_ZN4absl12lts_2024011620PrefetchToLocalCacheEPKv:
  146|  52.0M|    const void* addr) {
  147|  52.0M|  __builtin_prefetch(addr, 0, 3);
  148|  52.0M|}

_ZN6google8protobuf5Arena16DefaultConstructI11DBOperationEEPvPS1_:
  659|  1.56M|PROTOBUF_NOINLINE void* Arena::DefaultConstruct(Arena* arena) {
  660|  1.56M|  static_assert(is_destructor_skippable<T>::value, "");
  661|  1.56M|  void* mem = arena != nullptr ? arena->AllocateAligned(sizeof(T))
  ------------------
  |  Branch (661:15): [True: 0, False: 1.56M]
  ------------------
  662|  1.56M|                               : ::operator new(sizeof(T));
  663|  1.56M|  return new (mem) T(arena);
  664|  1.56M|}

_ZNK6google8protobuf8internal14ArenaStringPtr3GetEv:
  335|  6.10M|  PROTOBUF_NDEBUG_INLINE const std::string& Get() const {
  336|       |    // Unconditionally mask away the tag.
  337|  6.10M|    return *tagged_ptr_.Get();
  338|  6.10M|  }
_ZNK6google8protobuf8internal15TaggedStringPtr3GetEv:
  167|  6.11M|  inline std::string* Get() const {
  168|  6.11M|    return reinterpret_cast<std::string*>(as_int() & ~kMask);
  169|  6.11M|  }
_ZNK6google8protobuf8internal15TaggedStringPtr6as_intEv:
  203|  6.11M|  uintptr_t as_int() const { return reinterpret_cast<uintptr_t>(ptr_); }
_ZN6google8protobuf8internal15TaggedStringPtrC2EPNS1_21ExplicitlyConstructedINSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEELm8EEE:
  111|  3.13M|      : ptr_(ptr) {}
_ZN6google8protobuf8internal14ArenaStringPtrC2EPNS0_5ArenaE:
  242|  3.13M|      : tagged_ptr_(&fixed_address_empty_string) {
  243|  3.13M|    if (DebugHardenStringValues()) {
  ------------------
  |  Branch (243:9): [Folded - Ignored]
  ------------------
  244|      0|      Set(absl::string_view(""), arena);
  245|      0|    }
  246|  3.13M|  }
_ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv:
  524|  7.21k|inline void ArenaStringPtr::ClearNonDefaultToEmpty() {
  525|       |  // Unconditionally mask away the tag.
  526|  7.21k|  tagged_ptr_.Get()->clear();
  527|  7.21k|}

_ZN6google8protobuf8internal7HasBitsILi1EEixEi:
   41|  9.83k|  PROTOBUF_NDEBUG_INLINE uint32_t& operator[](int index) {
   42|  9.83k|    return has_bits_[index];
   43|  9.83k|  }
_ZN6google8protobuf8internal7HasBitsILi1EEC2Ev:
   31|  1.56M|  PROTOBUF_NDEBUG_INLINE constexpr HasBits() : has_bits_{} {}
_ZN6google8protobuf8internal7HasBitsILi1EE5ClearEv:
   37|  5.54k|  PROTOBUF_NDEBUG_INLINE void Clear() {
   38|  5.54k|    memset(has_bits_, 0, sizeof(has_bits_));
   39|  5.54k|  }

_ZN6google8protobuf8internal18InternalVisibilityC2Ev:
   36|  1.57M|inline constexpr InternalVisibility::InternalVisibility() = default;

_ZN6google8protobuf19DownCastToGeneratedI12DBOperationsEEPT_PNS0_7MessageE:
 1494|  4.51k|T* DownCastToGenerated(Message* from) {
 1495|  4.51k|  const Message* message_const = from;
 1496|  4.51k|  return const_cast<T*>(DownCastToGenerated<T>(message_const));
 1497|  4.51k|}
_ZN6google8protobuf19DownCastToGeneratedI12DBOperationsEEPKT_PKNS0_7MessageE:
 1484|  4.51k|const T* DownCastToGenerated(const Message* from) {
 1485|  4.51k|  internal::StrongReferenceToType<T>();
 1486|  9.03k|  ABSL_DCHECK(DynamicCastToGenerated<T>(from) == from)
  ------------------
  |  |   47|      0|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  4.51k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      0|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  4.51k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  4.51k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|  4.51k|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1487|  9.03k|      << "Cannot downcast " << from->GetTypeName() << " to "
 1488|  9.03k|      << T::default_instance().GetTypeName();
 1489|       |
 1490|  4.51k|  return static_cast<const T*>(from);
 1491|  4.51k|}
_ZN6google8protobuf7MessageC2EPNS0_5ArenaE:
  376|  1.57M|  inline explicit Message(Arena* arena) : MessageLite(arena) {}

_ZNK6google8protobuf11MessageLite8GetArenaEv:
  234|  4.29k|  Arena* GetArena() const { return _internal_metadata_.arena(); }
_ZN6google8protobuf8internal10CachedSizeC2Ei:
   88|  1.57M|  constexpr CachedSize(Scalar desired) noexcept : atom_(desired) {}
_ZN6google8protobuf11MessageLite19internal_visibilityEv:
  505|  1.57M|  static constexpr internal::InternalVisibility internal_visibility() {
  506|  1.57M|    return internal::InternalVisibility{};
  507|  1.57M|  }
_ZN6google8protobuf11MessageLiteC2EPNS0_5ArenaE:
  531|  1.57M|  inline explicit MessageLite(Arena* arena) : _internal_metadata_(arena) {}
_ZNK6google8protobuf11MessageLite9ClassData4fullEv:
  584|      2|    const ClassDataFull& full() const {
  585|      2|      ABSL_DCHECK(!is_lite);
  ------------------
  |  |   47|      2|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|      2|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|      4|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      2|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      4|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|      4|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  586|      2|      return *static_cast<const ClassDataFull*>(this);
  587|      2|    }
_ZNK6google8protobuf11MessageLite13ClassDataFull4baseEv:
  611|  26.0M|    constexpr const ClassData* base() const { return this; }
_ZN6google8protobuf11MessageLite16DefaultConstructI11DBOperationEEPT_PNS0_5ArenaE:
  510|  1.56M|  PROTOBUF_ALWAYS_INLINE static T* DefaultConstruct(Arena* arena) {
  511|  1.56M|    return static_cast<T*>(Arena::DefaultConstruct<T>(arena));
  512|  1.56M|  }
_ZN6google8protobuf11MessageLiteD2Ev:
  214|  1.57M|  virtual ~MessageLite() = default;

_ZNK6google8protobuf8internal16InternalMetadata5arenaEv:
   65|  4.29k|  PROTOBUF_NDEBUG_INLINE Arena* arena() const {
   66|  4.29k|    if (PROTOBUF_PREDICT_FALSE(have_unknown_fields())) {
  ------------------
  |  |  375|  4.29k|# define PROTOBUF_PREDICT_FALSE(x) (__builtin_expect(false || (x), false))
  |  |  ------------------
  |  |  |  Branch (375:36): [True: 0, False: 4.29k]
  |  |  |  Branch (375:54): [Folded - Ignored]
  |  |  |  Branch (375:63): [True: 0, False: 4.29k]
  |  |  ------------------
  ------------------
   67|      0|      return PtrValue<ContainerBase>()->arena;
   68|  4.29k|    } else {
   69|  4.29k|      return PtrValue<Arena>();
   70|  4.29k|    }
   71|  4.29k|  }
_ZNK6google8protobuf8internal16InternalMetadata19have_unknown_fieldsEv:
   73|  1.59M|  PROTOBUF_NDEBUG_INLINE bool have_unknown_fields() const {
   74|  1.59M|    return HasUnknownFieldsTag();
   75|  1.59M|  }
_ZNK6google8protobuf8internal16InternalMetadata19HasUnknownFieldsTagEv:
  141|  1.59M|  PROTOBUF_ALWAYS_INLINE bool HasUnknownFieldsTag() const {
  142|  1.59M|    return ptr_ & kUnknownFieldsTagMask;
  143|  1.59M|  }
_ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS0_5ArenaEEEPT_v:
  146|  4.29k|  U* PtrValue() const {
  147|  4.29k|    return reinterpret_cast<U*>(ptr_ & kPtrValueMask);
  148|  4.29k|  }
_ZN6google8protobuf8internal16InternalMetadataC2EPNS0_5ArenaE:
   46|  1.57M|  explicit InternalMetadata(Arena* arena) {
   47|  1.57M|    ptr_ = reinterpret_cast<intptr_t>(arena);
   48|  1.57M|  }
_ZN6google8protobuf8internal16InternalMetadata6DeleteINS0_15UnknownFieldSetEEEvv:
   58|  1.57M|  void Delete() {
   59|       |    // Note that Delete<> should be called not more than once.
   60|  1.57M|    if (have_unknown_fields()) {
  ------------------
  |  Branch (60:9): [True: 0, False: 1.57M]
  ------------------
   61|      0|      DeleteOutOfLineHelper<T>();
   62|      0|    }
   63|  1.57M|  }
_ZN6google8protobuf8internal16InternalMetadata5ClearINS0_15UnknownFieldSetEEEvv:
  126|  14.8k|  PROTOBUF_NDEBUG_INLINE void Clear() {
  127|  14.8k|    if (have_unknown_fields()) {
  ------------------
  |  Branch (127:9): [True: 0, False: 14.8k]
  ------------------
  128|      0|      DoClear<T>();
  129|      0|    }
  130|  14.8k|  }

_ZN6google8protobuf8internal8TSanReadEPKv:
  307|  9.24M|inline PROTOBUF_ALWAYS_INLINE void TSanRead(const void*) {}
_ZN6google8protobuf8internal9TSanWriteEPKv:
  308|  23.6k|inline PROTOBUF_ALWAYS_INLINE void TSanWrite(const void*) {}
_ZN6google8protobuf8internal21StrongReferenceToTypeI12DBOperationsEEvv:
   67|  4.51k|inline PROTOBUF_ALWAYS_INLINE void StrongReferenceToType() {
   68|  4.51k|  constexpr auto ptr = T::template GetStrongPointerForType<T>();
   69|  4.51k|#if defined(__cpp_nontype_template_args) && \
   70|  4.51k|    __cpp_nontype_template_args >= 201411L
   71|       |  // We can only use `ptr` as a template parameter since C++17
   72|  4.51k|  return StrongPointer<decltype(ptr), ptr>();
   73|       |#else
   74|       |  return StrongPointer(ptr);
   75|       |#endif
   76|  4.51k|}
_ZN6google8protobuf8internal13StrongPointerIKPKvXcvS4_adL_Z31_DBOperations_default_instance_EEEEvv:
   54|  4.51k|inline PROTOBUF_ALWAYS_INLINE void StrongPointer() {
   55|       |#if defined(__x86_64__) && defined(__linux__) && !defined(__APPLE__) &&     \
   56|       |    !defined(__ANDROID__) && defined(__clang__) && __clang_major__ >= 19 && \
   57|       |    !defined(PROTOBUF_INTERNAL_TEMPORARY_STRONG_POINTER_OPT_OUT)
   58|       |  // This injects a relocation in the code path without having to run code, but
   59|       |  // we can only do it with a newer clang.
   60|       |  asm(".reloc ., BFD_RELOC_NONE, %p0" ::"Ws"(ptr));
   61|       |#else
   62|  4.51k|  StrongPointer(ptr);
   63|  4.51k|#endif
   64|  4.51k|}
_ZN6google8protobuf8internal13StrongPointerIKvEEvPT_:
   43|  4.51k|inline PROTOBUF_ALWAYS_INLINE void StrongPointer(T* var) {
   44|  4.51k|#if defined(__GNUC__)
   45|  4.51k|  asm("" : : "r"(var));
   46|       |#else
   47|       |  auto volatile unused = var;
   48|       |  (void)&unused;  // Use address to avoid an extra load of "unused".
   49|       |#endif
   50|  4.51k|}
_ZN6google8protobuf8internal20PrefetchToLocalCacheEPKv:
  313|  52.0M|inline void PrefetchToLocalCache(const void* ptr) {
  314|  52.0M|  absl::PrefetchToLocalCache(ptr);
  315|  52.0M|}

_ZNK6google8protobuf16RepeatedPtrFieldI11DBOperationE5emptyEv:
 1299|  4.51k|inline bool RepeatedPtrField<Element>::empty() const {
 1300|  4.51k|  return RepeatedPtrFieldBase::empty();
 1301|  4.51k|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase5emptyEv:
  153|  4.51k|  bool empty() const { return current_size_ == 0; }
_ZNK6google8protobuf16RepeatedPtrFieldI11DBOperationE5beginEv:
 1800|  4.51k|RepeatedPtrField<Element>::begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1801|  4.51k|  return iterator(raw_data());
 1802|  4.51k|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase8raw_dataEv:
  338|  18.0k|  void* const* raw_data() const { return elements(); }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase8elementsEv:
  621|  18.0k|  void* const* elements() const {
  622|  18.0k|    return using_sso() ? &tagged_rep_or_elem_ : +rep()->elements;
  ------------------
  |  Branch (622:12): [True: 1.75k, False: 16.3k]
  ------------------
  623|  18.0k|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase9using_ssoEv:
  652|  18.1k|  bool using_sso() const {
  653|  18.1k|    return (reinterpret_cast<uintptr_t>(tagged_rep_or_elem_) & 1) == 0;
  654|  18.1k|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase3repEv:
  648|  16.3k|  const Rep* rep() const {
  649|  16.3k|    return const_cast<RepeatedPtrFieldBase*>(this)->rep();
  650|  16.3k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase3repEv:
  643|  16.3k|  Rep* rep() {
  644|  16.3k|    ABSL_DCHECK(!using_sso());
  ------------------
  |  |   47|  16.3k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  16.3k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  32.6k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  16.3k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  32.6k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  32.6k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  645|  16.3k|    return reinterpret_cast<Rep*>(
  646|  16.3k|        reinterpret_cast<uintptr_t>(tagged_rep_or_elem_) - 1);
  647|  16.3k|  }
_ZN6google8protobuf8internal19RepeatedPtrIteratorI11DBOperationEC2EPKPv:
 1581|  18.0k|  explicit RepeatedPtrIterator(void* const* it) : it_(it) {}
_ZN6google8protobuf8internal19RepeatedPtrIteratorIK11DBOperationEC2IS3_LPv0EEERKNS2_IT_EE:
 1589|  9.02k|      : it_(other.it_) {}
_ZNK6google8protobuf16RepeatedPtrFieldI11DBOperationE3endEv:
 1815|  4.51k|RepeatedPtrField<Element>::end() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1816|  4.51k|  return iterator(raw_data() + size());
 1817|  4.51k|}
_ZNK6google8protobuf16RepeatedPtrFieldI11DBOperationE4sizeEv:
 1304|  9.03k|inline int RepeatedPtrField<Element>::size() const {
 1305|  9.03k|  return RepeatedPtrFieldBase::size();
 1306|  9.03k|}
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase4sizeEv:
  154|  9.03k|  int size() const { return current_size_; }
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIK11DBOperationEES7_:
 1611|  1.56M|  friend bool operator!=(const iterator& x, const iterator& y) {
 1612|  1.56M|    return x.it_ != y.it_;
 1613|  1.56M|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorIK11DBOperationEdeEv:
 1592|  1.56M|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf8internal19RepeatedPtrIteratorIK11DBOperationEppEv:
 1596|  1.56M|  iterator& operator++() {
 1597|  1.56M|    ++it_;
 1598|  1.56M|    return *this;
 1599|  1.56M|  }
_ZN6google8protobuf16RepeatedPtrFieldI11DBOperationE5beginEv:
 1795|  4.51k|RepeatedPtrField<Element>::begin() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1796|  4.51k|  return iterator(raw_data());
 1797|  4.51k|}
_ZN6google8protobuf16RepeatedPtrFieldI11DBOperationE3endEv:
 1810|  4.51k|RepeatedPtrField<Element>::end() ABSL_ATTRIBUTE_LIFETIME_BOUND {
 1811|  4.51k|  return iterator(raw_data() + size());
 1812|  4.51k|}
_ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorI11DBOperationEES6_:
 1611|  1.56M|  friend bool operator!=(const iterator& x, const iterator& y) {
 1612|  1.56M|    return x.it_ != y.it_;
 1613|  1.56M|  }
_ZNK6google8protobuf8internal19RepeatedPtrIteratorI11DBOperationEdeEv:
 1592|  1.56M|  reference operator*() const { return *reinterpret_cast<Element*>(*it_); }
_ZN6google8protobuf8internal19RepeatedPtrIteratorI11DBOperationEppEv:
 1596|  1.56M|  iterator& operator++() {
 1597|  1.56M|    ++it_;
 1598|  1.56M|    return *this;
 1599|  1.56M|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBaseC2EPNS0_5ArenaE:
  140|  4.61k|        arena_(arena) {}
_ZN6google8protobuf8internal20RepeatedPtrFieldBaseD2Ev:
  145|  4.61k|  ~RepeatedPtrFieldBase() {
  146|       |#ifndef NDEBUG
  147|       |    // Try to trigger segfault / asan failure in non-opt builds. If arena_
  148|       |    // lifetime has ended before the destructor.
  149|       |    if (arena_) (void)arena_->SpaceAllocated();
  150|       |#endif
  151|  4.61k|  }
_ZNK6google8protobuf8internal20RepeatedPtrFieldBase12NeedsDestroyEv:
  230|  4.61k|  inline bool NeedsDestroy() const {
  231|       |    // Either there is an allocated element in SSO buffer or there is an
  232|       |    // allocated Rep.
  233|  4.61k|    return tagged_rep_or_elem_ != nullptr;
  234|  4.61k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase19ExchangeCurrentSizeEi:
  598|     46|  inline int ExchangeCurrentSize(int new_size) {
  599|     46|    return std::exchange(current_size_, new_size);
  600|     46|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase8elementsEv:
  624|     46|  void** elements() {
  625|     46|    return using_sso() ? &tagged_rep_or_elem_ : +rep()->elements;
  ------------------
  |  Branch (625:12): [True: 6, False: 40]
  ------------------
  626|     46|  }
_ZN6google8protobuf16RepeatedPtrFieldI11DBOperationE5ClearEv:
 1433|  9.31k|inline void RepeatedPtrField<Element>::Clear() {
 1434|  9.31k|  RepeatedPtrFieldBase::Clear<TypeHandler>();
 1435|  9.31k|}
_ZN6google8protobuf8internal20RepeatedPtrFieldBase5ClearINS1_18GenericTypeHandlerI11DBOperationEEEEvv:
  256|  9.31k|  void Clear() {
  257|  9.31k|    const int n = current_size_;
  258|  9.31k|    ABSL_DCHECK_GE(n, 0);
  ------------------
  |  |   82|  9.31k|  ABSL_LOG_INTERNAL_DCHECK_GE_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   94|  9.31k|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|  9.31k|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded - Ignored]
  |  |  |  |  |  |  |  Branch (56:19): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  9.31k|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|  9.31k|    if (n > 0) {
  ------------------
  |  Branch (259:9): [True: 46, False: 9.27k]
  ------------------
  260|     46|      using H = CommonHandler<TypeHandler>;
  261|     46|      ClearNonEmpty<H>();
  262|     46|    }
  263|  9.31k|  }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase13ClearNonEmptyINS1_18GenericTypeHandlerINS0_11MessageLiteEEEEEvv:
  672|     46|  PROTOBUF_NOINLINE void ClearNonEmpty() {
  673|     46|    const int n = current_size_;
  674|     46|    void* const* elems = elements();
  675|     46|    int i = 0;
  676|     46|    ABSL_DCHECK_GT(n, 0);
  ------------------
  |  |   84|     46|  ABSL_LOG_INTERNAL_DCHECK_GT_IMPL((val1), #val1, (val2), #val2)
  |  |  ------------------
  |  |  |  |   96|     46|  ABSL_LOG_INTERNAL_DCHECK_NOP(val1, val2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     46|  while (false && ((void)(x), (void)(y), 0)) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (56:10): [Folded - Ignored]
  |  |  |  |  |  |  |  Branch (56:19): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     46|  ::absl::log_internal::NullStream().InternalStream()
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  677|       |    // do/while loop to avoid initial test because we know n > 0
  678|  5.54k|    do {
  679|  5.54k|      TypeHandler::Clear(cast<TypeHandler>(elems[i++]));
  680|  5.54k|    } while (i < n);
  ------------------
  |  Branch (680:14): [True: 5.49k, False: 46]
  ------------------
  681|     46|    ExchangeCurrentSize(0);
  682|     46|  }
_ZN6google8protobuf8internal18GenericTypeHandlerINS0_11MessageLiteEE5ClearEPS3_:
  811|  5.54k|  static inline void Clear(GenericType* value) { value->Clear(); }
_ZN6google8protobuf8internal20RepeatedPtrFieldBase4castINS1_18GenericTypeHandlerINS0_11MessageLiteEEEEEPNT_4TypeEPv:
  657|  5.54k|  static inline Value<TypeHandler>* cast(void* element) {
  658|  5.54k|    return reinterpret_cast<Value<TypeHandler>*>(element);
  659|  5.54k|  }
_ZN6google8protobuf16RepeatedPtrFieldI11DBOperationE19StaticValidityCheckEv:
  901|  4.61k|  static constexpr PROTOBUF_ALWAYS_INLINE void StaticValidityCheck() {
  902|  4.61k|    static_assert(
  903|  4.61k|        absl::disjunction<
  904|  4.61k|            internal::is_supported_string_type<Element>,
  905|  4.61k|            internal::is_supported_message_type<Element>>::value,
  906|  4.61k|        "We only support string and Message types in RepeatedPtrField.");
  907|  4.61k|  }
_ZN6google8protobuf16RepeatedPtrFieldI11DBOperationEC2ENS0_8internal18InternalVisibilityEPNS0_5ArenaE:
  933|  4.61k|      : RepeatedPtrField(arena) {}
_ZN6google8protobuf16RepeatedPtrFieldI11DBOperationEC2EPNS0_5ArenaE:
 1219|  4.61k|    : RepeatedPtrFieldBase(arena) {
 1220|       |  // We can't have StaticValidityCheck here because that requires Element to be
 1221|       |  // a complete type, and in split repeated fields cases, we call
 1222|       |  // CreateMessage<RepeatedPtrField<T>> for incomplete Ts.
 1223|  4.61k|}
_ZN6google8protobuf16RepeatedPtrFieldI11DBOperationED2Ev:
 1241|  4.61k|RepeatedPtrField<Element>::~RepeatedPtrField() {
 1242|  4.61k|  StaticValidityCheck();
 1243|  4.61k|  if (!NeedsDestroy()) return;
  ------------------
  |  Branch (1243:7): [True: 51, False: 4.56k]
  ------------------
 1244|  4.56k|#ifdef __cpp_if_constexpr
 1245|  4.56k|  if constexpr (std::is_base_of<MessageLite, Element>::value) {
  ------------------
  |  Branch (1245:17): [Folded - Ignored]
  ------------------
 1246|       |#else
 1247|       |  if (std::is_base_of<MessageLite, Element>::value) {
 1248|       |#endif
 1249|  4.56k|    DestroyProtos();
 1250|  4.56k|  } else {
 1251|  4.56k|    Destroy<TypeHandler>();
 1252|  4.56k|  }
 1253|  4.56k|}

_ZN7rocksdb24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEE9GetSharedEPNS_5CacheEPNS_11SystemClockEPNSt3__110shared_ptrIS3_EE:
  115|  9.02k|                          std::shared_ptr<CacheEntryStatsCollector> *ptr) {
  116|  9.02k|    assert(raw_cache);
  117|  9.02k|    BasicTypedCacheInterface<CacheEntryStatsCollector, CacheEntryRole::kMisc>
  118|  9.02k|        cache{raw_cache};
  119|       |
  120|  9.02k|    const Slice &cache_key = GetCacheKey();
  121|  9.02k|    auto h = cache.Lookup(cache_key);
  122|  9.02k|    if (h == nullptr) {
  ------------------
  |  Branch (122:9): [True: 4.51k, False: 4.51k]
  ------------------
  123|       |      // Not yet in cache, but Cache doesn't provide a built-in way to
  124|       |      // avoid racing insert. So we double-check under a shared mutex,
  125|       |      // inspired by TableCache.
  126|  4.51k|      STATIC_AVOID_DESTRUCTION(std::mutex, static_mutex);
  ------------------
  |  |   53|  4.51k|#define STATIC_AVOID_DESTRUCTION(Type, name) static Type& name = *new Type
  ------------------
  127|  4.51k|      std::lock_guard<std::mutex> lock(static_mutex);
  128|       |
  129|  4.51k|      h = cache.Lookup(cache_key);
  130|  4.51k|      if (h == nullptr) {
  ------------------
  |  Branch (130:11): [True: 4.51k, False: 0]
  ------------------
  131|  4.51k|        auto new_ptr = new CacheEntryStatsCollector(cache.get(), clock);
  132|       |        // TODO: non-zero charge causes some tests that count block cache
  133|       |        // usage to go flaky. Fix the problem somehow so we can use an
  134|       |        // accurate charge.
  135|  4.51k|        size_t charge = 0;
  136|  4.51k|        Status s =
  137|  4.51k|            cache.Insert(cache_key, new_ptr, charge, &h, Cache::Priority::HIGH);
  138|  4.51k|        if (!s.ok()) {
  ------------------
  |  Branch (138:13): [True: 0, False: 4.51k]
  ------------------
  139|      0|          assert(h == nullptr);
  140|      0|          delete new_ptr;
  141|      0|          return s;
  142|      0|        }
  143|  4.51k|      }
  144|  4.51k|    }
  145|       |    // If we reach here, shared entry is in cache with handle `h`.
  146|  9.02k|    assert(cache.get()->GetCacheItemHelper(h) == cache.GetBasicHelper());
  147|       |
  148|       |    // Build an aliasing shared_ptr that keeps `ptr` in cache while there
  149|       |    // are references.
  150|  9.02k|    *ptr = cache.SharedGuard(h);
  151|  9.02k|    return Status::OK();
  152|  9.02k|  }
_ZN7rocksdb24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEE11GetCacheKeyEv:
  163|  9.02k|  static const Slice &GetCacheKey() {
  164|       |    // For each template instantiation
  165|  9.02k|    static CacheKey ckey = CacheKey::CreateUniqueForProcessLifetime();
  166|  9.02k|    static Slice ckey_slice = ckey.AsSlice();
  167|  9.02k|    return ckey_slice;
  168|  9.02k|  }
_ZN7rocksdb24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEC2EPNS_5CacheEPNS_11SystemClockE:
  161|  4.51k|        clock_(clock) {}
_ZN7rocksdb24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEE8GetStatsEPS2_:
  104|     46|  void GetStats(Stats *stats) {
  105|     46|    std::lock_guard<std::mutex> lock(saved_mutex_);
  106|     46|    *stats = saved_stats_;
  107|     46|  }
_ZN7rocksdb24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEE12CollectStatsEii:
   67|     46|  void CollectStats(int min_interval_seconds, int min_interval_factor) {
   68|       |    // Waits for any pending reader or writer (collector)
   69|     46|    std::lock_guard<std::mutex> lock(working_mutex_);
   70|       |
   71|     46|    uint64_t max_age_micros =
   72|     46|        static_cast<uint64_t>(std::max(min_interval_seconds, 0)) * 1000000U;
   73|       |
   74|     46|    if (last_end_time_micros_ > last_start_time_micros_ &&
  ------------------
  |  Branch (74:9): [True: 46, False: 0]
  ------------------
   75|     46|        min_interval_factor > 0) {
  ------------------
  |  Branch (75:9): [True: 46, False: 0]
  ------------------
   76|     46|      max_age_micros = std::max(
   77|     46|          max_age_micros, min_interval_factor * (last_end_time_micros_ -
   78|     46|                                                 last_start_time_micros_));
   79|     46|    }
   80|       |
   81|     46|    uint64_t start_time_micros = clock_->NowMicros();
   82|     46|    if ((start_time_micros - last_end_time_micros_) > max_age_micros) {
  ------------------
  |  Branch (82:9): [True: 46, False: 0]
  ------------------
   83|     46|      last_start_time_micros_ = start_time_micros;
   84|     46|      working_stats_.BeginCollection(cache_, clock_, start_time_micros);
   85|       |
   86|     46|      cache_->ApplyToAllEntries(working_stats_.GetEntryCallback(), {});
   87|     46|      TEST_SYNC_POINT_CALLBACK(
   88|     46|          "CacheEntryStatsCollector::GetStats:AfterApplyToAllEntries", nullptr);
   89|       |
   90|     46|      uint64_t end_time_micros = clock_->NowMicros();
   91|     46|      last_end_time_micros_ = end_time_micros;
   92|     46|      working_stats_.EndCollection(cache_, clock_, end_time_micros);
   93|     46|    } else {
   94|      0|      working_stats_.SkippedCollection();
   95|      0|    }
   96|       |
   97|       |    // Save so that we don't need to wait for an outstanding collection in
   98|       |    // order to make of copy of the last saved stats
   99|     46|    std::lock_guard<std::mutex> lock2(saved_mutex_);
  100|     46|    saved_stats_ = working_stats_;
  101|     46|  }

_ZN7rocksdb25ReleaseCacheHandleCleanupEPvS0_:
   10|  4.48k|void ReleaseCacheHandleCleanup(void* arg1, void* arg2) {
   11|  4.48k|  Cache* const cache = static_cast<Cache*>(arg1);
   12|  4.48k|  assert(cache);
   13|       |
   14|  4.48k|  Cache::Handle* const cache_handle = static_cast<Cache::Handle*>(arg2);
   15|  4.48k|  assert(cache_handle);
   16|       |
   17|  4.48k|  cache->Release(cache_handle);
   18|  4.48k|}

_ZN7rocksdb26MakeSharedCacheHandleGuardINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEEEENSt3__110shared_ptrIT_EEPNS_5CacheEPNS9_6HandleE:
  125|  9.02k|                                              Cache::Handle* handle) {
  126|  9.02k|  auto wrapper = std::make_shared<CacheHandleGuard<T>>(cache, handle);
  127|  9.02k|  return std::shared_ptr<T>(wrapper, GetFromCacheHandle<T>(cache, handle));
  128|  9.02k|}
_ZN7rocksdb16CacheHandleGuardINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEEEC2EPNS_5CacheEPNS6_6HandleE:
   42|  9.02k|        value_(GetFromCacheHandle<T>(cache, handle)) {
   43|  9.02k|    assert(cache_ && handle_ && value_);
   44|  9.02k|  }
_ZN7rocksdb16CacheHandleGuardINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEEED2Ev:
   74|  9.02k|  ~CacheHandleGuard() { ReleaseHandle(); }
_ZN7rocksdb16CacheHandleGuardINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEEE13ReleaseHandleEv:
   98|  9.02k|  void ReleaseHandle() {
   99|  9.02k|    if (IsEmpty()) {
  ------------------
  |  Branch (99:9): [True: 0, False: 9.02k]
  ------------------
  100|      0|      return;
  101|      0|    }
  102|       |
  103|  9.02k|    assert(cache_);
  104|  9.02k|    cache_->Release(handle_);
  105|  9.02k|  }
_ZNK7rocksdb16CacheHandleGuardINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEEE7IsEmptyEv:
   76|  9.02k|  bool IsEmpty() const { return !handle_; }
_ZN7rocksdb18GetFromCacheHandleINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEEEEPT_PNS_5CacheEPNS7_6HandleE:
   17|  18.0k|T* GetFromCacheHandle(Cache* cache, Cache::Handle* handle) {
   18|  18.0k|  assert(cache);
   19|  18.0k|  assert(handle);
   20|  18.0k|  return static_cast<T*>(cache->Value(handle));
   21|  18.0k|}

_ZN7rocksdb8CacheKey30CreateUniqueForProcessLifetimeEv:
   35|      1|CacheKey CacheKey::CreateUniqueForProcessLifetime() {
   36|       |  // To avoid colliding with CreateUniqueForCacheLifetime, assuming
   37|       |  // Cache::NewId counts up from zero, here we count down from UINT64_MAX.
   38|       |  // If this ever becomes a point of contention, we could sub-divide the
   39|       |  // space and use CoreLocalArray.
   40|      1|  static std::atomic<uint64_t> counter{UINT64_MAX};
   41|      1|  uint64_t id = counter.fetch_sub(1, std::memory_order_relaxed);
   42|       |  // Ensure we don't collide with CreateUniqueForCacheLifetime
   43|      1|  assert((id >> 63) == 1U);
   44|      1|  return CacheKey(0, id);
   45|      1|}
_ZN7rocksdb18OffsetableCacheKeyC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_m:
  302|  8.96k|                                       uint64_t file_number) {
  303|  8.96k|  UniqueId64x2 internal_id;
  304|  8.96k|  Status s = GetSstInternalUniqueId(db_id, db_session_id, file_number,
  305|  8.96k|                                    &internal_id, /*force=*/true);
  306|  8.96k|  assert(s.ok());
  307|  8.96k|  *this = FromInternalUniqueId(&internal_id);
  308|  8.96k|}
_ZN7rocksdb18OffsetableCacheKey20FromInternalUniqueIdENS_11UniqueIdPtrE:
  310|  8.96k|OffsetableCacheKey OffsetableCacheKey::FromInternalUniqueId(UniqueIdPtr id) {
  311|  8.96k|  uint64_t session_lower = id.ptr[0];
  312|  8.96k|  uint64_t file_num_etc = id.ptr[1];
  313|       |
  314|       |#ifndef NDEBUG
  315|       |  bool is_empty = session_lower == 0 && file_num_etc == 0;
  316|       |#endif
  317|       |
  318|       |  // Although DBImpl guarantees (in recent versions) that session_lower is not
  319|       |  // zero, that's not entirely sufficient to guarantee that file_num_etc64_ is
  320|       |  // not zero (so that the 0 case can be used by CacheKey::CreateUnique*)
  321|       |  // However, if we are given an "empty" id as input, then we should produce
  322|       |  // "empty" as output.
  323|       |  // As a consequence, this function is only bijective assuming
  324|       |  // id[0] == 0 only if id[1] == 0.
  325|  8.96k|  if (session_lower == 0U) {
  ------------------
  |  Branch (325:7): [True: 0, False: 8.96k]
  ------------------
  326|      0|    session_lower = file_num_etc;
  327|      0|  }
  328|       |
  329|       |  // See comments above for how DownwardInvolution and ReverseBits
  330|       |  // make this function invertible under various assumptions.
  331|  8.96k|  OffsetableCacheKey rv;
  332|  8.96k|  rv.file_num_etc64_ =
  333|  8.96k|      DownwardInvolution(session_lower) ^ ReverseBits(file_num_etc);
  334|  8.96k|  rv.offset_etc64_ = ReverseBits(session_lower);
  335|       |
  336|       |  // Because of these transformations and needing to allow arbitrary
  337|       |  // offset (thus, second 64 bits of cache key might be 0), we need to
  338|       |  // make some correction to ensure the first 64 bits is not 0.
  339|       |  // Fortunately, the transformation ensures the second 64 bits is not 0
  340|       |  // for non-empty base key, so we can swap in the case one is 0 without
  341|       |  // breaking bijectivity (assuming condition above).
  342|  8.96k|  assert(is_empty || rv.offset_etc64_ > 0);
  343|  8.96k|  if (rv.file_num_etc64_ == 0) {
  ------------------
  |  Branch (343:7): [True: 0, False: 8.96k]
  ------------------
  344|      0|    std::swap(rv.file_num_etc64_, rv.offset_etc64_);
  345|      0|  }
  346|  8.96k|  assert(is_empty || rv.file_num_etc64_ > 0);
  347|  8.96k|  return rv;
  348|  8.96k|}

_ZN7rocksdb8CacheKeyC2Ev:
   37|  52.1k|  inline CacheKey() : file_num_etc64_(), offset_etc64_() {}
_ZNK7rocksdb8CacheKey7AsSliceEv:
   44|  11.7k|  inline Slice AsSlice() const {
   45|  11.7k|    static_assert(sizeof(*this) == 16, "Standardized on 16-byte cache key");
   46|  11.7k|    assert(!IsEmpty());
   47|  11.7k|    return Slice(reinterpret_cast<const char *>(this), sizeof(*this));
   48|  11.7k|  }
_ZN7rocksdb8CacheKeyC2Emm:
   64|  11.7k|      : file_num_etc64_(file_num_etc64), offset_etc64_(offset_etc64) {}
_ZN7rocksdb18OffsetableCacheKeyC2Ev:
   86|  26.9k|  inline OffsetableCacheKey() : CacheKey() {}
_ZNK7rocksdb18OffsetableCacheKey10WithOffsetEm:
  125|  11.7k|  inline CacheKey WithOffset(uint64_t offset) const {
  126|  11.7k|    assert(!IsEmpty());
  127|  11.7k|    return CacheKey(file_num_etc64_, offset_etc64_ ^ offset);
  128|  11.7k|  }

_ZN7rocksdb27CacheReservationManagerImplILNS_14CacheEntryRoleE7EEC2ENSt3__110shared_ptrINS_5CacheEEEb:
   46|  4.48k|      memory_used_(0) {
   47|  4.48k|  assert(cache != nullptr);
   48|  4.48k|}
_ZN7rocksdb27CacheReservationManagerImplILNS_14CacheEntryRoleE7EED2Ev:
   51|  4.48k|CacheReservationManagerImpl<R>::~CacheReservationManagerImpl() {
   52|  4.48k|  for (auto* handle : dummy_handles_) {
  ------------------
  |  Branch (52:21): [True: 0, False: 4.48k]
  ------------------
   53|      0|    cache_.ReleaseAndEraseIfLastRef(handle);
   54|      0|  }
   55|  4.48k|}

_ZN7rocksdb23CacheReservationManagerD2Ev:
   37|  4.48k|  virtual ~CacheReservationManager() {}

_ZN7rocksdb9lru_cache14LRUHandleTableC2EiPNS_15MemoryAllocatorE:
   32|  6.64M|      allocator_(allocator) {}
_ZN7rocksdb9lru_cache14LRUHandleTableD2Ev:
   34|  6.64M|LRUHandleTable::~LRUHandleTable() {
   35|  6.64M|  auto alloc = allocator_;
   36|  6.64M|  ApplyToEntriesRange(
   37|  6.64M|      [alloc](LRUHandle* h) {
   38|  6.64M|        if (!h->HasRefs()) {
   39|  6.64M|          h->Free(alloc);
   40|  6.64M|        }
   41|  6.64M|      },
   42|  6.64M|      0, size_t{1} << length_bits_);
   43|  6.64M|}
_ZN7rocksdb9lru_cache14LRUHandleTable6LookupERKNS_5SliceEj:
   45|  38.7k|LRUHandle* LRUHandleTable::Lookup(const Slice& key, uint32_t hash) {
   46|  38.7k|  return *FindPointer(key, hash);
   47|  38.7k|}
_ZN7rocksdb9lru_cache14LRUHandleTable6InsertEPNS0_9LRUHandleE:
   49|  20.7k|LRUHandle* LRUHandleTable::Insert(LRUHandle* h) {
   50|  20.7k|  LRUHandle** ptr = FindPointer(h->key(), h->hash);
   51|  20.7k|  LRUHandle* old = *ptr;
   52|  20.7k|  h->next_hash = (old == nullptr ? nullptr : old->next_hash);
  ------------------
  |  Branch (52:19): [True: 20.7k, False: 0]
  ------------------
   53|  20.7k|  *ptr = h;
   54|  20.7k|  if (old == nullptr) {
  ------------------
  |  Branch (54:7): [True: 20.7k, False: 0]
  ------------------
   55|  20.7k|    ++elems_;
   56|  20.7k|    if ((elems_ >> length_bits_) > 0) {  // elems_ >= length
  ------------------
  |  Branch (56:9): [True: 0, False: 20.7k]
  ------------------
   57|       |      // Since each cache entry is fairly large, we aim for a small
   58|       |      // average linked list length (<= 1).
   59|      0|      Resize();
   60|      0|    }
   61|  20.7k|  }
   62|  20.7k|  return old;
   63|  20.7k|}
_ZN7rocksdb9lru_cache14LRUHandleTable6RemoveERKNS_5SliceEj:
   65|  4.59k|LRUHandle* LRUHandleTable::Remove(const Slice& key, uint32_t hash) {
   66|  4.59k|  LRUHandle** ptr = FindPointer(key, hash);
   67|  4.59k|  LRUHandle* result = *ptr;
   68|  4.59k|  if (result != nullptr) {
  ------------------
  |  Branch (68:7): [True: 4.59k, False: 0]
  ------------------
   69|  4.59k|    *ptr = result->next_hash;
   70|  4.59k|    --elems_;
   71|  4.59k|  }
   72|  4.59k|  return result;
   73|  4.59k|}
_ZN7rocksdb9lru_cache14LRUHandleTable11FindPointerERKNS_5SliceEj:
   75|  64.1k|LRUHandle** LRUHandleTable::FindPointer(const Slice& key, uint32_t hash) {
   76|  64.1k|  LRUHandle** ptr = &list_[hash >> (32 - length_bits_)];
   77|  64.2k|  while (*ptr != nullptr && ((*ptr)->hash != hash || key != (*ptr)->key())) {
  ------------------
  |  Branch (77:10): [True: 13.7k, False: 50.5k]
  |  Branch (77:10): [True: 172, False: 64.1k]
  |  Branch (77:30): [True: 172, False: 13.5k]
  |  Branch (77:54): [True: 0, False: 13.5k]
  ------------------
   78|    172|    ptr = &(*ptr)->next_hash;
   79|    172|  }
   80|  64.1k|  return ptr;
   81|  64.1k|}
_ZN7rocksdb9lru_cache13LRUCacheShardC2EmbddbNS_25CacheMetadataChargePolicyEiPNS_15MemoryAllocatorEPKNSt3__18functionIFbRKNS_5SliceEPNS_5Cache6HandleEbEEE:
  137|  6.64M|      eviction_callback_(*eviction_callback) {
  138|       |  // Make empty circular linked list.
  139|  6.64M|  lru_.next = &lru_;
  140|  6.64M|  lru_.prev = &lru_;
  141|  6.64M|  lru_low_pri_ = &lru_;
  142|  6.64M|  lru_bottom_pri_ = &lru_;
  143|  6.64M|  SetCapacity(capacity);
  144|  6.64M|}
_ZN7rocksdb9lru_cache13LRUCacheShard17EraseUnRefEntriesEv:
  146|   577k|void LRUCacheShard::EraseUnRefEntries() {
  147|   577k|  autovector<LRUHandle*> last_reference_list;
  148|   577k|  {
  149|   577k|    DMutexLock l(mutex_);
  150|   577k|    while (lru_.next != &lru_) {
  ------------------
  |  Branch (150:12): [True: 0, False: 577k]
  ------------------
  151|      0|      LRUHandle* old = lru_.next;
  152|       |      // LRU list contains only elements which can be evicted.
  153|      0|      assert(old->InCache() && !old->HasRefs());
  154|      0|      LRU_Remove(old);
  155|      0|      table_.Remove(old->key(), old->hash);
  156|      0|      old->SetInCache(false);
  157|      0|      assert(usage_ >= old->total_charge);
  158|      0|      usage_ -= old->total_charge;
  159|      0|      last_reference_list.push_back(old);
  160|      0|    }
  161|   577k|  }
  162|       |
  163|   577k|  for (auto entry : last_reference_list) {
  ------------------
  |  Branch (163:19): [True: 0, False: 577k]
  ------------------
  164|      0|    entry->Free(table_.GetAllocator());
  165|      0|  }
  166|   577k|}
_ZN7rocksdb9lru_cache13LRUCacheShard18ApplyToSomeEntriesERKNSt3__18functionIFvRKNS_5SliceEPvmPKNS_5Cache15CacheItemHelperEEEEmPm:
  172|  47.1k|    size_t average_entries_per_lock, size_t* state) {
  173|       |  // The state is essentially going to be the starting hash, which works
  174|       |  // nicely even if we resize between calls because we use upper-most
  175|       |  // hash bits for table indexes.
  176|  47.1k|  DMutexLock l(mutex_);
  177|  47.1k|  int length_bits = table_.GetLengthBits();
  178|  47.1k|  size_t length = size_t{1} << length_bits;
  179|       |
  180|  47.1k|  assert(average_entries_per_lock > 0);
  181|       |  // Assuming we are called with same average_entries_per_lock repeatedly,
  182|       |  // this simplifies some logic (index_end will not overflow).
  183|  47.1k|  assert(average_entries_per_lock < length || *state == 0);
  184|       |
  185|  47.1k|  size_t index_begin = *state >> (sizeof(size_t) * 8u - length_bits);
  186|  47.1k|  size_t index_end = index_begin + average_entries_per_lock;
  187|  47.1k|  if (index_end >= length) {
  ------------------
  |  Branch (187:7): [True: 2.94k, False: 44.1k]
  ------------------
  188|       |    // Going to end
  189|  2.94k|    index_end = length;
  190|  2.94k|    *state = SIZE_MAX;
  191|  44.1k|  } else {
  192|  44.1k|    *state = index_end << (sizeof(size_t) * 8u - length_bits);
  193|  44.1k|  }
  194|       |
  195|  47.1k|  table_.ApplyToEntriesRange(
  196|  47.1k|      [callback,
  197|  47.1k|       metadata_charge_policy = metadata_charge_policy_](LRUHandle* h) {
  198|  47.1k|        callback(h->key(), h->value, h->GetCharge(metadata_charge_policy),
  199|  47.1k|                 h->helper);
  200|  47.1k|      },
  201|  47.1k|      index_begin, index_end);
  202|  47.1k|}
_ZN7rocksdb9lru_cache13LRUCacheShard10LRU_RemoveEPNS0_9LRUHandleE:
  233|  9.00k|void LRUCacheShard::LRU_Remove(LRUHandle* e) {
  234|  9.00k|  assert(e->next != nullptr);
  235|  9.00k|  assert(e->prev != nullptr);
  236|  9.00k|  if (lru_low_pri_ == e) {
  ------------------
  |  Branch (236:7): [True: 4.48k, False: 4.51k]
  ------------------
  237|  4.48k|    lru_low_pri_ = e->prev;
  238|  4.48k|  }
  239|  9.00k|  if (lru_bottom_pri_ == e) {
  ------------------
  |  Branch (239:7): [True: 4.48k, False: 4.51k]
  ------------------
  240|  4.48k|    lru_bottom_pri_ = e->prev;
  241|  4.48k|  }
  242|  9.00k|  e->next->prev = e->prev;
  243|  9.00k|  e->prev->next = e->next;
  244|  9.00k|  e->prev = e->next = nullptr;
  245|  9.00k|  assert(lru_usage_ >= e->total_charge);
  246|  9.00k|  lru_usage_ -= e->total_charge;
  247|  9.00k|  assert(!e->InHighPriPool() || !e->InLowPriPool());
  248|  9.00k|  if (e->InHighPriPool()) {
  ------------------
  |  Branch (248:7): [True: 4.51k, False: 4.48k]
  ------------------
  249|  4.51k|    assert(high_pri_pool_usage_ >= e->total_charge);
  250|  4.51k|    high_pri_pool_usage_ -= e->total_charge;
  251|  4.51k|  } else if (e->InLowPriPool()) {
  ------------------
  |  Branch (251:14): [True: 0, False: 4.48k]
  ------------------
  252|      0|    assert(low_pri_pool_usage_ >= e->total_charge);
  253|      0|    low_pri_pool_usage_ -= e->total_charge;
  254|      0|  }
  255|  9.00k|}
_ZN7rocksdb9lru_cache13LRUCacheShard10LRU_InsertEPNS0_9LRUHandleE:
  257|  25.1k|void LRUCacheShard::LRU_Insert(LRUHandle* e) {
  258|  25.1k|  assert(e->next == nullptr);
  259|  25.1k|  assert(e->prev == nullptr);
  260|  25.1k|  if (high_pri_pool_ratio_ > 0 && (e->IsHighPri() || e->HasHit())) {
  ------------------
  |  Branch (260:7): [True: 25.1k, False: 0]
  |  Branch (260:36): [True: 9.02k, False: 16.1k]
  |  Branch (260:54): [True: 0, False: 16.1k]
  ------------------
  261|       |    // Inset "e" to head of LRU list.
  262|  9.02k|    e->next = &lru_;
  263|  9.02k|    e->prev = lru_.prev;
  264|  9.02k|    e->prev->next = e;
  265|  9.02k|    e->next->prev = e;
  266|  9.02k|    e->SetInHighPriPool(true);
  267|  9.02k|    e->SetInLowPriPool(false);
  268|  9.02k|    high_pri_pool_usage_ += e->total_charge;
  269|  9.02k|    MaintainPoolSize();
  270|  16.1k|  } else if (low_pri_pool_ratio_ > 0 &&
  ------------------
  |  Branch (270:14): [True: 0, False: 16.1k]
  ------------------
  271|  16.1k|             (e->IsHighPri() || e->IsLowPri() || e->HasHit())) {
  ------------------
  |  Branch (271:15): [True: 0, False: 0]
  |  Branch (271:33): [True: 0, False: 0]
  |  Branch (271:50): [True: 0, False: 0]
  ------------------
  272|       |    // Insert "e" to the head of low-pri pool.
  273|      0|    e->next = lru_low_pri_->next;
  274|      0|    e->prev = lru_low_pri_;
  275|      0|    e->prev->next = e;
  276|      0|    e->next->prev = e;
  277|      0|    e->SetInHighPriPool(false);
  278|      0|    e->SetInLowPriPool(true);
  279|      0|    low_pri_pool_usage_ += e->total_charge;
  280|      0|    lru_low_pri_ = e;
  281|      0|    MaintainPoolSize();
  282|  16.1k|  } else {
  283|       |    // Insert "e" to the head of bottom-pri pool.
  284|  16.1k|    e->next = lru_bottom_pri_->next;
  285|  16.1k|    e->prev = lru_bottom_pri_;
  286|  16.1k|    e->prev->next = e;
  287|  16.1k|    e->next->prev = e;
  288|  16.1k|    e->SetInHighPriPool(false);
  289|  16.1k|    e->SetInLowPriPool(false);
  290|       |    // if the low-pri pool is empty, lru_low_pri_ also needs to be updated.
  291|  16.1k|    if (lru_bottom_pri_ == lru_low_pri_) {
  ------------------
  |  Branch (291:9): [True: 16.1k, False: 0]
  ------------------
  292|  16.1k|      lru_low_pri_ = e;
  293|  16.1k|    }
  294|  16.1k|    lru_bottom_pri_ = e;
  295|  16.1k|  }
  296|  25.1k|  lru_usage_ += e->total_charge;
  297|  25.1k|}
_ZN7rocksdb9lru_cache13LRUCacheShard16MaintainPoolSizeEv:
  299|  9.02k|void LRUCacheShard::MaintainPoolSize() {
  300|  9.02k|  while (high_pri_pool_usage_ > high_pri_pool_capacity_) {
  ------------------
  |  Branch (300:10): [True: 0, False: 9.02k]
  ------------------
  301|       |    // Overflow last entry in high-pri pool to low-pri pool.
  302|      0|    lru_low_pri_ = lru_low_pri_->next;
  303|      0|    assert(lru_low_pri_ != &lru_);
  304|      0|    assert(lru_low_pri_->InHighPriPool());
  305|      0|    lru_low_pri_->SetInHighPriPool(false);
  306|      0|    lru_low_pri_->SetInLowPriPool(true);
  307|      0|    assert(high_pri_pool_usage_ >= lru_low_pri_->total_charge);
  308|      0|    high_pri_pool_usage_ -= lru_low_pri_->total_charge;
  309|      0|    low_pri_pool_usage_ += lru_low_pri_->total_charge;
  310|      0|  }
  311|       |
  312|  9.02k|  while (low_pri_pool_usage_ > low_pri_pool_capacity_) {
  ------------------
  |  Branch (312:10): [True: 0, False: 9.02k]
  ------------------
  313|       |    // Overflow last entry in low-pri pool to bottom-pri pool.
  314|      0|    lru_bottom_pri_ = lru_bottom_pri_->next;
  315|      0|    assert(lru_bottom_pri_ != &lru_);
  316|      0|    assert(lru_bottom_pri_->InLowPriPool());
  317|      0|    lru_bottom_pri_->SetInHighPriPool(false);
  318|      0|    lru_bottom_pri_->SetInLowPriPool(false);
  319|      0|    assert(low_pri_pool_usage_ >= lru_bottom_pri_->total_charge);
  320|      0|    low_pri_pool_usage_ -= lru_bottom_pri_->total_charge;
  321|      0|  }
  322|  9.02k|}
_ZN7rocksdb9lru_cache13LRUCacheShard12EvictFromLRUEmPNS_10autovectorIPNS0_9LRUHandleELm8EEE:
  325|  6.66M|                                 autovector<LRUHandle*>* deleted) {
  326|  6.66M|  while ((usage_ + charge) > capacity_ && lru_.next != &lru_) {
  ------------------
  |  Branch (326:10): [True: 109, False: 6.66M]
  |  Branch (326:43): [True: 2, False: 107]
  ------------------
  327|      2|    LRUHandle* old = lru_.next;
  328|       |    // LRU list contains only elements which can be evicted.
  329|      2|    assert(old->InCache() && !old->HasRefs());
  330|      2|    LRU_Remove(old);
  331|      2|    table_.Remove(old->key(), old->hash);
  332|      2|    old->SetInCache(false);
  333|      2|    assert(usage_ >= old->total_charge);
  334|      2|    usage_ -= old->total_charge;
  335|      2|    deleted->push_back(old);
  336|      2|  }
  337|  6.66M|}
_ZN7rocksdb9lru_cache13LRUCacheShard13NotifyEvictedERKNS_10autovectorIPNS0_9LRUHandleELm8EEE:
  340|  6.66M|    const autovector<LRUHandle*>& evicted_handles) {
  341|  6.66M|  MemoryAllocator* alloc = table_.GetAllocator();
  342|  6.66M|  for (LRUHandle* entry : evicted_handles) {
  ------------------
  |  Branch (342:25): [True: 2, False: 6.66M]
  ------------------
  343|      2|    if (eviction_callback_ &&
  ------------------
  |  Branch (343:9): [True: 0, False: 2]
  |  Branch (343:9): [True: 0, False: 2]
  ------------------
  344|      2|        eviction_callback_(entry->key(), static_cast<Cache::Handle*>(entry),
  ------------------
  |  Branch (344:9): [True: 0, False: 0]
  ------------------
  345|      0|                           entry->HasHit())) {
  346|       |      // Callback took ownership of obj; just free handle
  347|      0|      free(entry);
  348|      2|    } else {
  349|       |      // Free the entries here outside of mutex for performance reasons.
  350|      2|      entry->Free(alloc);
  351|      2|    }
  352|      2|  }
  353|  6.66M|}
_ZN7rocksdb9lru_cache13LRUCacheShard11SetCapacityEm:
  355|  6.64M|void LRUCacheShard::SetCapacity(size_t capacity) {
  356|  6.64M|  autovector<LRUHandle*> last_reference_list;
  357|  6.64M|  {
  358|  6.64M|    DMutexLock l(mutex_);
  359|  6.64M|    capacity_ = capacity;
  360|  6.64M|    high_pri_pool_capacity_ = capacity_ * high_pri_pool_ratio_;
  361|  6.64M|    low_pri_pool_capacity_ = capacity_ * low_pri_pool_ratio_;
  362|  6.64M|    EvictFromLRU(0, &last_reference_list);
  363|  6.64M|  }
  364|       |
  365|  6.64M|  NotifyEvicted(last_reference_list);
  366|  6.64M|}
_ZN7rocksdb9lru_cache13LRUCacheShard10InsertItemEPNS0_9LRUHandleEPS3_:
  373|  20.7k|Status LRUCacheShard::InsertItem(LRUHandle* e, LRUHandle** handle) {
  374|  20.7k|  Status s = Status::OK();
  375|  20.7k|  autovector<LRUHandle*> last_reference_list;
  376|       |
  377|  20.7k|  {
  378|  20.7k|    DMutexLock l(mutex_);
  379|       |
  380|       |    // Free the space following strict LRU policy until enough space
  381|       |    // is freed or the lru list is empty.
  382|  20.7k|    EvictFromLRU(e->total_charge, &last_reference_list);
  383|       |
  384|  20.7k|    if ((usage_ + e->total_charge) > capacity_ &&
  ------------------
  |  Branch (384:9): [True: 107, False: 20.6k]
  ------------------
  385|  20.7k|        (strict_capacity_limit_ || handle == nullptr)) {
  ------------------
  |  Branch (385:10): [True: 0, False: 107]
  |  Branch (385:36): [True: 0, False: 107]
  ------------------
  386|      0|      e->SetInCache(false);
  387|      0|      if (handle == nullptr) {
  ------------------
  |  Branch (387:11): [True: 0, False: 0]
  ------------------
  388|       |        // Don't insert the entry but still return ok, as if the entry inserted
  389|       |        // into cache and get evicted immediately.
  390|      0|        last_reference_list.push_back(e);
  391|      0|      } else {
  392|      0|        free(e);
  393|      0|        e = nullptr;
  394|      0|        *handle = nullptr;
  395|      0|        s = Status::MemoryLimit("Insert failed due to LRU cache being full.");
  396|      0|      }
  397|  20.7k|    } else {
  398|       |      // Insert into the cache. Note that the cache might get larger than its
  399|       |      // capacity if not enough space was freed up.
  400|  20.7k|      LRUHandle* old = table_.Insert(e);
  401|  20.7k|      usage_ += e->total_charge;
  402|  20.7k|      if (old != nullptr) {
  ------------------
  |  Branch (402:11): [True: 0, False: 20.7k]
  ------------------
  403|      0|        s = Status::OkOverwritten();
  404|      0|        assert(old->InCache());
  405|      0|        old->SetInCache(false);
  406|      0|        if (!old->HasRefs()) {
  ------------------
  |  Branch (406:13): [True: 0, False: 0]
  ------------------
  407|       |          // old is on LRU because it's in cache and its reference count is 0.
  408|      0|          LRU_Remove(old);
  409|      0|          assert(usage_ >= old->total_charge);
  410|      0|          usage_ -= old->total_charge;
  411|      0|          last_reference_list.push_back(old);
  412|      0|        }
  413|      0|      }
  414|  20.7k|      if (handle == nullptr) {
  ------------------
  |  Branch (414:11): [True: 0, False: 20.7k]
  ------------------
  415|      0|        LRU_Insert(e);
  416|  20.7k|      } else {
  417|       |        // If caller already holds a ref, no need to take one here.
  418|  20.7k|        if (!e->HasRefs()) {
  ------------------
  |  Branch (418:13): [True: 20.7k, False: 0]
  ------------------
  419|  20.7k|          e->Ref();
  420|  20.7k|        }
  421|  20.7k|        *handle = e;
  422|  20.7k|      }
  423|  20.7k|    }
  424|  20.7k|  }
  425|       |
  426|  20.7k|  NotifyEvicted(last_reference_list);
  427|       |
  428|  20.7k|  return s;
  429|  20.7k|}
_ZN7rocksdb9lru_cache13LRUCacheShard6LookupERKNS_5SliceEjPKNS_5Cache15CacheItemHelperEPNS5_13CreateContextENS5_8PriorityEPNS_10StatisticsE:
  435|  38.7k|                                 Statistics* /*stats*/) {
  436|  38.7k|  DMutexLock l(mutex_);
  437|  38.7k|  LRUHandle* e = table_.Lookup(key, hash);
  438|  38.7k|  if (e != nullptr) {
  ------------------
  |  Branch (438:7): [True: 8.99k, False: 29.7k]
  ------------------
  439|  8.99k|    assert(e->InCache());
  440|  8.99k|    if (!e->HasRefs()) {
  ------------------
  |  Branch (440:9): [True: 8.99k, False: 0]
  ------------------
  441|       |      // The entry is in LRU since it's in hash and has no external
  442|       |      // references.
  443|  8.99k|      LRU_Remove(e);
  444|  8.99k|    }
  445|  8.99k|    e->Ref();
  446|  8.99k|    e->SetHit();
  447|  8.99k|  }
  448|  38.7k|  return e;
  449|  38.7k|}
_ZN7rocksdb9lru_cache13LRUCacheShard7ReleaseEPNS0_9LRUHandleEbb:
  474|  29.7k|                            bool erase_if_last_ref) {
  475|  29.7k|  if (e == nullptr) {
  ------------------
  |  Branch (475:7): [True: 0, False: 29.7k]
  ------------------
  476|      0|    return false;
  477|      0|  }
  478|  29.7k|  bool must_free;
  479|  29.7k|  bool was_in_cache;
  480|  29.7k|  {
  481|  29.7k|    DMutexLock l(mutex_);
  482|  29.7k|    must_free = e->Unref();
  483|  29.7k|    was_in_cache = e->InCache();
  484|  29.7k|    if (must_free && was_in_cache) {
  ------------------
  |  Branch (484:9): [True: 29.7k, False: 0]
  |  Branch (484:22): [True: 29.7k, False: 0]
  ------------------
  485|       |      // The item is still in cache, and nobody else holds a reference to it.
  486|  29.7k|      if (usage_ > capacity_ || erase_if_last_ref) {
  ------------------
  |  Branch (486:11): [True: 109, False: 29.6k]
  |  Branch (486:33): [True: 4.48k, False: 25.1k]
  ------------------
  487|       |        // The LRU list must be empty since the cache is full.
  488|  4.59k|        assert(lru_.next == &lru_ || erase_if_last_ref);
  489|       |        // Take this opportunity and remove the item.
  490|  4.59k|        table_.Remove(e->key(), e->hash);
  491|  4.59k|        e->SetInCache(false);
  492|  25.1k|      } else {
  493|       |        // Put the item back on the LRU list, and don't free it.
  494|  25.1k|        LRU_Insert(e);
  495|  25.1k|        must_free = false;
  496|  25.1k|      }
  497|  29.7k|    }
  498|       |    // If about to be freed, then decrement the cache usage.
  499|  29.7k|    if (must_free) {
  ------------------
  |  Branch (499:9): [True: 4.59k, False: 25.1k]
  ------------------
  500|  4.59k|      assert(usage_ >= e->total_charge);
  501|  4.59k|      usage_ -= e->total_charge;
  502|  4.59k|    }
  503|  29.7k|  }
  504|       |
  505|       |  // Free the entry here outside of mutex for performance reasons.
  506|  29.7k|  if (must_free) {
  ------------------
  |  Branch (506:7): [True: 4.59k, False: 25.1k]
  ------------------
  507|       |    // Only call eviction callback if we're sure no one requested erasure
  508|       |    // FIXME: disabled because of test churn
  509|  4.59k|    if (false && was_in_cache && !erase_if_last_ref && eviction_callback_ &&
  ------------------
  |  Branch (509:9): [Folded - Ignored]
  |  Branch (509:9): [Folded - Ignored]
  |  Branch (509:18): [True: 0, False: 0]
  |  Branch (509:34): [True: 0, False: 0]
  |  Branch (509:56): [True: 0, False: 0]
  ------------------
  510|  4.59k|        eviction_callback_(e->key(), static_cast<Cache::Handle*>(e),
  ------------------
  |  Branch (510:9): [True: 0, False: 0]
  ------------------
  511|      0|                           e->HasHit())) {
  512|       |      // Callback took ownership of obj; just free handle
  513|      0|      free(e);
  514|  4.59k|    } else {
  515|  4.59k|      e->Free(table_.GetAllocator());
  516|  4.59k|    }
  517|  4.59k|  }
  518|  29.7k|  return must_free;
  519|  29.7k|}
_ZN7rocksdb9lru_cache13LRUCacheShard12CreateHandleERKNS_5SliceEjPvPKNS_5Cache15CacheItemHelperEm:
  524|  20.7k|                                       size_t charge) {
  525|  20.7k|  assert(helper);
  526|       |  // value == nullptr is reserved for indicating failure in SecondaryCache
  527|  20.7k|  assert(!(helper->IsSecondaryCacheCompatible() && value == nullptr));
  528|       |
  529|       |  // Allocate the memory here outside of the mutex.
  530|       |  // If the cache is full, we'll have to release it.
  531|       |  // It shouldn't happen very often though.
  532|  20.7k|  LRUHandle* e =
  533|  20.7k|      static_cast<LRUHandle*>(malloc(sizeof(LRUHandle) - 1 + key.size()));
  534|       |
  535|  20.7k|  e->value = value;
  536|  20.7k|  e->m_flags = 0;
  537|  20.7k|  e->im_flags = 0;
  538|  20.7k|  e->helper = helper;
  539|  20.7k|  e->key_length = key.size();
  540|  20.7k|  e->hash = hash;
  541|  20.7k|  e->refs = 0;
  542|  20.7k|  e->next = e->prev = nullptr;
  543|  20.7k|  memcpy(e->key_data, key.data(), key.size());
  544|  20.7k|  e->CalcTotalCharge(charge, metadata_charge_policy_);
  545|       |
  546|  20.7k|  return e;
  547|  20.7k|}
_ZN7rocksdb9lru_cache13LRUCacheShard6InsertERKNS_5SliceEjPvPKNS_5Cache15CacheItemHelperEmPPNS0_9LRUHandleENS6_8PriorityE:
  553|  20.7k|                             Cache::Priority priority) {
  554|  20.7k|  LRUHandle* e = CreateHandle(key, hash, value, helper, charge);
  555|  20.7k|  e->SetPriority(priority);
  556|  20.7k|  e->SetInCache(true);
  557|  20.7k|  return InsertItem(e, handle);
  558|  20.7k|}
_ZNK7rocksdb9lru_cache13LRUCacheShard8GetUsageEv:
  618|  2.94k|size_t LRUCacheShard::GetUsage() const {
  619|  2.94k|  DMutexLock l(mutex_);
  620|  2.94k|  return usage_;
  621|  2.94k|}
_ZNK7rocksdb9lru_cache13LRUCacheShard17GetOccupancyCountEv:
  629|  2.94k|size_t LRUCacheShard::GetOccupancyCount() const {
  630|  2.94k|  DMutexLock l(mutex_);
  631|  2.94k|  return table_.GetOccupancyCount();
  632|  2.94k|}
_ZNK7rocksdb9lru_cache13LRUCacheShard20GetTableAddressCountEv:
  634|  2.94k|size_t LRUCacheShard::GetTableAddressCount() const {
  635|  2.94k|  DMutexLock l(mutex_);
  636|  2.94k|  return size_t{1} << table_.GetLengthBits();
  637|  2.94k|}
_ZNK7rocksdb9lru_cache13LRUCacheShard22AppendPrintableOptionsERNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  639|  9.02k|void LRUCacheShard::AppendPrintableOptions(std::string& str) const {
  640|  9.02k|  const int kBufferSize = 200;
  641|  9.02k|  char buffer[kBufferSize];
  642|  9.02k|  {
  643|  9.02k|    DMutexLock l(mutex_);
  644|  9.02k|    snprintf(buffer, kBufferSize, "    high_pri_pool_ratio: %.3lf\n",
  645|  9.02k|             high_pri_pool_ratio_);
  646|  9.02k|    snprintf(buffer + strlen(buffer), kBufferSize - strlen(buffer),
  647|  9.02k|             "    low_pri_pool_ratio: %.3lf\n", low_pri_pool_ratio_);
  648|  9.02k|  }
  649|  9.02k|  str.append(buffer);
  650|  9.02k|}
_ZN7rocksdb9lru_cache8LRUCacheC2ERKNS_15LRUCacheOptionsE:
  652|   103k|LRUCache::LRUCache(const LRUCacheOptions& opts) : ShardedCache(opts) {
  653|   103k|  size_t per_shard = GetPerShardCapacity();
  654|   103k|  MemoryAllocator* alloc = memory_allocator();
  655|   103k|  InitShards([&](LRUCacheShard* cs) {
  656|   103k|    new (cs) LRUCacheShard(per_shard, opts.strict_capacity_limit,
  657|   103k|                           opts.high_pri_pool_ratio, opts.low_pri_pool_ratio,
  658|   103k|                           opts.use_adaptive_mutex, opts.metadata_charge_policy,
  659|   103k|                           /* max_upper_hash_bits */ 32 - opts.num_shard_bits,
  660|   103k|                           alloc, &eviction_callback_);
  661|   103k|  });
  662|   103k|}
_ZN7rocksdb9lru_cache8LRUCache5ValueEPNS_5Cache6HandleE:
  664|  31.5k|Cache::ObjectPtr LRUCache::Value(Handle* handle) {
  665|  31.5k|  auto h = static_cast<const LRUHandle*>(handle);
  666|  31.5k|  return h->value;
  667|  31.5k|}
_ZNK7rocksdb15LRUCacheOptions15MakeSharedCacheEv:
  690|   103k|std::shared_ptr<Cache> LRUCacheOptions::MakeSharedCache() const {
  691|   103k|  if (num_shard_bits >= 20) {
  ------------------
  |  Branch (691:7): [True: 0, False: 103k]
  ------------------
  692|      0|    return nullptr;  // The cache cannot be sharded into too many fine pieces.
  693|      0|  }
  694|   103k|  if (high_pri_pool_ratio < 0.0 || high_pri_pool_ratio > 1.0) {
  ------------------
  |  Branch (694:7): [True: 0, False: 103k]
  |  Branch (694:36): [True: 0, False: 103k]
  ------------------
  695|       |    // Invalid high_pri_pool_ratio
  696|      0|    return nullptr;
  697|      0|  }
  698|   103k|  if (low_pri_pool_ratio < 0.0 || low_pri_pool_ratio > 1.0) {
  ------------------
  |  Branch (698:7): [True: 0, False: 103k]
  |  Branch (698:35): [True: 0, False: 103k]
  ------------------
  699|       |    // Invalid low_pri_pool_ratio
  700|      0|    return nullptr;
  701|      0|  }
  702|   103k|  if (low_pri_pool_ratio + high_pri_pool_ratio > 1.0) {
  ------------------
  |  Branch (702:7): [True: 0, False: 103k]
  ------------------
  703|       |    // Invalid high_pri_pool_ratio and low_pri_pool_ratio combination
  704|      0|    return nullptr;
  705|      0|  }
  706|       |  // For sanitized options
  707|   103k|  LRUCacheOptions opts = *this;
  708|   103k|  if (opts.num_shard_bits < 0) {
  ------------------
  |  Branch (708:7): [True: 94.7k, False: 9.02k]
  ------------------
  709|  94.7k|    opts.num_shard_bits = GetDefaultCacheShardBits(capacity);
  710|  94.7k|  }
  711|   103k|  std::shared_ptr<Cache> cache = std::make_shared<LRUCache>(opts);
  712|   103k|  if (secondary_cache) {
  ------------------
  |  Branch (712:7): [True: 0, False: 103k]
  ------------------
  713|      0|    cache = std::make_shared<CacheWithSecondaryAdapter>(cache, secondary_cache);
  714|      0|  }
  715|   103k|  return cache;
  716|   103k|}
lru_cache.cc:_ZZN7rocksdb9lru_cache14LRUHandleTableD1EvENK3$_0clEPNS0_9LRUHandleE:
   37|  16.1k|      [alloc](LRUHandle* h) {
   38|  16.1k|        if (!h->HasRefs()) {
  ------------------
  |  Branch (38:13): [True: 16.1k, False: 0]
  ------------------
   39|  16.1k|          h->Free(alloc);
   40|  16.1k|        }
   41|  16.1k|      },
lru_cache.cc:_ZZN7rocksdb9lru_cache13LRUCacheShard18ApplyToSomeEntriesERKNSt3__18functionIFvRKNS_5SliceEPvmPKNS_5Cache15CacheItemHelperEEEEmPmENK3$_0clEPNS0_9LRUHandleE:
  197|     46|       metadata_charge_policy = metadata_charge_policy_](LRUHandle* h) {
  198|     46|        callback(h->key(), h->value, h->GetCharge(metadata_charge_policy),
  199|     46|                 h->helper);
  200|     46|      },
lru_cache.cc:_ZZN7rocksdb9lru_cache8LRUCacheC1ERKNS_15LRUCacheOptionsEENK3$_0clEPNS0_13LRUCacheShardE:
  655|  6.64M|  InitShards([&](LRUCacheShard* cs) {
  656|  6.64M|    new (cs) LRUCacheShard(per_shard, opts.strict_capacity_limit,
  657|  6.64M|                           opts.high_pri_pool_ratio, opts.low_pri_pool_ratio,
  658|  6.64M|                           opts.use_adaptive_mutex, opts.metadata_charge_policy,
  659|  6.64M|                           /* max_upper_hash_bits */ 32 - opts.num_shard_bits,
  660|  6.64M|                           alloc, &eviction_callback_);
  661|  6.64M|  });

_ZNK7rocksdb9lru_cache9LRUHandle3keyEv:
   93|  38.9k|  Slice key() const { return Slice(key_data, key_length); }
_ZNK7rocksdb9lru_cache9LRUHandle7GetHashEv:
   96|  29.7k|  uint32_t GetHash() const { return hash; }
_ZN7rocksdb9lru_cache9LRUHandle3RefEv:
   99|  29.7k|  void Ref() { refs++; }
_ZN7rocksdb9lru_cache9LRUHandle5UnrefEv:
  102|  29.7k|  bool Unref() {
  103|  29.7k|    assert(refs > 0);
  104|  29.7k|    refs--;
  105|  29.7k|    return refs == 0;
  106|  29.7k|  }
_ZNK7rocksdb9lru_cache9LRUHandle7HasRefsEv:
  109|  45.9k|  bool HasRefs() const { return refs > 0; }
_ZNK7rocksdb9lru_cache9LRUHandle7InCacheEv:
  111|  29.7k|  bool InCache() const { return m_flags & M_IN_CACHE; }
_ZNK7rocksdb9lru_cache9LRUHandle9IsHighPriEv:
  112|  25.1k|  bool IsHighPri() const { return im_flags & IM_IS_HIGH_PRI; }
_ZNK7rocksdb9lru_cache9LRUHandle13InHighPriPoolEv:
  113|  9.00k|  bool InHighPriPool() const { return m_flags & M_IN_HIGH_PRI_POOL; }
_ZNK7rocksdb9lru_cache9LRUHandle12InLowPriPoolEv:
  115|  4.48k|  bool InLowPriPool() const { return m_flags & M_IN_LOW_PRI_POOL; }
_ZNK7rocksdb9lru_cache9LRUHandle6HasHitEv:
  116|  16.1k|  bool HasHit() const { return m_flags & M_HAS_HIT; }
_ZN7rocksdb9lru_cache9LRUHandle10SetInCacheEb:
  119|  25.3k|  void SetInCache(bool in_cache) {
  120|  25.3k|    if (in_cache) {
  ------------------
  |  Branch (120:9): [True: 20.7k, False: 4.59k]
  ------------------
  121|  20.7k|      m_flags |= M_IN_CACHE;
  122|  20.7k|    } else {
  123|  4.59k|      m_flags &= ~M_IN_CACHE;
  124|  4.59k|    }
  125|  25.3k|  }
_ZN7rocksdb9lru_cache9LRUHandle11SetPriorityENS_5Cache8PriorityE:
  127|  20.7k|  void SetPriority(Cache::Priority priority) {
  128|  20.7k|    if (priority == Cache::Priority::HIGH) {
  ------------------
  |  Branch (128:9): [True: 4.51k, False: 16.2k]
  ------------------
  129|  4.51k|      im_flags |= IM_IS_HIGH_PRI;
  130|  4.51k|      im_flags &= ~IM_IS_LOW_PRI;
  131|  16.2k|    } else if (priority == Cache::Priority::LOW) {
  ------------------
  |  Branch (131:16): [True: 16.2k, False: 0]
  ------------------
  132|  16.2k|      im_flags &= ~IM_IS_HIGH_PRI;
  133|  16.2k|      im_flags |= IM_IS_LOW_PRI;
  134|  16.2k|    } else {
  135|      0|      im_flags &= ~IM_IS_HIGH_PRI;
  136|      0|      im_flags &= ~IM_IS_LOW_PRI;
  137|      0|    }
  138|  20.7k|  }
_ZN7rocksdb9lru_cache9LRUHandle16SetInHighPriPoolEb:
  140|  25.1k|  void SetInHighPriPool(bool in_high_pri_pool) {
  141|  25.1k|    if (in_high_pri_pool) {
  ------------------
  |  Branch (141:9): [True: 9.02k, False: 16.1k]
  ------------------
  142|  9.02k|      m_flags |= M_IN_HIGH_PRI_POOL;
  143|  16.1k|    } else {
  144|  16.1k|      m_flags &= ~M_IN_HIGH_PRI_POOL;
  145|  16.1k|    }
  146|  25.1k|  }
_ZN7rocksdb9lru_cache9LRUHandle15SetInLowPriPoolEb:
  148|  25.1k|  void SetInLowPriPool(bool in_low_pri_pool) {
  149|  25.1k|    if (in_low_pri_pool) {
  ------------------
  |  Branch (149:9): [True: 0, False: 25.1k]
  ------------------
  150|      0|      m_flags |= M_IN_LOW_PRI_POOL;
  151|  25.1k|    } else {
  152|  25.1k|      m_flags &= ~M_IN_LOW_PRI_POOL;
  153|  25.1k|    }
  154|  25.1k|  }
_ZN7rocksdb9lru_cache9LRUHandle6SetHitEv:
  156|  8.99k|  void SetHit() { m_flags |= M_HAS_HIT; }
_ZN7rocksdb9lru_cache9LRUHandle4FreeEPNS_15MemoryAllocatorE:
  166|  20.7k|  void Free(MemoryAllocator* allocator) {
  167|  20.7k|    assert(refs == 0);
  168|  20.7k|    assert(helper);
  169|  20.7k|    if (helper->del_cb) {
  ------------------
  |  Branch (169:9): [True: 20.7k, False: 0]
  ------------------
  170|  20.7k|      helper->del_cb(value, allocator);
  171|  20.7k|    }
  172|       |
  173|  20.7k|    free(this);
  174|  20.7k|  }
_ZNK7rocksdb9lru_cache9LRUHandle15CalcuMetaChargeENS_25CacheMetadataChargePolicyE:
  177|  20.8k|      CacheMetadataChargePolicy metadata_charge_policy) const {
  178|  20.8k|    if (metadata_charge_policy != kFullChargeCacheMetadata) {
  ------------------
  |  Branch (178:9): [True: 4.48k, False: 16.3k]
  ------------------
  179|  4.48k|      return 0;
  180|  16.3k|    } else {
  181|  16.3k|#ifdef ROCKSDB_MALLOC_USABLE_SIZE
  182|  16.3k|      return malloc_usable_size(
  183|  16.3k|          const_cast<void*>(static_cast<const void*>(this)));
  184|       |#else
  185|       |      // This is the size that is used when a new handle is created.
  186|       |      return sizeof(LRUHandle) - 1 + key_length;
  187|       |#endif
  188|  16.3k|    }
  189|  20.8k|  }
_ZN7rocksdb9lru_cache9LRUHandle15CalcTotalChargeEmNS_25CacheMetadataChargePolicyE:
  193|  20.7k|      size_t charge, CacheMetadataChargePolicy metadata_charge_policy) {
  194|  20.7k|    total_charge = charge + CalcuMetaCharge(metadata_charge_policy);
  195|  20.7k|  }
_ZNK7rocksdb9lru_cache9LRUHandle9GetChargeENS_25CacheMetadataChargePolicyE:
  198|     46|      CacheMetadataChargePolicy metadata_charge_policy) const {
  199|     46|    size_t meta_charge = CalcuMetaCharge(metadata_charge_policy);
  200|     46|    assert(total_charge >= meta_charge);
  201|     46|    return total_charge - meta_charge;
  202|     46|  }
_ZNK7rocksdb9lru_cache14LRUHandleTable13GetLengthBitsEv:
  232|  50.0k|  int GetLengthBits() const { return length_bits_; }
_ZNK7rocksdb9lru_cache14LRUHandleTable17GetOccupancyCountEv:
  234|  2.94k|  size_t GetOccupancyCount() const { return elems_; }
_ZNK7rocksdb9lru_cache14LRUHandleTable12GetAllocatorEv:
  236|  6.66M|  MemoryAllocator* GetAllocator() const { return allocator_; }
_ZN7rocksdb9lru_cache13LRUCacheShard11ComputeHashERKNS_5SliceEj:
  282|  59.5k|  static inline HashVal ComputeHash(const Slice& key, uint32_t seed) {
  283|  59.5k|    return Lower32of64(GetSliceNPHash64(key, seed));
  284|  59.5k|  }
_ZNK7rocksdb9lru_cache8LRUCache4NameEv:
  450|  9.07k|  const char* Name() const override { return "LRUCache"; }
lru_cache.cc:_ZN7rocksdb9lru_cache14LRUHandleTable19ApplyToEntriesRangeIZNS1_D1EvE3$_0EEvT_mm:
  220|  6.64M|  void ApplyToEntriesRange(T func, size_t index_begin, size_t index_end) {
  221|   112M|    for (size_t i = index_begin; i < index_end; i++) {
  ------------------
  |  Branch (221:34): [True: 106M, False: 6.64M]
  ------------------
  222|   106M|      LRUHandle* h = list_[i];
  223|   106M|      while (h != nullptr) {
  ------------------
  |  Branch (223:14): [True: 16.1k, False: 106M]
  ------------------
  224|  16.1k|        auto n = h->next_hash;
  225|  16.1k|        assert(h->InCache());
  226|  16.1k|        func(h);
  227|  16.1k|        h = n;
  228|  16.1k|      }
  229|   106M|    }
  230|  6.64M|  }
lru_cache.cc:_ZN7rocksdb9lru_cache14LRUHandleTable19ApplyToEntriesRangeIZNS0_13LRUCacheShard18ApplyToSomeEntriesERKNSt3__18functionIFvRKNS_5SliceEPvmPKNS_5Cache15CacheItemHelperEEEEmPmE3$_0EEvT_mm:
  220|  47.1k|  void ApplyToEntriesRange(T func, size_t index_begin, size_t index_end) {
  221|  94.2k|    for (size_t i = index_begin; i < index_end; i++) {
  ------------------
  |  Branch (221:34): [True: 47.1k, False: 47.1k]
  ------------------
  222|  47.1k|      LRUHandle* h = list_[i];
  223|  47.1k|      while (h != nullptr) {
  ------------------
  |  Branch (223:14): [True: 46, False: 47.1k]
  ------------------
  224|     46|        auto n = h->next_hash;
  225|     46|        assert(h->InCache());
  226|     46|        func(h);
  227|     46|        h = n;
  228|     46|      }
  229|  47.1k|    }
  230|  47.1k|  }

_ZN7rocksdb16ShardedCacheBaseC2ERKNS_19ShardedCacheOptionsE:
   66|   103k|      capacity_(opts.capacity) {}
_ZNK7rocksdb16ShardedCacheBase23ComputePerShardCapacityEm:
   68|   103k|size_t ShardedCacheBase::ComputePerShardCapacity(size_t capacity) const {
   69|   103k|  uint32_t num_shards = GetNumShards();
   70|   103k|  return (capacity + (num_shards - 1)) / num_shards;
   71|   103k|}
_ZNK7rocksdb16ShardedCacheBase19GetPerShardCapacityEv:
   73|   103k|size_t ShardedCacheBase::GetPerShardCapacity() const {
   74|   103k|  return ComputePerShardCapacity(GetCapacity());
   75|   103k|}
_ZNK7rocksdb16ShardedCacheBase11GetCapacityEv:
   81|   126k|size_t ShardedCacheBase::GetCapacity() const {
   82|   126k|  MutexLock l(&config_mutex_);
   83|   126k|  return capacity_;
   84|   126k|}
_ZNK7rocksdb16ShardedCacheBase19GetPrintableOptionsEv:
  105|  9.02k|std::string ShardedCacheBase::GetPrintableOptions() const {
  106|  9.02k|  std::string ret;
  107|  9.02k|  ret.reserve(20000);
  108|  9.02k|  const int kBufferSize = 200;
  109|  9.02k|  char buffer[kBufferSize];
  110|  9.02k|  {
  111|  9.02k|    MutexLock l(&config_mutex_);
  112|  9.02k|    snprintf(buffer, kBufferSize, "    capacity : %" ROCKSDB_PRIszt "\n",
  113|  9.02k|             capacity_);
  114|  9.02k|    ret.append(buffer);
  115|  9.02k|    snprintf(buffer, kBufferSize, "    num_shard_bits : %d\n",
  116|  9.02k|             GetNumShardBits());
  117|  9.02k|    ret.append(buffer);
  118|  9.02k|    snprintf(buffer, kBufferSize, "    strict_capacity_limit : %d\n",
  119|  9.02k|             strict_capacity_limit_);
  120|  9.02k|    ret.append(buffer);
  121|  9.02k|  }
  122|  9.02k|  snprintf(buffer, kBufferSize, "    memory_allocator : %s\n",
  123|  9.02k|           memory_allocator() ? memory_allocator()->Name() : "None");
  ------------------
  |  Branch (123:12): [True: 0, False: 9.02k]
  ------------------
  124|  9.02k|  ret.append(buffer);
  125|  9.02k|  AppendPrintableOptions(ret);
  126|  9.02k|  return ret;
  127|  9.02k|}
_ZN7rocksdb24GetDefaultCacheShardBitsEmm:
  129|  94.7k|int GetDefaultCacheShardBits(size_t capacity, size_t min_shard_size) {
  130|  94.7k|  int num_shard_bits = 0;
  131|  94.7k|  size_t num_shards = capacity / min_shard_size;
  132|   568k|  while (num_shards >>= 1) {
  ------------------
  |  Branch (132:10): [True: 568k, False: 0]
  ------------------
  133|   568k|    if (++num_shard_bits >= 6) {
  ------------------
  |  Branch (133:9): [True: 94.7k, False: 473k]
  ------------------
  134|       |      // No more than 6.
  135|  94.7k|      return num_shard_bits;
  136|  94.7k|    }
  137|   568k|  }
  138|      0|  return num_shard_bits;
  139|  94.7k|}
_ZNK7rocksdb16ShardedCacheBase15GetNumShardBitsEv:
  141|  9.02k|int ShardedCacheBase::GetNumShardBits() const {
  142|  9.02k|  return BitsSetToOne(shard_mask_);
  143|  9.02k|}
_ZNK7rocksdb16ShardedCacheBase12GetNumShardsEv:
  145|   424k|uint32_t ShardedCacheBase::GetNumShards() const { return shard_mask_ + 1; }
sharded_cache.cc:_ZN7rocksdb12_GLOBAL__N_113DetermineSeedEi:
   28|   103k|uint32_t DetermineSeed(int32_t hash_seed_option) {
   29|   103k|  if (hash_seed_option >= 0) {
  ------------------
  |  Branch (29:7): [True: 9.02k, False: 94.7k]
  ------------------
   30|       |    // User-specified exact seed
   31|  9.02k|    return static_cast<uint32_t>(hash_seed_option);
   32|  9.02k|  }
   33|  94.7k|  static SemiStructuredUniqueIdGen gen;
   34|  94.7k|  if (hash_seed_option == ShardedCacheOptions::kHostHashSeed) {
  ------------------
  |  Branch (34:7): [True: 94.7k, False: 0]
  ------------------
   35|  94.7k|    std::string hostname;
   36|  94.7k|    Status s = Env::Default()->GetHostNameString(&hostname);
   37|  94.7k|    if (s.ok()) {
  ------------------
  |  Branch (37:9): [True: 94.7k, False: 0]
  ------------------
   38|  94.7k|      return GetSliceHash(hostname) & kSeedMask;
   39|  94.7k|    } else {
   40|       |      // Fall back on something stable within the process.
   41|      0|      return BitwiseAnd(gen.GetBaseUpper(), kSeedMask);
   42|      0|    }
   43|  94.7k|  } else {
   44|       |    // for kQuasiRandomHashSeed and fallback
   45|      0|    uint32_t val = gen.GenerateNext<uint32_t>() & kSeedMask;
   46|       |    // Perform some 31-bit bijective transformations so that we get
   47|       |    // quasirandom, not just incrementing. (An incrementing seed from a
   48|       |    // random starting point would be fine, but hard to describe in a name.)
   49|       |    // See https://en.wikipedia.org/wiki/Quasirandom and using a murmur-like
   50|       |    // transformation here for our bijection in the lower 31 bits.
   51|       |    // See https://en.wikipedia.org/wiki/MurmurHash
   52|      0|    val *= /*31-bit prime*/ 1150630961;
   53|      0|    val ^= (val & kSeedMask) >> 17;
   54|      0|    val *= /*31-bit prime*/ 1320603883;
   55|      0|    return val & kSeedMask;
   56|      0|  }
   57|  94.7k|}

_ZN7rocksdb14CacheShardBaseC2ENS_25CacheMetadataChargePolicyE:
   28|  6.64M|      : metadata_charge_policy_(metadata_charge_policy) {}
_ZN7rocksdb14CacheShardBase20HashPieceForShardingEm:
   40|  89.2k|  static inline uint32_t HashPieceForSharding(HashCref hash) {
   41|  89.2k|    return Lower32of64(hash);
   42|  89.2k|  }
_ZNK7rocksdb16ShardedCacheBase11GetHashSeedEv:
  109|     46|  uint32_t GetHashSeed() const override { return hash_seed_; }
_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEEC2ERKNS_19ShardedCacheOptionsE:
  144|   103k|        destroy_shards_in_dtor_(false) {}
_ZN7rocksdb16ShardedCacheBaseD2Ev:
   93|   103k|  virtual ~ShardedCacheBase() = default;
_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEED2Ev:
  146|   103k|  virtual ~ShardedCache() {
  147|   103k|    if (destroy_shards_in_dtor_) {
  ------------------
  |  Branch (147:9): [True: 103k, False: 0]
  ------------------
  148|   103k|      ForEachShard([](CacheShard* cs) { cs->~CacheShard(); });
  149|   103k|    }
  150|   103k|    port::cacheline_aligned_free(shards_);
  151|   103k|  }
_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE12ForEachShardERKNSt3__18functionIFvPS2_EEE:
  274|   216k|  inline void ForEachShard(const std::function<void(CacheShard*)>& fn) {
  275|   216k|    uint32_t num_shards = GetNumShards();
  276|  14.0M|    for (uint32_t i = 0; i < num_shards; i++) {
  ------------------
  |  Branch (276:26): [True: 13.8M, False: 216k]
  ------------------
  277|  13.8M|      fn(shards_ + i);
  278|  13.8M|    }
  279|   216k|  }
_ZZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEED1EvENKUlPS2_E_clES4_:
  148|  6.64M|      ForEachShard([](CacheShard* cs) { cs->~CacheShard(); });
_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE10InitShardsERKNSt3__18functionIFvPS2_EEE:
  304|   103k|  void InitShards(const std::function<void(CacheShard*)>& placement_new) {
  305|   103k|    ForEachShard(placement_new);
  306|   103k|    destroy_shards_in_dtor_ = true;
  307|   103k|  }
_ZNK7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE13SumOverShardsERKNSt3__18functionIFmRS2_EEE:
  290|    138|      const std::function<size_t(CacheShard&)>& fn) const {
  291|    138|    uint32_t num_shards = GetNumShards();
  292|    138|    size_t result = 0;
  293|  8.97k|    for (uint32_t i = 0; i < num_shards; i++) {
  ------------------
  |  Branch (293:26): [True: 8.83k, False: 138]
  ------------------
  294|  8.83k|      result += fn(shards_[i]);
  295|  8.83k|    }
  296|    138|    return result;
  297|    138|  }
_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE8GetShardEj:
  153|  89.2k|  CacheShard& GetShard(HashCref hash) {
  154|  89.2k|    return shards_[CacheShard::HashPieceForSharding(hash) & shard_mask_];
  155|  89.2k|  }
_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE6InsertERKNS_5SliceEPvPKNS_5Cache15CacheItemHelperEmPPNS8_6HandleENS8_8PriorityES6_NS_15CompressionTypeE:
  180|  20.7k|      CompressionType /*type*/ = CompressionType::kNoCompression) override {
  181|  20.7k|    assert(helper);
  182|  20.7k|    HashVal hash = CacheShard::ComputeHash(key, hash_seed_);
  183|  20.7k|    auto h_out = reinterpret_cast<HandleImpl**>(handle);
  184|  20.7k|    return GetShard(hash).Insert(key, hash, obj, helper, charge, h_out,
  185|  20.7k|                                 priority);
  186|  20.7k|  }
_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE6LookupERKNS_5SliceEPKNS_5Cache15CacheItemHelperEPNS7_13CreateContextENS7_8PriorityEPNS_10StatisticsE:
  201|  38.7k|                 Statistics* stats = nullptr) override {
  202|  38.7k|    HashVal hash = CacheShard::ComputeHash(key, hash_seed_);
  203|  38.7k|    HandleImpl* result = GetShard(hash).Lookup(key, hash, helper,
  204|  38.7k|                                               create_context, priority, stats);
  205|  38.7k|    return static_cast<Handle*>(result);
  206|  38.7k|  }
_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE7ReleaseEPNS_5Cache6HandleEb:
  222|  29.7k|  bool Release(Handle* handle, bool erase_if_last_ref = false) override {
  223|  29.7k|    return Release(handle, true /*useful*/, erase_if_last_ref);
  224|  29.7k|  }
_ZNK7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE8GetUsageEv:
  226|     46|  size_t GetUsage() const override {
  227|     46|    return SumOverShards2(&CacheShard::GetUsage);
  228|     46|  }
_ZNK7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE14SumOverShards2EMS2_KFmvE:
  299|    138|  inline size_t SumOverShards2(size_t (CacheShard::*fn)() const) const {
  300|    138|    return SumOverShards([fn](CacheShard& cs) { return (cs.*fn)(); });
  301|    138|  }
_ZZNK7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE14SumOverShards2EMS2_KFmvEENKUlRS2_E_clES6_:
  300|  8.83k|    return SumOverShards([fn](CacheShard& cs) { return (cs.*fn)(); });
_ZNK7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE17GetOccupancyCountEv:
  232|     46|  size_t GetOccupancyCount() const override {
  233|     46|    return SumOverShards2(&CacheShard::GetOccupancyCount);
  234|     46|  }
_ZNK7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE20GetTableAddressCountEv:
  235|     46|  size_t GetTableAddressCount() const override {
  236|     46|    return SumOverShards2(&CacheShard::GetTableAddressCount);
  237|     46|  }
_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE17ApplyToAllEntriesERKNSt3__18functionIFvRKNS_5SliceEPvmPKNS_5Cache15CacheItemHelperEEEERKNSA_24ApplyToAllEntriesOptionsE:
  241|     46|      const ApplyToAllEntriesOptions& opts) override {
  242|     46|    uint32_t num_shards = GetNumShards();
  243|       |    // Iterate over part of each shard, rotating between shards, to
  244|       |    // minimize impact on latency of concurrent operations.
  245|     46|    std::unique_ptr<size_t[]> states(new size_t[num_shards]{});
  246|       |
  247|     46|    size_t aepl = opts.average_entries_per_lock;
  248|     46|    aepl = std::min(aepl, size_t{1});
  249|       |
  250|     46|    bool remaining_work;
  251|    736|    do {
  252|    736|      remaining_work = false;
  253|  47.8k|      for (uint32_t i = 0; i < num_shards; i++) {
  ------------------
  |  Branch (253:28): [True: 47.1k, False: 736]
  ------------------
  254|  47.1k|        if (states[i] != SIZE_MAX) {
  ------------------
  |  Branch (254:13): [True: 47.1k, False: 0]
  ------------------
  255|  47.1k|          shards_[i].ApplyToSomeEntries(callback, aepl, &states[i]);
  256|  47.1k|          remaining_work |= states[i] != SIZE_MAX;
  257|  47.1k|        }
  258|  47.1k|      }
  259|    736|    } while (remaining_work);
  ------------------
  |  Branch (259:14): [True: 690, False: 46]
  ------------------
  260|     46|  }
_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE17EraseUnRefEntriesEv:
  262|  9.02k|  void EraseUnRefEntries() override {
  263|  9.02k|    ForEachShard([](CacheShard* cs) { cs->EraseUnRefEntries(); });
  264|  9.02k|  }
_ZZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE17EraseUnRefEntriesEvENKUlPS2_E_clES4_:
  263|   577k|    ForEachShard([](CacheShard* cs) { cs->EraseUnRefEntries(); });
_ZN7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE7ReleaseEPNS_5Cache6HandleEbb:
  214|  29.7k|               bool erase_if_last_ref = false) override {
  215|  29.7k|    auto h = static_cast<HandleImpl*>(handle);
  216|  29.7k|    return GetShard(h->GetHash()).Release(h, useful, erase_if_last_ref);
  217|  29.7k|  }
_ZNK7rocksdb12ShardedCacheINS_9lru_cache13LRUCacheShardEE22AppendPrintableOptionsERNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  309|  9.02k|  void AppendPrintableOptions(std::string& str) const override {
  310|  9.02k|    shards_[0].AppendPrintableOptions(str);
  311|  9.02k|  }

_ZN7rocksdb18BaseCacheInterfaceINSt3__110shared_ptrINS_5CacheEEEEC2ES4_:
   56|  13.5k|  /*implicit*/ BaseCacheInterface(CachePtr cache) : cache_(std::move(cache)) {}
_ZNK7rocksdb18BaseCacheInterfaceIPNS_5CacheEE3getEv:
   68|  38.8k|  inline Cache* get() const { return &*cache_; }
_ZN7rocksdb18BaseCacheInterfaceIPNS_5CacheEEC2ES2_:
   56|  43.3k|  /*implicit*/ BaseCacheInterface(CachePtr cache) : cache_(std::move(cache)) {}
_ZN7rocksdb24BasicTypedCacheInterfaceINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEELNS_14CacheEntryRoleE13EPNS_5CacheEE6LookupERKNS_5SliceEPNS_10StatisticsE:
  171|  13.5k|  inline TypedHandle* Lookup(const Slice& key, Statistics* stats = nullptr) {
  172|  13.5k|    return static_cast<TypedHandle*>(this->cache_->BasicLookup(key, stats));
  173|  13.5k|  }
_ZN7rocksdb24BasicTypedCacheInterfaceINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEELNS_14CacheEntryRoleE13EPNS_5CacheEE6InsertERKNS_5SliceEPS4_mPPNS8_11TypedHandleENS6_8PriorityE:
  164|  4.51k|                       Priority priority = Priority::LOW) {
  165|  4.51k|    auto untyped_handle = reinterpret_cast<Handle**>(handle);
  166|  4.51k|    return this->cache_->Insert(
  167|  4.51k|        key, BasicTypedCacheHelperFns<TValue>::UpCastValue(value),
  168|  4.51k|        GetBasicHelper(), charge, untyped_handle, priority);
  169|  4.51k|  }
_ZN7rocksdb24BasicTypedCacheHelperFnsINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEEE11UpCastValueEPS4_:
  108|  4.51k|  inline static ObjectPtr UpCastValue(TValuePtr value) { return value; }
_ZN7rocksdb21BasicTypedCacheHelperINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEELNS_14CacheEntryRoleE13EE14GetBasicHelperEv:
  134|  4.51k|  static const Cache::CacheItemHelper* GetBasicHelper() {
  135|  4.51k|    static const Cache::CacheItemHelper kHelper{kRole,
  136|  4.51k|                                                &BasicTypedCacheHelper::Delete};
  137|  4.51k|    return &kHelper;
  138|  4.51k|  }
_ZN7rocksdb24BasicTypedCacheHelperFnsINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEEE6DeleteEPvPNS_15MemoryAllocatorE:
  113|  4.51k|  static void Delete(ObjectPtr value, MemoryAllocator* allocator) {
  114|       |    // FIXME: Currently, no callers actually allocate the ObjectPtr objects
  115|       |    // using the custom allocator, just subobjects that keep a reference to
  116|       |    // the allocator themselves (with CacheAllocationPtr).
  117|  4.51k|    if (/*DISABLED*/ false && allocator) {
  ------------------
  |  Branch (117:22): [Folded - Ignored]
  |  Branch (117:31): [True: 0, False: 0]
  ------------------
  118|      0|      if constexpr (std::is_destructible_v<TValue>) {
  ------------------
  |  Branch (118:21): [Folded - Ignored]
  ------------------
  119|      0|        DownCastValue(value)->~TValue();
  120|      0|      }
  121|      0|      allocator->Deallocate(value);
  122|  4.51k|    } else {
  123|       |      // Like delete but properly handles TValue=char[] etc.
  124|  4.51k|      std::default_delete<TValue>{}(DownCastValue(value));
  125|  4.51k|    }
  126|  4.51k|  }
_ZN7rocksdb24BasicTypedCacheHelperFnsINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEEE13DownCastValueEPv:
  109|  4.51k|  inline static TValuePtr DownCastValue(ObjectPtr value) {
  110|  4.51k|    return static_cast<TValuePtr>(value);
  111|  4.51k|  }
_ZN7rocksdb24BasicTypedCacheInterfaceINS_24CacheEntryStatsCollectorINS_13InternalStats19CacheEntryRoleStatsEEELNS_14CacheEntryRoleE13EPNS_5CacheEE11SharedGuardEPNS8_11TypedHandleE:
  188|  9.02k|  inline std::shared_ptr<TValue> SharedGuard(TypedHandle* handle) {
  189|  9.02k|    if (handle) {
  ------------------
  |  Branch (189:9): [True: 9.02k, False: 0]
  ------------------
  190|  9.02k|      return MakeSharedCacheHandleGuard<TValue>(&*this->cache_, handle);
  191|  9.02k|    } else {
  192|      0|      return {};
  193|      0|    }
  194|  9.02k|  }
_ZN7rocksdb24BasicTypedCacheInterfaceINS_11TableReaderELNS_14CacheEntryRoleE13EPNS_5CacheEE5ValueEPNS5_11TypedHandleE:
  196|  13.4k|  inline TValuePtr Value(TypedHandle* handle) {
  197|  13.4k|    return BasicTypedCacheHelperFns<TValue>::DownCastValue(
  198|  13.4k|        this->cache_->Value(handle));
  199|  13.4k|  }
_ZN7rocksdb24BasicTypedCacheHelperFnsINS_11TableReaderEE13DownCastValueEPv:
  109|  17.9k|  inline static TValuePtr DownCastValue(ObjectPtr value) {
  110|  17.9k|    return static_cast<TValuePtr>(value);
  111|  17.9k|  }
_ZN7rocksdb24BasicTypedCacheInterfaceINS_11TableReaderELNS_14CacheEntryRoleE13EPNS_5CacheEE6LookupERKNS_5SliceEPNS_10StatisticsE:
  171|  13.4k|  inline TypedHandle* Lookup(const Slice& key, Statistics* stats = nullptr) {
  172|  13.4k|    return static_cast<TypedHandle*>(this->cache_->BasicLookup(key, stats));
  173|  13.4k|  }
_ZN7rocksdb24BasicTypedCacheInterfaceINS_11TableReaderELNS_14CacheEntryRoleE13EPNS_5CacheEE6InsertERKNS_5SliceEPS1_mPPNS5_11TypedHandleENS3_8PriorityE:
  164|  4.48k|                       Priority priority = Priority::LOW) {
  165|  4.48k|    auto untyped_handle = reinterpret_cast<Handle**>(handle);
  166|  4.48k|    return this->cache_->Insert(
  167|  4.48k|        key, BasicTypedCacheHelperFns<TValue>::UpCastValue(value),
  168|  4.48k|        GetBasicHelper(), charge, untyped_handle, priority);
  169|  4.48k|  }
_ZN7rocksdb24BasicTypedCacheHelperFnsINS_11TableReaderEE11UpCastValueEPS1_:
  108|  4.48k|  inline static ObjectPtr UpCastValue(TValuePtr value) { return value; }
_ZN7rocksdb21BasicTypedCacheHelperINS_11TableReaderELNS_14CacheEntryRoleE13EE14GetBasicHelperEv:
  134|  4.48k|  static const Cache::CacheItemHelper* GetBasicHelper() {
  135|  4.48k|    static const Cache::CacheItemHelper kHelper{kRole,
  136|  4.48k|                                                &BasicTypedCacheHelper::Delete};
  137|  4.48k|    return &kHelper;
  138|  4.48k|  }
_ZN7rocksdb24BasicTypedCacheHelperFnsINS_11TableReaderEE6DeleteEPvPNS_15MemoryAllocatorE:
  113|  4.48k|  static void Delete(ObjectPtr value, MemoryAllocator* allocator) {
  114|       |    // FIXME: Currently, no callers actually allocate the ObjectPtr objects
  115|       |    // using the custom allocator, just subobjects that keep a reference to
  116|       |    // the allocator themselves (with CacheAllocationPtr).
  117|  4.48k|    if (/*DISABLED*/ false && allocator) {
  ------------------
  |  Branch (117:22): [Folded - Ignored]
  |  Branch (117:31): [True: 0, False: 0]
  ------------------
  118|      0|      if constexpr (std::is_destructible_v<TValue>) {
  ------------------
  |  Branch (118:21): [Folded - Ignored]
  ------------------
  119|      0|        DownCastValue(value)->~TValue();
  120|      0|      }
  121|      0|      allocator->Deallocate(value);
  122|  4.48k|    } else {
  123|       |      // Like delete but properly handles TValue=char[] etc.
  124|  4.48k|      std::default_delete<TValue>{}(DownCastValue(value));
  125|  4.48k|    }
  126|  4.48k|  }
_ZN7rocksdb18BaseCacheInterfaceIPNS_5CacheEE24RegisterReleaseAsCleanupEPNS1_6HandleERNS_9CleanableE:
   64|  4.48k|  inline void RegisterReleaseAsCleanup(Handle* handle, Cleanable& cleanable) {
   65|  4.48k|    cleanable.RegisterCleanup(&ReleaseCacheHandleCleanup, get(), handle);
   66|  4.48k|  }
_ZN7rocksdb18BaseCacheInterfaceIPNS_5CacheEE24ReleaseAndEraseIfLastRefEPNS1_6HandleE:
   60|  4.48k|  inline void ReleaseAndEraseIfLastRef(Handle* handle) {
   61|  4.48k|    cache_->Release(handle, /*erase_if_last_ref*/ true);
   62|  4.48k|  }
_ZN7rocksdb20FullTypedCacheHelperINS_21ParsedFullFilterBlockENS_18BlockCreateContextELNS_14CacheEntryRoleE1EE13GetFullHelperEv:
  261|      2|  static const Cache::CacheItemHelper* GetFullHelper() {
  262|      2|    static const Cache::CacheItemHelper kHelper{
  263|      2|        kRole,
  264|      2|        &FullTypedCacheHelper::Delete,
  265|      2|        &FullTypedCacheHelper::Size,
  266|      2|        &FullTypedCacheHelper::SaveTo,
  267|      2|        &FullTypedCacheHelper::Create,
  268|      2|        BasicTypedCacheHelper<TValue, kRole>::GetBasicHelper()};
  269|      2|    return &kHelper;
  270|      2|  }
_ZN7rocksdb21BasicTypedCacheHelperINS_21ParsedFullFilterBlockELNS_14CacheEntryRoleE1EE14GetBasicHelperEv:
  134|      4|  static const Cache::CacheItemHelper* GetBasicHelper() {
  135|      4|    static const Cache::CacheItemHelper kHelper{kRole,
  136|      4|                                                &BasicTypedCacheHelper::Delete};
  137|      4|    return &kHelper;
  138|      4|  }
_ZN7rocksdb20FullTypedCacheHelperINS_17UncompressionDictENS_18BlockCreateContextELNS_14CacheEntryRoleE5EE13GetFullHelperEv:
  261|      2|  static const Cache::CacheItemHelper* GetFullHelper() {
  262|      2|    static const Cache::CacheItemHelper kHelper{
  263|      2|        kRole,
  264|      2|        &FullTypedCacheHelper::Delete,
  265|      2|        &FullTypedCacheHelper::Size,
  266|      2|        &FullTypedCacheHelper::SaveTo,
  267|      2|        &FullTypedCacheHelper::Create,
  268|      2|        BasicTypedCacheHelper<TValue, kRole>::GetBasicHelper()};
  269|      2|    return &kHelper;
  270|      2|  }
_ZN7rocksdb21BasicTypedCacheHelperINS_17UncompressionDictELNS_14CacheEntryRoleE5EE14GetBasicHelperEv:
  134|      4|  static const Cache::CacheItemHelper* GetBasicHelper() {
  135|      4|    static const Cache::CacheItemHelper kHelper{kRole,
  136|      4|                                                &BasicTypedCacheHelper::Delete};
  137|      4|    return &kHelper;
  138|      4|  }
_ZN7rocksdb23FullTypedCacheInterfaceINS_11Block_kDataENS_18BlockCreateContextELNS_14CacheEntryRoleE0EPNS_5CacheEE10InsertFullERKNS_5SliceEPS1_mPPNS_24BasicTypedCacheInterfaceIS1_LS3_0ES5_E11TypedHandleENS4_8PriorityENS_9CacheTierES9_NS_15CompressionTypeE:
  309|  11.7k|      CompressionType type = CompressionType::kNoCompression) {
  310|  11.7k|    auto untyped_handle = reinterpret_cast<Handle**>(handle);
  311|  11.7k|    auto helper = lowest_used_cache_tier > CacheTier::kVolatileTier
  ------------------
  |  Branch (311:19): [True: 11.7k, False: 0]
  ------------------
  312|  11.7k|                      ? GetFullHelper()
  313|  11.7k|                      : GetBasicHelper();
  314|  11.7k|    return this->cache_->Insert(key, UpCastValue(value), helper, charge,
  315|  11.7k|                                untyped_handle, priority, compressed, type);
  316|  11.7k|  }
_ZN7rocksdb20FullTypedCacheHelperINS_11Block_kDataENS_18BlockCreateContextELNS_14CacheEntryRoleE0EE13GetFullHelperEv:
  261|  23.5k|  static const Cache::CacheItemHelper* GetFullHelper() {
  262|  23.5k|    static const Cache::CacheItemHelper kHelper{
  263|  23.5k|        kRole,
  264|  23.5k|        &FullTypedCacheHelper::Delete,
  265|  23.5k|        &FullTypedCacheHelper::Size,
  266|  23.5k|        &FullTypedCacheHelper::SaveTo,
  267|  23.5k|        &FullTypedCacheHelper::Create,
  268|  23.5k|        BasicTypedCacheHelper<TValue, kRole>::GetBasicHelper()};
  269|  23.5k|    return &kHelper;
  270|  23.5k|  }
_ZN7rocksdb24BasicTypedCacheHelperFnsINS_11Block_kDataEE6DeleteEPvPNS_15MemoryAllocatorE:
  113|  11.7k|  static void Delete(ObjectPtr value, MemoryAllocator* allocator) {
  114|       |    // FIXME: Currently, no callers actually allocate the ObjectPtr objects
  115|       |    // using the custom allocator, just subobjects that keep a reference to
  116|       |    // the allocator themselves (with CacheAllocationPtr).
  117|  11.7k|    if (/*DISABLED*/ false && allocator) {
  ------------------
  |  Branch (117:22): [Folded - Ignored]
  |  Branch (117:31): [True: 0, False: 0]
  ------------------
  118|      0|      if constexpr (std::is_destructible_v<TValue>) {
  ------------------
  |  Branch (118:21): [Folded - Ignored]
  ------------------
  119|      0|        DownCastValue(value)->~TValue();
  120|      0|      }
  121|      0|      allocator->Deallocate(value);
  122|  11.7k|    } else {
  123|       |      // Like delete but properly handles TValue=char[] etc.
  124|  11.7k|      std::default_delete<TValue>{}(DownCastValue(value));
  125|  11.7k|    }
  126|  11.7k|  }
_ZN7rocksdb24BasicTypedCacheHelperFnsINS_11Block_kDataEE13DownCastValueEPv:
  109|  11.7k|  inline static TValuePtr DownCastValue(ObjectPtr value) {
  110|  11.7k|    return static_cast<TValuePtr>(value);
  111|  11.7k|  }
_ZN7rocksdb21BasicTypedCacheHelperINS_11Block_kDataELNS_14CacheEntryRoleE0EE14GetBasicHelperEv:
  134|      4|  static const Cache::CacheItemHelper* GetBasicHelper() {
  135|      4|    static const Cache::CacheItemHelper kHelper{kRole,
  136|      4|                                                &BasicTypedCacheHelper::Delete};
  137|      4|    return &kHelper;
  138|      4|  }
_ZN7rocksdb24BasicTypedCacheHelperFnsINS_11Block_kDataEE11UpCastValueEPS1_:
  108|  11.7k|  inline static ObjectPtr UpCastValue(TValuePtr value) { return value; }
_ZN7rocksdb23FullTypedCacheInterfaceINS_11Block_kDataENS_18BlockCreateContextELNS_14CacheEntryRoleE0EPNS_5CacheEE10LookupFullERKNS_5SliceEPS2_NS4_8PriorityEPNS_10StatisticsENS_9CacheTierE:
  347|  11.7k|      CacheTier lowest_used_cache_tier = CacheTier::kNonVolatileBlockTier) {
  348|  11.7k|    if (lowest_used_cache_tier > CacheTier::kVolatileTier) {
  ------------------
  |  Branch (348:9): [True: 11.7k, False: 0]
  ------------------
  349|  11.7k|      return static_cast<TypedHandle*>(this->cache_->Lookup(
  350|  11.7k|          key, GetFullHelper(), create_context, priority, stats));
  351|  11.7k|    } else {
  352|      0|      return BasicTypedCacheInterface<TValue, kRole, CachePtr>::Lookup(key,
  353|      0|                                                                       stats);
  354|      0|    }
  355|  11.7k|  }
_ZN7rocksdb20FullTypedCacheHelperINS_12Block_kIndexENS_18BlockCreateContextELNS_14CacheEntryRoleE4EE13GetFullHelperEv:
  261|      2|  static const Cache::CacheItemHelper* GetFullHelper() {
  262|      2|    static const Cache::CacheItemHelper kHelper{
  263|      2|        kRole,
  264|      2|        &FullTypedCacheHelper::Delete,
  265|      2|        &FullTypedCacheHelper::Size,
  266|      2|        &FullTypedCacheHelper::SaveTo,
  267|      2|        &FullTypedCacheHelper::Create,
  268|      2|        BasicTypedCacheHelper<TValue, kRole>::GetBasicHelper()};
  269|      2|    return &kHelper;
  270|      2|  }
_ZN7rocksdb21BasicTypedCacheHelperINS_12Block_kIndexELNS_14CacheEntryRoleE4EE14GetBasicHelperEv:
  134|      4|  static const Cache::CacheItemHelper* GetBasicHelper() {
  135|      4|    static const Cache::CacheItemHelper kHelper{kRole,
  136|      4|                                                &BasicTypedCacheHelper::Delete};
  137|      4|    return &kHelper;
  138|      4|  }
_ZN7rocksdb20FullTypedCacheHelperINS_27Block_kFilterPartitionIndexENS_18BlockCreateContextELNS_14CacheEntryRoleE2EE13GetFullHelperEv:
  261|      2|  static const Cache::CacheItemHelper* GetFullHelper() {
  262|      2|    static const Cache::CacheItemHelper kHelper{
  263|      2|        kRole,
  264|      2|        &FullTypedCacheHelper::Delete,
  265|      2|        &FullTypedCacheHelper::Size,
  266|      2|        &FullTypedCacheHelper::SaveTo,
  267|      2|        &FullTypedCacheHelper::Create,
  268|      2|        BasicTypedCacheHelper<TValue, kRole>::GetBasicHelper()};
  269|      2|    return &kHelper;
  270|      2|  }
_ZN7rocksdb21BasicTypedCacheHelperINS_27Block_kFilterPartitionIndexELNS_14CacheEntryRoleE2EE14GetBasicHelperEv:
  134|      4|  static const Cache::CacheItemHelper* GetBasicHelper() {
  135|      4|    static const Cache::CacheItemHelper kHelper{kRole,
  136|      4|                                                &BasicTypedCacheHelper::Delete};
  137|      4|    return &kHelper;
  138|      4|  }
_ZN7rocksdb20FullTypedCacheHelperINS_20Block_kRangeDeletionENS_18BlockCreateContextELNS_14CacheEntryRoleE5EE13GetFullHelperEv:
  261|      2|  static const Cache::CacheItemHelper* GetFullHelper() {
  262|      2|    static const Cache::CacheItemHelper kHelper{
  263|      2|        kRole,
  264|      2|        &FullTypedCacheHelper::Delete,
  265|      2|        &FullTypedCacheHelper::Size,
  266|      2|        &FullTypedCacheHelper::SaveTo,
  267|      2|        &FullTypedCacheHelper::Create,
  268|      2|        BasicTypedCacheHelper<TValue, kRole>::GetBasicHelper()};
  269|      2|    return &kHelper;
  270|      2|  }
_ZN7rocksdb21BasicTypedCacheHelperINS_20Block_kRangeDeletionELNS_14CacheEntryRoleE5EE14GetBasicHelperEv:
  134|      4|  static const Cache::CacheItemHelper* GetBasicHelper() {
  135|      4|    static const Cache::CacheItemHelper kHelper{kRole,
  136|      4|                                                &BasicTypedCacheHelper::Delete};
  137|      4|    return &kHelper;
  138|      4|  }
_ZNK7rocksdb18BaseCacheInterfaceIPNS_5CacheEEcvbEv:
   70|  35.2k|  explicit inline operator bool() const noexcept { return cache_ != nullptr; }

_ZN7rocksdb18ArenaWrappedDBIter4InitEPNS_3EnvERKNS_11ReadOptionsERKNS_16ImmutableOptionsERKNS_16MutableCFOptionsEPKNS_7VersionERKmmmPNS_12ReadCallbackEPNS_22ColumnFamilyHandleImplEbb:
   47|  4.51k|    ColumnFamilyHandleImpl* cfh, bool expose_blob_index, bool allow_refresh) {
   48|  4.51k|  auto mem = arena_.AllocateAligned(sizeof(DBIter));
   49|  4.51k|  db_iter_ = new (mem) DBIter(
   50|  4.51k|      env, read_options, ioptions, mutable_cf_options, ioptions.user_comparator,
   51|  4.51k|      /* iter */ nullptr, version, sequence, true,
   52|  4.51k|      max_sequential_skip_in_iteration, read_callback, cfh, expose_blob_index);
   53|  4.51k|  sv_number_ = version_number;
   54|  4.51k|  read_options_ = read_options;
   55|  4.51k|  allow_refresh_ = allow_refresh;
   56|  4.51k|  memtable_range_tombstone_iter_ = nullptr;
   57|       |
   58|  4.51k|  if (!CheckFSFeatureSupport(env->GetFileSystem().get(),
  ------------------
  |  Branch (58:7): [True: 4.51k, False: 0]
  ------------------
   59|  4.51k|                             FSSupportedOps::kAsyncIO)) {
   60|  4.51k|    read_options_.async_io = false;
   61|  4.51k|  }
   62|  4.51k|}
_ZN7rocksdb25NewArenaWrappedDbIteratorEPNS_3EnvERKNS_11ReadOptionsERKNS_16ImmutableOptionsERKNS_16MutableCFOptionsEPKNS_7VersionERKmmmPNS_12ReadCallbackEPNS_22ColumnFamilyHandleImplEbb:
  170|  4.51k|    ColumnFamilyHandleImpl* cfh, bool expose_blob_index, bool allow_refresh) {
  171|  4.51k|  ArenaWrappedDBIter* iter = new ArenaWrappedDBIter();
  172|  4.51k|  iter->Init(env, read_options, ioptions, mutable_cf_options, version, sequence,
  173|  4.51k|             max_sequential_skip_in_iterations, version_number, read_callback,
  174|  4.51k|             cfh, expose_blob_index, allow_refresh);
  175|  4.51k|  if (cfh != nullptr && allow_refresh) {
  ------------------
  |  Branch (175:7): [True: 4.51k, False: 0]
  |  Branch (175:25): [True: 4.51k, False: 0]
  ------------------
  176|  4.51k|    iter->StoreRefreshInfo(cfh, read_callback, expose_blob_index);
  177|  4.51k|  }
  178|       |
  179|  4.51k|  return iter;
  180|  4.51k|}

_ZN7rocksdb18ArenaWrappedDBIter14GetReadOptionsEv:
   50|  4.51k|  const ReadOptions& GetReadOptions() { return read_options_; }
_ZN7rocksdb18ArenaWrappedDBIterD2Ev:
   38|  4.51k|  ~ArenaWrappedDBIter() override {
   39|  4.51k|    if (db_iter_ != nullptr) {
  ------------------
  |  Branch (39:9): [True: 4.51k, False: 0]
  ------------------
   40|  4.51k|      db_iter_->~DBIter();
   41|  4.51k|    } else {
   42|      0|      assert(false);
   43|      0|    }
   44|  4.51k|  }
_ZN7rocksdb18ArenaWrappedDBIter8GetArenaEv:
   48|  4.51k|  virtual Arena* GetArena() { return &arena_; }
_ZN7rocksdb18ArenaWrappedDBIter18SetIterUnderDBIterEPNS_20InternalIteratorBaseINS_5SliceEEE:
   54|  4.51k|  virtual void SetIterUnderDBIter(InternalIterator* iter) {
   55|  4.51k|    db_iter_->SetIter(iter);
   56|  4.51k|  }
_ZN7rocksdb18ArenaWrappedDBIter29SetMemtableRangetombstoneIterEPNSt3__110unique_ptrINS_25TruncatedRangeDelIteratorENS1_14default_deleteIS3_EEEE:
   59|  2.90k|      std::unique_ptr<TruncatedRangeDelIterator>* iter) {
   60|  2.90k|    memtable_range_tombstone_iter_ = iter;
   61|  2.90k|  }
_ZNK7rocksdb18ArenaWrappedDBIter5ValidEv:
   63|  34.1k|  bool Valid() const override { return db_iter_->Valid(); }
_ZN7rocksdb18ArenaWrappedDBIter11SeekToFirstEv:
   64|  4.51k|  void SeekToFirst() override { db_iter_->SeekToFirst(); }
_ZN7rocksdb18ArenaWrappedDBIter4NextEv:
   72|  29.5k|  void Next() override { db_iter_->Next(); }
_ZNK7rocksdb18ArenaWrappedDBIter3keyEv:
   74|  29.5k|  Slice key() const override { return db_iter_->key(); }
_ZNK7rocksdb18ArenaWrappedDBIter5valueEv:
   75|  29.5k|  Slice value() const override { return db_iter_->value(); }
_ZN7rocksdb18ArenaWrappedDBIter16StoreRefreshInfoEPNS_22ColumnFamilyHandleImplEPNS_12ReadCallbackEb:
   97|  4.51k|                        ReadCallback* read_callback, bool expose_blob_index) {
   98|  4.51k|    cfh_ = cfh;
   99|  4.51k|    read_callback_ = read_callback;
  100|  4.51k|    expose_blob_index_ = expose_blob_index;
  101|  4.51k|  }

_ZN7rocksdb13BlobFileCacheC2EPNS_5CacheEPKNS_16ImmutableOptionsEPKNS_11FileOptionsEjPNS_13HistogramImplERKNSt3__110shared_ptrINS_8IOTracerEEE:
   33|  9.02k|      io_tracer_(io_tracer) {
   34|  9.02k|  assert(cache_);
   35|  9.02k|  assert(immutable_options_);
   36|  9.02k|  assert(file_options_);
   37|  9.02k|}

_ZN7rocksdb26BlobFileCompletionCallbackC2EPNS_14SstFileManagerEPNS_17InstrumentedMutexEPNS_12ErrorHandlerEPNS_11EventLoggerERKNSt3__16vectorINS9_10shared_ptrINS_13EventListenerEEENS9_9allocatorISD_EEEERKNS9_12basic_stringIcNS9_11char_traitsIcEENSE_IcEEEE:
   25|  9.02k|      : event_logger_(event_logger), listeners_(listeners), dbname_(dbname) {
   26|  9.02k|    sst_file_manager_ = sst_file_manager;
   27|  9.02k|    mutex_ = mutex;
   28|  9.02k|    error_handler_ = error_handler;
   29|  9.02k|  }

_ZN7rocksdb10BlobSourceC2EPKNS_16ImmutableOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESC_PNS_13BlobFileCacheE:
   32|  9.02k|      lowest_used_cache_tier_(immutable_options->lowest_used_cache_tier) {
   33|  9.02k|  auto bbto =
   34|  9.02k|      immutable_options->table_factory->GetOptions<BlockBasedTableOptions>();
   35|  9.02k|  if (bbto &&
  ------------------
  |  Branch (35:7): [True: 9.02k, False: 0]
  |  Branch (35:7): [True: 0, False: 9.02k]
  ------------------
   36|  9.02k|      bbto->cache_usage_options.options_overrides.at(CacheEntryRole::kBlobCache)
  ------------------
  |  Branch (36:7): [True: 0, False: 9.02k]
  ------------------
   37|  9.02k|              .charged == CacheEntryRoleOptions::Decision::kEnabled) {
   38|      0|    blob_cache_ = SharedCacheInterface{std::make_shared<ChargedCache>(
   39|      0|        immutable_options->blob_cache, bbto->block_cache)};
   40|      0|  }
   41|  9.02k|}
_ZN7rocksdb10BlobSourceD2Ev:
   43|  9.02k|BlobSource::~BlobSource() = default;

_ZN7rocksdb15NewTableBuilderERKNS_19TableBuilderOptionsEPNS_18WritableFileWriterE:
   52|  4.48k|                              WritableFileWriter* file) {
   53|  4.48k|  assert((tboptions.column_family_id ==
   54|  4.48k|          TablePropertiesCollectorFactory::Context::kUnknownColumnFamily) ==
   55|  4.48k|         tboptions.column_family_name.empty());
   56|  4.48k|  return tboptions.ioptions.table_factory->NewTableBuilder(tboptions, file);
   57|  4.48k|}
_ZN7rocksdb10BuildTableERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPNS_10VersionSetERKNS_18ImmutableDBOptionsERKNS_19TableBuilderOptionsERKNS_11FileOptionsEPNS_10TableCacheEPNS_20InternalIteratorBaseINS_5SliceEEENS0_6vectorINS0_10unique_ptrINS_32FragmentedRangeTombstoneIteratorENS0_14default_deleteISS_EEEENS4_ISV_EEEEPNS_12FileMetaDataEPNSQ_INS_16BlobFileAdditionENS4_IS10_EEEENSQ_ImNS4_ImEEEEmmmPNS_15SnapshotCheckerEbPNS_13InternalStatsEPNS_8IOStatusERKNS0_10shared_ptrINS_8IOTracerEEENS_22BlobFileCreationReasonENS_10UnownedPtrIKNS_18SeqnoToTimeMappingEEEPNS_11EventLoggerEiPNS_15TablePropertiesENS_3Env17WriteLifeTimeHintEPS7_PNS_26BlobFileCompletionCallbackEPNS_7VersionEPmS1X_S1X_:
   78|  4.48k|    uint64_t* memtable_garbage_bytes) {
   79|  4.48k|  assert((tboptions.column_family_id ==
   80|  4.48k|          TablePropertiesCollectorFactory::Context::kUnknownColumnFamily) ==
   81|  4.48k|         tboptions.column_family_name.empty());
   82|  4.48k|  auto& mutable_cf_options = tboptions.moptions;
   83|  4.48k|  auto& ioptions = tboptions.ioptions;
   84|       |  // Reports the IOStats for flush for every following bytes.
   85|  4.48k|  const size_t kReportFlushIOStatsEvery = 1048576;
   86|  4.48k|  OutputValidator output_validator(tboptions.internal_comparator,
   87|  4.48k|                                   /*enable_hash=*/paranoid_file_checks);
   88|  4.48k|  Status s;
   89|  4.48k|  meta->fd.file_size = 0;
   90|  4.48k|  iter->SeekToFirst();
   91|  4.48k|  std::unique_ptr<CompactionRangeDelAggregator> range_del_agg(
   92|  4.48k|      new CompactionRangeDelAggregator(&tboptions.internal_comparator,
   93|  4.48k|                                       snapshots, full_history_ts_low));
   94|  4.48k|  uint64_t num_unfragmented_tombstones = 0;
   95|  4.48k|  uint64_t total_tombstone_payload_bytes = 0;
   96|  4.48k|  for (auto& range_del_iter : range_del_iters) {
  ------------------
  |  Branch (96:29): [True: 2.90k, False: 4.48k]
  ------------------
   97|  2.90k|    num_unfragmented_tombstones +=
   98|  2.90k|        range_del_iter->num_unfragmented_tombstones();
   99|  2.90k|    total_tombstone_payload_bytes +=
  100|  2.90k|        range_del_iter->total_tombstone_payload_bytes();
  101|  2.90k|    range_del_agg->AddTombstones(std::move(range_del_iter));
  102|  2.90k|  }
  103|       |
  104|  4.48k|  std::string fname = TableFileName(ioptions.cf_paths, meta->fd.GetNumber(),
  105|  4.48k|                                    meta->fd.GetPathId());
  106|  4.48k|  std::vector<std::string> blob_file_paths;
  107|  4.48k|  std::string file_checksum = kUnknownFileChecksum;
  108|  4.48k|  std::string file_checksum_func_name = kUnknownFileChecksumFuncName;
  109|  4.48k|  EventHelpers::NotifyTableFileCreationStarted(ioptions.listeners, dbname,
  110|  4.48k|                                               tboptions.column_family_name,
  111|  4.48k|                                               fname, job_id, tboptions.reason);
  112|  4.48k|  Env* env = db_options.env;
  113|  4.48k|  assert(env);
  114|  4.48k|  FileSystem* fs = db_options.fs.get();
  115|  4.48k|  assert(fs);
  116|       |
  117|  4.48k|  TableProperties tp;
  118|  4.48k|  bool table_file_created = false;
  119|  4.48k|  if (iter->Valid() || !range_del_agg->IsEmpty()) {
  ------------------
  |  Branch (119:7): [True: 4.16k, False: 318]
  |  Branch (119:24): [True: 318, False: 0]
  ------------------
  120|  4.48k|    std::unique_ptr<CompactionFilter> compaction_filter;
  121|  4.48k|    if (ioptions.compaction_filter_factory != nullptr &&
  ------------------
  |  Branch (121:9): [True: 0, False: 4.48k]
  ------------------
  122|  4.48k|        ioptions.compaction_filter_factory->ShouldFilterTableFileCreation(
  ------------------
  |  Branch (122:9): [True: 0, False: 0]
  ------------------
  123|      0|            tboptions.reason)) {
  124|      0|      CompactionFilter::Context context;
  125|      0|      context.is_full_compaction = false;
  126|      0|      context.is_manual_compaction = false;
  127|      0|      context.column_family_id = tboptions.column_family_id;
  128|      0|      context.reason = tboptions.reason;
  129|      0|      compaction_filter =
  130|      0|          ioptions.compaction_filter_factory->CreateCompactionFilter(context);
  131|      0|      if (compaction_filter != nullptr &&
  ------------------
  |  Branch (131:11): [True: 0, False: 0]
  ------------------
  132|      0|          !compaction_filter->IgnoreSnapshots()) {
  ------------------
  |  Branch (132:11): [True: 0, False: 0]
  ------------------
  133|      0|        s.PermitUncheckedError();
  134|      0|        return Status::NotSupported(
  135|      0|            "CompactionFilter::IgnoreSnapshots() = false is not supported "
  136|      0|            "anymore.");
  137|      0|      }
  138|      0|    }
  139|       |
  140|  4.48k|    TableBuilder* builder;
  141|  4.48k|    std::unique_ptr<WritableFileWriter> file_writer;
  142|  4.48k|    {
  143|  4.48k|      std::unique_ptr<FSWritableFile> file;
  144|       |#ifndef NDEBUG
  145|       |      bool use_direct_writes = file_options.use_direct_writes;
  146|       |      TEST_SYNC_POINT_CALLBACK("BuildTable:create_file", &use_direct_writes);
  147|       |#endif  // !NDEBUG
  148|  4.48k|      IOStatus io_s = NewWritableFile(fs, fname, &file, file_options);
  149|  4.48k|      assert(s.ok());
  150|  4.48k|      s = io_s;
  151|  4.48k|      if (io_status->ok()) {
  ------------------
  |  Branch (151:11): [True: 4.48k, False: 0]
  ------------------
  152|  4.48k|        *io_status = io_s;
  153|  4.48k|      }
  154|  4.48k|      if (!s.ok()) {
  ------------------
  |  Branch (154:11): [True: 0, False: 4.48k]
  ------------------
  155|      0|        EventHelpers::LogAndNotifyTableFileCreationFinished(
  156|      0|            event_logger, ioptions.listeners, dbname,
  157|      0|            tboptions.column_family_name, fname, job_id, meta->fd,
  158|      0|            kInvalidBlobFileNumber, tp, tboptions.reason, s, file_checksum,
  159|      0|            file_checksum_func_name);
  160|      0|        return s;
  161|      0|      }
  162|       |
  163|  4.48k|      table_file_created = true;
  164|  4.48k|      FileTypeSet tmp_set = ioptions.checksum_handoff_file_types;
  165|  4.48k|      file->SetIOPriority(tboptions.write_options.rate_limiter_priority);
  166|  4.48k|      file->SetWriteLifeTimeHint(write_hint);
  167|  4.48k|      file_writer.reset(new WritableFileWriter(
  168|  4.48k|          std::move(file), fname, file_options, ioptions.clock, io_tracer,
  169|  4.48k|          ioptions.stats, Histograms::SST_WRITE_MICROS, ioptions.listeners,
  170|  4.48k|          ioptions.file_checksum_gen_factory.get(),
  171|  4.48k|          tmp_set.Contains(FileType::kTableFile), false));
  172|       |
  173|  4.48k|      builder = NewTableBuilder(tboptions, file_writer.get());
  174|  4.48k|    }
  175|       |
  176|      0|    auto ucmp = tboptions.internal_comparator.user_comparator();
  177|  4.48k|    MergeHelper merge(
  178|  4.48k|        env, ucmp, ioptions.merge_operator.get(), compaction_filter.get(),
  179|  4.48k|        ioptions.logger, true /* internal key corruption is not ok */,
  180|  4.48k|        snapshots.empty() ? 0 : snapshots.back(), snapshot_checker);
  ------------------
  |  Branch (180:9): [True: 4.48k, False: 0]
  ------------------
  181|       |
  182|  4.48k|    std::unique_ptr<BlobFileBuilder> blob_file_builder(
  183|  4.48k|        (mutable_cf_options.enable_blob_files &&
  ------------------
  |  Branch (183:10): [True: 0, False: 4.48k]
  ------------------
  184|  4.48k|         tboptions.level_at_creation >=
  ------------------
  |  Branch (184:10): [True: 0, False: 0]
  ------------------
  185|      0|             mutable_cf_options.blob_file_starting_level &&
  186|  4.48k|         blob_file_additions)
  ------------------
  |  Branch (186:10): [True: 0, False: 0]
  ------------------
  187|  4.48k|            ? new BlobFileBuilder(
  188|      0|                  versions, fs, &ioptions, &mutable_cf_options, &file_options,
  189|      0|                  &(tboptions.write_options), tboptions.db_id,
  190|      0|                  tboptions.db_session_id, job_id, tboptions.column_family_id,
  191|      0|                  tboptions.column_family_name, write_hint, io_tracer,
  192|      0|                  blob_callback, blob_creation_reason, &blob_file_paths,
  193|      0|                  blob_file_additions)
  194|  4.48k|            : nullptr);
  195|       |
  196|  4.48k|    const std::atomic<bool> kManualCompactionCanceledFalse{false};
  197|  4.48k|    CompactionIterator c_iter(
  198|  4.48k|        iter, ucmp, &merge, kMaxSequenceNumber, &snapshots, earliest_snapshot,
  199|  4.48k|        earliest_write_conflict_snapshot, job_snapshot, snapshot_checker, env,
  200|  4.48k|        ShouldReportDetailedTime(env, ioptions.stats),
  201|  4.48k|        true /* internal key corruption is not ok */, range_del_agg.get(),
  202|  4.48k|        blob_file_builder.get(), ioptions.allow_data_in_errors,
  203|  4.48k|        ioptions.enforce_single_del_contracts,
  204|  4.48k|        /*manual_compaction_canceled=*/kManualCompactionCanceledFalse,
  205|  4.48k|        true /* must_count_input_entries */,
  206|  4.48k|        /*compaction=*/nullptr, compaction_filter.get(),
  207|  4.48k|        /*shutting_down=*/nullptr, db_options.info_log, full_history_ts_low);
  208|       |
  209|  4.48k|    const size_t ts_sz = ucmp->timestamp_size();
  210|  4.48k|    const bool logical_strip_timestamp =
  211|  4.48k|        ts_sz > 0 && !ioptions.persist_user_defined_timestamps;
  ------------------
  |  Branch (211:9): [True: 0, False: 4.48k]
  |  Branch (211:22): [True: 0, False: 0]
  ------------------
  212|       |
  213|  4.48k|    SequenceNumber smallest_preferred_seqno = kMaxSequenceNumber;
  214|  4.48k|    std::string key_after_flush_buf;
  215|  4.48k|    std::string value_buf;
  216|  4.48k|    c_iter.SeekToFirst();
  217|  39.1k|    for (; c_iter.Valid(); c_iter.Next()) {
  ------------------
  |  Branch (217:12): [True: 34.6k, False: 4.48k]
  ------------------
  218|  34.6k|      const Slice& key = c_iter.key();
  219|  34.6k|      const Slice& value = c_iter.value();
  220|  34.6k|      ParsedInternalKey ikey = c_iter.ikey();
  221|  34.6k|      key_after_flush_buf.assign(key.data(), key.size());
  222|  34.6k|      Slice key_after_flush = key_after_flush_buf;
  223|  34.6k|      Slice value_after_flush = value;
  224|       |
  225|       |      // If user defined timestamps will be stripped from user key after flush,
  226|       |      // the in memory version of the key act logically the same as one with a
  227|       |      // minimum timestamp. We update the timestamp here so file boundary and
  228|       |      // output validator, block builder all see the effect of the stripping.
  229|  34.6k|      if (logical_strip_timestamp) {
  ------------------
  |  Branch (229:11): [True: 0, False: 34.6k]
  ------------------
  230|      0|        key_after_flush_buf.clear();
  231|      0|        ReplaceInternalKeyWithMinTimestamp(&key_after_flush_buf, key, ts_sz);
  232|      0|        key_after_flush = key_after_flush_buf;
  233|      0|      }
  234|       |
  235|  34.6k|      if (ikey.type == kTypeValuePreferredSeqno) {
  ------------------
  |  Branch (235:11): [True: 0, False: 34.6k]
  ------------------
  236|      0|        auto [unpacked_value, unix_write_time] =
  237|      0|            ParsePackedValueWithWriteTime(value);
  238|      0|        SequenceNumber preferred_seqno =
  239|      0|            seqno_to_time_mapping
  ------------------
  |  Branch (239:13): [True: 0, False: 0]
  ------------------
  240|      0|                ? seqno_to_time_mapping->GetProximalSeqnoBeforeTime(
  241|      0|                      unix_write_time)
  242|      0|                : kMaxSequenceNumber;
  243|      0|        if (preferred_seqno < ikey.sequence) {
  ------------------
  |  Branch (243:13): [True: 0, False: 0]
  ------------------
  244|      0|          value_after_flush =
  245|      0|              PackValueAndSeqno(unpacked_value, preferred_seqno, &value_buf);
  246|      0|          smallest_preferred_seqno =
  247|      0|              std::min(smallest_preferred_seqno, preferred_seqno);
  248|      0|        } else {
  249|       |          // Cannot get a useful preferred seqno, convert it to a kTypeValue.
  250|      0|          UpdateInternalKey(&key_after_flush_buf, ikey.sequence, kTypeValue);
  251|      0|          ikey = ParsedInternalKey(ikey.user_key, ikey.sequence, kTypeValue);
  252|      0|          key_after_flush = key_after_flush_buf;
  253|      0|          value_after_flush = ParsePackedValueForValue(value);
  254|      0|        }
  255|      0|      }
  256|       |
  257|       |      //  Generate a rolling 64-bit hash of the key and values
  258|       |      //  Note :
  259|       |      //  Here "key" integrates 'sequence_number'+'kType'+'user key'.
  260|  34.6k|      s = output_validator.Add(key_after_flush, value_after_flush);
  261|  34.6k|      if (!s.ok()) {
  ------------------
  |  Branch (261:11): [True: 0, False: 34.6k]
  ------------------
  262|      0|        break;
  263|      0|      }
  264|  34.6k|      builder->Add(key_after_flush, value_after_flush);
  265|       |
  266|  34.6k|      s = meta->UpdateBoundaries(key_after_flush, value_after_flush,
  267|  34.6k|                                 ikey.sequence, ikey.type);
  268|  34.6k|      if (!s.ok()) {
  ------------------
  |  Branch (268:11): [True: 0, False: 34.6k]
  ------------------
  269|      0|        break;
  270|      0|      }
  271|       |
  272|       |      // TODO(noetzli): Update stats after flush, too.
  273|       |      // TODO(hx235): Replace `rate_limiter_priority` with `io_activity` for
  274|       |      // flush IO in repair when we have an `Env::IOActivity` enum for it
  275|  34.6k|      if ((tboptions.write_options.io_activity == Env::IOActivity::kFlush ||
  ------------------
  |  Branch (275:12): [True: 0, False: 34.6k]
  ------------------
  276|  34.6k|           tboptions.write_options.io_activity == Env::IOActivity::kDBOpen ||
  ------------------
  |  Branch (276:12): [True: 34.6k, False: 0]
  ------------------
  277|  34.6k|           tboptions.write_options.rate_limiter_priority == Env::IO_HIGH) &&
  ------------------
  |  Branch (277:12): [True: 0, False: 0]
  ------------------
  278|  34.6k|          IOSTATS(bytes_written) >= kReportFlushIOStatsEvery) {
  ------------------
  |  |   32|  34.6k|#define IOSTATS(metric) (iostats_context.metric)
  ------------------
  |  Branch (278:11): [True: 34.6k, False: 57]
  ------------------
  279|  34.6k|        ThreadStatusUtil::SetThreadOperationProperty(
  280|  34.6k|            ThreadStatus::FLUSH_BYTES_WRITTEN, IOSTATS(bytes_written));
  ------------------
  |  |   32|  34.6k|#define IOSTATS(metric) (iostats_context.metric)
  ------------------
  281|  34.6k|      }
  282|  34.6k|    }
  283|  4.48k|    if (!s.ok()) {
  ------------------
  |  Branch (283:9): [True: 0, False: 4.48k]
  ------------------
  284|      0|      c_iter.status().PermitUncheckedError();
  285|  4.48k|    } else if (!c_iter.status().ok()) {
  ------------------
  |  Branch (285:16): [True: 0, False: 4.48k]
  ------------------
  286|      0|      s = c_iter.status();
  287|      0|    }
  288|       |
  289|  4.48k|    if (s.ok()) {
  ------------------
  |  Branch (289:9): [True: 4.48k, False: 0]
  ------------------
  290|  4.48k|      auto range_del_it = range_del_agg->NewIterator();
  291|  4.48k|      Slice last_tombstone_start_user_key{};
  292|   135k|      for (range_del_it->SeekToFirst(); range_del_it->Valid();
  ------------------
  |  Branch (292:41): [True: 131k, False: 4.48k]
  ------------------
  293|   131k|           range_del_it->Next()) {
  294|       |        // When user timestamp should not be persisted, we logically strip a
  295|       |        // range tombstone's start and end key's timestamp (replace it with min
  296|       |        // timestamp) before passing them along to table builder and to update
  297|       |        // file boundaries.
  298|   131k|        auto tombstone = range_del_it->Tombstone(logical_strip_timestamp);
  299|   131k|        std::pair<InternalKey, Slice> kv = tombstone.Serialize();
  300|   131k|        builder->Add(kv.first.Encode(), kv.second);
  301|   131k|        InternalKey tombstone_end = tombstone.SerializeEndKey();
  302|   131k|        meta->UpdateBoundariesForRange(kv.first, tombstone_end, tombstone.seq_,
  303|   131k|                                       tboptions.internal_comparator);
  304|   131k|        if (version) {
  ------------------
  |  Branch (304:13): [True: 131k, False: 0]
  ------------------
  305|   131k|          if (last_tombstone_start_user_key.empty() ||
  ------------------
  |  Branch (305:15): [True: 4.93k, False: 126k]
  |  Branch (305:15): [True: 131k, False: 0]
  ------------------
  306|   131k|              ucmp->CompareWithoutTimestamp(last_tombstone_start_user_key,
  ------------------
  |  Branch (306:15): [True: 126k, False: 0]
  ------------------
  307|   131k|                                            range_del_it->start_key()) < 0) {
  308|   131k|            SizeApproximationOptions approx_opts;
  309|   131k|            approx_opts.files_size_error_margin = 0.1;
  310|   131k|            meta->compensated_range_deletion_size += versions->ApproximateSize(
  311|   131k|                approx_opts, tboptions.read_options, version, kv.first.Encode(),
  312|   131k|                tombstone_end.Encode(), 0 /* start_level */, -1 /* end_level */,
  313|   131k|                TableReaderCaller::kFlush);
  314|   131k|          }
  315|   131k|          last_tombstone_start_user_key = range_del_it->start_key();
  316|   131k|        }
  317|   131k|      }
  318|  4.48k|    }
  319|       |
  320|  4.48k|    TEST_SYNC_POINT("BuildTable:BeforeFinishBuildTable");
  321|  4.48k|    const bool empty = builder->IsEmpty();
  322|  4.48k|    if (num_input_entries != nullptr) {
  ------------------
  |  Branch (322:9): [True: 4.48k, False: 0]
  ------------------
  323|  4.48k|      assert(c_iter.HasNumInputEntryScanned());
  324|  4.48k|      *num_input_entries =
  325|  4.48k|          c_iter.NumInputEntryScanned() + num_unfragmented_tombstones;
  326|  4.48k|    }
  327|  4.48k|    if (!s.ok() || empty) {
  ------------------
  |  Branch (327:9): [True: 0, False: 4.48k]
  |  Branch (327:20): [True: 0, False: 4.48k]
  ------------------
  328|      0|      builder->Abandon();
  329|  4.48k|    } else {
  330|  4.48k|      SeqnoToTimeMapping relevant_mapping;
  331|  4.48k|      if (seqno_to_time_mapping) {
  ------------------
  |  Branch (331:11): [True: 0, False: 4.48k]
  ------------------
  332|      0|        relevant_mapping.CopyFromSeqnoRange(
  333|      0|            *seqno_to_time_mapping,
  334|      0|            std::min(meta->fd.smallest_seqno, smallest_preferred_seqno),
  335|      0|            meta->fd.largest_seqno);
  336|      0|        relevant_mapping.SetCapacity(kMaxSeqnoTimePairsPerSST);
  337|      0|        relevant_mapping.Enforce(tboptions.file_creation_time);
  338|      0|      }
  339|  4.48k|      builder->SetSeqnoTimeTableProperties(
  340|  4.48k|          relevant_mapping,
  341|  4.48k|          ioptions.compaction_style == CompactionStyle::kCompactionStyleFIFO
  ------------------
  |  Branch (341:11): [True: 0, False: 4.48k]
  ------------------
  342|  4.48k|              ? meta->file_creation_time
  343|  4.48k|              : meta->oldest_ancester_time);
  344|  4.48k|      s = builder->Finish();
  345|  4.48k|    }
  346|  4.48k|    if (io_status->ok()) {
  ------------------
  |  Branch (346:9): [True: 4.48k, False: 0]
  ------------------
  347|  4.48k|      *io_status = builder->io_status();
  348|  4.48k|    }
  349|       |
  350|  4.48k|    if (s.ok() && !empty) {
  ------------------
  |  Branch (350:9): [True: 4.48k, False: 0]
  |  Branch (350:19): [True: 4.48k, False: 0]
  ------------------
  351|  4.48k|      uint64_t file_size = builder->FileSize();
  352|  4.48k|      meta->fd.file_size = file_size;
  353|  4.48k|      meta->tail_size = builder->GetTailSize();
  354|  4.48k|      meta->marked_for_compaction = builder->NeedCompact();
  355|  4.48k|      meta->user_defined_timestamps_persisted =
  356|  4.48k|          ioptions.persist_user_defined_timestamps;
  357|  4.48k|      assert(meta->fd.GetFileSize() > 0);
  358|  4.48k|      tp = builder
  359|  4.48k|               ->GetTableProperties();  // refresh now that builder is finished
  360|  4.48k|      if (memtable_payload_bytes != nullptr &&
  ------------------
  |  Branch (360:11): [True: 0, False: 4.48k]
  ------------------
  361|  4.48k|          memtable_garbage_bytes != nullptr) {
  ------------------
  |  Branch (361:11): [True: 0, False: 0]
  ------------------
  362|      0|        const CompactionIterationStats& ci_stats = c_iter.iter_stats();
  363|      0|        uint64_t total_payload_bytes = ci_stats.total_input_raw_key_bytes +
  364|      0|                                       ci_stats.total_input_raw_value_bytes +
  365|      0|                                       total_tombstone_payload_bytes;
  366|      0|        uint64_t total_payload_bytes_written =
  367|      0|            (tp.raw_key_size + tp.raw_value_size);
  368|       |        // Prevent underflow, which may still happen at this point
  369|       |        // since we only support inserts, deletes, and deleteRanges.
  370|      0|        if (total_payload_bytes_written <= total_payload_bytes) {
  ------------------
  |  Branch (370:13): [True: 0, False: 0]
  ------------------
  371|      0|          *memtable_payload_bytes = total_payload_bytes;
  372|      0|          *memtable_garbage_bytes =
  373|      0|              total_payload_bytes - total_payload_bytes_written;
  374|      0|        } else {
  375|      0|          *memtable_payload_bytes = 0;
  376|      0|          *memtable_garbage_bytes = 0;
  377|      0|        }
  378|      0|      }
  379|  4.48k|      if (table_properties) {
  ------------------
  |  Branch (379:11): [True: 0, False: 4.48k]
  ------------------
  380|      0|        *table_properties = tp;
  381|      0|      }
  382|  4.48k|    }
  383|  4.48k|    delete builder;
  384|       |
  385|       |    // Finish and check for file errors
  386|  4.48k|    TEST_SYNC_POINT("BuildTable:BeforeSyncTable");
  387|  4.48k|    IOOptions opts;
  388|  4.48k|    *io_status =
  389|  4.48k|        WritableFileWriter::PrepareIOOptions(tboptions.write_options, opts);
  390|  4.48k|    if (s.ok() && io_status->ok() && !empty) {
  ------------------
  |  Branch (390:9): [True: 4.48k, False: 0]
  |  Branch (390:19): [True: 4.48k, False: 0]
  |  Branch (390:38): [True: 4.48k, False: 0]
  ------------------
  391|  4.48k|      StopWatch sw(ioptions.clock, ioptions.stats, TABLE_SYNC_MICROS);
  392|  4.48k|      *io_status = file_writer->Sync(opts, ioptions.use_fsync);
  393|  4.48k|    }
  394|  4.48k|    TEST_SYNC_POINT("BuildTable:BeforeCloseTableFile");
  395|  4.48k|    if (s.ok() && io_status->ok() && !empty) {
  ------------------
  |  Branch (395:9): [True: 4.48k, False: 0]
  |  Branch (395:19): [True: 4.48k, False: 0]
  |  Branch (395:38): [True: 4.48k, False: 0]
  ------------------
  396|  4.48k|      *io_status = file_writer->Close(opts);
  397|  4.48k|    }
  398|  4.48k|    if (s.ok() && io_status->ok() && !empty) {
  ------------------
  |  Branch (398:9): [True: 4.48k, False: 0]
  |  Branch (398:19): [True: 4.48k, False: 0]
  |  Branch (398:38): [True: 4.48k, False: 0]
  ------------------
  399|       |      // Add the checksum information to file metadata.
  400|  4.48k|      meta->file_checksum = file_writer->GetFileChecksum();
  401|  4.48k|      meta->file_checksum_func_name = file_writer->GetFileChecksumFuncName();
  402|  4.48k|      file_checksum = meta->file_checksum;
  403|  4.48k|      file_checksum_func_name = meta->file_checksum_func_name;
  404|       |      // Set unique_id only if db_id and db_session_id exist
  405|  4.48k|      if (!tboptions.db_id.empty() && !tboptions.db_session_id.empty()) {
  ------------------
  |  Branch (405:11): [True: 4.48k, False: 0]
  |  Branch (405:39): [True: 4.48k, False: 0]
  ------------------
  406|  4.48k|        if (!GetSstInternalUniqueId(tboptions.db_id, tboptions.db_session_id,
  ------------------
  |  Branch (406:13): [True: 0, False: 4.48k]
  ------------------
  407|  4.48k|                                    meta->fd.GetNumber(), &(meta->unique_id))
  408|  4.48k|                 .ok()) {
  409|       |          // if failed to get unique id, just set it Null
  410|      0|          meta->unique_id = kNullUniqueId64x2;
  411|      0|        }
  412|  4.48k|      }
  413|  4.48k|    }
  414|       |
  415|  4.48k|    if (s.ok()) {
  ------------------
  |  Branch (415:9): [True: 4.48k, False: 0]
  ------------------
  416|  4.48k|      s = *io_status;
  417|  4.48k|    }
  418|       |
  419|       |    // TODO(yuzhangyu): handle the key copy in the blob when ts should be
  420|       |    // stripped.
  421|  4.48k|    if (blob_file_builder) {
  ------------------
  |  Branch (421:9): [True: 0, False: 4.48k]
  ------------------
  422|      0|      if (s.ok()) {
  ------------------
  |  Branch (422:11): [True: 0, False: 0]
  ------------------
  423|      0|        s = blob_file_builder->Finish();
  424|      0|      } else {
  425|      0|        blob_file_builder->Abandon(s);
  426|      0|      }
  427|      0|      blob_file_builder.reset();
  428|      0|    }
  429|       |
  430|       |    // TODO Also check the IO status when create the Iterator.
  431|       |
  432|  4.48k|    TEST_SYNC_POINT("BuildTable:BeforeOutputValidation");
  433|  4.48k|    if (s.ok() && !empty) {
  ------------------
  |  Branch (433:9): [True: 4.48k, False: 0]
  |  Branch (433:19): [True: 4.48k, False: 0]
  ------------------
  434|       |      // Verify that the table is usable
  435|       |      // We set for_compaction to false and don't OptimizeForCompactionTableRead
  436|       |      // here because this is a special case after we finish the table building.
  437|       |      // No matter whether use_direct_io_for_flush_and_compaction is true,
  438|       |      // the goal is to cache it here for further user reads.
  439|  4.48k|      std::unique_ptr<InternalIterator> it(table_cache->NewIterator(
  440|  4.48k|          tboptions.read_options, file_options, tboptions.internal_comparator,
  441|  4.48k|          *meta, nullptr /* range_del_agg */,
  442|  4.48k|          mutable_cf_options.prefix_extractor, nullptr,
  443|  4.48k|          (internal_stats == nullptr) ? nullptr
  ------------------
  |  Branch (443:11): [True: 0, False: 4.48k]
  ------------------
  444|  4.48k|                                      : internal_stats->GetFileReadHist(0),
  445|  4.48k|          TableReaderCaller::kFlush, /*arena=*/nullptr,
  446|  4.48k|          /*skip_filter=*/false, tboptions.level_at_creation,
  447|  4.48k|          MaxFileSizeForL0MetaPin(mutable_cf_options),
  448|  4.48k|          /*smallest_compaction_key=*/nullptr,
  449|  4.48k|          /*largest_compaction_key*/ nullptr,
  450|  4.48k|          /*allow_unprepared_value*/ false,
  451|  4.48k|          mutable_cf_options.block_protection_bytes_per_key));
  452|  4.48k|      s = it->status();
  453|  4.48k|      if (s.ok() && paranoid_file_checks) {
  ------------------
  |  Branch (453:11): [True: 4.48k, False: 0]
  |  Branch (453:21): [True: 0, False: 4.48k]
  ------------------
  454|      0|        OutputValidator file_validator(tboptions.internal_comparator,
  455|      0|                                       /*enable_hash=*/true);
  456|      0|        for (it->SeekToFirst(); it->Valid(); it->Next()) {
  ------------------
  |  Branch (456:33): [True: 0, False: 0]
  ------------------
  457|       |          // Generate a rolling 64-bit hash of the key and values
  458|      0|          file_validator.Add(it->key(), it->value()).PermitUncheckedError();
  459|      0|        }
  460|      0|        s = it->status();
  461|      0|        if (s.ok() && !output_validator.CompareValidator(file_validator)) {
  ------------------
  |  Branch (461:13): [True: 0, False: 0]
  |  Branch (461:23): [True: 0, False: 0]
  ------------------
  462|      0|          s = Status::Corruption("Paranoid checksums do not match");
  463|      0|        }
  464|      0|      }
  465|  4.48k|    }
  466|  4.48k|  }
  467|       |
  468|       |  // Check for input iterator errors
  469|  4.48k|  if (!iter->status().ok()) {
  ------------------
  |  Branch (469:7): [True: 0, False: 4.48k]
  ------------------
  470|      0|    s = iter->status();
  471|      0|  }
  472|       |
  473|  4.48k|  if (!s.ok() || meta->fd.GetFileSize() == 0) {
  ------------------
  |  Branch (473:7): [True: 0, False: 4.48k]
  |  Branch (473:18): [True: 0, False: 4.48k]
  ------------------
  474|      0|    TEST_SYNC_POINT("BuildTable:BeforeDeleteFile");
  475|       |
  476|      0|    constexpr IODebugContext* dbg = nullptr;
  477|       |
  478|      0|    if (table_file_created) {
  ------------------
  |  Branch (478:9): [True: 0, False: 0]
  ------------------
  479|      0|      IOOptions opts;
  480|      0|      Status prepare =
  481|      0|          WritableFileWriter::PrepareIOOptions(tboptions.write_options, opts);
  482|      0|      if (prepare.ok()) {
  ------------------
  |  Branch (482:11): [True: 0, False: 0]
  ------------------
  483|      0|        Status ignored = fs->DeleteFile(fname, opts, dbg);
  484|      0|        ignored.PermitUncheckedError();
  485|      0|      }
  486|      0|    }
  487|       |
  488|      0|    assert(blob_file_additions || blob_file_paths.empty());
  489|       |
  490|      0|    if (blob_file_additions) {
  ------------------
  |  Branch (490:9): [True: 0, False: 0]
  ------------------
  491|      0|      for (const std::string& blob_file_path : blob_file_paths) {
  ------------------
  |  Branch (491:46): [True: 0, False: 0]
  ------------------
  492|      0|        Status ignored = DeleteDBFile(&db_options, blob_file_path, dbname,
  493|      0|                                      /*force_bg=*/false, /*force_fg=*/false);
  494|      0|        ignored.PermitUncheckedError();
  495|      0|        TEST_SYNC_POINT("BuildTable::AfterDeleteFile");
  496|      0|      }
  497|      0|    }
  498|      0|  }
  499|       |
  500|  4.48k|  Status status_for_listener = s;
  501|  4.48k|  if (meta->fd.GetFileSize() == 0) {
  ------------------
  |  Branch (501:7): [True: 0, False: 4.48k]
  ------------------
  502|      0|    fname = "(nil)";
  503|      0|    if (s.ok()) {
  ------------------
  |  Branch (503:9): [True: 0, False: 0]
  ------------------
  504|      0|      status_for_listener = Status::Aborted("Empty SST file not kept");
  505|      0|    }
  506|      0|  }
  507|       |  // Output to event logger and fire events.
  508|  4.48k|  EventHelpers::LogAndNotifyTableFileCreationFinished(
  509|  4.48k|      event_logger, ioptions.listeners, dbname, tboptions.column_family_name,
  510|  4.48k|      fname, job_id, meta->fd, meta->oldest_blob_file_number, tp,
  511|  4.48k|      tboptions.reason, status_for_listener, file_checksum,
  512|  4.48k|      file_checksum_func_name);
  513|       |
  514|  4.48k|  return s;
  515|  4.48k|}

_ZN7rocksdb22ColumnFamilyHandleImplC2EPNS_16ColumnFamilyDataEPNS_6DBImplEPNS_17InstrumentedMutexE:
   48|  27.0k|    : cfd_(column_family_data), db_(db), mutex_(mutex) {
   49|  27.0k|  if (cfd_ != nullptr) {
  ------------------
  |  Branch (49:7): [True: 18.0k, False: 9.02k]
  ------------------
   50|  18.0k|    cfd_->Ref();
   51|  18.0k|  }
   52|  27.0k|}
_ZN7rocksdb22ColumnFamilyHandleImplD2Ev:
   54|  27.0k|ColumnFamilyHandleImpl::~ColumnFamilyHandleImpl() {
   55|  27.0k|  if (cfd_ != nullptr) {
  ------------------
  |  Branch (55:7): [True: 18.0k, False: 9.02k]
  ------------------
   56|  18.0k|    for (auto& listener : cfd_->ioptions()->listeners) {
  ------------------
  |  Branch (56:25): [True: 0, False: 18.0k]
  ------------------
   57|      0|      listener->OnColumnFamilyHandleDeletionStarted(this);
   58|      0|    }
   59|       |    // Job id == 0 means that this is not our background process, but rather
   60|       |    // user thread
   61|       |    // Need to hold some shared pointers owned by the initial_cf_options
   62|       |    // before final cleaning up finishes.
   63|  18.0k|    ColumnFamilyOptions initial_cf_options_copy = cfd_->initial_cf_options();
   64|  18.0k|    JobContext job_context(0);
   65|  18.0k|    mutex_->Lock();
   66|  18.0k|    bool dropped = cfd_->IsDropped();
   67|  18.0k|    if (cfd_->UnrefAndTryDelete()) {
  ------------------
  |  Branch (67:9): [True: 0, False: 18.0k]
  ------------------
   68|      0|      if (dropped) {
  ------------------
  |  Branch (68:11): [True: 0, False: 0]
  ------------------
   69|      0|        db_->FindObsoleteFiles(&job_context, false, true);
   70|      0|      }
   71|      0|    }
   72|  18.0k|    mutex_->Unlock();
   73|  18.0k|    if (job_context.HaveSomethingToDelete()) {
  ------------------
  |  Branch (73:9): [True: 0, False: 18.0k]
  ------------------
   74|      0|      bool defer_purge =
   75|      0|          db_->immutable_db_options().avoid_unnecessary_blocking_io;
   76|      0|      db_->PurgeObsoleteFiles(job_context, defer_purge);
   77|      0|    }
   78|  18.0k|    job_context.Clean();
   79|  18.0k|  }
   80|  27.0k|}
_ZNK7rocksdb22ColumnFamilyHandleImpl5GetIDEv:
   82|  1.36M|uint32_t ColumnFamilyHandleImpl::GetID() const { return cfd()->GetID(); }
_ZNK7rocksdb22ColumnFamilyHandleImpl13GetComparatorEv:
   95|  2.72M|const Comparator* ColumnFamilyHandleImpl::GetComparator() const {
   96|  2.72M|  return cfd()->user_comparator();
   97|  2.72M|}
_ZN7rocksdb29GetInternalTblPropCollFactoryERKNS_18ImmutableCFOptionsEPNSt3__16vectorINS3_10unique_ptrINS_26InternalTblPropCollFactoryENS3_14default_deleteIS6_EEEENS3_9allocatorIS9_EEEE:
  101|  18.0k|    InternalTblPropCollFactories* internal_tbl_prop_coll_factories) {
  102|  18.0k|  assert(internal_tbl_prop_coll_factories);
  103|       |
  104|  18.0k|  auto& collector_factories = ioptions.table_properties_collector_factories;
  105|  18.0k|  for (size_t i = 0; i < ioptions.table_properties_collector_factories.size();
  ------------------
  |  Branch (105:22): [True: 0, False: 18.0k]
  ------------------
  106|  18.0k|       ++i) {
  107|      0|    assert(collector_factories[i]);
  108|      0|    internal_tbl_prop_coll_factories->emplace_back(
  109|      0|        new UserKeyTablePropertiesCollectorFactory(collector_factories[i]));
  110|      0|  }
  111|  18.0k|}
_ZN7rocksdb25CheckCompressionSupportedERKNS_19ColumnFamilyOptionsE:
  113|  9.02k|Status CheckCompressionSupported(const ColumnFamilyOptions& cf_options) {
  114|  9.02k|  if (!cf_options.compression_per_level.empty()) {
  ------------------
  |  Branch (114:7): [True: 0, False: 9.02k]
  ------------------
  115|      0|    for (size_t level = 0; level < cf_options.compression_per_level.size();
  ------------------
  |  Branch (115:28): [True: 0, False: 0]
  ------------------
  116|      0|         ++level) {
  117|      0|      if (!CompressionTypeSupported(cf_options.compression_per_level[level])) {
  ------------------
  |  Branch (117:11): [True: 0, False: 0]
  ------------------
  118|      0|        return Status::InvalidArgument(
  119|      0|            "Compression type " +
  120|      0|            CompressionTypeToString(cf_options.compression_per_level[level]) +
  121|      0|            " is not linked with the binary.");
  122|      0|      }
  123|      0|    }
  124|  9.02k|  } else {
  125|  9.02k|    if (!CompressionTypeSupported(cf_options.compression)) {
  ------------------
  |  Branch (125:9): [True: 0, False: 9.02k]
  ------------------
  126|      0|      return Status::InvalidArgument(
  127|      0|          "Compression type " +
  128|      0|          CompressionTypeToString(cf_options.compression) +
  129|      0|          " is not linked with the binary.");
  130|      0|    }
  131|  9.02k|  }
  132|  9.02k|  if (cf_options.compression_opts.zstd_max_train_bytes > 0) {
  ------------------
  |  Branch (132:7): [True: 0, False: 9.02k]
  ------------------
  133|      0|    if (cf_options.compression_opts.use_zstd_dict_trainer) {
  ------------------
  |  Branch (133:9): [True: 0, False: 0]
  ------------------
  134|      0|      if (!ZSTD_TrainDictionarySupported()) {
  ------------------
  |  Branch (134:11): [True: 0, False: 0]
  ------------------
  135|      0|        return Status::InvalidArgument(
  136|      0|            "zstd dictionary trainer cannot be used because ZSTD 1.1.3+ "
  137|      0|            "is not linked with the binary.");
  138|      0|      }
  139|      0|    } else if (!ZSTD_FinalizeDictionarySupported()) {
  ------------------
  |  Branch (139:16): [True: 0, False: 0]
  ------------------
  140|      0|      return Status::InvalidArgument(
  141|      0|          "zstd finalizeDictionary cannot be used because ZSTD 1.4.5+ "
  142|      0|          "is not linked with the binary.");
  143|      0|    }
  144|      0|    if (cf_options.compression_opts.max_dict_bytes == 0) {
  ------------------
  |  Branch (144:9): [True: 0, False: 0]
  ------------------
  145|      0|      return Status::InvalidArgument(
  146|      0|          "The dictionary size limit (`CompressionOptions::max_dict_bytes`) "
  147|      0|          "should be nonzero if we're using zstd's dictionary generator.");
  148|      0|    }
  149|      0|  }
  150|       |
  151|  9.02k|  if (!CompressionTypeSupported(cf_options.blob_compression_type)) {
  ------------------
  |  Branch (151:7): [True: 0, False: 9.02k]
  ------------------
  152|      0|    std::ostringstream oss;
  153|      0|    oss << "The specified blob compression type "
  154|      0|        << CompressionTypeToString(cf_options.blob_compression_type)
  155|      0|        << " is not available.";
  156|       |
  157|      0|    return Status::InvalidArgument(oss.str());
  158|      0|  }
  159|       |
  160|  9.02k|  return Status::OK();
  161|  9.02k|}
_ZN7rocksdb30CheckConcurrentWritesSupportedERKNS_19ColumnFamilyOptionsE:
  163|  9.02k|Status CheckConcurrentWritesSupported(const ColumnFamilyOptions& cf_options) {
  164|  9.02k|  if (cf_options.inplace_update_support) {
  ------------------
  |  Branch (164:7): [True: 0, False: 9.02k]
  ------------------
  165|      0|    return Status::InvalidArgument(
  166|      0|        "In-place memtable updates (inplace_update_support) is not compatible "
  167|      0|        "with concurrent writes (allow_concurrent_memtable_write)");
  168|      0|  }
  169|  9.02k|  if (!cf_options.memtable_factory->IsInsertConcurrentlySupported()) {
  ------------------
  |  Branch (169:7): [True: 0, False: 9.02k]
  ------------------
  170|      0|    return Status::InvalidArgument(
  171|      0|        "Memtable doesn't concurrent writes (allow_concurrent_memtable_write)");
  172|      0|  }
  173|  9.02k|  return Status::OK();
  174|  9.02k|}
_ZN7rocksdb21CheckCFPathsSupportedERKNS_9DBOptionsERKNS_19ColumnFamilyOptionsE:
  177|  9.02k|                             const ColumnFamilyOptions& cf_options) {
  178|       |  // More than one cf_paths are supported only in universal
  179|       |  // and level compaction styles. This function also checks the case
  180|       |  // in which cf_paths is not specified, which results in db_paths
  181|       |  // being used.
  182|  9.02k|  if ((cf_options.compaction_style != kCompactionStyleUniversal) &&
  ------------------
  |  Branch (182:7): [True: 9.02k, False: 0]
  ------------------
  183|  9.02k|      (cf_options.compaction_style != kCompactionStyleLevel)) {
  ------------------
  |  Branch (183:7): [True: 0, False: 9.02k]
  ------------------
  184|      0|    if (cf_options.cf_paths.size() > 1) {
  ------------------
  |  Branch (184:9): [True: 0, False: 0]
  ------------------
  185|      0|      return Status::NotSupported(
  186|      0|          "More than one CF paths are only supported in "
  187|      0|          "universal and level compaction styles. ");
  188|      0|    } else if (cf_options.cf_paths.empty() && db_options.db_paths.size() > 1) {
  ------------------
  |  Branch (188:16): [True: 0, False: 0]
  |  Branch (188:47): [True: 0, False: 0]
  ------------------
  189|      0|      return Status::NotSupported(
  190|      0|          "More than one DB paths are only supported in "
  191|      0|          "universal and level compaction styles. ");
  192|      0|    }
  193|      0|  }
  194|  9.02k|  return Status::OK();
  195|  9.02k|}
_ZN7rocksdb15SanitizeOptionsERKNS_18ImmutableDBOptionsERKNS_19ColumnFamilyOptionsE:
  203|  22.5k|                                    const ColumnFamilyOptions& src) {
  204|  22.5k|  ColumnFamilyOptions result = src;
  205|  22.5k|  size_t clamp_max = std::conditional<
  206|  22.5k|      sizeof(size_t) == 4, std::integral_constant<size_t, 0xffffffff>,
  207|  22.5k|      std::integral_constant<uint64_t, 64ull << 30>>::type::value;
  208|  22.5k|  ClipToRange(&result.write_buffer_size, (static_cast<size_t>(64)) << 10,
  209|  22.5k|              clamp_max);
  210|       |  // if user sets arena_block_size, we trust user to use this value. Otherwise,
  211|       |  // calculate a proper value from writer_buffer_size;
  212|  22.5k|  if (result.arena_block_size <= 0) {
  ------------------
  |  Branch (212:7): [True: 22.5k, False: 0]
  ------------------
  213|  22.5k|    result.arena_block_size =
  214|  22.5k|        std::min(size_t{1024 * 1024}, result.write_buffer_size / 8);
  215|       |
  216|       |    // Align up to 4k
  217|  22.5k|    const size_t align = 4 * 1024;
  218|  22.5k|    result.arena_block_size =
  219|  22.5k|        ((result.arena_block_size + align - 1) / align) * align;
  220|  22.5k|  }
  221|  22.5k|  result.min_write_buffer_number_to_merge =
  222|  22.5k|      std::min(result.min_write_buffer_number_to_merge,
  223|  22.5k|               result.max_write_buffer_number - 1);
  224|  22.5k|  if (result.min_write_buffer_number_to_merge < 1) {
  ------------------
  |  Branch (224:7): [True: 0, False: 22.5k]
  ------------------
  225|      0|    result.min_write_buffer_number_to_merge = 1;
  226|      0|  }
  227|       |
  228|  22.5k|  if (db_options.atomic_flush && result.min_write_buffer_number_to_merge > 1) {
  ------------------
  |  Branch (228:7): [True: 0, False: 22.5k]
  |  Branch (228:34): [True: 0, False: 0]
  ------------------
  229|      0|    ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  230|      0|        db_options.logger,
  231|      0|        "Currently, if atomic_flush is true, then triggering flush for any "
  232|      0|        "column family internally (non-manual flush) will trigger flushing "
  233|      0|        "all column families even if the number of memtables is smaller "
  234|      0|        "min_write_buffer_number_to_merge. Therefore, configuring "
  235|      0|        "min_write_buffer_number_to_merge > 1 is not compatible and should "
  236|      0|        "be satinized to 1. Not doing so will lead to data loss and "
  237|      0|        "inconsistent state across multiple column families when WAL is "
  238|      0|        "disabled, which is a common setting for atomic flush");
  239|       |
  240|      0|    result.min_write_buffer_number_to_merge = 1;
  241|      0|  }
  242|       |
  243|  22.5k|  if (result.num_levels < 1) {
  ------------------
  |  Branch (243:7): [True: 0, False: 22.5k]
  ------------------
  244|      0|    result.num_levels = 1;
  245|      0|  }
  246|  22.5k|  if (result.compaction_style == kCompactionStyleLevel &&
  ------------------
  |  Branch (246:7): [True: 22.5k, False: 0]
  ------------------
  247|  22.5k|      result.num_levels < 2) {
  ------------------
  |  Branch (247:7): [True: 0, False: 22.5k]
  ------------------
  248|      0|    result.num_levels = 2;
  249|      0|  }
  250|       |
  251|  22.5k|  if (result.compaction_style == kCompactionStyleUniversal &&
  ------------------
  |  Branch (251:7): [True: 0, False: 22.5k]
  ------------------
  252|  22.5k|      db_options.allow_ingest_behind && result.num_levels < 3) {
  ------------------
  |  Branch (252:7): [True: 0, False: 0]
  |  Branch (252:41): [True: 0, False: 0]
  ------------------
  253|      0|    result.num_levels = 3;
  254|      0|  }
  255|       |
  256|  22.5k|  if (result.max_write_buffer_number < 2) {
  ------------------
  |  Branch (256:7): [True: 0, False: 22.5k]
  ------------------
  257|      0|    result.max_write_buffer_number = 2;
  258|      0|  }
  259|       |  // fall back max_write_buffer_number_to_maintain if
  260|       |  // max_write_buffer_size_to_maintain is not set
  261|  22.5k|  if (result.max_write_buffer_size_to_maintain < 0) {
  ------------------
  |  Branch (261:7): [True: 0, False: 22.5k]
  ------------------
  262|      0|    result.max_write_buffer_size_to_maintain =
  263|      0|        result.max_write_buffer_number *
  264|      0|        static_cast<int64_t>(result.write_buffer_size);
  265|  22.5k|  } else if (result.max_write_buffer_size_to_maintain == 0 &&
  ------------------
  |  Branch (265:14): [True: 22.5k, False: 0]
  ------------------
  266|  22.5k|             result.max_write_buffer_number_to_maintain < 0) {
  ------------------
  |  Branch (266:14): [True: 0, False: 22.5k]
  ------------------
  267|      0|    result.max_write_buffer_number_to_maintain = result.max_write_buffer_number;
  268|      0|  }
  269|       |  // bloom filter size shouldn't exceed 1/4 of memtable size.
  270|  22.5k|  if (result.memtable_prefix_bloom_size_ratio > 0.25) {
  ------------------
  |  Branch (270:7): [True: 0, False: 22.5k]
  ------------------
  271|      0|    result.memtable_prefix_bloom_size_ratio = 0.25;
  272|  22.5k|  } else if (result.memtable_prefix_bloom_size_ratio < 0) {
  ------------------
  |  Branch (272:14): [True: 0, False: 22.5k]
  ------------------
  273|      0|    result.memtable_prefix_bloom_size_ratio = 0;
  274|      0|  }
  275|       |
  276|  22.5k|  if (!result.prefix_extractor) {
  ------------------
  |  Branch (276:7): [True: 22.5k, False: 0]
  ------------------
  277|  22.5k|    assert(result.memtable_factory);
  278|  22.5k|    Slice name = result.memtable_factory->Name();
  279|  22.5k|    if (name.compare("HashSkipListRepFactory") == 0 ||
  ------------------
  |  Branch (279:9): [True: 0, False: 22.5k]
  |  Branch (279:9): [True: 0, False: 22.5k]
  ------------------
  280|  22.5k|        name.compare("HashLinkListRepFactory") == 0) {
  ------------------
  |  Branch (280:9): [True: 0, False: 22.5k]
  ------------------
  281|      0|      result.memtable_factory = std::make_shared<SkipListFactory>();
  282|      0|    }
  283|  22.5k|  }
  284|       |
  285|  22.5k|  if (result.compaction_style == kCompactionStyleFIFO) {
  ------------------
  |  Branch (285:7): [True: 0, False: 22.5k]
  ------------------
  286|       |    // since we delete level0 files in FIFO compaction when there are too many
  287|       |    // of them, these options don't really mean anything
  288|      0|    result.level0_slowdown_writes_trigger = std::numeric_limits<int>::max();
  289|      0|    result.level0_stop_writes_trigger = std::numeric_limits<int>::max();
  290|      0|  }
  291|       |
  292|  22.5k|  if (result.max_bytes_for_level_multiplier <= 0) {
  ------------------
  |  Branch (292:7): [True: 0, False: 22.5k]
  ------------------
  293|      0|    result.max_bytes_for_level_multiplier = 1;
  294|      0|  }
  295|       |
  296|  22.5k|  if (result.level0_file_num_compaction_trigger == 0) {
  ------------------
  |  Branch (296:7): [True: 0, False: 22.5k]
  ------------------
  297|      0|    ROCKS_LOG_WARN(db_options.logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  298|      0|                   "level0_file_num_compaction_trigger cannot be 0");
  299|      0|    result.level0_file_num_compaction_trigger = 1;
  300|      0|  }
  301|       |
  302|  22.5k|  if (result.level0_stop_writes_trigger <
  ------------------
  |  Branch (302:7): [True: 0, False: 22.5k]
  ------------------
  303|  22.5k|          result.level0_slowdown_writes_trigger ||
  304|  22.5k|      result.level0_slowdown_writes_trigger <
  ------------------
  |  Branch (304:7): [True: 0, False: 22.5k]
  ------------------
  305|  22.5k|          result.level0_file_num_compaction_trigger) {
  306|      0|    ROCKS_LOG_WARN(db_options.logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  307|      0|                   "This condition must be satisfied: "
  308|      0|                   "level0_stop_writes_trigger(%d) >= "
  309|      0|                   "level0_slowdown_writes_trigger(%d) >= "
  310|      0|                   "level0_file_num_compaction_trigger(%d)",
  311|      0|                   result.level0_stop_writes_trigger,
  312|      0|                   result.level0_slowdown_writes_trigger,
  313|      0|                   result.level0_file_num_compaction_trigger);
  314|      0|    if (result.level0_slowdown_writes_trigger <
  ------------------
  |  Branch (314:9): [True: 0, False: 0]
  ------------------
  315|      0|        result.level0_file_num_compaction_trigger) {
  316|      0|      result.level0_slowdown_writes_trigger =
  317|      0|          result.level0_file_num_compaction_trigger;
  318|      0|    }
  319|      0|    if (result.level0_stop_writes_trigger <
  ------------------
  |  Branch (319:9): [True: 0, False: 0]
  ------------------
  320|      0|        result.level0_slowdown_writes_trigger) {
  321|      0|      result.level0_stop_writes_trigger = result.level0_slowdown_writes_trigger;
  322|      0|    }
  323|      0|    ROCKS_LOG_WARN(db_options.logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  324|      0|                   "Adjust the value to "
  325|      0|                   "level0_stop_writes_trigger(%d) "
  326|      0|                   "level0_slowdown_writes_trigger(%d) "
  327|      0|                   "level0_file_num_compaction_trigger(%d)",
  328|      0|                   result.level0_stop_writes_trigger,
  329|      0|                   result.level0_slowdown_writes_trigger,
  330|      0|                   result.level0_file_num_compaction_trigger);
  331|      0|  }
  332|       |
  333|  22.5k|  if (result.soft_pending_compaction_bytes_limit == 0) {
  ------------------
  |  Branch (333:7): [True: 0, False: 22.5k]
  ------------------
  334|      0|    result.soft_pending_compaction_bytes_limit =
  335|      0|        result.hard_pending_compaction_bytes_limit;
  336|  22.5k|  } else if (result.hard_pending_compaction_bytes_limit > 0 &&
  ------------------
  |  Branch (336:14): [True: 22.5k, False: 0]
  ------------------
  337|  22.5k|             result.soft_pending_compaction_bytes_limit >
  ------------------
  |  Branch (337:14): [True: 0, False: 22.5k]
  ------------------
  338|  22.5k|                 result.hard_pending_compaction_bytes_limit) {
  339|      0|    result.soft_pending_compaction_bytes_limit =
  340|      0|        result.hard_pending_compaction_bytes_limit;
  341|      0|  }
  342|       |
  343|       |  // When the DB is stopped, it's possible that there are some .trash files that
  344|       |  // were not deleted yet, when we open the DB we will find these .trash files
  345|       |  // and schedule them to be deleted (or delete immediately if SstFileManager
  346|       |  // was not used)
  347|  22.5k|  auto sfm =
  348|  22.5k|      static_cast<SstFileManagerImpl*>(db_options.sst_file_manager.get());
  349|  22.5k|  for (size_t i = 0; i < result.cf_paths.size(); i++) {
  ------------------
  |  Branch (349:22): [True: 0, False: 22.5k]
  ------------------
  350|      0|    DeleteScheduler::CleanupDirectory(db_options.env, sfm,
  351|      0|                                      result.cf_paths[i].path)
  352|      0|        .PermitUncheckedError();
  353|      0|  }
  354|       |
  355|  22.5k|  if (result.cf_paths.empty()) {
  ------------------
  |  Branch (355:7): [True: 22.5k, False: 0]
  ------------------
  356|  22.5k|    result.cf_paths = db_options.db_paths;
  357|  22.5k|  }
  358|       |
  359|  22.5k|  if (result.level_compaction_dynamic_level_bytes) {
  ------------------
  |  Branch (359:7): [True: 22.5k, False: 0]
  ------------------
  360|  22.5k|    if (result.compaction_style != kCompactionStyleLevel) {
  ------------------
  |  Branch (360:9): [True: 0, False: 22.5k]
  ------------------
  361|      0|      ROCKS_LOG_INFO(db_options.info_log.get(),
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  362|      0|                     "level_compaction_dynamic_level_bytes only makes sense "
  363|      0|                     "for level-based compaction");
  364|      0|      result.level_compaction_dynamic_level_bytes = false;
  365|  22.5k|    } else if (result.cf_paths.size() > 1U) {
  ------------------
  |  Branch (365:16): [True: 0, False: 22.5k]
  ------------------
  366|       |      // we don't yet know how to make both of this feature and multiple
  367|       |      // DB path work.
  368|      0|      ROCKS_LOG_WARN(db_options.info_log.get(),
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  369|      0|                     "multiple cf_paths/db_paths and "
  370|      0|                     "level_compaction_dynamic_level_bytes "
  371|      0|                     "can't be used together");
  372|      0|      result.level_compaction_dynamic_level_bytes = false;
  373|      0|    }
  374|  22.5k|  }
  375|       |
  376|  22.5k|  if (result.max_compaction_bytes == 0) {
  ------------------
  |  Branch (376:7): [True: 22.5k, False: 0]
  ------------------
  377|  22.5k|    result.max_compaction_bytes = result.target_file_size_base * 25;
  378|  22.5k|  }
  379|       |
  380|  22.5k|  bool is_block_based_table = (result.table_factory->IsInstanceOf(
  381|  22.5k|      TableFactory::kBlockBasedTableName()));
  382|       |
  383|  22.5k|  const uint64_t kAdjustedTtl = 30 * 24 * 60 * 60;
  384|  22.5k|  if (result.ttl == kDefaultTtl) {
  ------------------
  |  Branch (384:7): [True: 22.5k, False: 0]
  ------------------
  385|  22.5k|    if (is_block_based_table) {
  ------------------
  |  Branch (385:9): [True: 22.5k, False: 0]
  ------------------
  386|       |      // FIFO also requires max_open_files=-1, which is checked in
  387|       |      // ValidateOptions().
  388|  22.5k|      result.ttl = kAdjustedTtl;
  389|  22.5k|    } else {
  390|      0|      result.ttl = 0;
  391|      0|    }
  392|  22.5k|  }
  393|       |
  394|  22.5k|  const uint64_t kAdjustedPeriodicCompSecs = 30 * 24 * 60 * 60;
  395|  22.5k|  if (result.compaction_style == kCompactionStyleLevel) {
  ------------------
  |  Branch (395:7): [True: 22.5k, False: 0]
  ------------------
  396|  22.5k|    if ((result.compaction_filter != nullptr ||
  ------------------
  |  Branch (396:10): [True: 0, False: 22.5k]
  ------------------
  397|  22.5k|         result.compaction_filter_factory != nullptr) &&
  ------------------
  |  Branch (397:10): [True: 0, False: 22.5k]
  ------------------
  398|  22.5k|        result.periodic_compaction_seconds == kDefaultPeriodicCompSecs &&
  ------------------
  |  Branch (398:9): [True: 0, False: 0]
  ------------------
  399|  22.5k|        is_block_based_table) {
  ------------------
  |  Branch (399:9): [True: 0, False: 0]
  ------------------
  400|      0|      result.periodic_compaction_seconds = kAdjustedPeriodicCompSecs;
  401|      0|    }
  402|  22.5k|  } else if (result.compaction_style == kCompactionStyleUniversal) {
  ------------------
  |  Branch (402:14): [True: 0, False: 0]
  ------------------
  403|      0|    if (result.periodic_compaction_seconds == kDefaultPeriodicCompSecs &&
  ------------------
  |  Branch (403:9): [True: 0, False: 0]
  ------------------
  404|      0|        is_block_based_table) {
  ------------------
  |  Branch (404:9): [True: 0, False: 0]
  ------------------
  405|      0|      result.periodic_compaction_seconds = kAdjustedPeriodicCompSecs;
  406|      0|    }
  407|      0|  } else if (result.compaction_style == kCompactionStyleFIFO) {
  ------------------
  |  Branch (407:14): [True: 0, False: 0]
  ------------------
  408|      0|    if (result.periodic_compaction_seconds != kDefaultPeriodicCompSecs) {
  ------------------
  |  Branch (408:9): [True: 0, False: 0]
  ------------------
  409|      0|      ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  410|      0|          db_options.info_log.get(),
  411|      0|          "periodic_compaction_seconds does not support FIFO compaction. You"
  412|      0|          "may want to set option TTL instead.");
  413|      0|    }
  414|      0|    if (result.last_level_temperature != Temperature::kUnknown) {
  ------------------
  |  Branch (414:9): [True: 0, False: 0]
  ------------------
  415|      0|      ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  416|      0|          db_options.info_log.get(),
  417|      0|          "last_level_temperature is ignored with FIFO compaction. Consider "
  418|      0|          "CompactionOptionsFIFO::file_temperature_age_thresholds.");
  419|      0|      result.last_level_temperature = Temperature::kUnknown;
  420|      0|    }
  421|      0|  }
  422|       |
  423|       |  // For universal compaction, `ttl` and `periodic_compaction_seconds` mean the
  424|       |  // same thing, take the stricter value.
  425|  22.5k|  if (result.compaction_style == kCompactionStyleUniversal) {
  ------------------
  |  Branch (425:7): [True: 0, False: 22.5k]
  ------------------
  426|      0|    if (result.periodic_compaction_seconds == 0) {
  ------------------
  |  Branch (426:9): [True: 0, False: 0]
  ------------------
  427|      0|      result.periodic_compaction_seconds = result.ttl;
  428|      0|    } else if (result.ttl != 0) {
  ------------------
  |  Branch (428:16): [True: 0, False: 0]
  ------------------
  429|      0|      result.periodic_compaction_seconds =
  430|      0|          std::min(result.ttl, result.periodic_compaction_seconds);
  431|      0|    }
  432|      0|  }
  433|       |
  434|  22.5k|  if (result.periodic_compaction_seconds == kDefaultPeriodicCompSecs) {
  ------------------
  |  Branch (434:7): [True: 22.5k, False: 0]
  ------------------
  435|  22.5k|    result.periodic_compaction_seconds = 0;
  436|  22.5k|  }
  437|       |
  438|  22.5k|  return result;
  439|  22.5k|}
_ZN7rocksdb12SuperVersionD2Ev:
  445|  9.02k|SuperVersion::~SuperVersion() {
  446|  9.02k|  for (auto td : to_delete) {
  ------------------
  |  Branch (446:16): [True: 0, False: 9.02k]
  ------------------
  447|      0|    delete td;
  448|      0|  }
  449|  9.02k|}
_ZN7rocksdb12SuperVersion3RefEv:
  451|  9.02k|SuperVersion* SuperVersion::Ref() {
  452|  9.02k|  refs.fetch_add(1, std::memory_order_relaxed);
  453|  9.02k|  return this;
  454|  9.02k|}
_ZN7rocksdb12SuperVersion5UnrefEv:
  456|  18.0k|bool SuperVersion::Unref() {
  457|       |  // fetch_sub returns the previous value of ref
  458|  18.0k|  uint32_t previous_refs = refs.fetch_sub(1);
  459|  18.0k|  assert(previous_refs > 0);
  460|  18.0k|  return previous_refs == 1;
  461|  18.0k|}
_ZN7rocksdb12SuperVersion7CleanupEv:
  463|  9.02k|void SuperVersion::Cleanup() {
  464|  9.02k|  assert(refs.load(std::memory_order_relaxed) == 0);
  465|       |  // Since this SuperVersion object is being deleted,
  466|       |  // decrement reference to the immutable MemtableList
  467|       |  // this SV object was pointing to.
  468|  9.02k|  imm->Unref(&to_delete);
  469|  9.02k|  MemTable* m = mem->Unref();
  470|  9.02k|  if (m != nullptr) {
  ------------------
  |  Branch (470:7): [True: 0, False: 9.02k]
  ------------------
  471|      0|    auto* memory_usage = current->cfd()->imm()->current_memory_usage();
  472|      0|    assert(*memory_usage >= m->ApproximateMemoryUsage());
  473|      0|    *memory_usage -= m->ApproximateMemoryUsage();
  474|      0|    to_delete.push_back(m);
  475|      0|  }
  476|  9.02k|  current->Unref();
  477|  9.02k|  cfd->UnrefAndTryDelete();
  478|  9.02k|}
_ZN7rocksdb12SuperVersion4InitEPNS_16ColumnFamilyDataEPNS_8MemTableEPNS_19MemTableListVersionEPNS_7VersionENSt3__110shared_ptrIKNS_18SeqnoToTimeMappingEEE:
  483|  9.02k|    std::shared_ptr<const SeqnoToTimeMapping> new_seqno_to_time_mapping) {
  484|  9.02k|  cfd = new_cfd;
  485|  9.02k|  mem = new_mem;
  486|  9.02k|  imm = new_imm;
  487|  9.02k|  current = new_current;
  488|  9.02k|  full_history_ts_low = cfd->GetFullHistoryTsLow();
  489|  9.02k|  seqno_to_time_mapping = std::move(new_seqno_to_time_mapping);
  490|  9.02k|  cfd->Ref();
  491|  9.02k|  mem->Ref();
  492|  9.02k|  imm->Ref();
  493|  9.02k|  current->Ref();
  494|  9.02k|  refs.store(1, std::memory_order_relaxed);
  495|  9.02k|}
_ZNK7rocksdb16ColumnFamilyData10GetDbPathsEv:
  514|  18.0k|std::vector<std::string> ColumnFamilyData::GetDbPaths() const {
  515|  18.0k|  std::vector<std::string> paths;
  516|  18.0k|  paths.reserve(ioptions_.cf_paths.size());
  517|  18.0k|  for (const DbPath& db_path : ioptions_.cf_paths) {
  ------------------
  |  Branch (517:30): [True: 18.0k, False: 18.0k]
  ------------------
  518|  18.0k|    paths.emplace_back(db_path.path);
  519|  18.0k|  }
  520|  18.0k|  return paths;
  521|  18.0k|}
_ZN7rocksdb16ColumnFamilyDataC2EjRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPNS_7VersionEPNS_5CacheEPNS_18WriteBufferManagerERKNS_19ColumnFamilyOptionsERKNS_18ImmutableDBOptionsEPKNS_11FileOptionsEPNS_15ColumnFamilySetEPNS_16BlockCacheTracerERKNS1_10shared_ptrINS_8IOTracerEEES9_S9_:
  567|  18.0k|      next_epoch_number_(1) {
  568|  18.0k|  if (id_ != kDummyColumnFamilyDataId) {
  ------------------
  |  Branch (568:7): [True: 9.02k, False: 9.02k]
  ------------------
  569|       |    // TODO(cc): RegisterDbPaths can be expensive, considering moving it
  570|       |    // outside of this constructor which might be called with db mutex held.
  571|       |    // TODO(cc): considering using ioptions_.fs, currently some tests rely on
  572|       |    // EnvWrapper, that's the main reason why we use env here.
  573|  9.02k|    Status s = ioptions_.env->RegisterDbPaths(GetDbPaths());
  574|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (574:9): [True: 9.02k, False: 0]
  ------------------
  575|  9.02k|      db_paths_registered_ = true;
  576|  9.02k|    } else {
  577|      0|      ROCKS_LOG_ERROR(
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  578|      0|          ioptions_.logger,
  579|      0|          "Failed to register data paths of column family (id: %d, name: %s)",
  580|      0|          id_, name_.c_str());
  581|      0|    }
  582|  9.02k|  }
  583|  18.0k|  Ref();
  584|       |
  585|       |  // Convert user defined table properties collector factories to internal ones.
  586|  18.0k|  GetInternalTblPropCollFactory(ioptions_, &internal_tbl_prop_coll_factories_);
  587|       |
  588|       |  // if _dummy_versions is nullptr, then this is a dummy column family.
  589|  18.0k|  if (_dummy_versions != nullptr) {
  ------------------
  |  Branch (589:7): [True: 9.02k, False: 9.02k]
  ------------------
  590|  9.02k|    internal_stats_.reset(
  591|  9.02k|        new InternalStats(ioptions_.num_levels, ioptions_.clock, this));
  592|  9.02k|    table_cache_.reset(new TableCache(ioptions_, file_options, _table_cache,
  593|  9.02k|                                      block_cache_tracer, io_tracer,
  594|  9.02k|                                      db_session_id));
  595|  9.02k|    blob_file_cache_.reset(
  596|  9.02k|        new BlobFileCache(_table_cache, ioptions(), soptions(), id_,
  597|  9.02k|                          internal_stats_->GetBlobFileReadHist(), io_tracer));
  598|  9.02k|    blob_source_.reset(new BlobSource(ioptions(), db_id, db_session_id,
  599|  9.02k|                                      blob_file_cache_.get()));
  600|       |
  601|  9.02k|    if (ioptions_.compaction_style == kCompactionStyleLevel) {
  ------------------
  |  Branch (601:9): [True: 9.02k, False: 0]
  ------------------
  602|  9.02k|      compaction_picker_.reset(
  603|  9.02k|          new LevelCompactionPicker(ioptions_, &internal_comparator_));
  604|  9.02k|    } else if (ioptions_.compaction_style == kCompactionStyleUniversal) {
  ------------------
  |  Branch (604:16): [True: 0, False: 0]
  ------------------
  605|      0|      compaction_picker_.reset(
  606|      0|          new UniversalCompactionPicker(ioptions_, &internal_comparator_));
  607|      0|    } else if (ioptions_.compaction_style == kCompactionStyleFIFO) {
  ------------------
  |  Branch (607:16): [True: 0, False: 0]
  ------------------
  608|      0|      compaction_picker_.reset(
  609|      0|          new FIFOCompactionPicker(ioptions_, &internal_comparator_));
  610|      0|    } else if (ioptions_.compaction_style == kCompactionStyleNone) {
  ------------------
  |  Branch (610:16): [True: 0, False: 0]
  ------------------
  611|      0|      compaction_picker_.reset(
  612|      0|          new NullCompactionPicker(ioptions_, &internal_comparator_));
  613|      0|      ROCKS_LOG_WARN(ioptions_.logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  614|      0|                     "Column family %s does not use any background compaction. "
  615|      0|                     "Compactions can only be done via CompactFiles\n",
  616|      0|                     GetName().c_str());
  617|      0|    } else {
  618|      0|      ROCKS_LOG_ERROR(ioptions_.logger,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  619|      0|                      "Unable to recognize the specified compaction style %d. "
  620|      0|                      "Column family %s will use kCompactionStyleLevel.\n",
  621|      0|                      ioptions_.compaction_style, GetName().c_str());
  622|      0|      compaction_picker_.reset(
  623|      0|          new LevelCompactionPicker(ioptions_, &internal_comparator_));
  624|      0|    }
  625|       |
  626|  9.02k|    if (column_family_set_->NumberOfColumnFamilies() < 10) {
  ------------------
  |  Branch (626:9): [True: 9.02k, False: 0]
  ------------------
  627|  9.02k|      ROCKS_LOG_INFO(ioptions_.logger,
  ------------------
  |  |   39|  9.02k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  9.02k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  9.02k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  9.02k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  628|  9.02k|                     "--------------- Options for column family [%s]:\n",
  629|  9.02k|                     name.c_str());
  630|  9.02k|      initial_cf_options_.Dump(ioptions_.logger);
  631|  9.02k|    } else {
  632|      0|      ROCKS_LOG_INFO(ioptions_.logger, "\t(skipping printing options)\n");
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  633|      0|    }
  634|  9.02k|  }
  635|       |
  636|  18.0k|  RecalculateWriteStallConditions(mutable_cf_options_);
  637|       |
  638|  18.0k|  if (cf_options.table_factory->IsInstanceOf(
  ------------------
  |  Branch (638:7): [True: 18.0k, False: 0]
  |  Branch (638:7): [True: 18.0k, False: 0]
  ------------------
  639|  18.0k|          TableFactory::kBlockBasedTableName()) &&
  640|  18.0k|      cf_options.table_factory->GetOptions<BlockBasedTableOptions>()) {
  ------------------
  |  Branch (640:7): [True: 18.0k, False: 0]
  ------------------
  641|  18.0k|    const BlockBasedTableOptions* bbto =
  642|  18.0k|        cf_options.table_factory->GetOptions<BlockBasedTableOptions>();
  643|  18.0k|    const auto& options_overrides = bbto->cache_usage_options.options_overrides;
  644|  18.0k|    const auto file_metadata_charged =
  645|  18.0k|        options_overrides.at(CacheEntryRole::kFileMetadata).charged;
  646|  18.0k|    if (bbto->block_cache &&
  ------------------
  |  Branch (646:9): [True: 18.0k, False: 0]
  ------------------
  647|  18.0k|        file_metadata_charged == CacheEntryRoleOptions::Decision::kEnabled) {
  ------------------
  |  Branch (647:9): [True: 0, False: 18.0k]
  ------------------
  648|       |      // TODO(hx235): Add a `ConcurrentCacheReservationManager` at DB scope
  649|       |      // responsible for reservation of `ObsoleteFileInfo` so that we can keep
  650|       |      // this `file_metadata_cache_res_mgr_` nonconcurrent
  651|      0|      file_metadata_cache_res_mgr_.reset(new ConcurrentCacheReservationManager(
  652|      0|          std::make_shared<
  653|      0|              CacheReservationManagerImpl<CacheEntryRole::kFileMetadata>>(
  654|      0|              bbto->block_cache)));
  655|      0|    }
  656|  18.0k|  }
  657|  18.0k|}
_ZN7rocksdb16ColumnFamilyDataD2Ev:
  660|  18.0k|ColumnFamilyData::~ColumnFamilyData() {
  661|  18.0k|  assert(refs_.load(std::memory_order_relaxed) == 0);
  662|       |  // remove from linked list
  663|  18.0k|  auto prev = prev_;
  664|  18.0k|  auto next = next_;
  665|  18.0k|  prev->next_ = next;
  666|  18.0k|  next->prev_ = prev;
  667|       |
  668|  18.0k|  if (!dropped_ && column_family_set_ != nullptr) {
  ------------------
  |  Branch (668:7): [True: 18.0k, False: 0]
  |  Branch (668:20): [True: 9.02k, False: 9.02k]
  ------------------
  669|       |    // If it's dropped, it's already removed from column family set
  670|       |    // If column_family_set_ == nullptr, this is dummy CFD and not in
  671|       |    // ColumnFamilySet
  672|  9.02k|    column_family_set_->RemoveColumnFamily(this);
  673|  9.02k|  }
  674|       |
  675|  18.0k|  if (current_ != nullptr) {
  ------------------
  |  Branch (675:7): [True: 9.02k, False: 9.02k]
  ------------------
  676|  9.02k|    current_->Unref();
  677|  9.02k|  }
  678|       |
  679|       |  // It would be wrong if this ColumnFamilyData is in flush_queue_ or
  680|       |  // compaction_queue_ and we destroyed it
  681|  18.0k|  assert(!queued_for_flush_);
  682|  18.0k|  assert(!queued_for_compaction_);
  683|  18.0k|  assert(super_version_ == nullptr);
  684|       |
  685|  18.0k|  if (dummy_versions_ != nullptr) {
  ------------------
  |  Branch (685:7): [True: 9.02k, False: 9.02k]
  ------------------
  686|       |    // List must be empty
  687|  9.02k|    assert(dummy_versions_->Next() == dummy_versions_);
  688|  9.02k|    bool deleted __attribute__((__unused__));
  689|  9.02k|    deleted = dummy_versions_->Unref();
  690|  9.02k|    assert(deleted);
  691|  9.02k|  }
  692|       |
  693|  18.0k|  if (mem_ != nullptr) {
  ------------------
  |  Branch (693:7): [True: 9.02k, False: 9.02k]
  ------------------
  694|  9.02k|    delete mem_->Unref();
  695|  9.02k|  }
  696|  18.0k|  autovector<MemTable*> to_delete;
  697|  18.0k|  imm_.current()->Unref(&to_delete);
  698|  18.0k|  for (MemTable* m : to_delete) {
  ------------------
  |  Branch (698:20): [True: 0, False: 18.0k]
  ------------------
  699|      0|    delete m;
  700|      0|  }
  701|       |
  702|  18.0k|  if (db_paths_registered_) {
  ------------------
  |  Branch (702:7): [True: 9.02k, False: 9.02k]
  ------------------
  703|       |    // TODO(cc): considering using ioptions_.fs, currently some tests rely on
  704|       |    // EnvWrapper, that's the main reason why we use env here.
  705|  9.02k|    Status s = ioptions_.env->UnregisterDbPaths(GetDbPaths());
  706|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (706:9): [True: 0, False: 9.02k]
  ------------------
  707|      0|      ROCKS_LOG_ERROR(
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  708|      0|          ioptions_.logger,
  709|      0|          "Failed to unregister data paths of column family (id: %d, name: %s)",
  710|      0|          id_, name_.c_str());
  711|      0|    }
  712|  9.02k|  }
  713|  18.0k|}
_ZN7rocksdb16ColumnFamilyData17UnrefAndTryDeleteEv:
  715|  45.1k|bool ColumnFamilyData::UnrefAndTryDelete() {
  716|  45.1k|  int old_refs = refs_.fetch_sub(1);
  717|  45.1k|  assert(old_refs > 0);
  718|       |
  719|  45.1k|  if (old_refs == 1) {
  ------------------
  |  Branch (719:7): [True: 18.0k, False: 27.1k]
  ------------------
  720|  18.0k|    assert(super_version_ == nullptr);
  721|  18.0k|    delete this;
  722|  18.0k|    return true;
  723|  18.0k|  }
  724|       |
  725|  27.1k|  if (old_refs == 2 && super_version_ != nullptr) {
  ------------------
  |  Branch (725:7): [True: 9.02k, False: 18.1k]
  |  Branch (725:24): [True: 9.02k, False: 0]
  ------------------
  726|       |    // Only the super_version_ holds me
  727|  9.02k|    SuperVersion* sv = super_version_;
  728|  9.02k|    super_version_ = nullptr;
  729|       |
  730|       |    // Release SuperVersion references kept in ThreadLocalPtr.
  731|  9.02k|    local_sv_.reset();
  732|       |
  733|  9.02k|    if (sv->Unref()) {
  ------------------
  |  Branch (733:9): [True: 9.02k, False: 0]
  ------------------
  734|       |      // Note: sv will delete this ColumnFamilyData during Cleanup()
  735|  9.02k|      assert(sv->cfd == this);
  736|  9.02k|      sv->Cleanup();
  737|  9.02k|      delete sv;
  738|  9.02k|      return true;
  739|  9.02k|    }
  740|  9.02k|  }
  741|  18.1k|  return false;
  742|  27.1k|}
_ZNK7rocksdb16ColumnFamilyData18GetLatestCFOptionsEv:
  754|  9.02k|ColumnFamilyOptions ColumnFamilyData::GetLatestCFOptions() const {
  755|  9.02k|  return BuildColumnFamilyOptions(initial_cf_options_, mutable_cf_options_);
  756|  9.02k|}
_ZN7rocksdb16ColumnFamilyData30GetWriteStallConditionAndCauseEiimRKNS_16MutableCFOptionsERKNS_18ImmutableCFOptionsE:
  922|  9.02k|    const ImmutableCFOptions& immutable_cf_options) {
  923|  9.02k|  if (num_unflushed_memtables >= mutable_cf_options.max_write_buffer_number) {
  ------------------
  |  Branch (923:7): [True: 0, False: 9.02k]
  ------------------
  924|      0|    return {WriteStallCondition::kStopped, WriteStallCause::kMemtableLimit};
  925|  9.02k|  } else if (!mutable_cf_options.disable_auto_compactions &&
  ------------------
  |  Branch (925:14): [True: 9.02k, False: 0]
  ------------------
  926|  9.02k|             num_l0_files >= mutable_cf_options.level0_stop_writes_trigger) {
  ------------------
  |  Branch (926:14): [True: 0, False: 9.02k]
  ------------------
  927|      0|    return {WriteStallCondition::kStopped, WriteStallCause::kL0FileCountLimit};
  928|  9.02k|  } else if (!mutable_cf_options.disable_auto_compactions &&
  ------------------
  |  Branch (928:14): [True: 9.02k, False: 0]
  ------------------
  929|  9.02k|             mutable_cf_options.hard_pending_compaction_bytes_limit > 0 &&
  ------------------
  |  Branch (929:14): [True: 9.02k, False: 0]
  ------------------
  930|  9.02k|             num_compaction_needed_bytes >=
  ------------------
  |  Branch (930:14): [True: 0, False: 9.02k]
  ------------------
  931|  9.02k|                 mutable_cf_options.hard_pending_compaction_bytes_limit) {
  932|      0|    return {WriteStallCondition::kStopped,
  933|      0|            WriteStallCause::kPendingCompactionBytes};
  934|  9.02k|  } else if (mutable_cf_options.max_write_buffer_number > 3 &&
  ------------------
  |  Branch (934:14): [True: 0, False: 9.02k]
  ------------------
  935|  9.02k|             num_unflushed_memtables >=
  ------------------
  |  Branch (935:14): [True: 0, False: 0]
  ------------------
  936|      0|                 mutable_cf_options.max_write_buffer_number - 1 &&
  937|  9.02k|             num_unflushed_memtables - 1 >=
  ------------------
  |  Branch (937:14): [True: 0, False: 0]
  ------------------
  938|      0|                 immutable_cf_options.min_write_buffer_number_to_merge) {
  939|      0|    return {WriteStallCondition::kDelayed, WriteStallCause::kMemtableLimit};
  940|  9.02k|  } else if (!mutable_cf_options.disable_auto_compactions &&
  ------------------
  |  Branch (940:14): [True: 9.02k, False: 0]
  ------------------
  941|  9.02k|             mutable_cf_options.level0_slowdown_writes_trigger >= 0 &&
  ------------------
  |  Branch (941:14): [True: 9.02k, False: 0]
  ------------------
  942|  9.02k|             num_l0_files >=
  ------------------
  |  Branch (942:14): [True: 0, False: 9.02k]
  ------------------
  943|  9.02k|                 mutable_cf_options.level0_slowdown_writes_trigger) {
  944|      0|    return {WriteStallCondition::kDelayed, WriteStallCause::kL0FileCountLimit};
  945|  9.02k|  } else if (!mutable_cf_options.disable_auto_compactions &&
  ------------------
  |  Branch (945:14): [True: 9.02k, False: 0]
  ------------------
  946|  9.02k|             mutable_cf_options.soft_pending_compaction_bytes_limit > 0 &&
  ------------------
  |  Branch (946:14): [True: 9.02k, False: 0]
  ------------------
  947|  9.02k|             num_compaction_needed_bytes >=
  ------------------
  |  Branch (947:14): [True: 0, False: 9.02k]
  ------------------
  948|  9.02k|                 mutable_cf_options.soft_pending_compaction_bytes_limit) {
  949|      0|    return {WriteStallCondition::kDelayed,
  950|      0|            WriteStallCause::kPendingCompactionBytes};
  951|      0|  }
  952|  9.02k|  return {WriteStallCondition::kNormal, WriteStallCause::kNone};
  953|  9.02k|}
_ZN7rocksdb16ColumnFamilyData31RecalculateWriteStallConditionsERKNS_16MutableCFOptionsE:
  956|  27.0k|    const MutableCFOptions& mutable_cf_options) {
  957|  27.0k|  auto write_stall_condition = WriteStallCondition::kNormal;
  958|  27.0k|  if (current_ != nullptr) {
  ------------------
  |  Branch (958:7): [True: 9.02k, False: 18.0k]
  ------------------
  959|  9.02k|    auto* vstorage = current_->storage_info();
  960|  9.02k|    auto write_controller = column_family_set_->write_controller_;
  961|  9.02k|    uint64_t compaction_needed_bytes =
  962|  9.02k|        vstorage->estimated_compaction_needed_bytes();
  963|       |
  964|  9.02k|    auto write_stall_condition_and_cause = GetWriteStallConditionAndCause(
  965|  9.02k|        imm()->NumNotFlushed(), vstorage->l0_delay_trigger_count(),
  966|  9.02k|        vstorage->estimated_compaction_needed_bytes(), mutable_cf_options,
  967|  9.02k|        *ioptions());
  968|  9.02k|    write_stall_condition = write_stall_condition_and_cause.first;
  969|  9.02k|    auto write_stall_cause = write_stall_condition_and_cause.second;
  970|       |
  971|  9.02k|    bool was_stopped = write_controller->IsStopped();
  972|  9.02k|    bool needed_delay = write_controller->NeedsDelay();
  973|       |
  974|  9.02k|    if (write_stall_condition == WriteStallCondition::kStopped &&
  ------------------
  |  Branch (974:9): [True: 0, False: 9.02k]
  ------------------
  975|  9.02k|        write_stall_cause == WriteStallCause::kMemtableLimit) {
  ------------------
  |  Branch (975:9): [True: 0, False: 0]
  ------------------
  976|      0|      write_controller_token_ = write_controller->GetStopToken();
  977|      0|      internal_stats_->AddCFStats(InternalStats::MEMTABLE_LIMIT_STOPS, 1);
  978|      0|      ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  979|      0|          ioptions_.logger,
  980|      0|          "[%s] Stopping writes because we have %d immutable memtables "
  981|      0|          "(waiting for flush), max_write_buffer_number is set to %d",
  982|      0|          name_.c_str(), imm()->NumNotFlushed(),
  983|      0|          mutable_cf_options.max_write_buffer_number);
  984|  9.02k|    } else if (write_stall_condition == WriteStallCondition::kStopped &&
  ------------------
  |  Branch (984:16): [True: 0, False: 9.02k]
  ------------------
  985|  9.02k|               write_stall_cause == WriteStallCause::kL0FileCountLimit) {
  ------------------
  |  Branch (985:16): [True: 0, False: 0]
  ------------------
  986|      0|      write_controller_token_ = write_controller->GetStopToken();
  987|      0|      internal_stats_->AddCFStats(InternalStats::L0_FILE_COUNT_LIMIT_STOPS, 1);
  988|      0|      if (compaction_picker_->IsLevel0CompactionInProgress()) {
  ------------------
  |  Branch (988:11): [True: 0, False: 0]
  ------------------
  989|      0|        internal_stats_->AddCFStats(
  990|      0|            InternalStats::L0_FILE_COUNT_LIMIT_STOPS_WITH_ONGOING_COMPACTION,
  991|      0|            1);
  992|      0|      }
  993|      0|      ROCKS_LOG_WARN(ioptions_.logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  994|      0|                     "[%s] Stopping writes because we have %d level-0 files",
  995|      0|                     name_.c_str(), vstorage->l0_delay_trigger_count());
  996|  9.02k|    } else if (write_stall_condition == WriteStallCondition::kStopped &&
  ------------------
  |  Branch (996:16): [True: 0, False: 9.02k]
  ------------------
  997|  9.02k|               write_stall_cause == WriteStallCause::kPendingCompactionBytes) {
  ------------------
  |  Branch (997:16): [True: 0, False: 0]
  ------------------
  998|      0|      write_controller_token_ = write_controller->GetStopToken();
  999|      0|      internal_stats_->AddCFStats(
 1000|      0|          InternalStats::PENDING_COMPACTION_BYTES_LIMIT_STOPS, 1);
 1001|      0|      ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1002|      0|          ioptions_.logger,
 1003|      0|          "[%s] Stopping writes because of estimated pending compaction "
 1004|      0|          "bytes %" PRIu64,
 1005|      0|          name_.c_str(), compaction_needed_bytes);
 1006|  9.02k|    } else if (write_stall_condition == WriteStallCondition::kDelayed &&
  ------------------
  |  Branch (1006:16): [True: 0, False: 9.02k]
  ------------------
 1007|  9.02k|               write_stall_cause == WriteStallCause::kMemtableLimit) {
  ------------------
  |  Branch (1007:16): [True: 0, False: 0]
  ------------------
 1008|      0|      write_controller_token_ =
 1009|      0|          SetupDelay(write_controller, compaction_needed_bytes,
 1010|      0|                     prev_compaction_needed_bytes_, was_stopped,
 1011|      0|                     mutable_cf_options.disable_auto_compactions);
 1012|      0|      internal_stats_->AddCFStats(InternalStats::MEMTABLE_LIMIT_DELAYS, 1);
 1013|      0|      ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1014|      0|          ioptions_.logger,
 1015|      0|          "[%s] Stalling writes because we have %d immutable memtables "
 1016|      0|          "(waiting for flush), max_write_buffer_number is set to %d "
 1017|      0|          "rate %" PRIu64,
 1018|      0|          name_.c_str(), imm()->NumNotFlushed(),
 1019|      0|          mutable_cf_options.max_write_buffer_number,
 1020|      0|          write_controller->delayed_write_rate());
 1021|  9.02k|    } else if (write_stall_condition == WriteStallCondition::kDelayed &&
  ------------------
  |  Branch (1021:16): [True: 0, False: 9.02k]
  ------------------
 1022|  9.02k|               write_stall_cause == WriteStallCause::kL0FileCountLimit) {
  ------------------
  |  Branch (1022:16): [True: 0, False: 0]
  ------------------
 1023|       |      // L0 is the last two files from stopping.
 1024|      0|      bool near_stop = vstorage->l0_delay_trigger_count() >=
 1025|      0|                       mutable_cf_options.level0_stop_writes_trigger - 2;
 1026|      0|      write_controller_token_ =
 1027|      0|          SetupDelay(write_controller, compaction_needed_bytes,
 1028|      0|                     prev_compaction_needed_bytes_, was_stopped || near_stop,
  ------------------
  |  Branch (1028:53): [True: 0, False: 0]
  |  Branch (1028:68): [True: 0, False: 0]
  ------------------
 1029|      0|                     mutable_cf_options.disable_auto_compactions);
 1030|      0|      internal_stats_->AddCFStats(InternalStats::L0_FILE_COUNT_LIMIT_DELAYS, 1);
 1031|      0|      if (compaction_picker_->IsLevel0CompactionInProgress()) {
  ------------------
  |  Branch (1031:11): [True: 0, False: 0]
  ------------------
 1032|      0|        internal_stats_->AddCFStats(
 1033|      0|            InternalStats::L0_FILE_COUNT_LIMIT_DELAYS_WITH_ONGOING_COMPACTION,
 1034|      0|            1);
 1035|      0|      }
 1036|      0|      ROCKS_LOG_WARN(ioptions_.logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1037|      0|                     "[%s] Stalling writes because we have %d level-0 files "
 1038|      0|                     "rate %" PRIu64,
 1039|      0|                     name_.c_str(), vstorage->l0_delay_trigger_count(),
 1040|      0|                     write_controller->delayed_write_rate());
 1041|  9.02k|    } else if (write_stall_condition == WriteStallCondition::kDelayed &&
  ------------------
  |  Branch (1041:16): [True: 0, False: 9.02k]
  ------------------
 1042|  9.02k|               write_stall_cause == WriteStallCause::kPendingCompactionBytes) {
  ------------------
  |  Branch (1042:16): [True: 0, False: 0]
  ------------------
 1043|       |      // If the distance to hard limit is less than 1/4 of the gap between soft
 1044|       |      // and
 1045|       |      // hard bytes limit, we think it is near stop and speed up the slowdown.
 1046|      0|      bool near_stop =
 1047|      0|          mutable_cf_options.hard_pending_compaction_bytes_limit > 0 &&
  ------------------
  |  Branch (1047:11): [True: 0, False: 0]
  ------------------
 1048|      0|          (compaction_needed_bytes -
  ------------------
  |  Branch (1048:11): [True: 0, False: 0]
  ------------------
 1049|      0|           mutable_cf_options.soft_pending_compaction_bytes_limit) >
 1050|      0|              3 *
 1051|      0|                  (mutable_cf_options.hard_pending_compaction_bytes_limit -
 1052|      0|                   mutable_cf_options.soft_pending_compaction_bytes_limit) /
 1053|      0|                  4;
 1054|       |
 1055|      0|      write_controller_token_ =
 1056|      0|          SetupDelay(write_controller, compaction_needed_bytes,
 1057|      0|                     prev_compaction_needed_bytes_, was_stopped || near_stop,
  ------------------
  |  Branch (1057:53): [True: 0, False: 0]
  |  Branch (1057:68): [True: 0, False: 0]
  ------------------
 1058|      0|                     mutable_cf_options.disable_auto_compactions);
 1059|      0|      internal_stats_->AddCFStats(
 1060|      0|          InternalStats::PENDING_COMPACTION_BYTES_LIMIT_DELAYS, 1);
 1061|      0|      ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1062|      0|          ioptions_.logger,
 1063|      0|          "[%s] Stalling writes because of estimated pending compaction "
 1064|      0|          "bytes %" PRIu64 " rate %" PRIu64,
 1065|      0|          name_.c_str(), vstorage->estimated_compaction_needed_bytes(),
 1066|      0|          write_controller->delayed_write_rate());
 1067|  9.02k|    } else {
 1068|  9.02k|      assert(write_stall_condition == WriteStallCondition::kNormal);
 1069|  9.02k|      if (vstorage->l0_delay_trigger_count() >=
  ------------------
  |  Branch (1069:11): [True: 0, False: 9.02k]
  ------------------
 1070|  9.02k|          GetL0FileCountForCompactionSpeedup(
 1071|  9.02k|              mutable_cf_options.level0_file_num_compaction_trigger,
 1072|  9.02k|              mutable_cf_options.level0_slowdown_writes_trigger)) {
 1073|      0|        write_controller_token_ =
 1074|      0|            write_controller->GetCompactionPressureToken();
 1075|      0|        ROCKS_LOG_INFO(
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1076|      0|            ioptions_.logger,
 1077|      0|            "[%s] Increasing compaction threads because we have %d level-0 "
 1078|      0|            "files ",
 1079|      0|            name_.c_str(), vstorage->l0_delay_trigger_count());
 1080|  9.02k|      } else if (mutable_cf_options.soft_pending_compaction_bytes_limit == 0) {
  ------------------
  |  Branch (1080:18): [True: 0, False: 9.02k]
  ------------------
 1081|       |        // If soft pending compaction byte limit is not set, always speed up
 1082|       |        // compaction.
 1083|      0|        write_controller_token_ =
 1084|      0|            write_controller->GetCompactionPressureToken();
 1085|  9.02k|      } else if (vstorage->estimated_compaction_needed_bytes() >=
  ------------------
  |  Branch (1085:18): [True: 0, False: 9.02k]
  ------------------
 1086|  9.02k|                 GetPendingCompactionBytesForCompactionSpeedup(
 1087|  9.02k|                     mutable_cf_options, vstorage)) {
 1088|      0|        write_controller_token_ =
 1089|      0|            write_controller->GetCompactionPressureToken();
 1090|      0|        ROCKS_LOG_INFO(
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1091|      0|            ioptions_.logger,
 1092|      0|            "[%s] Increasing compaction threads because of estimated pending "
 1093|      0|            "compaction "
 1094|      0|            "bytes %" PRIu64,
 1095|      0|            name_.c_str(), vstorage->estimated_compaction_needed_bytes());
 1096|  9.02k|      } else if (uint64_t(vstorage->FilesMarkedForCompaction().size()) >=
  ------------------
  |  Branch (1096:18): [True: 0, False: 9.02k]
  ------------------
 1097|  9.02k|                 GetMarkedFileCountForCompactionSpeedup()) {
 1098|      0|        write_controller_token_ =
 1099|      0|            write_controller->GetCompactionPressureToken();
 1100|      0|        ROCKS_LOG_INFO(
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1101|      0|            ioptions_.logger,
 1102|      0|            "[%s] Increasing compaction threads because we have %" PRIu64
 1103|      0|            " files marked for compaction",
 1104|      0|            name_.c_str(),
 1105|      0|            uint64_t(vstorage->FilesMarkedForCompaction().size()));
 1106|  9.02k|      } else {
 1107|  9.02k|        write_controller_token_.reset();
 1108|  9.02k|      }
 1109|       |      // If the DB recovers from delay conditions, we reward with reducing
 1110|       |      // double the slowdown ratio. This is to balance the long term slowdown
 1111|       |      // increase signal.
 1112|  9.02k|      if (needed_delay) {
  ------------------
  |  Branch (1112:11): [True: 0, False: 9.02k]
  ------------------
 1113|      0|        uint64_t write_rate = write_controller->delayed_write_rate();
 1114|      0|        write_controller->set_delayed_write_rate(static_cast<uint64_t>(
 1115|      0|            static_cast<double>(write_rate) * kDelayRecoverSlowdownRatio));
 1116|       |        // Set the low pri limit to be 1/4 the delayed write rate.
 1117|       |        // Note we don't reset this value even after delay condition is relased.
 1118|       |        // Low-pri rate will continue to apply if there is a compaction
 1119|       |        // pressure.
 1120|      0|        write_controller->low_pri_rate_limiter()->SetBytesPerSecond(write_rate /
 1121|      0|                                                                    4);
 1122|      0|      }
 1123|  9.02k|    }
 1124|  9.02k|    prev_compaction_needed_bytes_ = compaction_needed_bytes;
 1125|  9.02k|  }
 1126|  27.0k|  return write_stall_condition;
 1127|  27.0k|}
_ZNK7rocksdb16ColumnFamilyData8soptionsEv:
 1129|  9.02k|const FileOptions* ColumnFamilyData::soptions() const {
 1130|  9.02k|  return &(column_family_set_->file_options_);
 1131|  9.02k|}
_ZN7rocksdb16ColumnFamilyData10SetCurrentEPNS_7VersionE:
 1133|  27.0k|void ColumnFamilyData::SetCurrent(Version* current_version) {
 1134|  27.0k|  current_ = current_version;
 1135|  27.0k|}
_ZN7rocksdb16ColumnFamilyData20ConstructNewMemtableERKNS_16MutableCFOptionsEm:
 1154|  13.5k|    const MutableCFOptions& mutable_cf_options, SequenceNumber earliest_seq) {
 1155|  13.5k|  return new MemTable(internal_comparator_, ioptions_, mutable_cf_options,
 1156|  13.5k|                      write_buffer_manager_, earliest_seq, id_);
 1157|  13.5k|}
_ZN7rocksdb16ColumnFamilyData17CreateNewMemtableERKNS_16MutableCFOptionsEm:
 1160|  13.5k|    const MutableCFOptions& mutable_cf_options, SequenceNumber earliest_seq) {
 1161|  13.5k|  if (mem_ != nullptr) {
  ------------------
  |  Branch (1161:7): [True: 4.48k, False: 9.02k]
  ------------------
 1162|  4.48k|    delete mem_->Unref();
 1163|  4.48k|  }
 1164|  13.5k|  SetMemtable(ConstructNewMemtable(mutable_cf_options, earliest_seq));
 1165|  13.5k|  mem_->Ref();
 1166|  13.5k|}
_ZNK7rocksdb16ColumnFamilyData15NeedsCompactionEv:
 1168|  9.02k|bool ColumnFamilyData::NeedsCompaction() const {
 1169|  9.02k|  return !mutable_cf_options_.disable_auto_compactions &&
  ------------------
  |  Branch (1169:10): [True: 9.02k, False: 0]
  ------------------
 1170|  9.02k|         compaction_picker_->NeedsCompaction(current_->storage_info());
  ------------------
  |  Branch (1170:10): [True: 0, False: 9.02k]
  ------------------
 1171|  9.02k|}
_ZN7rocksdb16ColumnFamilyData25GetReferencedSuperVersionEPNS_6DBImplE:
 1272|  4.51k|SuperVersion* ColumnFamilyData::GetReferencedSuperVersion(DBImpl* db) {
 1273|  4.51k|  SuperVersion* sv = GetThreadLocalSuperVersion(db);
 1274|  4.51k|  sv->Ref();
 1275|  4.51k|  if (!ReturnThreadLocalSuperVersion(sv)) {
  ------------------
  |  Branch (1275:7): [True: 0, False: 4.51k]
  ------------------
 1276|       |    // This Unref() corresponds to the Ref() in GetThreadLocalSuperVersion()
 1277|       |    // when the thread-local pointer was populated. So, the Ref() earlier in
 1278|       |    // this function still prevents the returned SuperVersion* from being
 1279|       |    // deleted out from under the caller.
 1280|      0|    sv->Unref();
 1281|      0|  }
 1282|  4.51k|  return sv;
 1283|  4.51k|}
_ZN7rocksdb16ColumnFamilyData26GetThreadLocalSuperVersionEPNS_6DBImplE:
 1285|  4.51k|SuperVersion* ColumnFamilyData::GetThreadLocalSuperVersion(DBImpl* db) {
 1286|       |  // The SuperVersion is cached in thread local storage to avoid acquiring
 1287|       |  // mutex when SuperVersion does not change since the last use. When a new
 1288|       |  // SuperVersion is installed, the compaction or flush thread cleans up
 1289|       |  // cached SuperVersion in all existing thread local storage. To avoid
 1290|       |  // acquiring mutex for this operation, we use atomic Swap() on the thread
 1291|       |  // local pointer to guarantee exclusive access. If the thread local pointer
 1292|       |  // is being used while a new SuperVersion is installed, the cached
 1293|       |  // SuperVersion can become stale. In that case, the background thread would
 1294|       |  // have swapped in kSVObsolete. We re-check the value at when returning
 1295|       |  // SuperVersion back to thread local, with an atomic compare and swap.
 1296|       |  // The superversion will need to be released if detected to be stale.
 1297|  4.51k|  void* ptr = local_sv_->Swap(SuperVersion::kSVInUse);
 1298|       |  // Invariant:
 1299|       |  // (1) Scrape (always) installs kSVObsolete in ThreadLocal storage
 1300|       |  // (2) the Swap above (always) installs kSVInUse, ThreadLocal storage
 1301|       |  // should only keep kSVInUse before ReturnThreadLocalSuperVersion call
 1302|       |  // (if no Scrape happens).
 1303|  4.51k|  assert(ptr != SuperVersion::kSVInUse);
 1304|  4.51k|  SuperVersion* sv = static_cast<SuperVersion*>(ptr);
 1305|  4.51k|  if (sv == SuperVersion::kSVObsolete) {
  ------------------
  |  Branch (1305:7): [True: 4.51k, False: 0]
  ------------------
 1306|  4.51k|    RecordTick(ioptions_.stats, NUMBER_SUPERVERSION_ACQUIRES);
 1307|  4.51k|    db->mutex()->Lock();
 1308|  4.51k|    sv = super_version_->Ref();
 1309|  4.51k|    db->mutex()->Unlock();
 1310|  4.51k|  }
 1311|  4.51k|  assert(sv != nullptr);
 1312|  4.51k|  return sv;
 1313|  4.51k|}
_ZN7rocksdb16ColumnFamilyData29ReturnThreadLocalSuperVersionEPNS_12SuperVersionE:
 1315|  4.51k|bool ColumnFamilyData::ReturnThreadLocalSuperVersion(SuperVersion* sv) {
 1316|  4.51k|  assert(sv != nullptr);
 1317|       |  // Put the SuperVersion back
 1318|  4.51k|  void* expected = SuperVersion::kSVInUse;
 1319|  4.51k|  if (local_sv_->CompareAndSwap(static_cast<void*>(sv), expected)) {
  ------------------
  |  Branch (1319:7): [True: 4.51k, False: 0]
  ------------------
 1320|       |    // When we see kSVInUse in the ThreadLocal, we are sure ThreadLocal
 1321|       |    // storage has not been altered and no Scrape has happened. The
 1322|       |    // SuperVersion is still current.
 1323|  4.51k|    return true;
 1324|  4.51k|  } else {
 1325|       |    // ThreadLocal scrape happened in the process of this GetImpl call (after
 1326|       |    // thread local Swap() at the beginning and before CompareAndSwap()).
 1327|       |    // This means the SuperVersion it holds is obsolete.
 1328|      0|    assert(expected == SuperVersion::kSVObsolete);
 1329|      0|  }
 1330|      0|  return false;
 1331|  4.51k|}
_ZN7rocksdb16ColumnFamilyData19InstallSuperVersionEPNS_19SuperVersionContextERKNS_16MutableCFOptionsE:
 1341|  9.02k|    const MutableCFOptions& mutable_cf_options) {
 1342|  9.02k|  SuperVersion* new_superversion = sv_context->new_superversion.release();
 1343|  9.02k|  new_superversion->mutable_cf_options = mutable_cf_options;
 1344|  9.02k|  new_superversion->Init(this, mem_, imm_.current(), current_,
 1345|  9.02k|                         sv_context->new_seqno_to_time_mapping
  ------------------
  |  Branch (1345:26): [True: 0, False: 9.02k]
  ------------------
 1346|  9.02k|                             ? std::move(sv_context->new_seqno_to_time_mapping)
 1347|  9.02k|                         : super_version_
  ------------------
  |  Branch (1347:28): [True: 0, False: 9.02k]
  ------------------
 1348|  9.02k|                             ? super_version_->ShareSeqnoToTimeMapping()
 1349|  9.02k|                             : nullptr);
 1350|  9.02k|  SuperVersion* old_superversion = super_version_;
 1351|  9.02k|  super_version_ = new_superversion;
 1352|  9.02k|  if (old_superversion == nullptr || old_superversion->current != current() ||
  ------------------
  |  Branch (1352:7): [True: 9.02k, False: 0]
  |  Branch (1352:38): [True: 0, False: 0]
  ------------------
 1353|  9.02k|      old_superversion->mem != mem_ ||
  ------------------
  |  Branch (1353:7): [True: 0, False: 0]
  ------------------
 1354|  9.02k|      old_superversion->imm != imm_.current()) {
  ------------------
  |  Branch (1354:7): [True: 0, False: 0]
  ------------------
 1355|       |    // Should not recalculate slow down condition if nothing has changed, since
 1356|       |    // currently RecalculateWriteStallConditions() treats it as further slowing
 1357|       |    // down is needed.
 1358|  9.02k|    super_version_->write_stall_condition =
 1359|  9.02k|        RecalculateWriteStallConditions(mutable_cf_options);
 1360|  9.02k|  } else {
 1361|      0|    super_version_->write_stall_condition =
 1362|      0|        old_superversion->write_stall_condition;
 1363|      0|  }
 1364|  9.02k|  if (old_superversion != nullptr) {
  ------------------
  |  Branch (1364:7): [True: 0, False: 9.02k]
  ------------------
 1365|       |    // Reset SuperVersions cached in thread local storage.
 1366|       |    // This should be done before old_superversion->Unref(). That's to ensure
 1367|       |    // that local_sv_ never holds the last reference to SuperVersion, since
 1368|       |    // it has no means to safely do SuperVersion cleanup.
 1369|      0|    ResetThreadLocalSuperVersions();
 1370|       |
 1371|      0|    if (old_superversion->mutable_cf_options.write_buffer_size !=
  ------------------
  |  Branch (1371:9): [True: 0, False: 0]
  ------------------
 1372|      0|        mutable_cf_options.write_buffer_size) {
 1373|      0|      mem_->UpdateWriteBufferSize(mutable_cf_options.write_buffer_size);
 1374|      0|    }
 1375|      0|    if (old_superversion->write_stall_condition !=
  ------------------
  |  Branch (1375:9): [True: 0, False: 0]
  ------------------
 1376|      0|        new_superversion->write_stall_condition) {
 1377|      0|      sv_context->PushWriteStallNotification(
 1378|      0|          old_superversion->write_stall_condition,
 1379|      0|          new_superversion->write_stall_condition, GetName(), ioptions());
 1380|      0|    }
 1381|      0|    if (old_superversion->Unref()) {
  ------------------
  |  Branch (1381:9): [True: 0, False: 0]
  ------------------
 1382|      0|      old_superversion->Cleanup();
 1383|      0|      sv_context->superversions_to_free.push_back(old_superversion);
 1384|      0|    }
 1385|      0|  }
 1386|  9.02k|  ++super_version_number_;
 1387|  9.02k|  super_version_->version_number = super_version_number_;
 1388|  9.02k|}
_ZN7rocksdb16ColumnFamilyData15ValidateOptionsERKNS_9DBOptionsERKNS_19ColumnFamilyOptionsE:
 1409|  9.02k|    const DBOptions& db_options, const ColumnFamilyOptions& cf_options) {
 1410|  9.02k|  Status s;
 1411|  9.02k|  s = CheckCompressionSupported(cf_options);
 1412|  9.02k|  if (s.ok() && db_options.allow_concurrent_memtable_write) {
  ------------------
  |  Branch (1412:7): [True: 9.02k, False: 0]
  |  Branch (1412:17): [True: 9.02k, False: 0]
  ------------------
 1413|  9.02k|    s = CheckConcurrentWritesSupported(cf_options);
 1414|  9.02k|  }
 1415|  9.02k|  if (s.ok() && db_options.unordered_write &&
  ------------------
  |  Branch (1415:7): [True: 9.02k, False: 0]
  |  Branch (1415:17): [True: 0, False: 9.02k]
  ------------------
 1416|  9.02k|      cf_options.max_successive_merges != 0) {
  ------------------
  |  Branch (1416:7): [True: 0, False: 0]
  ------------------
 1417|      0|    s = Status::InvalidArgument(
 1418|      0|        "max_successive_merges > 0 is incompatible with unordered_write");
 1419|      0|  }
 1420|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (1420:7): [True: 9.02k, False: 0]
  ------------------
 1421|  9.02k|    s = CheckCFPathsSupported(db_options, cf_options);
 1422|  9.02k|  }
 1423|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (1423:7): [True: 0, False: 9.02k]
  ------------------
 1424|      0|    return s;
 1425|      0|  }
 1426|       |
 1427|  9.02k|  if (cf_options.ttl > 0 && cf_options.ttl != kDefaultTtl) {
  ------------------
  |  Branch (1427:7): [True: 9.02k, False: 0]
  |  Branch (1427:29): [True: 0, False: 9.02k]
  ------------------
 1428|      0|    if (!cf_options.table_factory->IsInstanceOf(
  ------------------
  |  Branch (1428:9): [True: 0, False: 0]
  ------------------
 1429|      0|            TableFactory::kBlockBasedTableName())) {
 1430|      0|      return Status::NotSupported(
 1431|      0|          "TTL is only supported in Block-Based Table format. ");
 1432|      0|    }
 1433|      0|  }
 1434|       |
 1435|  9.02k|  if (cf_options.periodic_compaction_seconds > 0 &&
  ------------------
  |  Branch (1435:7): [True: 9.02k, False: 0]
  ------------------
 1436|  9.02k|      cf_options.periodic_compaction_seconds != kDefaultPeriodicCompSecs) {
  ------------------
  |  Branch (1436:7): [True: 0, False: 9.02k]
  ------------------
 1437|      0|    if (!cf_options.table_factory->IsInstanceOf(
  ------------------
  |  Branch (1437:9): [True: 0, False: 0]
  ------------------
 1438|      0|            TableFactory::kBlockBasedTableName())) {
 1439|      0|      return Status::NotSupported(
 1440|      0|          "Periodic Compaction is only supported in "
 1441|      0|          "Block-Based Table format. ");
 1442|      0|    }
 1443|      0|  }
 1444|       |
 1445|  9.02k|  const auto* ucmp = cf_options.comparator;
 1446|  9.02k|  assert(ucmp);
 1447|  9.02k|  if (ucmp->timestamp_size() > 0 &&
  ------------------
  |  Branch (1447:7): [True: 0, False: 9.02k]
  ------------------
 1448|  9.02k|      !cf_options.persist_user_defined_timestamps) {
  ------------------
  |  Branch (1448:7): [True: 0, False: 0]
  ------------------
 1449|      0|    if (db_options.atomic_flush) {
  ------------------
  |  Branch (1449:9): [True: 0, False: 0]
  ------------------
 1450|      0|      return Status::NotSupported(
 1451|      0|          "Not persisting user-defined timestamps feature is not supported"
 1452|      0|          "in combination with atomic flush.");
 1453|      0|    }
 1454|      0|    if (db_options.allow_concurrent_memtable_write) {
  ------------------
  |  Branch (1454:9): [True: 0, False: 0]
  ------------------
 1455|      0|      return Status::NotSupported(
 1456|      0|          "Not persisting user-defined timestamps feature is not supported"
 1457|      0|          " in combination with concurrent memtable write.");
 1458|      0|    }
 1459|      0|    const char* comparator_name = cf_options.comparator->Name();
 1460|      0|    size_t name_size = strlen(comparator_name);
 1461|      0|    const char* suffix = ".u64ts";
 1462|      0|    size_t suffix_size = strlen(suffix);
 1463|      0|    if (name_size <= suffix_size ||
  ------------------
  |  Branch (1463:9): [True: 0, False: 0]
  ------------------
 1464|      0|        strcmp(comparator_name + name_size - suffix_size, suffix) != 0) {
  ------------------
  |  Branch (1464:9): [True: 0, False: 0]
  ------------------
 1465|      0|      return Status::NotSupported(
 1466|      0|          "Not persisting user-defined timestamps"
 1467|      0|          "feature only support user-defined timestamps formatted as "
 1468|      0|          "uint64_t.");
 1469|      0|    }
 1470|      0|  }
 1471|       |
 1472|  9.02k|  if (cf_options.enable_blob_garbage_collection) {
  ------------------
  |  Branch (1472:7): [True: 0, False: 9.02k]
  ------------------
 1473|      0|    if (cf_options.blob_garbage_collection_age_cutoff < 0.0 ||
  ------------------
  |  Branch (1473:9): [True: 0, False: 0]
  ------------------
 1474|      0|        cf_options.blob_garbage_collection_age_cutoff > 1.0) {
  ------------------
  |  Branch (1474:9): [True: 0, False: 0]
  ------------------
 1475|      0|      return Status::InvalidArgument(
 1476|      0|          "The age cutoff for blob garbage collection should be in the range "
 1477|      0|          "[0.0, 1.0].");
 1478|      0|    }
 1479|      0|    if (cf_options.blob_garbage_collection_force_threshold < 0.0 ||
  ------------------
  |  Branch (1479:9): [True: 0, False: 0]
  ------------------
 1480|      0|        cf_options.blob_garbage_collection_force_threshold > 1.0) {
  ------------------
  |  Branch (1480:9): [True: 0, False: 0]
  ------------------
 1481|      0|      return Status::InvalidArgument(
 1482|      0|          "The garbage ratio threshold for forcing blob garbage collection "
 1483|      0|          "should be in the range [0.0, 1.0].");
 1484|      0|    }
 1485|      0|  }
 1486|       |
 1487|  9.02k|  if (cf_options.compaction_style == kCompactionStyleFIFO &&
  ------------------
  |  Branch (1487:7): [True: 0, False: 9.02k]
  ------------------
 1488|  9.02k|      db_options.max_open_files != -1 && cf_options.ttl > 0) {
  ------------------
  |  Branch (1488:7): [True: 0, False: 0]
  |  Branch (1488:42): [True: 0, False: 0]
  ------------------
 1489|      0|    return Status::NotSupported(
 1490|      0|        "FIFO compaction only supported with max_open_files = -1.");
 1491|      0|  }
 1492|       |
 1493|  9.02k|  std::vector<uint32_t> supported{0, 1, 2, 4, 8};
 1494|  9.02k|  if (std::find(supported.begin(), supported.end(),
  ------------------
  |  Branch (1494:7): [True: 0, False: 9.02k]
  ------------------
 1495|  9.02k|                cf_options.memtable_protection_bytes_per_key) ==
 1496|  9.02k|      supported.end()) {
 1497|      0|    return Status::NotSupported(
 1498|      0|        "Memtable per key-value checksum protection only supports 0, 1, 2, 4 "
 1499|      0|        "or 8 bytes per key.");
 1500|      0|  }
 1501|  9.02k|  if (std::find(supported.begin(), supported.end(),
  ------------------
  |  Branch (1501:7): [True: 0, False: 9.02k]
  ------------------
 1502|  9.02k|                cf_options.block_protection_bytes_per_key) == supported.end()) {
 1503|      0|    return Status::NotSupported(
 1504|      0|        "Block per key-value checksum protection only supports 0, 1, 2, 4 "
 1505|      0|        "or 8 bytes per key.");
 1506|      0|  }
 1507|       |
 1508|  9.02k|  if (!cf_options.compaction_options_fifo.file_temperature_age_thresholds
  ------------------
  |  Branch (1508:7): [True: 0, False: 9.02k]
  ------------------
 1509|  9.02k|           .empty()) {
 1510|      0|    if (cf_options.compaction_style != kCompactionStyleFIFO) {
  ------------------
  |  Branch (1510:9): [True: 0, False: 0]
  ------------------
 1511|      0|      return Status::NotSupported(
 1512|      0|          "Option file_temperature_age_thresholds only supports FIFO "
 1513|      0|          "compaction.");
 1514|      0|    } else if (cf_options.num_levels > 1) {
  ------------------
  |  Branch (1514:16): [True: 0, False: 0]
  ------------------
 1515|      0|      return Status::NotSupported(
 1516|      0|          "Option file_temperature_age_thresholds is only supported when "
 1517|      0|          "num_levels = 1.");
 1518|      0|    } else {
 1519|      0|      const auto& ages =
 1520|      0|          cf_options.compaction_options_fifo.file_temperature_age_thresholds;
 1521|      0|      assert(ages.size() >= 1);
 1522|       |      // check that age is sorted
 1523|      0|      for (size_t i = 0; i < ages.size() - 1; ++i) {
  ------------------
  |  Branch (1523:26): [True: 0, False: 0]
  ------------------
 1524|      0|        if (ages[i].age >= ages[i + 1].age) {
  ------------------
  |  Branch (1524:13): [True: 0, False: 0]
  ------------------
 1525|      0|          return Status::NotSupported(
 1526|      0|              "Option file_temperature_age_thresholds requires elements to be "
 1527|      0|              "sorted in increasing order with respect to `age` field.");
 1528|      0|        }
 1529|      0|      }
 1530|      0|    }
 1531|      0|  }
 1532|       |
 1533|  9.02k|  if (cf_options.compaction_style == kCompactionStyleUniversal) {
  ------------------
  |  Branch (1533:7): [True: 0, False: 9.02k]
  ------------------
 1534|      0|    int max_read_amp = cf_options.compaction_options_universal.max_read_amp;
 1535|      0|    if (max_read_amp < -1) {
  ------------------
  |  Branch (1535:9): [True: 0, False: 0]
  ------------------
 1536|      0|      return Status::NotSupported(
 1537|      0|          "CompactionOptionsUniversal::max_read_amp should be at least -1.");
 1538|      0|    } else if (0 < max_read_amp &&
  ------------------
  |  Branch (1538:16): [True: 0, False: 0]
  ------------------
 1539|      0|               max_read_amp < cf_options.level0_file_num_compaction_trigger) {
  ------------------
  |  Branch (1539:16): [True: 0, False: 0]
  ------------------
 1540|      0|      return Status::NotSupported(
 1541|      0|          "CompactionOptionsUniversal::max_read_amp limits the number of sorted"
 1542|      0|          " runs but is smaller than the compaction trigger "
 1543|      0|          "level0_file_num_compaction_trigger.");
 1544|      0|    }
 1545|      0|  }
 1546|  9.02k|  return s;
 1547|  9.02k|}
_ZN7rocksdb16ColumnFamilyData21CalculateSSTWriteHintEi:
 1569|  4.48k|Env::WriteLifeTimeHint ColumnFamilyData::CalculateSSTWriteHint(int level) {
 1570|  4.48k|  if (initial_cf_options_.compaction_style != kCompactionStyleLevel) {
  ------------------
  |  Branch (1570:7): [True: 0, False: 4.48k]
  ------------------
 1571|      0|    return Env::WLTH_NOT_SET;
 1572|      0|  }
 1573|  4.48k|  if (level == 0) {
  ------------------
  |  Branch (1573:7): [True: 4.48k, False: 0]
  ------------------
 1574|  4.48k|    return Env::WLTH_MEDIUM;
 1575|  4.48k|  }
 1576|      0|  int base_level = current_->storage_info()->base_level();
 1577|       |
 1578|       |  // L1: medium, L2: long, ...
 1579|      0|  if (level - base_level >= 2) {
  ------------------
  |  Branch (1579:7): [True: 0, False: 0]
  ------------------
 1580|      0|    return Env::WLTH_EXTREME;
 1581|      0|  } else if (level < base_level) {
  ------------------
  |  Branch (1581:14): [True: 0, False: 0]
  ------------------
 1582|       |    // There is no restriction which prevents level passed in to be smaller
 1583|       |    // than base_level.
 1584|      0|    return Env::WLTH_MEDIUM;
 1585|      0|  }
 1586|      0|  return static_cast<Env::WriteLifeTimeHint>(
 1587|      0|      level - base_level + static_cast<int>(Env::WLTH_MEDIUM));
 1588|      0|}
_ZN7rocksdb16ColumnFamilyData14AddDirectoriesEPNSt3__13mapINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_10shared_ptrINS_11FSDirectoryEEENS1_4lessIS8_EENS6_INS1_4pairIKS8_SB_EEEEEE:
 1591|  9.02k|    std::map<std::string, std::shared_ptr<FSDirectory>>* created_dirs) {
 1592|  9.02k|  Status s;
 1593|  9.02k|  assert(created_dirs != nullptr);
 1594|  9.02k|  assert(data_dirs_.empty());
 1595|  9.02k|  for (auto& p : ioptions_.cf_paths) {
  ------------------
  |  Branch (1595:16): [True: 9.02k, False: 9.02k]
  ------------------
 1596|  9.02k|    auto existing_dir = created_dirs->find(p.path);
 1597|       |
 1598|  9.02k|    if (existing_dir == created_dirs->end()) {
  ------------------
  |  Branch (1598:9): [True: 9.02k, False: 0]
  ------------------
 1599|  9.02k|      std::unique_ptr<FSDirectory> path_directory;
 1600|  9.02k|      s = DBImpl::CreateAndNewDirectory(ioptions_.fs.get(), p.path,
 1601|  9.02k|                                        &path_directory);
 1602|  9.02k|      if (!s.ok()) {
  ------------------
  |  Branch (1602:11): [True: 0, False: 9.02k]
  ------------------
 1603|      0|        return s;
 1604|      0|      }
 1605|  9.02k|      assert(path_directory != nullptr);
 1606|  9.02k|      data_dirs_.emplace_back(path_directory.release());
 1607|  9.02k|      (*created_dirs)[p.path] = data_dirs_.back();
 1608|  9.02k|    } else {
 1609|      0|      data_dirs_.emplace_back(existing_dir->second);
 1610|      0|    }
 1611|  9.02k|  }
 1612|  9.02k|  assert(data_dirs_.size() == ioptions_.cf_paths.size());
 1613|  9.02k|  return s;
 1614|  9.02k|}
_ZN7rocksdb16ColumnFamilyData19RecoverEpochNumbersEv:
 1666|  9.02k|void ColumnFamilyData::RecoverEpochNumbers() {
 1667|  9.02k|  assert(current_);
 1668|  9.02k|  auto* vstorage = current_->storage_info();
 1669|  9.02k|  assert(vstorage);
 1670|  9.02k|  vstorage->RecoverEpochNumbers(this);
 1671|  9.02k|}
_ZN7rocksdb15ColumnFamilySetC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKNS_18ImmutableDBOptionsERKNS_11FileOptionsEPNS_5CacheEPNS_18WriteBufferManagerEPNS_15WriteControllerEPNS_16BlockCacheTracerERKNS1_10shared_ptrINS_8IOTracerEEES9_S9_:
 1698|  9.02k|      db_session_id_(db_session_id) {
 1699|       |  // initialize linked list
 1700|  9.02k|  dummy_cfd_->prev_ = dummy_cfd_;
 1701|  9.02k|  dummy_cfd_->next_ = dummy_cfd_;
 1702|  9.02k|}
_ZN7rocksdb15ColumnFamilySetD2Ev:
 1704|  9.02k|ColumnFamilySet::~ColumnFamilySet() {
 1705|  18.0k|  while (column_family_data_.size() > 0) {
  ------------------
  |  Branch (1705:10): [True: 9.02k, False: 9.02k]
  ------------------
 1706|       |    // cfd destructor will delete itself from column_family_data_
 1707|  9.02k|    auto cfd = column_family_data_.begin()->second;
 1708|  9.02k|    bool last_ref __attribute__((__unused__));
 1709|  9.02k|    last_ref = cfd->UnrefAndTryDelete();
 1710|  9.02k|    assert(last_ref);
 1711|  9.02k|  }
 1712|  9.02k|  bool dummy_last_ref __attribute__((__unused__));
 1713|  9.02k|  dummy_last_ref = dummy_cfd_->UnrefAndTryDelete();
 1714|  9.02k|  assert(dummy_last_ref);
 1715|  9.02k|}
_ZNK7rocksdb15ColumnFamilySet10GetDefaultEv:
 1717|  2.74M|ColumnFamilyData* ColumnFamilySet::GetDefault() const {
 1718|  2.74M|  assert(default_cfd_cache_ != nullptr);
 1719|  2.74M|  return default_cfd_cache_;
 1720|  2.74M|}
_ZNK7rocksdb15ColumnFamilySet15GetColumnFamilyEj:
 1722|  49.6k|ColumnFamilyData* ColumnFamilySet::GetColumnFamily(uint32_t id) const {
 1723|  49.6k|  auto cfd_iter = column_family_data_.find(id);
 1724|  49.6k|  if (cfd_iter != column_family_data_.end()) {
  ------------------
  |  Branch (1724:7): [True: 49.6k, False: 0]
  ------------------
 1725|  49.6k|    return cfd_iter->second;
 1726|  49.6k|  } else {
 1727|      0|    return nullptr;
 1728|      0|  }
 1729|  49.6k|}
_ZNK7rocksdb15ColumnFamilySet15GetColumnFamilyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1732|  9.02k|    const std::string& name) const {
 1733|  9.02k|  auto cfd_iter = column_families_.find(name);
 1734|  9.02k|  if (cfd_iter != column_families_.end()) {
  ------------------
  |  Branch (1734:7): [True: 9.02k, False: 0]
  ------------------
 1735|  9.02k|    auto cfd = GetColumnFamily(cfd_iter->second);
 1736|  9.02k|    assert(cfd != nullptr);
 1737|  9.02k|    return cfd;
 1738|  9.02k|  } else {
 1739|      0|    return nullptr;
 1740|      0|  }
 1741|  9.02k|}
_ZN7rocksdb15ColumnFamilySet18GetMaxColumnFamilyEv:
 1747|  18.0k|uint32_t ColumnFamilySet::GetMaxColumnFamily() { return max_column_family_; }
_ZN7rocksdb15ColumnFamilySet21UpdateMaxColumnFamilyEj:
 1749|  9.02k|void ColumnFamilySet::UpdateMaxColumnFamily(uint32_t new_max_column_family) {
 1750|  9.02k|  max_column_family_ = std::max(new_max_column_family, max_column_family_);
 1751|  9.02k|}
_ZNK7rocksdb15ColumnFamilySet22NumberOfColumnFamiliesEv:
 1753|  9.02k|size_t ColumnFamilySet::NumberOfColumnFamilies() const {
 1754|  9.02k|  return column_families_.size();
 1755|  9.02k|}
_ZN7rocksdb15ColumnFamilySet18CreateColumnFamilyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEjPNS_7VersionERKNS_19ColumnFamilyOptionsE:
 1760|  9.02k|    const ColumnFamilyOptions& options) {
 1761|  9.02k|  assert(column_families_.find(name) == column_families_.end());
 1762|  9.02k|  ColumnFamilyData* new_cfd = new ColumnFamilyData(
 1763|  9.02k|      id, name, dummy_versions, table_cache_, write_buffer_manager_, options,
 1764|  9.02k|      *db_options_, &file_options_, this, block_cache_tracer_, io_tracer_,
 1765|  9.02k|      db_id_, db_session_id_);
 1766|  9.02k|  column_families_.insert({name, id});
 1767|  9.02k|  column_family_data_.insert({id, new_cfd});
 1768|  9.02k|  auto ucmp = new_cfd->user_comparator();
 1769|  9.02k|  assert(ucmp);
 1770|  9.02k|  size_t ts_sz = ucmp->timestamp_size();
 1771|  9.02k|  running_ts_sz_.insert({id, ts_sz});
 1772|  9.02k|  if (ts_sz > 0) {
  ------------------
  |  Branch (1772:7): [True: 0, False: 9.02k]
  ------------------
 1773|      0|    ts_sz_for_record_.insert({id, ts_sz});
 1774|      0|  }
 1775|  9.02k|  max_column_family_ = std::max(max_column_family_, id);
 1776|       |  // add to linked list
 1777|  9.02k|  new_cfd->next_ = dummy_cfd_;
 1778|  9.02k|  auto prev = dummy_cfd_->prev_;
 1779|  9.02k|  new_cfd->prev_ = prev;
 1780|  9.02k|  prev->next_ = new_cfd;
 1781|  9.02k|  dummy_cfd_->prev_ = new_cfd;
 1782|  9.02k|  if (id == 0) {
  ------------------
  |  Branch (1782:7): [True: 9.02k, False: 0]
  ------------------
 1783|  9.02k|    default_cfd_cache_ = new_cfd;
 1784|  9.02k|  }
 1785|  9.02k|  return new_cfd;
 1786|  9.02k|}
_ZN7rocksdb15ColumnFamilySet18RemoveColumnFamilyEPNS_16ColumnFamilyDataE:
 1789|  9.02k|void ColumnFamilySet::RemoveColumnFamily(ColumnFamilyData* cfd) {
 1790|  9.02k|  uint32_t cf_id = cfd->GetID();
 1791|  9.02k|  auto cfd_iter = column_family_data_.find(cf_id);
 1792|  9.02k|  assert(cfd_iter != column_family_data_.end());
 1793|  9.02k|  column_family_data_.erase(cfd_iter);
 1794|  9.02k|  column_families_.erase(cfd->GetName());
 1795|  9.02k|  running_ts_sz_.erase(cf_id);
 1796|  9.02k|  ts_sz_for_record_.erase(cf_id);
 1797|  9.02k|}
_ZN7rocksdb25ColumnFamilyMemTablesImpl4SeekEj:
 1800|  2.72M|bool ColumnFamilyMemTablesImpl::Seek(uint32_t column_family_id) {
 1801|  2.72M|  if (column_family_id == 0) {
  ------------------
  |  Branch (1801:7): [True: 2.72M, False: 0]
  ------------------
 1802|       |    // optimization for common case
 1803|  2.72M|    current_ = column_family_set_->GetDefault();
 1804|  2.72M|  } else {
 1805|      0|    current_ = column_family_set_->GetColumnFamily(column_family_id);
 1806|      0|  }
 1807|  2.72M|  handle_.SetCFD(current_);
 1808|  2.72M|  return current_ != nullptr;
 1809|  2.72M|}
_ZNK7rocksdb25ColumnFamilyMemTablesImpl12GetLogNumberEv:
 1811|  1.36M|uint64_t ColumnFamilyMemTablesImpl::GetLogNumber() const {
 1812|  1.36M|  assert(current_ != nullptr);
 1813|  1.36M|  return current_->GetLogNumber();
 1814|  1.36M|}
_ZNK7rocksdb25ColumnFamilyMemTablesImpl11GetMemTableEv:
 1816|  2.53M|MemTable* ColumnFamilyMemTablesImpl::GetMemTable() const {
 1817|  2.53M|  assert(current_ != nullptr);
 1818|  2.53M|  return current_->mem();
 1819|  2.53M|}
_ZN7rocksdb25ColumnFamilyMemTablesImpl21GetColumnFamilyHandleEv:
 1821|  1.03M|ColumnFamilyHandle* ColumnFamilyMemTablesImpl::GetColumnFamilyHandle() {
 1822|  1.03M|  assert(current_ != nullptr);
 1823|  1.03M|  return &handle_;
 1824|  1.03M|}
_ZN7rocksdb17GetColumnFamilyIDEPNS_18ColumnFamilyHandleE:
 1826|  1.36M|uint32_t GetColumnFamilyID(ColumnFamilyHandle* column_family) {
 1827|  1.36M|  uint32_t column_family_id = 0;
 1828|  1.36M|  if (column_family != nullptr) {
  ------------------
  |  Branch (1828:7): [True: 1.36M, False: 0]
  ------------------
 1829|  1.36M|    auto cfh = static_cast_with_check<ColumnFamilyHandleImpl>(column_family);
 1830|  1.36M|    column_family_id = cfh->GetID();
 1831|  1.36M|  }
 1832|  1.36M|  return column_family_id;
 1833|  1.36M|}
column_family.cc:_ZN7rocksdb12_GLOBAL__N_123SuperVersionUnrefHandleEPv:
  498|  4.51k|void SuperVersionUnrefHandle(void* ptr) {
  499|       |  // UnrefHandle is called when a thread exits or a ThreadLocalPtr gets
  500|       |  // destroyed. When the former happens, the thread shouldn't see kSVInUse.
  501|       |  // When the latter happens, only super_version_ holds a reference
  502|       |  // to ColumnFamilyData, so no further queries are possible.
  503|  4.51k|  SuperVersion* sv = static_cast<SuperVersion*>(ptr);
  504|  4.51k|  bool was_last_ref __attribute__((__unused__));
  505|  4.51k|  was_last_ref = sv->Unref();
  506|       |  // Thread-local SuperVersions can't outlive ColumnFamilyData::super_version_.
  507|       |  // This is important because we can't do SuperVersion cleanup here.
  508|       |  // That would require locking DB mutex, which would deadlock because
  509|       |  // SuperVersionUnrefHandle is called with locked ThreadLocalPtr mutex.
  510|  4.51k|  assert(!was_last_ref);
  511|  4.51k|}
column_family.cc:_ZN7rocksdb12_GLOBAL__N_134GetL0FileCountForCompactionSpeedupEii:
  848|  9.02k|                                       int level0_slowdown_writes_trigger) {
  849|       |  // SanitizeOptions() ensures it.
  850|  9.02k|  assert(level0_file_num_compaction_trigger <= level0_slowdown_writes_trigger);
  851|       |
  852|  9.02k|  if (level0_file_num_compaction_trigger < 0) {
  ------------------
  |  Branch (852:7): [True: 0, False: 9.02k]
  ------------------
  853|      0|    return std::numeric_limits<int>::max();
  854|      0|  }
  855|       |
  856|  9.02k|  const int64_t twice_level0_trigger =
  857|  9.02k|      static_cast<int64_t>(level0_file_num_compaction_trigger) * 2;
  858|       |
  859|  9.02k|  const int64_t one_fourth_trigger_slowdown =
  860|  9.02k|      static_cast<int64_t>(level0_file_num_compaction_trigger) +
  861|  9.02k|      ((level0_slowdown_writes_trigger - level0_file_num_compaction_trigger) /
  862|  9.02k|       4);
  863|       |
  864|  9.02k|  assert(twice_level0_trigger >= 0);
  865|  9.02k|  assert(one_fourth_trigger_slowdown >= 0);
  866|       |
  867|       |  // 1/4 of the way between L0 compaction trigger threshold and slowdown
  868|       |  // condition.
  869|       |  // Or twice as compaction trigger, if it is smaller.
  870|  9.02k|  int64_t res = std::min(twice_level0_trigger, one_fourth_trigger_slowdown);
  871|  9.02k|  if (res >= std::numeric_limits<int32_t>::max()) {
  ------------------
  |  Branch (871:7): [True: 0, False: 9.02k]
  ------------------
  872|      0|    return std::numeric_limits<int32_t>::max();
  873|  9.02k|  } else {
  874|       |    // res fits in int
  875|  9.02k|    return static_cast<int>(res);
  876|  9.02k|  }
  877|  9.02k|}
column_family.cc:_ZN7rocksdb12_GLOBAL__N_145GetPendingCompactionBytesForCompactionSpeedupERKNS_16MutableCFOptionsEPKNS_18VersionStorageInfoE:
  881|  9.02k|    const VersionStorageInfo* vstorage) {
  882|       |  // Compaction debt relatively large compared to the stable (bottommost) data
  883|       |  // size indicates compaction fell behind.
  884|  9.02k|  const uint64_t kBottommostSizeDivisor = 8;
  885|       |  // Meaningful progress toward the slowdown trigger is another good indication.
  886|  9.02k|  const uint64_t kSlowdownTriggerDivisor = 4;
  887|       |
  888|  9.02k|  uint64_t bottommost_files_size = 0;
  889|  9.02k|  for (const auto& level_and_file : vstorage->BottommostFiles()) {
  ------------------
  |  Branch (889:35): [True: 4.48k, False: 9.02k]
  ------------------
  890|  4.48k|    bottommost_files_size += level_and_file.second->fd.GetFileSize();
  891|  4.48k|  }
  892|       |
  893|       |  // Slowdown trigger might be zero but that means compaction speedup should
  894|       |  // always happen (undocumented/historical), so no special treatment is needed.
  895|  9.02k|  uint64_t slowdown_threshold =
  896|  9.02k|      mutable_cf_options.soft_pending_compaction_bytes_limit /
  897|  9.02k|      kSlowdownTriggerDivisor;
  898|       |
  899|       |  // Size of zero, however, should not be used to decide to speedup compaction.
  900|  9.02k|  if (bottommost_files_size == 0) {
  ------------------
  |  Branch (900:7): [True: 4.54k, False: 4.48k]
  ------------------
  901|  4.54k|    return slowdown_threshold;
  902|  4.54k|  }
  903|       |
  904|  4.48k|  uint64_t size_threshold = bottommost_files_size / kBottommostSizeDivisor;
  905|  4.48k|  return std::min(size_threshold, slowdown_threshold);
  906|  9.02k|}
column_family.cc:_ZN7rocksdb12_GLOBAL__N_138GetMarkedFileCountForCompactionSpeedupEv:
  908|  9.02k|uint64_t GetMarkedFileCountForCompactionSpeedup() {
  909|       |  // When just one file is marked, it is not clear that parallel compaction will
  910|       |  // help the compaction that the user nicely requested to happen sooner. When
  911|       |  // multiple files are marked, however, it is pretty clearly helpful, except
  912|       |  // for the rare case in which a single compaction grabs all the marked files.
  913|  9.02k|  return 2;
  914|  9.02k|}

_ZN7rocksdb25ColumnFamilyMemTablesImplC2EPNS_15ColumnFamilySetE:
  873|  9.02k|      : column_family_set_(column_family_set), current_(nullptr) {}
_ZN7rocksdb26ColumnFamilyHandleInternalC2Ev:
  195|  9.02k|        internal_cfd_(nullptr) {}
_ZNK7rocksdb26ColumnFamilyHandleInternal3cfdEv:
  198|  1.03M|  ColumnFamilyData* cfd() const override { return internal_cfd_; }
_ZNK7rocksdb16ColumnFamilyData25GetLatestMutableCFOptionsEv:
  353|   130k|  const MutableCFOptions* GetLatestMutableCFOptions() const {
  354|   130k|    return &mutable_cf_options_;
  355|   130k|  }
_ZN7rocksdb15ColumnFamilySet5beginEv:
  764|   252k|  iterator begin() { return iterator(dummy_cfd_->next_); }
_ZN7rocksdb15ColumnFamilySet8iteratorC2EPNS_16ColumnFamilyDataE:
  712|   505k|    explicit iterator(ColumnFamilyData* cfd) : current_(cfd) {}
_ZN7rocksdb15ColumnFamilySet3endEv:
  765|   252k|  iterator end() { return iterator(dummy_cfd_); }
_ZNK7rocksdb15ColumnFamilySet8iteratorneERKS1_:
  718|   505k|    bool operator!=(const iterator& other) const {
  719|   505k|      return this->current_ != other.current_;
  720|   505k|    }
_ZN7rocksdb15ColumnFamilySet8iteratordeEv:
  721|   253k|    ColumnFamilyData* operator*() { return current_; }
_ZN7rocksdb15ColumnFamilySet8iteratorppEv:
  714|   252k|    iterator& operator++() {
  715|   252k|      current_ = current_->next_;
  716|   252k|      return *this;
  717|   252k|    }
_ZNK7rocksdb16ColumnFamilyData8ioptionsEv:
  344|  2.99M|  const ImmutableOptions* ioptions() const { return &ioptions_; }
_ZNK7rocksdb16ColumnFamilyData9IsDroppedEv:
  330|   130k|  bool IsDropped() const { return dropped_.load(std::memory_order_relaxed); }
_ZN7rocksdb20RefedColumnFamilySetC2EPNS_15ColumnFamilySetE:
  825|     46|  explicit RefedColumnFamilySet(ColumnFamilySet* cfs) : wrapped_(cfs) {}
_ZN7rocksdb20RefedColumnFamilySet5beginEv:
  861|     46|  iterator begin() { return iterator(wrapped_->begin()); }
_ZN7rocksdb20RefedColumnFamilySet8iteratorC2ENS_15ColumnFamilySet8iteratorE:
  829|     92|    explicit iterator(ColumnFamilySet::iterator wrapped) : wrapped_(wrapped) {
  830|     92|      MaybeRef(*wrapped_);
  831|     92|    }
_ZN7rocksdb20RefedColumnFamilySet8iterator8MaybeRefEPNS_16ColumnFamilyDataE:
  833|    138|    inline void MaybeRef(ColumnFamilyData* cfd) {
  834|    138|      if (cfd->GetID() != ColumnFamilyData::kDummyColumnFamilyDataId) {
  ------------------
  |  Branch (834:11): [True: 46, False: 92]
  ------------------
  835|     46|        cfd->Ref();
  836|     46|      }
  837|    138|    }
_ZN7rocksdb20RefedColumnFamilySet3endEv:
  862|     46|  iterator end() { return iterator(wrapped_->end()); }
_ZNK7rocksdb20RefedColumnFamilySet8iteratorneERKS1_:
  852|     92|    inline bool operator!=(const iterator& other) const {
  853|     92|      return this->wrapped_ != other.wrapped_;
  854|     92|    }
_ZN7rocksdb20RefedColumnFamilySet8iteratordeEv:
  855|     46|    inline ColumnFamilyData* operator*() { return *wrapped_; }
_ZNK7rocksdb16ColumnFamilyData11initializedEv:
  508|  54.2k|  bool initialized() const { return initialized_.load(); }
_ZN7rocksdb16ColumnFamilyData14internal_statsEv:
  372|  45.1k|  InternalStats* internal_stats() { return internal_stats_.get(); }
_ZN7rocksdb20RefedColumnFamilySet8iteratorppEv:
  844|     46|    inline iterator& operator++() {
  845|     46|      ColumnFamilyData* old = *wrapped_;
  846|     46|      ++wrapped_;
  847|       |      // Can only unref & potentially free cfd after accessing its next_
  848|     46|      MaybeUnref(old);
  849|     46|      MaybeRef(*wrapped_);
  850|     46|      return *this;
  851|     46|    }
_ZN7rocksdb20RefedColumnFamilySet8iterator10MaybeUnrefEPNS_16ColumnFamilyDataE:
  838|    138|    inline void MaybeUnref(ColumnFamilyData* cfd) {
  839|    138|      if (cfd->GetID() != ColumnFamilyData::kDummyColumnFamilyDataId) {
  ------------------
  |  Branch (839:11): [True: 46, False: 92]
  ------------------
  840|     46|        cfd->UnrefAndTryDelete();
  841|     46|      }
  842|    138|    }
_ZN7rocksdb20RefedColumnFamilySet8iteratorD2Ev:
  832|     92|    ~iterator() { MaybeUnref(*wrapped_); }
_ZNK7rocksdb16ColumnFamilyData7GetNameEv:
  301|  49.7k|  const std::string& GetName() const { return name_; }
_ZN7rocksdb12SuperVersionC2Ev:
  227|  9.02k|  SuperVersion() = default;
_ZN7rocksdb16ColumnFamilyData7currentEv:
  381|   383k|  Version* current() { return current_; }
_ZNK7rocksdb16ColumnFamilyData15user_comparatorEv:
  448|  4.56M|  const Comparator* user_comparator() const {
  449|  4.56M|    return internal_comparator_.user_comparator();
  450|  4.56M|  }
_ZNK7rocksdb16ColumnFamilyData19GetFullHistoryTsLowEv:
  534|  18.0k|  const std::string& GetFullHistoryTsLow() const {
  535|  18.0k|    return full_history_ts_low_;
  536|  18.0k|  }
_ZN7rocksdb16ColumnFamilyData15GetSuperVersionEv:
  460|  13.5k|  SuperVersion* GetSuperVersion() { return super_version_; }
_ZNK7rocksdb16ColumnFamilyData19internal_comparatorEv:
  452|   185k|  const InternalKeyComparator& internal_comparator() const {
  453|   185k|    return internal_comparator_;
  454|   185k|  }
_ZNK7rocksdb12SuperVersion21GetSeqnoToTimeMappingEv:
  253|  9.02k|  UnownedPtr<const SeqnoToTimeMapping> GetSeqnoToTimeMapping() const {
  254|  9.02k|    return seqno_to_time_mapping.get();
  255|  9.02k|  }
_ZN7rocksdb16ColumnFamilyData3memEv:
  375|  5.08M|  MemTable* mem() { return mem_; }
_ZN7rocksdb16ColumnFamilyData15set_initializedEv:
  506|  9.02k|  void set_initialized() { initialized_.store(true); }
_ZNK7rocksdb16ColumnFamilyData5GetIDEv:
  299|  1.52M|  uint32_t GetID() const { return id_; }
_ZNK7rocksdb16ColumnFamilyData12NumberLevelsEv:
  337|   315k|  int NumberLevels() const { return ioptions_.num_levels; }
_ZN7rocksdb16ColumnFamilyData3RefEv:
  306|  45.1k|  void Ref() { refs_.fetch_add(1); }
_ZNK7rocksdb22ColumnFamilyHandleImpl3cfdEv:
  171|  4.11M|  virtual ColumnFamilyData* cfd() const { return cfd_; }
_ZN7rocksdb26ColumnFamilyHandleInternal6SetCFDEPNS_16ColumnFamilyDataE:
  197|  2.72M|  void SetCFD(ColumnFamilyData* _cfd) { internal_cfd_ = _cfd; }
_ZN7rocksdb16ColumnFamilyData12SetLogNumberEm:
  339|  22.5k|  void SetLogNumber(uint64_t log_number) { log_number_ = log_number; }
_ZNK7rocksdb16ColumnFamilyData12GetLogNumberEv:
  340|  1.40M|  uint64_t GetLogNumber() const { return log_number_; }
_ZN7rocksdb16ColumnFamilyData25is_delete_range_supportedEv:
  362|  1.03M|  bool is_delete_range_supported() { return is_delete_range_supported_; }
_ZN7rocksdb16ColumnFamilyData3immEv:
  374|  9.02k|  MemTableList* imm() { return &imm_; }
_ZN7rocksdb16ColumnFamilyData14dummy_versionsEv:
  382|  90.2k|  Version* dummy_versions() { return dummy_versions_; }
_ZN7rocksdb16ColumnFamilyData11SetMemtableEPNS_8MemTableE:
  388|  13.5k|  void SetMemtable(MemTable* new_mem) {
  389|  13.5k|    uint64_t memtable_id = last_memtable_id_.fetch_add(1) + 1;
  390|  13.5k|    new_mem->SetID(memtable_id);
  391|  13.5k|    mem_ = new_mem;
  392|  13.5k|  }
_ZNK7rocksdb16ColumnFamilyData11table_cacheEv:
  403|  58.5k|  TableCache* table_cache() const { return table_cache_.get(); }
_ZNK7rocksdb16ColumnFamilyData11blob_sourceEv:
  404|  27.0k|  BlobSource* blob_source() const { return blob_source_.get(); }
_ZNK7rocksdb16ColumnFamilyData32internal_tbl_prop_coll_factoriesEv:
  456|  4.48k|  const InternalTblPropCollFactories* internal_tbl_prop_coll_factories() const {
  457|  4.48k|    return &internal_tbl_prop_coll_factories_;
  458|  4.48k|  }
_ZN7rocksdb16ColumnFamilyData21queued_for_compactionEv:
  492|  9.02k|  bool queued_for_compaction() { return queued_for_compaction_; }
_ZN7rocksdb16ColumnFamilyData18initial_cf_optionsEv:
  510|  18.0k|  const ColumnFamilyOptions& initial_cf_options() {
  511|  18.0k|    return initial_cf_options_;
  512|  18.0k|  }
_ZN7rocksdb16ColumnFamilyData38GetFileMetadataCacheReservationManagerEv:
  547|  22.5k|  GetFileMetadataCacheReservationManager() {
  548|  22.5k|    return file_metadata_cache_res_mgr_;
  549|  22.5k|  }
_ZN7rocksdb16ColumnFamilyData14NewEpochNumberEv:
  558|  4.48k|  uint64_t NewEpochNumber() { return next_epoch_number_.fetch_add(1); }
_ZNK7rocksdb16ColumnFamilyData18GetNextEpochNumberEv:
  561|  9.02k|  uint64_t GetNextEpochNumber() const { return next_epoch_number_.load(); }
_ZN7rocksdb16ColumnFamilyData18SetNextEpochNumberEm:
  564|  9.02k|  void SetNextEpochNumber(uint64_t next_epoch_number) {
  565|  9.02k|    next_epoch_number_.store(next_epoch_number);
  566|  9.02k|  }
_ZN7rocksdb16ColumnFamilyData20ResetNextEpochNumberEv:
  569|  9.02k|  void ResetNextEpochNumber() { next_epoch_number_.store(1); }
_ZNK7rocksdb15ColumnFamilySet37GetRunningColumnFamiliesTimestampSizeEv:
  755|  4.51k|      const {
  756|  4.51k|    return running_ts_sz_;
  757|  4.51k|  }
_ZNK7rocksdb15ColumnFamilySet39GetColumnFamiliesTimestampSizeForRecordEv:
  760|  1.36M|  GetColumnFamiliesTimestampSizeForRecord() const {
  761|  1.36M|    return ts_sz_for_record_;
  762|  1.36M|  }
_ZN7rocksdb15ColumnFamilySet15get_table_cacheEv:
  767|  4.48k|  Cache* get_table_cache() { return table_cache_; }
_ZN7rocksdb25ColumnFamilyMemTablesImpl7currentEv:
  903|  5.44M|  ColumnFamilyData* current() override { return current_; }

_ZN7rocksdb18CompactionIteratorC2EPNS_20InternalIteratorBaseINS_5SliceEEEPKNS_10ComparatorEPNS_11MergeHelperEmPNSt3__16vectorImNSA_9allocatorImEEEEmmmPKNS_15SnapshotCheckerEPNS_3EnvEbbPNS_28CompactionRangeDelAggregatorEPNS_15BlobFileBuilderEbbRKNSA_6atomicIbEEbPKNS_10CompactionEPKNS_16CompactionFilterEPSR_NSA_10shared_ptrINS_6LoggerEEEPKNSA_12basic_stringIcNSA_11char_traitsIcEENSC_IcEEEEmm:
   53|  4.48k|          preclude_last_level_min_seqno) {}
_ZN7rocksdb18CompactionIteratorC2EPNS_20InternalIteratorBaseINS_5SliceEEEPKNS_10ComparatorEPNS_11MergeHelperEmPNSt3__16vectorImNSA_9allocatorImEEEEmmmPKNS_15SnapshotCheckerEPNS_3EnvEbbPNS_28CompactionRangeDelAggregatorEPNS_15BlobFileBuilderEbbRKNSA_6atomicIbEENSA_10unique_ptrINS0_15CompactionProxyENSA_14default_deleteISU_EEEEbPKNS_16CompactionFilterEPSR_NSA_10shared_ptrINS_6LoggerEEEPKNSA_12basic_stringIcNSA_11char_traitsIcEENSC_IcEEEEmm:
  114|  4.48k|      preclude_last_level_min_seqno_(preclude_last_level_min_seqno) {
  115|  4.48k|  assert(snapshots_ != nullptr);
  116|  4.48k|  assert(preserve_time_min_seqno_ <= preclude_last_level_min_seqno_);
  117|       |
  118|  4.48k|  if (compaction_ != nullptr) {
  ------------------
  |  Branch (118:7): [True: 0, False: 4.48k]
  ------------------
  119|      0|    level_ptrs_ = std::vector<size_t>(compaction_->number_levels(), 0);
  120|      0|  }
  121|       |#ifndef NDEBUG
  122|       |  // findEarliestVisibleSnapshot assumes this ordering.
  123|       |  for (size_t i = 1; i < snapshots_->size(); ++i) {
  124|       |    assert(snapshots_->at(i - 1) < snapshots_->at(i));
  125|       |  }
  126|       |  assert(timestamp_size_ == 0 || !full_history_ts_low_ ||
  127|       |         timestamp_size_ == full_history_ts_low_->size());
  128|       |#endif
  129|  4.48k|  input_.SetPinnedItersMgr(&pinned_iters_mgr_);
  130|       |  // The default `merge_until_status_` does not need to be checked since it is
  131|       |  // overwritten as soon as `MergeUntil()` is called
  132|  4.48k|  merge_until_status_.PermitUncheckedError();
  133|  4.48k|  TEST_SYNC_POINT_CALLBACK("CompactionIterator:AfterInit", compaction_.get());
  134|  4.48k|}
_ZN7rocksdb18CompactionIteratorD2Ev:
  136|  4.48k|CompactionIterator::~CompactionIterator() {
  137|       |  // input_ Iterator lifetime is longer than pinned_iters_mgr_ lifetime
  138|  4.48k|  input_.SetPinnedItersMgr(nullptr);
  139|  4.48k|}
_ZN7rocksdb18CompactionIterator11SeekToFirstEv:
  150|  4.48k|void CompactionIterator::SeekToFirst() {
  151|  4.48k|  NextFromInput();
  152|  4.48k|  PrepareOutput();
  153|  4.48k|}
_ZN7rocksdb18CompactionIterator4NextEv:
  155|  34.6k|void CompactionIterator::Next() {
  156|       |  // If there is a merge output, return it before continuing to process the
  157|       |  // input.
  158|  34.6k|  if (merge_out_iter_.Valid()) {
  ------------------
  |  Branch (158:7): [True: 0, False: 34.6k]
  ------------------
  159|      0|    merge_out_iter_.Next();
  160|       |
  161|       |    // Check if we returned all records of the merge output.
  162|      0|    if (merge_out_iter_.Valid()) {
  ------------------
  |  Branch (162:9): [True: 0, False: 0]
  ------------------
  163|      0|      key_ = merge_out_iter_.key();
  164|      0|      value_ = merge_out_iter_.value();
  165|      0|      Status s = ParseInternalKey(key_, &ikey_, allow_data_in_errors_);
  166|       |      // MergeUntil stops when it encounters a corrupt key and does not
  167|       |      // include them in the result, so we expect the keys here to be valid.
  168|      0|      if (!s.ok()) {
  ------------------
  |  Branch (168:11): [True: 0, False: 0]
  ------------------
  169|      0|        ROCKS_LOG_FATAL(
  ------------------
  |  |   48|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::FATAL_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:63): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|      0|            info_log_, "Invalid ikey %s in compaction. %s",
  171|      0|            allow_data_in_errors_ ? key_.ToString(true).c_str() : "hidden",
  172|      0|            s.getState());
  173|      0|        assert(false);
  174|      0|      }
  175|       |
  176|       |      // Keep current_key_ in sync.
  177|      0|      if (0 == timestamp_size_) {
  ------------------
  |  Branch (177:11): [True: 0, False: 0]
  ------------------
  178|      0|        current_key_.UpdateInternalKey(ikey_.sequence, ikey_.type);
  179|      0|      } else {
  180|      0|        Slice ts = ikey_.GetTimestamp(timestamp_size_);
  181|      0|        current_key_.UpdateInternalKey(ikey_.sequence, ikey_.type, &ts);
  182|      0|      }
  183|      0|      key_ = current_key_.GetInternalKey();
  184|      0|      ikey_.user_key = current_key_.GetUserKey();
  185|      0|      validity_info_.SetValid(ValidContext::kMerge1);
  186|      0|    } else {
  187|      0|      if (merge_until_status_.IsMergeInProgress()) {
  ------------------
  |  Branch (187:11): [True: 0, False: 0]
  ------------------
  188|       |        // `Status::MergeInProgress()` tells us that the previous `MergeUntil()`
  189|       |        // produced only merge operands. Those merge operands were accessed and
  190|       |        // written out using `merge_out_iter_`. Since `merge_out_iter_` is
  191|       |        // exhausted at this point, all merge operands have been written out.
  192|       |        //
  193|       |        // Still, there may be a base value (PUT, DELETE, SINGLEDEL, etc.) that
  194|       |        // needs to be written out. Normally, `CompactionIterator` would skip it
  195|       |        // on the basis that it has already output something in the same
  196|       |        // snapshot stripe. To prevent this, we reset `has_current_user_key_` to
  197|       |        // trick the future iteration from finding out the snapshot stripe is
  198|       |        // unchanged.
  199|      0|        has_current_user_key_ = false;
  200|      0|      }
  201|       |      // We consumed all pinned merge operands, release pinned iterators
  202|      0|      pinned_iters_mgr_.ReleasePinnedData();
  203|       |      // MergeHelper moves the iterator to the first record after the merged
  204|       |      // records, so even though we reached the end of the merge output, we do
  205|       |      // not want to advance the iterator.
  206|      0|      NextFromInput();
  207|      0|    }
  208|  34.6k|  } else {
  209|       |    // Only advance the input iterator if there is no merge output and the
  210|       |    // iterator is not already at the next record.
  211|  34.6k|    if (!at_next_) {
  ------------------
  |  Branch (211:9): [True: 34.6k, False: 0]
  ------------------
  212|  34.6k|      AdvanceInputIter();
  213|  34.6k|    }
  214|  34.6k|    NextFromInput();
  215|  34.6k|  }
  216|       |
  217|  34.6k|  if (Valid()) {
  ------------------
  |  Branch (217:7): [True: 30.8k, False: 3.81k]
  ------------------
  218|       |    // Record that we've outputted a record for the current key.
  219|  30.8k|    has_outputted_key_ = true;
  220|  30.8k|  }
  221|       |
  222|  34.6k|  PrepareOutput();
  223|  34.6k|}
_ZN7rocksdb18CompactionIterator20InvokeFilterIfNeededEPbPNS_5SliceE:
  226|   123k|                                              Slice* skip_until) {
  227|   123k|  if (!compaction_filter_) {
  ------------------
  |  Branch (227:7): [True: 123k, False: 0]
  ------------------
  228|   123k|    return true;
  229|   123k|  }
  230|       |
  231|      0|  if (ikey_.type != kTypeValue && ikey_.type != kTypeBlobIndex &&
  ------------------
  |  Branch (231:7): [True: 0, False: 0]
  |  Branch (231:35): [True: 0, False: 0]
  ------------------
  232|      0|      ikey_.type != kTypeWideColumnEntity) {
  ------------------
  |  Branch (232:7): [True: 0, False: 0]
  ------------------
  233|      0|    return true;
  234|      0|  }
  235|       |
  236|      0|  CompactionFilter::Decision decision =
  237|      0|      CompactionFilter::Decision::kUndetermined;
  238|      0|  CompactionFilter::ValueType value_type =
  239|      0|      ikey_.type == kTypeValue ? CompactionFilter::ValueType::kValue
  ------------------
  |  Branch (239:7): [True: 0, False: 0]
  ------------------
  240|      0|      : ikey_.type == kTypeBlobIndex
  ------------------
  |  Branch (240:9): [True: 0, False: 0]
  ------------------
  241|      0|          ? CompactionFilter::ValueType::kBlobIndex
  242|      0|          : CompactionFilter::ValueType::kWideColumnEntity;
  243|       |
  244|       |  // Hack: pass internal key to BlobIndexCompactionFilter since it needs
  245|       |  // to get sequence number.
  246|      0|  assert(compaction_filter_);
  247|      0|  const Slice& filter_key =
  248|      0|      (ikey_.type != kTypeBlobIndex ||
  ------------------
  |  Branch (248:8): [True: 0, False: 0]
  ------------------
  249|      0|       !compaction_filter_->IsStackedBlobDbInternalCompactionFilter())
  ------------------
  |  Branch (249:8): [True: 0, False: 0]
  ------------------
  250|      0|          ? ikey_.user_key
  251|      0|          : key_;
  252|       |
  253|      0|  compaction_filter_value_.clear();
  254|      0|  compaction_filter_skip_until_.Clear();
  255|       |
  256|      0|  std::vector<std::pair<std::string, std::string>> new_columns;
  257|       |
  258|      0|  {
  259|      0|    StopWatchNano timer(clock_, report_detailed_time_);
  260|       |
  261|      0|    if (ikey_.type == kTypeBlobIndex) {
  ------------------
  |  Branch (261:9): [True: 0, False: 0]
  ------------------
  262|      0|      decision = compaction_filter_->FilterBlobByKey(
  263|      0|          level_, filter_key, &compaction_filter_value_,
  264|      0|          compaction_filter_skip_until_.rep());
  265|      0|      if (decision == CompactionFilter::Decision::kUndetermined &&
  ------------------
  |  Branch (265:11): [True: 0, False: 0]
  ------------------
  266|      0|          !compaction_filter_->IsStackedBlobDbInternalCompactionFilter()) {
  ------------------
  |  Branch (266:11): [True: 0, False: 0]
  ------------------
  267|      0|        if (!compaction_) {
  ------------------
  |  Branch (267:13): [True: 0, False: 0]
  ------------------
  268|      0|          status_ =
  269|      0|              Status::Corruption("Unexpected blob index outside of compaction");
  270|      0|          validity_info_.Invalidate();
  271|      0|          return false;
  272|      0|        }
  273|       |
  274|      0|        TEST_SYNC_POINT_CALLBACK(
  275|      0|            "CompactionIterator::InvokeFilterIfNeeded::TamperWithBlobIndex",
  276|      0|            &value_);
  277|       |
  278|       |        // For integrated BlobDB impl, CompactionIterator reads blob value.
  279|       |        // For Stacked BlobDB impl, the corresponding CompactionFilter's
  280|       |        // FilterV2 method should read the blob value.
  281|      0|        BlobIndex blob_index;
  282|      0|        Status s = blob_index.DecodeFrom(value_);
  283|      0|        if (!s.ok()) {
  ------------------
  |  Branch (283:13): [True: 0, False: 0]
  ------------------
  284|      0|          status_ = s;
  285|      0|          validity_info_.Invalidate();
  286|      0|          return false;
  287|      0|        }
  288|       |
  289|      0|        FilePrefetchBuffer* prefetch_buffer =
  290|      0|            prefetch_buffers_ ? prefetch_buffers_->GetOrCreatePrefetchBuffer(
  ------------------
  |  Branch (290:13): [True: 0, False: 0]
  ------------------
  291|      0|                                    blob_index.file_number())
  292|      0|                              : nullptr;
  293|       |
  294|      0|        uint64_t bytes_read = 0;
  295|       |
  296|      0|        assert(blob_fetcher_);
  297|       |
  298|      0|        s = blob_fetcher_->FetchBlob(ikey_.user_key, blob_index,
  299|      0|                                     prefetch_buffer, &blob_value_,
  300|      0|                                     &bytes_read);
  301|      0|        if (!s.ok()) {
  ------------------
  |  Branch (301:13): [True: 0, False: 0]
  ------------------
  302|      0|          status_ = s;
  303|      0|          validity_info_.Invalidate();
  304|      0|          return false;
  305|      0|        }
  306|       |
  307|      0|        ++iter_stats_.num_blobs_read;
  308|      0|        iter_stats_.total_blob_bytes_read += bytes_read;
  309|       |
  310|      0|        value_type = CompactionFilter::ValueType::kValue;
  311|      0|      }
  312|      0|    }
  313|       |
  314|      0|    if (decision == CompactionFilter::Decision::kUndetermined) {
  ------------------
  |  Branch (314:9): [True: 0, False: 0]
  ------------------
  315|      0|      const Slice* existing_val = nullptr;
  316|      0|      const WideColumns* existing_col = nullptr;
  317|       |
  318|      0|      WideColumns existing_columns;
  319|       |
  320|      0|      if (ikey_.type != kTypeWideColumnEntity) {
  ------------------
  |  Branch (320:11): [True: 0, False: 0]
  ------------------
  321|      0|        if (!blob_value_.empty()) {
  ------------------
  |  Branch (321:13): [True: 0, False: 0]
  ------------------
  322|      0|          existing_val = &blob_value_;
  323|      0|        } else {
  324|      0|          existing_val = &value_;
  325|      0|        }
  326|      0|      } else {
  327|      0|        Slice value_copy = value_;
  328|      0|        const Status s =
  329|      0|            WideColumnSerialization::Deserialize(value_copy, existing_columns);
  330|       |
  331|      0|        if (!s.ok()) {
  ------------------
  |  Branch (331:13): [True: 0, False: 0]
  ------------------
  332|      0|          status_ = s;
  333|      0|          validity_info_.Invalidate();
  334|      0|          return false;
  335|      0|        }
  336|       |
  337|      0|        existing_col = &existing_columns;
  338|      0|      }
  339|       |
  340|      0|      decision = compaction_filter_->FilterV3(
  341|      0|          level_, filter_key, value_type, existing_val, existing_col,
  342|      0|          &compaction_filter_value_, &new_columns,
  343|      0|          compaction_filter_skip_until_.rep());
  344|      0|    }
  345|       |
  346|      0|    iter_stats_.total_filter_time +=
  347|      0|        env_ != nullptr && report_detailed_time_ ? timer.ElapsedNanos() : 0;
  ------------------
  |  Branch (347:9): [True: 0, False: 0]
  |  Branch (347:28): [True: 0, False: 0]
  ------------------
  348|      0|  }
  349|       |
  350|      0|  if (decision == CompactionFilter::Decision::kUndetermined) {
  ------------------
  |  Branch (350:7): [True: 0, False: 0]
  ------------------
  351|       |    // Should not reach here, since FilterV2/FilterV3 should never return
  352|       |    // kUndetermined.
  353|      0|    status_ = Status::NotSupported(
  354|      0|        "FilterV2/FilterV3 should never return kUndetermined");
  355|      0|    validity_info_.Invalidate();
  356|      0|    return false;
  357|      0|  }
  358|       |
  359|      0|  if (decision == CompactionFilter::Decision::kRemoveAndSkipUntil &&
  ------------------
  |  Branch (359:7): [True: 0, False: 0]
  |  Branch (359:7): [True: 0, False: 0]
  ------------------
  360|      0|      cmp_->Compare(*compaction_filter_skip_until_.rep(), ikey_.user_key) <=
  ------------------
  |  Branch (360:7): [True: 0, False: 0]
  ------------------
  361|      0|          0) {
  362|       |    // Can't skip to a key smaller than the current one.
  363|       |    // Keep the key as per FilterV2/FilterV3 documentation.
  364|      0|    decision = CompactionFilter::Decision::kKeep;
  365|      0|  }
  366|       |
  367|      0|  if (decision == CompactionFilter::Decision::kRemove) {
  ------------------
  |  Branch (367:7): [True: 0, False: 0]
  ------------------
  368|       |    // convert the current key to a delete; key_ is pointing into
  369|       |    // current_key_ at this point, so updating current_key_ updates key()
  370|      0|    ikey_.type = kTypeDeletion;
  371|      0|    current_key_.UpdateInternalKey(ikey_.sequence, kTypeDeletion);
  372|       |    // no value associated with delete
  373|      0|    value_.clear();
  374|      0|    iter_stats_.num_record_drop_user++;
  375|      0|  } else if (decision == CompactionFilter::Decision::kPurge) {
  ------------------
  |  Branch (375:14): [True: 0, False: 0]
  ------------------
  376|       |    // convert the current key to a single delete; key_ is pointing into
  377|       |    // current_key_ at this point, so updating current_key_ updates key()
  378|      0|    ikey_.type = kTypeSingleDeletion;
  379|      0|    current_key_.UpdateInternalKey(ikey_.sequence, kTypeSingleDeletion);
  380|       |    // no value associated with single delete
  381|      0|    value_.clear();
  382|      0|    iter_stats_.num_record_drop_user++;
  383|      0|  } else if (decision == CompactionFilter::Decision::kChangeValue) {
  ------------------
  |  Branch (383:14): [True: 0, False: 0]
  ------------------
  384|      0|    if (ikey_.type != kTypeValue) {
  ------------------
  |  Branch (384:9): [True: 0, False: 0]
  ------------------
  385|      0|      ikey_.type = kTypeValue;
  386|      0|      current_key_.UpdateInternalKey(ikey_.sequence, kTypeValue);
  387|      0|    }
  388|       |
  389|      0|    value_ = compaction_filter_value_;
  390|      0|  } else if (decision == CompactionFilter::Decision::kRemoveAndSkipUntil) {
  ------------------
  |  Branch (390:14): [True: 0, False: 0]
  ------------------
  391|      0|    *need_skip = true;
  392|      0|    compaction_filter_skip_until_.ConvertFromUserKey(kMaxSequenceNumber,
  393|      0|                                                     kValueTypeForSeek);
  394|      0|    *skip_until = compaction_filter_skip_until_.Encode();
  395|      0|  } else if (decision == CompactionFilter::Decision::kChangeBlobIndex) {
  ------------------
  |  Branch (395:14): [True: 0, False: 0]
  ------------------
  396|       |    // Only the StackableDB-based BlobDB impl's compaction filter should return
  397|       |    // kChangeBlobIndex. Decision about rewriting blob and changing blob index
  398|       |    // in the integrated BlobDB impl is made in subsequent call to
  399|       |    // PrepareOutput() and its callees.
  400|      0|    if (!compaction_filter_->IsStackedBlobDbInternalCompactionFilter()) {
  ------------------
  |  Branch (400:9): [True: 0, False: 0]
  ------------------
  401|      0|      status_ = Status::NotSupported(
  402|      0|          "Only stacked BlobDB's internal compaction filter can return "
  403|      0|          "kChangeBlobIndex.");
  404|      0|      validity_info_.Invalidate();
  405|      0|      return false;
  406|      0|    }
  407|       |
  408|      0|    if (ikey_.type != kTypeBlobIndex) {
  ------------------
  |  Branch (408:9): [True: 0, False: 0]
  ------------------
  409|      0|      ikey_.type = kTypeBlobIndex;
  410|      0|      current_key_.UpdateInternalKey(ikey_.sequence, kTypeBlobIndex);
  411|      0|    }
  412|       |
  413|      0|    value_ = compaction_filter_value_;
  414|      0|  } else if (decision == CompactionFilter::Decision::kIOError) {
  ------------------
  |  Branch (414:14): [True: 0, False: 0]
  ------------------
  415|      0|    if (!compaction_filter_->IsStackedBlobDbInternalCompactionFilter()) {
  ------------------
  |  Branch (415:9): [True: 0, False: 0]
  ------------------
  416|      0|      status_ = Status::NotSupported(
  417|      0|          "CompactionFilter for integrated BlobDB should not return kIOError");
  418|      0|      validity_info_.Invalidate();
  419|      0|      return false;
  420|      0|    }
  421|       |
  422|      0|    status_ = Status::IOError("Failed to access blob during compaction filter");
  423|      0|    validity_info_.Invalidate();
  424|      0|    return false;
  425|      0|  } else if (decision == CompactionFilter::Decision::kChangeWideColumnEntity) {
  ------------------
  |  Branch (425:14): [True: 0, False: 0]
  ------------------
  426|      0|    WideColumns sorted_columns;
  427|      0|    sorted_columns.reserve(new_columns.size());
  428|       |
  429|      0|    for (const auto& column : new_columns) {
  ------------------
  |  Branch (429:29): [True: 0, False: 0]
  ------------------
  430|      0|      sorted_columns.emplace_back(column.first, column.second);
  431|      0|    }
  432|       |
  433|      0|    WideColumnsHelper::SortColumns(sorted_columns);
  434|       |
  435|      0|    {
  436|      0|      const Status s = WideColumnSerialization::Serialize(
  437|      0|          sorted_columns, compaction_filter_value_);
  438|      0|      if (!s.ok()) {
  ------------------
  |  Branch (438:11): [True: 0, False: 0]
  ------------------
  439|      0|        status_ = s;
  440|      0|        validity_info_.Invalidate();
  441|      0|        return false;
  442|      0|      }
  443|      0|    }
  444|       |
  445|      0|    if (ikey_.type != kTypeWideColumnEntity) {
  ------------------
  |  Branch (445:9): [True: 0, False: 0]
  ------------------
  446|      0|      ikey_.type = kTypeWideColumnEntity;
  447|      0|      current_key_.UpdateInternalKey(ikey_.sequence, kTypeWideColumnEntity);
  448|      0|    }
  449|       |
  450|      0|    value_ = compaction_filter_value_;
  451|      0|  }
  452|       |
  453|      0|  return true;
  454|      0|}
_ZN7rocksdb18CompactionIterator13NextFromInputEv:
  456|  39.1k|void CompactionIterator::NextFromInput() {
  457|  39.1k|  at_next_ = false;
  458|  39.1k|  validity_info_.Invalidate();
  459|       |
  460|   885k|  while (!Valid() && input_.Valid() && !IsPausingManualCompaction() &&
  ------------------
  |  Branch (460:10): [True: 850k, False: 34.6k]
  |  Branch (460:22): [True: 846k, False: 4.48k]
  |  Branch (460:40): [True: 846k, False: 0]
  ------------------
  461|   885k|         !IsShuttingDown()) {
  ------------------
  |  Branch (461:10): [True: 846k, False: 0]
  ------------------
  462|   846k|    key_ = input_.key();
  463|   846k|    value_ = input_.value();
  464|   846k|    blob_value_.Reset();
  465|   846k|    iter_stats_.num_input_records++;
  466|   846k|    is_range_del_ = input_.IsDeleteRangeSentinelKey();
  467|       |
  468|   846k|    Status pik_status = ParseInternalKey(key_, &ikey_, allow_data_in_errors_);
  469|   846k|    if (!pik_status.ok()) {
  ------------------
  |  Branch (469:9): [True: 0, False: 846k]
  ------------------
  470|      0|      iter_stats_.num_input_corrupt_records++;
  471|       |
  472|       |      // If `expect_valid_internal_key_` is false, return the corrupted key
  473|       |      // and let the caller decide what to do with it.
  474|      0|      if (expect_valid_internal_key_) {
  ------------------
  |  Branch (474:11): [True: 0, False: 0]
  ------------------
  475|      0|        status_ = pik_status;
  476|      0|        return;
  477|      0|      }
  478|      0|      key_ = current_key_.SetInternalKey(key_);
  479|      0|      has_current_user_key_ = false;
  480|      0|      current_user_key_sequence_ = kMaxSequenceNumber;
  481|      0|      current_user_key_snapshot_ = 0;
  482|      0|      validity_info_.SetValid(ValidContext::kParseKeyError);
  483|      0|      break;
  484|      0|    }
  485|   846k|    TEST_SYNC_POINT_CALLBACK("CompactionIterator:ProcessKV", &ikey_);
  486|   846k|    if (is_range_del_) {
  ------------------
  |  Branch (486:9): [True: 0, False: 846k]
  ------------------
  487|      0|      validity_info_.SetValid(kRangeDeletion);
  488|      0|      break;
  489|      0|    }
  490|       |    // Update input statistics
  491|   846k|    if (ikey_.type == kTypeDeletion || ikey_.type == kTypeSingleDeletion ||
  ------------------
  |  Branch (491:9): [True: 186k, False: 660k]
  |  Branch (491:40): [True: 0, False: 660k]
  ------------------
  492|   846k|        ikey_.type == kTypeDeletionWithTimestamp) {
  ------------------
  |  Branch (492:9): [True: 0, False: 660k]
  ------------------
  493|   186k|      iter_stats_.num_input_deletion_records++;
  494|   660k|    } else if (ikey_.type == kTypeValuePreferredSeqno) {
  ------------------
  |  Branch (494:16): [True: 0, False: 660k]
  ------------------
  495|      0|      iter_stats_.num_input_timed_put_records++;
  496|      0|    }
  497|   846k|    iter_stats_.total_input_raw_key_bytes += key_.size();
  498|   846k|    iter_stats_.total_input_raw_value_bytes += value_.size();
  499|       |
  500|       |    // If need_skip is true, we should seek the input iterator
  501|       |    // to internal key skip_until and continue from there.
  502|   846k|    bool need_skip = false;
  503|       |    // Points either into compaction_filter_skip_until_ or into
  504|       |    // merge_helper_->compaction_filter_skip_until_.
  505|   846k|    Slice skip_until;
  506|       |
  507|   846k|    bool user_key_equal_without_ts = false;
  508|   846k|    int cmp_ts = 0;
  509|   846k|    if (has_current_user_key_) {
  ------------------
  |  Branch (509:9): [True: 842k, False: 4.16k]
  ------------------
  510|   842k|      user_key_equal_without_ts =
  511|   842k|          cmp_->EqualWithoutTimestamp(ikey_.user_key, current_user_key_);
  512|       |      // if timestamp_size_ > 0, then curr_ts_ has been initialized by a
  513|       |      // previous key.
  514|   842k|      cmp_ts = timestamp_size_ ? cmp_->CompareTimestamp(
  ------------------
  |  Branch (514:16): [True: 0, False: 842k]
  ------------------
  515|      0|                                     ExtractTimestampFromUserKey(
  516|      0|                                         ikey_.user_key, timestamp_size_),
  517|      0|                                     curr_ts_)
  518|   842k|                               : 0;
  519|   842k|    }
  520|       |
  521|       |    // Check whether the user key changed. After this if statement current_key_
  522|       |    // is a copy of the current input key (maybe converted to a delete by the
  523|       |    // compaction filter). ikey_.user_key is pointing to the copy.
  524|   846k|    if (!has_current_user_key_ || !user_key_equal_without_ts || cmp_ts != 0) {
  ------------------
  |  Branch (524:9): [True: 4.16k, False: 842k]
  |  Branch (524:35): [True: 119k, False: 722k]
  |  Branch (524:65): [True: 0, False: 722k]
  ------------------
  525|       |      // First occurrence of this user key
  526|       |      // Copy key for output
  527|   123k|      key_ = current_key_.SetInternalKey(key_, &ikey_);
  528|       |
  529|   123k|      int prev_cmp_with_ts_low =
  530|   123k|          !full_history_ts_low_ ? 0
  ------------------
  |  Branch (530:11): [True: 123k, False: 0]
  ------------------
  531|   123k|          : curr_ts_.empty()
  ------------------
  |  Branch (531:13): [True: 0, False: 0]
  ------------------
  532|      0|              ? 0
  533|      0|              : cmp_->CompareTimestamp(curr_ts_, *full_history_ts_low_);
  534|       |
  535|       |      // If timestamp_size_ > 0, then copy from ikey_ to curr_ts_ for the use
  536|       |      // in next iteration to compare with the timestamp of next key.
  537|   123k|      UpdateTimestampAndCompareWithFullHistoryLow();
  538|       |
  539|       |      // If
  540|       |      // (1) !has_current_user_key_, OR
  541|       |      // (2) timestamp is disabled, OR
  542|       |      // (3) all history will be preserved, OR
  543|       |      // (4) user key (excluding timestamp) is different from previous key, OR
  544|       |      // (5) timestamp is NO older than *full_history_ts_low_, OR
  545|       |      // (6) timestamp is the largest one older than full_history_ts_low_,
  546|       |      // then current_user_key_ must be treated as a different user key.
  547|       |      // This means, if a user key (excluding ts) is the same as the previous
  548|       |      // user key, and its ts is older than *full_history_ts_low_, then we
  549|       |      // consider this key for GC, e.g. it may be dropped if certain conditions
  550|       |      // match.
  551|   123k|      if (!has_current_user_key_ || !timestamp_size_ || !full_history_ts_low_ ||
  ------------------
  |  Branch (551:11): [True: 4.16k, False: 119k]
  |  Branch (551:37): [True: 119k, False: 0]
  |  Branch (551:57): [True: 0, False: 0]
  ------------------
  552|   123k|          !user_key_equal_without_ts || cmp_with_history_ts_low_ >= 0 ||
  ------------------
  |  Branch (552:11): [True: 0, False: 0]
  |  Branch (552:41): [True: 0, False: 0]
  ------------------
  553|   123k|          prev_cmp_with_ts_low >= 0) {
  ------------------
  |  Branch (553:11): [True: 0, False: 0]
  ------------------
  554|       |        // Initialize for future comparison for rule (A) and etc.
  555|   123k|        current_user_key_sequence_ = kMaxSequenceNumber;
  556|   123k|        current_user_key_snapshot_ = 0;
  557|   123k|        has_current_user_key_ = true;
  558|   123k|      }
  559|   123k|      current_user_key_ = ikey_.user_key;
  560|       |
  561|   123k|      has_outputted_key_ = false;
  562|       |
  563|   123k|      last_key_seq_zeroed_ = false;
  564|       |
  565|   123k|      current_key_committed_ = KeyCommitted(ikey_.sequence);
  566|       |
  567|       |      // Apply the compaction filter to the first committed version of the user
  568|       |      // key.
  569|   123k|      if (current_key_committed_ &&
  ------------------
  |  Branch (569:11): [True: 123k, False: 0]
  ------------------
  570|   123k|          !InvokeFilterIfNeeded(&need_skip, &skip_until)) {
  ------------------
  |  Branch (570:11): [True: 0, False: 123k]
  ------------------
  571|      0|        break;
  572|      0|      }
  573|   722k|    } else {
  574|       |      // Update the current key to reflect the new sequence number/type without
  575|       |      // copying the user key.
  576|       |      // TODO(rven): Compaction filter does not process keys in this path
  577|       |      // Need to have the compaction filter process multiple versions
  578|       |      // if we have versions on both sides of a snapshot
  579|   722k|      current_key_.UpdateInternalKey(ikey_.sequence, ikey_.type);
  580|   722k|      key_ = current_key_.GetInternalKey();
  581|   722k|      ikey_.user_key = current_key_.GetUserKey();
  582|       |
  583|       |      // Note that newer version of a key is ordered before older versions. If a
  584|       |      // newer version of a key is committed, so as the older version. No need
  585|       |      // to query snapshot_checker_ in that case.
  586|   722k|      if (UNLIKELY(!current_key_committed_)) {
  ------------------
  |  |   14|   722k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 722k]
  |  |  ------------------
  ------------------
  587|      0|        assert(snapshot_checker_ != nullptr);
  588|      0|        current_key_committed_ = KeyCommitted(ikey_.sequence);
  589|       |        // Apply the compaction filter to the first committed version of the
  590|       |        // user key.
  591|      0|        if (current_key_committed_ &&
  ------------------
  |  Branch (591:13): [True: 0, False: 0]
  ------------------
  592|      0|            !InvokeFilterIfNeeded(&need_skip, &skip_until)) {
  ------------------
  |  Branch (592:13): [True: 0, False: 0]
  ------------------
  593|      0|          break;
  594|      0|        }
  595|      0|      }
  596|   722k|    }
  597|       |
  598|   846k|    if (UNLIKELY(!current_key_committed_)) {
  ------------------
  |  |   14|   846k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 846k]
  |  |  ------------------
  ------------------
  599|      0|      assert(snapshot_checker_ != nullptr);
  600|      0|      validity_info_.SetValid(ValidContext::kCurrentKeyUncommitted);
  601|      0|      break;
  602|      0|    }
  603|       |
  604|       |    // If there are no snapshots, then this kv affect visibility at tip.
  605|       |    // Otherwise, search though all existing snapshots to find the earliest
  606|       |    // snapshot that is affected by this kv.
  607|   846k|    SequenceNumber last_sequence = current_user_key_sequence_;
  608|   846k|    current_user_key_sequence_ = ikey_.sequence;
  609|   846k|    SequenceNumber last_snapshot = current_user_key_snapshot_;
  610|   846k|    SequenceNumber prev_snapshot = 0;  // 0 means no previous snapshot
  611|   846k|    current_user_key_snapshot_ =
  612|   846k|        visible_at_tip_
  ------------------
  |  Branch (612:9): [True: 846k, False: 0]
  ------------------
  613|   846k|            ? earliest_snapshot_
  614|   846k|            : findEarliestVisibleSnapshot(ikey_.sequence, &prev_snapshot);
  615|       |
  616|   846k|    if (need_skip) {
  ------------------
  |  Branch (616:9): [True: 0, False: 846k]
  ------------------
  617|       |      // This case is handled below.
  618|   846k|    } else if (clear_and_output_next_key_) {
  ------------------
  |  Branch (618:16): [True: 0, False: 846k]
  ------------------
  619|       |      // In the previous iteration we encountered a single delete that we could
  620|       |      // not compact out.  We will keep this Put, but can drop it's data.
  621|       |      // (See Optimization 3, below.)
  622|      0|      if (ikey_.type != kTypeValue && ikey_.type != kTypeBlobIndex &&
  ------------------
  |  Branch (622:11): [True: 0, False: 0]
  |  Branch (622:39): [True: 0, False: 0]
  ------------------
  623|      0|          ikey_.type != kTypeWideColumnEntity &&
  ------------------
  |  Branch (623:11): [True: 0, False: 0]
  ------------------
  624|      0|          ikey_.type != kTypeValuePreferredSeqno) {
  ------------------
  |  Branch (624:11): [True: 0, False: 0]
  ------------------
  625|      0|        ROCKS_LOG_FATAL(info_log_, "Unexpected key %s for compaction output",
  ------------------
  |  |   48|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::FATAL_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  626|      0|                        ikey_.DebugString(allow_data_in_errors_, true).c_str());
  627|      0|        assert(false);
  628|      0|      }
  629|      0|      if (current_user_key_snapshot_ < last_snapshot) {
  ------------------
  |  Branch (629:11): [True: 0, False: 0]
  ------------------
  630|      0|        ROCKS_LOG_FATAL(info_log_,
  ------------------
  |  |   48|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::FATAL_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  631|      0|                        "key %s, current_user_key_snapshot_ (%" PRIu64
  632|      0|                        ") < last_snapshot (%" PRIu64 ")",
  633|      0|                        ikey_.DebugString(allow_data_in_errors_, true).c_str(),
  634|      0|                        current_user_key_snapshot_, last_snapshot);
  635|      0|        assert(false);
  636|      0|      }
  637|       |
  638|      0|      if (ikey_.type == kTypeBlobIndex || ikey_.type == kTypeWideColumnEntity ||
  ------------------
  |  Branch (638:11): [True: 0, False: 0]
  |  Branch (638:43): [True: 0, False: 0]
  ------------------
  639|      0|          ikey_.type == kTypeValuePreferredSeqno) {
  ------------------
  |  Branch (639:11): [True: 0, False: 0]
  ------------------
  640|      0|        ikey_.type = kTypeValue;
  641|      0|        current_key_.UpdateInternalKey(ikey_.sequence, ikey_.type);
  642|      0|      }
  643|       |
  644|      0|      value_.clear();
  645|      0|      validity_info_.SetValid(ValidContext::kKeepSDAndClearPut);
  646|      0|      clear_and_output_next_key_ = false;
  647|   846k|    } else if (ikey_.type == kTypeSingleDeletion) {
  ------------------
  |  Branch (647:16): [True: 0, False: 846k]
  ------------------
  648|       |      // We can compact out a SingleDelete if:
  649|       |      // 1) We encounter the corresponding PUT -OR- we know that this key
  650|       |      //    doesn't appear past this output level
  651|       |      // =AND=
  652|       |      // 2) We've already returned a record in this snapshot -OR-
  653|       |      //    there are no earlier earliest_write_conflict_snapshot.
  654|       |      //
  655|       |      // A note about 2) above:
  656|       |      // we try to determine whether there is any earlier write conflict
  657|       |      // checking snapshot by calling DefinitelyInSnapshot() with seq and
  658|       |      // earliest_write_conflict_snapshot as arguments. For write-prepared
  659|       |      // and write-unprepared transactions, if earliest_write_conflict_snapshot
  660|       |      // is evicted from WritePreparedTxnDB::commit_cache, then
  661|       |      // DefinitelyInSnapshot(seq, earliest_write_conflict_snapshot) returns
  662|       |      // false, even if the seq is actually visible within
  663|       |      // earliest_write_conflict_snapshot. Consequently, CompactionIterator
  664|       |      // may try to zero out its sequence number, thus hitting assertion error
  665|       |      // in debug mode or cause incorrect DBIter return result.
  666|       |      // We observe that earliest_write_conflict_snapshot >= earliest_snapshot,
  667|       |      // and the seq zeroing logic depends on
  668|       |      // DefinitelyInSnapshot(seq, earliest_snapshot). Therefore, if we cannot
  669|       |      // determine whether seq is **definitely** in
  670|       |      // earliest_write_conflict_snapshot, then we can additionally check if
  671|       |      // seq is definitely in earliest_snapshot. If the latter holds, then the
  672|       |      // former holds too.
  673|       |      //
  674|       |      // Rule 1 is needed for SingleDelete correctness.  Rule 2 is needed to
  675|       |      // allow Transactions to do write-conflict checking (if we compacted away
  676|       |      // all keys, then we wouldn't know that a write happened in this
  677|       |      // snapshot).  If there is no earlier snapshot, then we know that there
  678|       |      // are no active transactions that need to know about any writes.
  679|       |      //
  680|       |      // Optimization 3:
  681|       |      // If we encounter a SingleDelete followed by a PUT and Rule 2 is NOT
  682|       |      // true, then we must output a SingleDelete.  In this case, we will decide
  683|       |      // to also output the PUT.  While we are compacting less by outputting the
  684|       |      // PUT now, hopefully this will lead to better compaction in the future
  685|       |      // when Rule 2 is later true (Ie, We are hoping we can later compact out
  686|       |      // both the SingleDelete and the Put, while we couldn't if we only
  687|       |      // outputted the SingleDelete now).
  688|       |      // In this case, we can save space by removing the PUT's value as it will
  689|       |      // never be read.
  690|       |      //
  691|       |      // Deletes and Merges are not supported on the same key that has a
  692|       |      // SingleDelete as it is not possible to correctly do any partial
  693|       |      // compaction of such a combination of operations.  The result of mixing
  694|       |      // those operations for a given key is documented as being undefined.  So
  695|       |      // we can choose how to handle such a combinations of operations.  We will
  696|       |      // try to compact out as much as we can in these cases.
  697|       |      // We will report counts on these anomalous cases.
  698|       |      //
  699|       |      // Note: If timestamp is enabled, then record will be eligible for
  700|       |      // deletion, only if, along with above conditions (Rule 1 and Rule 2)
  701|       |      // full_history_ts_low_ is specified and timestamp for that key is less
  702|       |      // than *full_history_ts_low_. If it's not eligible for deletion, then we
  703|       |      // will output the SingleDelete. For Optimization 3 also, if
  704|       |      // full_history_ts_low_ is specified and timestamp for the key is less
  705|       |      // than *full_history_ts_low_ then only optimization will be applied.
  706|       |
  707|       |      // The easiest way to process a SingleDelete during iteration is to peek
  708|       |      // ahead at the next key.
  709|      0|      const bool is_timestamp_eligible_for_gc =
  710|      0|          (timestamp_size_ == 0 ||
  ------------------
  |  Branch (710:12): [True: 0, False: 0]
  ------------------
  711|      0|           (full_history_ts_low_ && cmp_with_history_ts_low_ < 0));
  ------------------
  |  Branch (711:13): [True: 0, False: 0]
  |  Branch (711:37): [True: 0, False: 0]
  ------------------
  712|       |
  713|      0|      ParsedInternalKey next_ikey;
  714|      0|      AdvanceInputIter();
  715|      0|      while (input_.Valid() && input_.IsDeleteRangeSentinelKey() &&
  ------------------
  |  Branch (715:14): [True: 0, False: 0]
  |  Branch (715:14): [True: 0, False: 0]
  |  Branch (715:32): [True: 0, False: 0]
  ------------------
  716|      0|             ParseInternalKey(input_.key(), &next_ikey, allow_data_in_errors_)
  ------------------
  |  Branch (716:14): [True: 0, False: 0]
  ------------------
  717|      0|                 .ok() &&
  718|      0|             cmp_->EqualWithoutTimestamp(ikey_.user_key, next_ikey.user_key)) {
  ------------------
  |  Branch (718:14): [True: 0, False: 0]
  ------------------
  719|       |        // skip range tombstone start keys with the same user key
  720|       |        // since they are not "real" point keys.
  721|      0|        AdvanceInputIter();
  722|      0|      }
  723|       |
  724|       |      // Check whether the next key exists, is not corrupt, and is the same key
  725|       |      // as the single delete.
  726|      0|      if (input_.Valid() &&
  ------------------
  |  Branch (726:11): [True: 0, False: 0]
  |  Branch (726:11): [True: 0, False: 0]
  ------------------
  727|      0|          ParseInternalKey(input_.key(), &next_ikey, allow_data_in_errors_)
  ------------------
  |  Branch (727:11): [True: 0, False: 0]
  ------------------
  728|      0|              .ok() &&
  729|      0|          cmp_->EqualWithoutTimestamp(ikey_.user_key, next_ikey.user_key)) {
  ------------------
  |  Branch (729:11): [True: 0, False: 0]
  ------------------
  730|      0|        assert(!input_.IsDeleteRangeSentinelKey());
  731|       |#ifndef NDEBUG
  732|       |        const Compaction* c =
  733|       |            compaction_ ? compaction_->real_compaction() : nullptr;
  734|       |#endif
  735|      0|        TEST_SYNC_POINT_CALLBACK(
  736|      0|            "CompactionIterator::NextFromInput:SingleDelete:1",
  737|      0|            const_cast<Compaction*>(c));
  738|      0|        if (last_key_seq_zeroed_) {
  ------------------
  |  Branch (738:13): [True: 0, False: 0]
  ------------------
  739|      0|          ++iter_stats_.num_record_drop_hidden;
  740|      0|          ++iter_stats_.num_record_drop_obsolete;
  741|      0|          assert(bottommost_level_);
  742|      0|          AdvanceInputIter();
  743|      0|        } else if (prev_snapshot == 0 ||
  ------------------
  |  Branch (743:20): [True: 0, False: 0]
  ------------------
  744|      0|                   DefinitelyNotInSnapshot(next_ikey.sequence, prev_snapshot)) {
  ------------------
  |  Branch (744:20): [True: 0, False: 0]
  ------------------
  745|       |          // Check whether the next key belongs to the same snapshot as the
  746|       |          // SingleDelete.
  747|       |
  748|      0|          TEST_SYNC_POINT_CALLBACK(
  749|      0|              "CompactionIterator::NextFromInput:SingleDelete:2", nullptr);
  750|      0|          if (next_ikey.type == kTypeSingleDeletion) {
  ------------------
  |  Branch (750:15): [True: 0, False: 0]
  ------------------
  751|       |            // We encountered two SingleDeletes for same key in a row. This
  752|       |            // could be due to unexpected user input. If write-(un)prepared
  753|       |            // transaction is used, this could also be due to releasing an old
  754|       |            // snapshot between a Put and its matching SingleDelete.
  755|       |            // Skip the first SingleDelete and let the next iteration decide
  756|       |            // how to handle the second SingleDelete.
  757|       |
  758|       |            // First SingleDelete has been skipped since we already called
  759|       |            // input_.Next().
  760|      0|            ++iter_stats_.num_record_drop_obsolete;
  761|      0|            ++iter_stats_.num_single_del_mismatch;
  762|      0|          } else if (next_ikey.type == kTypeDeletion) {
  ------------------
  |  Branch (762:22): [True: 0, False: 0]
  ------------------
  763|      0|            std::ostringstream oss;
  764|      0|            oss << "Found SD and type: " << static_cast<int>(next_ikey.type)
  765|      0|                << " on the same key, violating the contract "
  766|      0|                   "of SingleDelete. Check your application to make sure the "
  767|      0|                   "application does not mix SingleDelete and Delete for "
  768|      0|                   "the same key. If you are using "
  769|      0|                   "write-prepared/write-unprepared transactions, and use "
  770|      0|                   "SingleDelete to delete certain keys, then make sure "
  771|      0|                   "TransactionDBOptions::rollback_deletion_type_callback is "
  772|      0|                   "configured properly. Mixing SD and DEL can lead to "
  773|      0|                   "undefined behaviors";
  774|      0|            ++iter_stats_.num_record_drop_obsolete;
  775|      0|            ++iter_stats_.num_single_del_mismatch;
  776|      0|            if (enforce_single_del_contracts_) {
  ------------------
  |  Branch (776:17): [True: 0, False: 0]
  ------------------
  777|      0|              ROCKS_LOG_ERROR(info_log_, "%s", oss.str().c_str());
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  778|      0|              validity_info_.Invalidate();
  779|      0|              status_ = Status::Corruption(oss.str());
  780|      0|              return;
  781|      0|            }
  782|      0|            ROCKS_LOG_WARN(info_log_, "%s", oss.str().c_str());
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  783|      0|          } else if (!is_timestamp_eligible_for_gc) {
  ------------------
  |  Branch (783:22): [True: 0, False: 0]
  ------------------
  784|       |            // We cannot drop the SingleDelete as timestamp is enabled, and
  785|       |            // timestamp of this key is greater than or equal to
  786|       |            // *full_history_ts_low_. We will output the SingleDelete.
  787|      0|            validity_info_.SetValid(ValidContext::kKeepTsHistory);
  788|      0|          } else if (has_outputted_key_ ||
  ------------------
  |  Branch (788:22): [True: 0, False: 0]
  ------------------
  789|      0|                     DefinitelyInSnapshot(ikey_.sequence,
  ------------------
  |  Branch (789:22): [True: 0, False: 0]
  ------------------
  790|      0|                                          earliest_write_conflict_snapshot_) ||
  791|      0|                     (earliest_snapshot_ < earliest_write_conflict_snapshot_ &&
  ------------------
  |  Branch (791:23): [True: 0, False: 0]
  ------------------
  792|      0|                      DefinitelyInSnapshot(ikey_.sequence,
  ------------------
  |  Branch (792:23): [True: 0, False: 0]
  ------------------
  793|      0|                                           earliest_snapshot_))) {
  794|       |            // Found a matching value, we can drop the single delete and the
  795|       |            // value.  It is safe to drop both records since we've already
  796|       |            // outputted a key in this snapshot, or there is no earlier
  797|       |            // snapshot (Rule 2 above).
  798|       |
  799|       |            // Note: it doesn't matter whether the second key is a Put or if it
  800|       |            // is an unexpected Merge or Delete.  We will compact it out
  801|       |            // either way. We will maintain counts of how many mismatches
  802|       |            // happened
  803|      0|            if (next_ikey.type != kTypeValue &&
  ------------------
  |  Branch (803:17): [True: 0, False: 0]
  ------------------
  804|      0|                next_ikey.type != kTypeBlobIndex &&
  ------------------
  |  Branch (804:17): [True: 0, False: 0]
  ------------------
  805|      0|                next_ikey.type != kTypeWideColumnEntity &&
  ------------------
  |  Branch (805:17): [True: 0, False: 0]
  ------------------
  806|      0|                next_ikey.type != kTypeValuePreferredSeqno) {
  ------------------
  |  Branch (806:17): [True: 0, False: 0]
  ------------------
  807|      0|              ++iter_stats_.num_single_del_mismatch;
  808|      0|            }
  809|       |
  810|      0|            ++iter_stats_.num_record_drop_hidden;
  811|      0|            ++iter_stats_.num_record_drop_obsolete;
  812|       |            // Already called input_.Next() once.  Call it a second time to
  813|       |            // skip past the second key.
  814|      0|            AdvanceInputIter();
  815|      0|          } else {
  816|       |            // Found a matching value, but we cannot drop both keys since
  817|       |            // there is an earlier snapshot and we need to leave behind a record
  818|       |            // to know that a write happened in this snapshot (Rule 2 above).
  819|       |            // Clear the value and output the SingleDelete. (The value will be
  820|       |            // outputted on the next iteration.)
  821|       |
  822|       |            // Setting valid_ to true will output the current SingleDelete
  823|      0|            validity_info_.SetValid(ValidContext::kKeepSDForConflictCheck);
  824|       |
  825|       |            // Set up the Put to be outputted in the next iteration.
  826|       |            // (Optimization 3).
  827|      0|            clear_and_output_next_key_ = true;
  828|      0|            TEST_SYNC_POINT_CALLBACK(
  829|      0|                "CompactionIterator::NextFromInput:KeepSDForWW",
  830|      0|                /*arg=*/nullptr);
  831|      0|          }
  832|      0|        } else {
  833|       |          // We hit the next snapshot without hitting a put, so the iterator
  834|       |          // returns the single delete.
  835|      0|          validity_info_.SetValid(ValidContext::kKeepSDForSnapshot);
  836|      0|          TEST_SYNC_POINT_CALLBACK(
  837|      0|              "CompactionIterator::NextFromInput:SingleDelete:3",
  838|      0|              const_cast<Compaction*>(c));
  839|      0|        }
  840|      0|      } else {
  841|       |        // We are at the end of the input, could not parse the next key, or hit
  842|       |        // a different key. The iterator returns the single delete if the key
  843|       |        // possibly exists beyond the current output level.  We set
  844|       |        // has_current_user_key to false so that if the iterator is at the next
  845|       |        // key, we do not compare it again against the previous key at the next
  846|       |        // iteration. If the next key is corrupt, we return before the
  847|       |        // comparison, so the value of has_current_user_key does not matter.
  848|      0|        has_current_user_key_ = false;
  849|      0|        if (compaction_ != nullptr &&
  ------------------
  |  Branch (849:13): [True: 0, False: 0]
  ------------------
  850|      0|            DefinitelyInSnapshot(ikey_.sequence, earliest_snapshot_) &&
  ------------------
  |  Branch (850:13): [True: 0, False: 0]
  ------------------
  851|      0|            compaction_->KeyNotExistsBeyondOutputLevel(ikey_.user_key,
  ------------------
  |  Branch (851:13): [True: 0, False: 0]
  ------------------
  852|      0|                                                       &level_ptrs_) &&
  853|      0|            is_timestamp_eligible_for_gc) {
  ------------------
  |  Branch (853:13): [True: 0, False: 0]
  ------------------
  854|       |          // Key doesn't exist outside of this range.
  855|       |          // Can compact out this SingleDelete.
  856|      0|          ++iter_stats_.num_record_drop_obsolete;
  857|      0|          ++iter_stats_.num_single_del_fallthru;
  858|      0|          if (!bottommost_level_) {
  ------------------
  |  Branch (858:15): [True: 0, False: 0]
  ------------------
  859|      0|            ++iter_stats_.num_optimized_del_drop_obsolete;
  860|      0|          }
  861|      0|        } else if (last_key_seq_zeroed_) {
  ------------------
  |  Branch (861:20): [True: 0, False: 0]
  ------------------
  862|       |          // Skip.
  863|      0|          ++iter_stats_.num_record_drop_hidden;
  864|      0|          ++iter_stats_.num_record_drop_obsolete;
  865|      0|          assert(bottommost_level_);
  866|      0|        } else {
  867|       |          // Output SingleDelete
  868|      0|          validity_info_.SetValid(ValidContext::kKeepSD);
  869|      0|        }
  870|      0|      }
  871|       |
  872|      0|      if (Valid()) {
  ------------------
  |  Branch (872:11): [True: 0, False: 0]
  ------------------
  873|      0|        at_next_ = true;
  874|      0|      }
  875|   846k|    } else if (last_snapshot == current_user_key_snapshot_ ||
  ------------------
  |  Branch (875:16): [True: 722k, False: 123k]
  ------------------
  876|   846k|               (last_snapshot > 0 &&
  ------------------
  |  Branch (876:17): [True: 0, False: 123k]
  ------------------
  877|   722k|                last_snapshot < current_user_key_snapshot_)) {
  ------------------
  |  Branch (877:17): [True: 0, False: 0]
  ------------------
  878|       |      // If the earliest snapshot is which this key is visible in
  879|       |      // is the same as the visibility of a previous instance of the
  880|       |      // same key, then this kv is not visible in any snapshot.
  881|       |      // Hidden by an newer entry for same user key
  882|       |      //
  883|       |      // Note: Dropping this key will not affect TransactionDB write-conflict
  884|       |      // checking since there has already been a record returned for this key
  885|       |      // in this snapshot.
  886|   722k|      if (last_sequence < current_user_key_sequence_) {
  ------------------
  |  Branch (886:11): [True: 0, False: 722k]
  ------------------
  887|      0|        ROCKS_LOG_FATAL(info_log_,
  ------------------
  |  |   48|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::FATAL_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  888|      0|                        "key %s, last_sequence (%" PRIu64
  889|      0|                        ") < current_user_key_sequence_ (%" PRIu64 ")",
  890|      0|                        ikey_.DebugString(allow_data_in_errors_, true).c_str(),
  891|      0|                        last_sequence, current_user_key_sequence_);
  892|      0|        assert(false);
  893|      0|      }
  894|       |
  895|   722k|      ++iter_stats_.num_record_drop_hidden;  // rule (A)
  896|   722k|      AdvanceInputIter();
  897|   722k|    } else if (compaction_ != nullptr &&
  ------------------
  |  Branch (897:16): [True: 0, False: 123k]
  ------------------
  898|   123k|               (ikey_.type == kTypeDeletion ||
  ------------------
  |  Branch (898:17): [True: 0, False: 0]
  ------------------
  899|      0|                (ikey_.type == kTypeDeletionWithTimestamp &&
  ------------------
  |  Branch (899:18): [True: 0, False: 0]
  ------------------
  900|      0|                 cmp_with_history_ts_low_ < 0)) &&
  ------------------
  |  Branch (900:18): [True: 0, False: 0]
  ------------------
  901|   123k|               DefinitelyInSnapshot(ikey_.sequence, earliest_snapshot_) &&
  ------------------
  |  Branch (901:16): [True: 0, False: 0]
  ------------------
  902|   123k|               compaction_->KeyNotExistsBeyondOutputLevel(ikey_.user_key,
  ------------------
  |  Branch (902:16): [True: 0, False: 0]
  ------------------
  903|      0|                                                          &level_ptrs_)) {
  904|       |      // TODO(noetzli): This is the only place where we use compaction_
  905|       |      // (besides the constructor). We should probably get rid of this
  906|       |      // dependency and find a way to do similar filtering during flushes.
  907|       |      //
  908|       |      // For this user key:
  909|       |      // (1) there is no data in higher levels
  910|       |      // (2) data in lower levels will have larger sequence numbers
  911|       |      // (3) data in layers that are being compacted here and have
  912|       |      //     smaller sequence numbers will be dropped in the next
  913|       |      //     few iterations of this loop (by rule (A) above).
  914|       |      // Therefore this deletion marker is obsolete and can be dropped.
  915|       |      //
  916|       |      // Note:  Dropping this Delete will not affect TransactionDB
  917|       |      // write-conflict checking since it is earlier than any snapshot.
  918|       |      //
  919|       |      // It seems that we can also drop deletion later than earliest snapshot
  920|       |      // given that:
  921|       |      // (1) The deletion is earlier than earliest_write_conflict_snapshot, and
  922|       |      // (2) No value exist earlier than the deletion.
  923|       |      //
  924|       |      // Note also that a deletion marker of type kTypeDeletionWithTimestamp
  925|       |      // will be treated as a different user key unless the timestamp is older
  926|       |      // than *full_history_ts_low_.
  927|      0|      ++iter_stats_.num_record_drop_obsolete;
  928|      0|      if (!bottommost_level_) {
  ------------------
  |  Branch (928:11): [True: 0, False: 0]
  ------------------
  929|      0|        ++iter_stats_.num_optimized_del_drop_obsolete;
  930|      0|      }
  931|      0|      AdvanceInputIter();
  932|   123k|    } else if ((ikey_.type == kTypeDeletion ||
  ------------------
  |  Branch (932:17): [True: 21.3k, False: 102k]
  ------------------
  933|   123k|                (ikey_.type == kTypeDeletionWithTimestamp &&
  ------------------
  |  Branch (933:18): [True: 0, False: 102k]
  ------------------
  934|   102k|                 cmp_with_history_ts_low_ < 0)) &&
  ------------------
  |  Branch (934:18): [True: 0, False: 0]
  ------------------
  935|   123k|               bottommost_level_) {
  ------------------
  |  Branch (935:16): [True: 0, False: 21.3k]
  ------------------
  936|       |      // Handle the case where we have a delete key at the bottom most level
  937|       |      // We can skip outputting the key iff there are no subsequent puts for
  938|       |      // this key
  939|      0|      assert(!compaction_ || compaction_->KeyNotExistsBeyondOutputLevel(
  940|      0|                                 ikey_.user_key, &level_ptrs_));
  941|      0|      ParsedInternalKey next_ikey;
  942|      0|      AdvanceInputIter();
  943|       |#ifndef NDEBUG
  944|       |      const Compaction* c =
  945|       |          compaction_ ? compaction_->real_compaction() : nullptr;
  946|       |#endif
  947|      0|      TEST_SYNC_POINT_CALLBACK(
  948|      0|          "CompactionIterator::NextFromInput:BottommostDelete:1",
  949|      0|          const_cast<Compaction*>(c));
  950|       |      // Skip over all versions of this key that happen to occur in the same
  951|       |      // snapshot range as the delete.
  952|       |      //
  953|       |      // Note that a deletion marker of type kTypeDeletionWithTimestamp will be
  954|       |      // considered to have a different user key unless the timestamp is older
  955|       |      // than *full_history_ts_low_.
  956|       |      //
  957|       |      // Range tombstone start keys are skipped as they are not "real" keys.
  958|      0|      while (!IsPausingManualCompaction() && !IsShuttingDown() &&
  ------------------
  |  Branch (958:14): [True: 0, False: 0]
  |  Branch (958:14): [True: 0, False: 0]
  |  Branch (958:46): [True: 0, False: 0]
  ------------------
  959|      0|             input_.Valid() &&
  ------------------
  |  Branch (959:14): [True: 0, False: 0]
  ------------------
  960|      0|             (ParseInternalKey(input_.key(), &next_ikey, allow_data_in_errors_)
  ------------------
  |  Branch (960:14): [True: 0, False: 0]
  ------------------
  961|      0|                  .ok()) &&
  962|      0|             cmp_->EqualWithoutTimestamp(ikey_.user_key, next_ikey.user_key) &&
  ------------------
  |  Branch (962:14): [True: 0, False: 0]
  ------------------
  963|      0|             (prev_snapshot == 0 || input_.IsDeleteRangeSentinelKey() ||
  ------------------
  |  Branch (963:15): [True: 0, False: 0]
  |  Branch (963:37): [True: 0, False: 0]
  ------------------
  964|      0|              DefinitelyNotInSnapshot(next_ikey.sequence, prev_snapshot))) {
  ------------------
  |  Branch (964:15): [True: 0, False: 0]
  ------------------
  965|      0|        AdvanceInputIter();
  966|      0|      }
  967|       |      // If you find you still need to output a row with this key, we need to
  968|       |      // output the delete too
  969|      0|      if (input_.Valid() &&
  ------------------
  |  Branch (969:11): [True: 0, False: 0]
  |  Branch (969:11): [True: 0, False: 0]
  ------------------
  970|      0|          (ParseInternalKey(input_.key(), &next_ikey, allow_data_in_errors_)
  ------------------
  |  Branch (970:11): [True: 0, False: 0]
  ------------------
  971|      0|               .ok()) &&
  972|      0|          cmp_->EqualWithoutTimestamp(ikey_.user_key, next_ikey.user_key)) {
  ------------------
  |  Branch (972:11): [True: 0, False: 0]
  ------------------
  973|      0|        validity_info_.SetValid(ValidContext::kKeepDel);
  974|      0|        at_next_ = true;
  975|      0|      }
  976|   123k|    } else if (ikey_.type == kTypeValuePreferredSeqno &&
  ------------------
  |  Branch (976:16): [True: 0, False: 123k]
  ------------------
  977|   123k|               DefinitelyInSnapshot(ikey_.sequence, earliest_snapshot_) &&
  ------------------
  |  Branch (977:16): [True: 0, False: 0]
  ------------------
  978|   123k|               (bottommost_level_ ||
  ------------------
  |  Branch (978:17): [True: 0, False: 0]
  ------------------
  979|      0|                (compaction_ != nullptr &&
  ------------------
  |  Branch (979:18): [True: 0, False: 0]
  ------------------
  980|      0|                 compaction_->KeyNotExistsBeyondOutputLevel(ikey_.user_key,
  ------------------
  |  Branch (980:18): [True: 0, False: 0]
  ------------------
  981|      0|                                                            &level_ptrs_)))) {
  982|       |      // This section that attempts to swap preferred sequence number will not
  983|       |      // be invoked if this is a CompactionIterator created for flush, since
  984|       |      // `compaction_` will be nullptr and it's not bottommost either.
  985|       |      //
  986|       |      // The entries with the same user key and smaller sequence numbers are
  987|       |      // all in this earliest snapshot range to be iterated. Since those entries
  988|       |      // will be hidden by this entry [rule A], it's safe to swap in the
  989|       |      // preferred seqno now.
  990|       |      //
  991|       |      // It's otherwise not safe to swap in the preferred seqno since it's
  992|       |      // possible for entries in earlier snapshots to have sequence number that
  993|       |      // is smaller than this entry's sequence number but bigger than this
  994|       |      // entry's preferred sequence number. Swapping in the preferred sequence
  995|       |      // number will break the internal key ordering invariant for this key.
  996|       |      //
  997|       |      // A special case involving range deletion is handled separately below.
  998|      0|      auto [unpacked_value, preferred_seqno] =
  999|      0|          ParsePackedValueWithSeqno(value_);
 1000|      0|      assert(preferred_seqno < ikey_.sequence || ikey_.sequence == 0);
 1001|      0|      if (range_del_agg_->ShouldDelete(
  ------------------
  |  Branch (1001:11): [True: 0, False: 0]
  ------------------
 1002|      0|              key_, RangeDelPositioningMode::kForwardTraversal)) {
 1003|      0|        ++iter_stats_.num_record_drop_hidden;
 1004|      0|        ++iter_stats_.num_record_drop_range_del;
 1005|      0|        AdvanceInputIter();
 1006|      0|      } else {
 1007|      0|        InternalKey ikey_after_swap(ikey_.user_key,
 1008|      0|                                    std::min(preferred_seqno, ikey_.sequence),
 1009|      0|                                    kTypeValue);
 1010|      0|        Slice ikey_after_swap_slice(*ikey_after_swap.rep());
 1011|      0|        if (range_del_agg_->ShouldDelete(
  ------------------
  |  Branch (1011:13): [True: 0, False: 0]
  ------------------
 1012|      0|                ikey_after_swap_slice,
 1013|      0|                RangeDelPositioningMode::kForwardTraversal)) {
 1014|       |          // A range tombstone that doesn't cover this kTypeValuePreferredSeqno
 1015|       |          // entry will end up covering the entry, so it's not safe to swap
 1016|       |          // preferred sequence number. In this case, we output the entry as is.
 1017|      0|          validity_info_.SetValid(ValidContext::kNewUserKey);
 1018|      0|        } else {
 1019|      0|          if (ikey_.sequence != 0) {
  ------------------
  |  Branch (1019:15): [True: 0, False: 0]
  ------------------
 1020|      0|            iter_stats_.num_timed_put_swap_preferred_seqno++;
 1021|      0|            saved_seq_for_penul_check_ = ikey_.sequence;
 1022|      0|            ikey_.sequence = preferred_seqno;
 1023|      0|          }
 1024|      0|          ikey_.type = kTypeValue;
 1025|      0|          current_key_.UpdateInternalKey(ikey_.sequence, ikey_.type);
 1026|      0|          key_ = current_key_.GetInternalKey();
 1027|      0|          ikey_.user_key = current_key_.GetUserKey();
 1028|      0|          value_ = unpacked_value;
 1029|      0|          validity_info_.SetValid(ValidContext::kSwapPreferredSeqno);
 1030|      0|        }
 1031|      0|      }
 1032|   123k|    } else if (ikey_.type == kTypeMerge) {
  ------------------
  |  Branch (1032:16): [True: 0, False: 123k]
  ------------------
 1033|      0|      if (!merge_helper_->HasOperator()) {
  ------------------
  |  Branch (1033:11): [True: 0, False: 0]
  ------------------
 1034|      0|        status_ = Status::InvalidArgument(
 1035|      0|            "merge_operator is not properly initialized.");
 1036|      0|        return;
 1037|      0|      }
 1038|       |
 1039|      0|      pinned_iters_mgr_.StartPinning();
 1040|       |
 1041|       |      // We know the merge type entry is not hidden, otherwise we would
 1042|       |      // have hit (A)
 1043|       |      // We encapsulate the merge related state machine in a different
 1044|       |      // object to minimize change to the existing flow.
 1045|      0|      merge_until_status_ = merge_helper_->MergeUntil(
 1046|      0|          &input_, range_del_agg_, prev_snapshot, bottommost_level_,
 1047|      0|          allow_data_in_errors_, blob_fetcher_.get(), full_history_ts_low_,
 1048|      0|          prefetch_buffers_.get(), &iter_stats_);
 1049|      0|      merge_out_iter_.SeekToFirst();
 1050|       |
 1051|      0|      if (!merge_until_status_.ok() &&
  ------------------
  |  Branch (1051:11): [True: 0, False: 0]
  ------------------
 1052|      0|          !merge_until_status_.IsMergeInProgress()) {
  ------------------
  |  Branch (1052:11): [True: 0, False: 0]
  ------------------
 1053|      0|        status_ = merge_until_status_;
 1054|      0|        return;
 1055|      0|      } else if (merge_out_iter_.Valid()) {
  ------------------
  |  Branch (1055:18): [True: 0, False: 0]
  ------------------
 1056|       |        // NOTE: key, value, and ikey_ refer to old entries.
 1057|       |        //       These will be correctly set below.
 1058|      0|        key_ = merge_out_iter_.key();
 1059|      0|        value_ = merge_out_iter_.value();
 1060|      0|        pik_status = ParseInternalKey(key_, &ikey_, allow_data_in_errors_);
 1061|       |        // MergeUntil stops when it encounters a corrupt key and does not
 1062|       |        // include them in the result, so we expect the keys here to valid.
 1063|      0|        if (!pik_status.ok()) {
  ------------------
  |  Branch (1063:13): [True: 0, False: 0]
  ------------------
 1064|      0|          ROCKS_LOG_FATAL(
  ------------------
  |  |   48|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::FATAL_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:63): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1065|      0|              info_log_, "Invalid key %s in compaction. %s",
 1066|      0|              allow_data_in_errors_ ? key_.ToString(true).c_str() : "hidden",
 1067|      0|              pik_status.getState());
 1068|      0|          assert(false);
 1069|      0|        }
 1070|       |        // Keep current_key_ in sync.
 1071|      0|        current_key_.UpdateInternalKey(ikey_.sequence, ikey_.type);
 1072|      0|        key_ = current_key_.GetInternalKey();
 1073|      0|        ikey_.user_key = current_key_.GetUserKey();
 1074|      0|        validity_info_.SetValid(ValidContext::kMerge2);
 1075|      0|      } else {
 1076|       |        // all merge operands were filtered out. reset the user key, since the
 1077|       |        // batch consumed by the merge operator should not shadow any keys
 1078|       |        // coming after the merges
 1079|      0|        has_current_user_key_ = false;
 1080|      0|        pinned_iters_mgr_.ReleasePinnedData();
 1081|       |
 1082|      0|        if (merge_helper_->FilteredUntil(&skip_until)) {
  ------------------
  |  Branch (1082:13): [True: 0, False: 0]
  ------------------
 1083|      0|          need_skip = true;
 1084|      0|        }
 1085|      0|      }
 1086|   123k|    } else {
 1087|       |      // 1. new user key -OR-
 1088|       |      // 2. different snapshot stripe
 1089|       |      // If user-defined timestamp is enabled, we consider keys for GC if they
 1090|       |      // are below history_ts_low_. CompactionRangeDelAggregator::ShouldDelete()
 1091|       |      // only considers range deletions that are at or below history_ts_low_ and
 1092|       |      // trim_ts_. We drop keys here that are below history_ts_low_ and are
 1093|       |      // covered by a range tombstone that is at or below history_ts_low_ and
 1094|       |      // trim_ts.
 1095|   123k|      bool should_delete = false;
 1096|   123k|      if (!timestamp_size_ || cmp_with_history_ts_low_ < 0) {
  ------------------
  |  Branch (1096:11): [True: 123k, False: 0]
  |  Branch (1096:31): [True: 0, False: 0]
  ------------------
 1097|   123k|        should_delete = range_del_agg_->ShouldDelete(
 1098|   123k|            key_, RangeDelPositioningMode::kForwardTraversal);
 1099|   123k|      }
 1100|   123k|      if (should_delete) {
  ------------------
  |  Branch (1100:11): [True: 88.9k, False: 34.6k]
  ------------------
 1101|  88.9k|        ++iter_stats_.num_record_drop_hidden;
 1102|  88.9k|        ++iter_stats_.num_record_drop_range_del;
 1103|  88.9k|        AdvanceInputIter();
 1104|  88.9k|      } else {
 1105|  34.6k|        validity_info_.SetValid(ValidContext::kNewUserKey);
 1106|  34.6k|      }
 1107|   123k|    }
 1108|       |
 1109|   846k|    if (need_skip) {
  ------------------
  |  Branch (1109:9): [True: 0, False: 846k]
  ------------------
 1110|      0|      SkipUntil(skip_until);
 1111|      0|    }
 1112|   846k|  }
 1113|       |
 1114|  39.1k|  if (!Valid() && IsShuttingDown()) {
  ------------------
  |  Branch (1114:7): [True: 4.48k, False: 34.6k]
  |  Branch (1114:19): [True: 0, False: 4.48k]
  ------------------
 1115|      0|    status_ = Status::ShutdownInProgress();
 1116|      0|  }
 1117|       |
 1118|  39.1k|  if (IsPausingManualCompaction()) {
  ------------------
  |  Branch (1118:7): [True: 0, False: 39.1k]
  ------------------
 1119|      0|    status_ = Status::Incomplete(Status::SubCode::kManualCompactionPaused);
 1120|      0|  }
 1121|       |
 1122|       |  // Propagate corruption status from memtable itereator
 1123|  39.1k|  if (!input_.Valid() && input_.status().IsCorruption()) {
  ------------------
  |  Branch (1123:7): [True: 4.48k, False: 34.6k]
  |  Branch (1123:7): [True: 0, False: 39.1k]
  |  Branch (1123:26): [True: 0, False: 4.48k]
  ------------------
 1124|      0|    status_ = input_.status();
 1125|      0|  }
 1126|  39.1k|}
_ZN7rocksdb18CompactionIterator29ExtractLargeValueIfNeededImplEv:
 1128|  29.5k|bool CompactionIterator::ExtractLargeValueIfNeededImpl() {
 1129|  29.5k|  if (!blob_file_builder_) {
  ------------------
  |  Branch (1129:7): [True: 29.5k, False: 0]
  ------------------
 1130|  29.5k|    return false;
 1131|  29.5k|  }
 1132|       |
 1133|      0|  blob_index_.clear();
 1134|      0|  const Status s = blob_file_builder_->Add(user_key(), value_, &blob_index_);
 1135|       |
 1136|      0|  if (!s.ok()) {
  ------------------
  |  Branch (1136:7): [True: 0, False: 0]
  ------------------
 1137|      0|    status_ = s;
 1138|      0|    validity_info_.Invalidate();
 1139|       |
 1140|      0|    return false;
 1141|      0|  }
 1142|       |
 1143|      0|  if (blob_index_.empty()) {
  ------------------
  |  Branch (1143:7): [True: 0, False: 0]
  ------------------
 1144|      0|    return false;
 1145|      0|  }
 1146|       |
 1147|      0|  value_ = blob_index_;
 1148|       |
 1149|      0|  return true;
 1150|      0|}
_ZN7rocksdb18CompactionIterator25ExtractLargeValueIfNeededEv:
 1152|  29.5k|void CompactionIterator::ExtractLargeValueIfNeeded() {
 1153|  29.5k|  assert(ikey_.type == kTypeValue);
 1154|       |
 1155|  29.5k|  if (!ExtractLargeValueIfNeededImpl()) {
  ------------------
  |  Branch (1155:7): [True: 29.5k, False: 0]
  ------------------
 1156|  29.5k|    return;
 1157|  29.5k|  }
 1158|       |
 1159|      0|  ikey_.type = kTypeBlobIndex;
 1160|      0|  current_key_.UpdateInternalKey(ikey_.sequence, ikey_.type);
 1161|      0|}
_ZN7rocksdb18CompactionIterator13PrepareOutputEv:
 1327|  39.1k|void CompactionIterator::PrepareOutput() {
 1328|  39.1k|  if (Valid()) {
  ------------------
  |  Branch (1328:7): [True: 34.6k, False: 4.48k]
  ------------------
 1329|  34.6k|    if (LIKELY(!is_range_del_)) {
  ------------------
  |  |   13|  34.6k|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 34.6k, False: 0]
  |  |  ------------------
  ------------------
 1330|  34.6k|      if (ikey_.type == kTypeValue) {
  ------------------
  |  Branch (1330:11): [True: 29.5k, False: 5.06k]
  ------------------
 1331|  29.5k|        ExtractLargeValueIfNeeded();
 1332|  29.5k|      } else if (ikey_.type == kTypeBlobIndex) {
  ------------------
  |  Branch (1332:18): [True: 0, False: 5.06k]
  ------------------
 1333|      0|        GarbageCollectBlobIfNeeded();
 1334|      0|      }
 1335|       |
 1336|       |      // For range del sentinel, we don't use it to cut files for bottommost
 1337|       |      // compaction. So it should not make a difference which output level we
 1338|       |      // decide.
 1339|  34.6k|      if (compaction_ != nullptr && compaction_->SupportsPerKeyPlacement()) {
  ------------------
  |  Branch (1339:11): [True: 0, False: 34.6k]
  |  Branch (1339:37): [True: 0, False: 0]
  ------------------
 1340|      0|        DecideOutputLevel();
 1341|      0|      }
 1342|  34.6k|    }
 1343|       |
 1344|       |    // Zeroing out the sequence number leads to better compression.
 1345|       |    // If this is the bottommost level (no files in lower levels)
 1346|       |    // and the earliest snapshot is larger than this seqno
 1347|       |    // and the userkey differs from the last userkey in compaction
 1348|       |    // then we can squash the seqno to zero.
 1349|       |    //
 1350|       |    // This is safe for TransactionDB write-conflict checking since transactions
 1351|       |    // only care about sequence number larger than any active snapshots.
 1352|       |    //
 1353|       |    // Can we do the same for levels above bottom level as long as
 1354|       |    // KeyNotExistsBeyondOutputLevel() return true?
 1355|  34.6k|    if (Valid() && compaction_ != nullptr &&
  ------------------
  |  Branch (1355:9): [True: 34.6k, False: 0]
  |  Branch (1355:20): [True: 0, False: 34.6k]
  ------------------
 1356|  34.6k|        !compaction_->allow_ingest_behind() && bottommost_level_ &&
  ------------------
  |  Branch (1356:9): [True: 0, False: 0]
  |  Branch (1356:48): [True: 0, False: 0]
  ------------------
 1357|  34.6k|        DefinitelyInSnapshot(ikey_.sequence, earliest_snapshot_) &&
  ------------------
  |  Branch (1357:9): [True: 0, False: 0]
  ------------------
 1358|  34.6k|        ikey_.type != kTypeMerge && current_key_committed_ &&
  ------------------
  |  Branch (1358:9): [True: 0, False: 0]
  |  Branch (1358:37): [True: 0, False: 0]
  ------------------
 1359|  34.6k|        !output_to_penultimate_level_ &&
  ------------------
  |  Branch (1359:9): [True: 0, False: 0]
  ------------------
 1360|  34.6k|        ikey_.sequence < preserve_time_min_seqno_ && !is_range_del_) {
  ------------------
  |  Branch (1360:9): [True: 0, False: 0]
  |  Branch (1360:54): [True: 0, False: 0]
  ------------------
 1361|      0|      if (ikey_.type == kTypeDeletion ||
  ------------------
  |  Branch (1361:11): [True: 0, False: 0]
  ------------------
 1362|      0|          (ikey_.type == kTypeSingleDeletion && timestamp_size_ == 0)) {
  ------------------
  |  Branch (1362:12): [True: 0, False: 0]
  |  Branch (1362:49): [True: 0, False: 0]
  ------------------
 1363|      0|        ROCKS_LOG_FATAL(
  ------------------
  |  |   48|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::FATAL_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:63): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1364|      0|            info_log_,
 1365|      0|            "Unexpected key %s for seq-zero optimization. "
 1366|      0|            "earliest_snapshot %" PRIu64
 1367|      0|            ", earliest_write_conflict_snapshot %" PRIu64
 1368|      0|            " job_snapshot %" PRIu64
 1369|      0|            ". timestamp_size: %d full_history_ts_low_ %s. validity %x",
 1370|      0|            ikey_.DebugString(allow_data_in_errors_, true).c_str(),
 1371|      0|            earliest_snapshot_, earliest_write_conflict_snapshot_,
 1372|      0|            job_snapshot_, static_cast<int>(timestamp_size_),
 1373|      0|            full_history_ts_low_ != nullptr
 1374|      0|                ? Slice(*full_history_ts_low_).ToString(true).c_str()
 1375|      0|                : "null",
 1376|      0|            validity_info_.rep);
 1377|      0|        assert(false);
 1378|      0|      }
 1379|      0|      ikey_.sequence = 0;
 1380|      0|      last_key_seq_zeroed_ = true;
 1381|      0|      TEST_SYNC_POINT_CALLBACK("CompactionIterator::PrepareOutput:ZeroingSeq",
 1382|      0|                               &ikey_);
 1383|      0|      if (!timestamp_size_) {
  ------------------
  |  Branch (1383:11): [True: 0, False: 0]
  ------------------
 1384|      0|        current_key_.UpdateInternalKey(0, ikey_.type);
 1385|      0|      } else if (full_history_ts_low_ && cmp_with_history_ts_low_ < 0) {
  ------------------
  |  Branch (1385:18): [True: 0, False: 0]
  |  Branch (1385:42): [True: 0, False: 0]
  ------------------
 1386|       |        // We can also zero out timestamp for better compression.
 1387|       |        // For the same user key (excluding timestamp), the timestamp-based
 1388|       |        // history can be collapsed to save some space if the timestamp is
 1389|       |        // older than *full_history_ts_low_.
 1390|      0|        const std::string kTsMin(timestamp_size_, static_cast<char>(0));
 1391|      0|        const Slice ts_slice = kTsMin;
 1392|      0|        ikey_.SetTimestamp(ts_slice);
 1393|      0|        current_key_.UpdateInternalKey(0, ikey_.type, &ts_slice);
 1394|      0|      }
 1395|      0|    }
 1396|  34.6k|  }
 1397|  39.1k|}
_ZN7rocksdb18CompactionIterator44ComputeBlobGarbageCollectionCutoffFileNumberEPKNS0_15CompactionProxyE:
 1451|  4.48k|    const CompactionProxy* compaction) {
 1452|  4.48k|  if (!compaction) {
  ------------------
  |  Branch (1452:7): [True: 4.48k, False: 0]
  ------------------
 1453|  4.48k|    return 0;
 1454|  4.48k|  }
 1455|       |
 1456|      0|  if (!compaction->enable_blob_garbage_collection()) {
  ------------------
  |  Branch (1456:7): [True: 0, False: 0]
  ------------------
 1457|      0|    return 0;
 1458|      0|  }
 1459|       |
 1460|      0|  const Version* const version = compaction->input_version();
 1461|      0|  assert(version);
 1462|       |
 1463|      0|  const VersionStorageInfo* const storage_info = version->storage_info();
 1464|      0|  assert(storage_info);
 1465|       |
 1466|      0|  const auto& blob_files = storage_info->GetBlobFiles();
 1467|       |
 1468|      0|  const size_t cutoff_index = static_cast<size_t>(
 1469|      0|      compaction->blob_garbage_collection_age_cutoff() * blob_files.size());
 1470|       |
 1471|      0|  if (cutoff_index >= blob_files.size()) {
  ------------------
  |  Branch (1471:7): [True: 0, False: 0]
  ------------------
 1472|      0|    return std::numeric_limits<uint64_t>::max();
 1473|      0|  }
 1474|       |
 1475|      0|  const auto& meta = blob_files[cutoff_index];
 1476|      0|  assert(meta);
 1477|       |
 1478|      0|  return meta->GetBlobFileNumber();
 1479|      0|}
_ZN7rocksdb18CompactionIterator25CreateBlobFetcherIfNeededEPKNS0_15CompactionProxyE:
 1482|  4.48k|    const CompactionProxy* compaction) {
 1483|  4.48k|  if (!compaction) {
  ------------------
  |  Branch (1483:7): [True: 4.48k, False: 0]
  ------------------
 1484|  4.48k|    return nullptr;
 1485|  4.48k|  }
 1486|       |
 1487|      0|  const Version* const version = compaction->input_version();
 1488|      0|  if (!version) {
  ------------------
  |  Branch (1488:7): [True: 0, False: 0]
  ------------------
 1489|      0|    return nullptr;
 1490|      0|  }
 1491|       |
 1492|      0|  ReadOptions read_options;
 1493|      0|  read_options.io_activity = Env::IOActivity::kCompaction;
 1494|      0|  read_options.fill_cache = false;
 1495|       |
 1496|      0|  return std::unique_ptr<BlobFetcher>(new BlobFetcher(version, read_options));
 1497|      0|}
_ZN7rocksdb18CompactionIterator38CreatePrefetchBufferCollectionIfNeededEPKNS0_15CompactionProxyE:
 1501|  4.48k|    const CompactionProxy* compaction) {
 1502|  4.48k|  if (!compaction) {
  ------------------
  |  Branch (1502:7): [True: 4.48k, False: 0]
  ------------------
 1503|  4.48k|    return nullptr;
 1504|  4.48k|  }
 1505|       |
 1506|      0|  if (!compaction->input_version()) {
  ------------------
  |  Branch (1506:7): [True: 0, False: 0]
  ------------------
 1507|      0|    return nullptr;
 1508|      0|  }
 1509|       |
 1510|      0|  if (compaction->allow_mmap_reads()) {
  ------------------
  |  Branch (1510:7): [True: 0, False: 0]
  ------------------
 1511|      0|    return nullptr;
 1512|      0|  }
 1513|       |
 1514|      0|  const uint64_t readahead_size = compaction->blob_compaction_readahead_size();
 1515|      0|  if (!readahead_size) {
  ------------------
  |  Branch (1515:7): [True: 0, False: 0]
  ------------------
 1516|      0|    return nullptr;
 1517|      0|  }
 1518|       |
 1519|      0|  return std::unique_ptr<PrefetchBufferCollection>(
 1520|      0|      new PrefetchBufferCollection(readahead_size));
 1521|      0|}

_ZN7rocksdb19SequenceIterWrapperC2EPNS_20InternalIteratorBaseINS_5SliceEEEPKNS_10ComparatorEb:
   37|  4.48k|        need_count_entries_(need_count_entries) {}
_ZNK7rocksdb19SequenceIterWrapper5ValidEv:
   38|   890k|  bool Valid() const override { return inner_iter_->Valid(); }
_ZNK7rocksdb19SequenceIterWrapper6statusEv:
   39|  4.48k|  Status status() const override { return inner_iter_->status(); }
_ZN7rocksdb19SequenceIterWrapper4NextEv:
   40|   846k|  void Next() override {
   41|   846k|    if (!inner_iter_->IsDeleteRangeSentinelKey()) {
  ------------------
  |  Branch (41:9): [True: 846k, False: 0]
  ------------------
   42|   846k|      num_itered_++;
   43|   846k|    }
   44|   846k|    inner_iter_->Next();
   45|   846k|  }
_ZNK7rocksdb19SequenceIterWrapper3keyEv:
   59|   846k|  Slice key() const override { return inner_iter_->key(); }
_ZNK7rocksdb19SequenceIterWrapper5valueEv:
   60|   846k|  Slice value() const override { return inner_iter_->value(); }
_ZNK7rocksdb19SequenceIterWrapper9NumIteredEv:
   68|  4.48k|  uint64_t NumItered() const { return num_itered_; }
_ZNK7rocksdb19SequenceIterWrapper24IsDeleteRangeSentinelKeyEv:
   70|   846k|  bool IsDeleteRangeSentinelKey() const override {
   71|   846k|    assert(Valid());
   72|   846k|    return inner_iter_->IsDeleteRangeSentinelKey();
   73|   846k|  }
_ZNK7rocksdb18CompactionIterator3keyEv:
  258|  34.6k|  const Slice& key() const { return key_; }
_ZNK7rocksdb18CompactionIterator5valueEv:
  259|  34.6k|  const Slice& value() const { return value_; }
_ZNK7rocksdb18CompactionIterator6statusEv:
  260|  4.48k|  const Status& status() const { return status_; }
_ZNK7rocksdb18CompactionIterator4ikeyEv:
  261|  34.6k|  const ParsedInternalKey& ikey() const { return ikey_; }
_ZNK7rocksdb18CompactionIterator5ValidEv:
  262|  1.07M|  inline bool Valid() const { return validity_info_.IsValid(); }
_ZNK7rocksdb18CompactionIterator20NumInputEntryScannedEv:
  271|  4.48k|  uint64_t NumInputEntryScanned() const { return input_.NumItered(); }
_ZN7rocksdb18CompactionIterator12KeyCommittedEm:
  326|   123k|  inline bool KeyCommitted(SequenceNumber sequence) {
  327|   123k|    return snapshot_checker_ == nullptr ||
  ------------------
  |  Branch (327:12): [True: 123k, False: 0]
  ------------------
  328|   123k|           snapshot_checker_->CheckInSnapshot(sequence, job_snapshot_) ==
  ------------------
  |  Branch (328:12): [True: 0, False: 0]
  ------------------
  329|      0|               SnapshotCheckerResult::kInSnapshot;
  330|   123k|  }
_ZN7rocksdb18CompactionIterator43UpdateTimestampAndCompareWithFullHistoryLowEv:
  338|   123k|  inline void UpdateTimestampAndCompareWithFullHistoryLow() {
  339|   123k|    if (!timestamp_size_) {
  ------------------
  |  Branch (339:9): [True: 123k, False: 0]
  ------------------
  340|   123k|      return;
  341|   123k|    }
  342|      0|    Slice ts = ExtractTimestampFromUserKey(ikey_.user_key, timestamp_size_);
  343|      0|    curr_ts_.assign(ts.data(), ts.size());
  344|      0|    if (full_history_ts_low_) {
  ------------------
  |  Branch (344:9): [True: 0, False: 0]
  ------------------
  345|      0|      cmp_with_history_ts_low_ =
  346|      0|          cmp_->CompareTimestamp(ts, *full_history_ts_low_);
  347|      0|    }
  348|      0|  }
_ZNK7rocksdb18CompactionIterator12ValidityInfo7IsValidEv:
  419|  1.07M|    inline bool IsValid() const { return rep & 1; }
_ZN7rocksdb18CompactionIterator12ValidityInfo8SetValidEh:
  423|  34.6k|    inline void SetValid(uint8_t ctx) { rep = (ctx << 1) | 1; }
_ZN7rocksdb18CompactionIterator12ValidityInfo10InvalidateEv:
  424|  39.1k|    inline void Invalidate() { rep = 0; }
_ZN7rocksdb18CompactionIterator16AdvanceInputIterEv:
  522|   846k|  void AdvanceInputIter() { input_.Next(); }
_ZN7rocksdb18CompactionIterator14IsShuttingDownEv:
  526|   850k|  bool IsShuttingDown() {
  527|       |    // This is a best-effort facility, so memory_order_relaxed is sufficient.
  528|   850k|    return shutting_down_ && shutting_down_->load(std::memory_order_relaxed);
  ------------------
  |  Branch (528:12): [True: 0, False: 850k]
  |  Branch (528:30): [True: 0, False: 0]
  ------------------
  529|   850k|  }
_ZN7rocksdb18CompactionIterator25IsPausingManualCompactionEv:
  531|   885k|  bool IsPausingManualCompaction() {
  532|       |    // This is a best-effort facility, so memory_order_relaxed is sufficient.
  533|   885k|    return manual_compaction_canceled_.load(std::memory_order_relaxed);
  534|   885k|  }

_ZN7rocksdb16CompactionPickerC2ERKNS_16ImmutableOptionsEPKNS_21InternalKeyComparatorE:
  131|  9.02k|    : ioptions_(ioptions), icmp_(icmp) {}
_ZN7rocksdb16CompactionPickerD2Ev:
  133|  9.02k|CompactionPicker::~CompactionPicker() = default;

_ZNK7rocksdb21LevelCompactionPicker15NeedsCompactionEPKNS_18VersionStorageInfoE:
   23|  9.02k|    const VersionStorageInfo* vstorage) const {
   24|  9.02k|  if (!vstorage->ExpiredTtlFiles().empty()) {
  ------------------
  |  Branch (24:7): [True: 0, False: 9.02k]
  ------------------
   25|      0|    return true;
   26|      0|  }
   27|  9.02k|  if (!vstorage->FilesMarkedForPeriodicCompaction().empty()) {
  ------------------
  |  Branch (27:7): [True: 0, False: 9.02k]
  ------------------
   28|      0|    return true;
   29|      0|  }
   30|  9.02k|  if (!vstorage->BottommostFilesMarkedForCompaction().empty()) {
  ------------------
  |  Branch (30:7): [True: 0, False: 9.02k]
  ------------------
   31|      0|    return true;
   32|      0|  }
   33|  9.02k|  if (!vstorage->FilesMarkedForCompaction().empty()) {
  ------------------
  |  Branch (33:7): [True: 0, False: 9.02k]
  ------------------
   34|      0|    return true;
   35|      0|  }
   36|  9.02k|  if (!vstorage->FilesMarkedForForcedBlobGC().empty()) {
  ------------------
  |  Branch (36:7): [True: 0, False: 9.02k]
  ------------------
   37|      0|    return true;
   38|      0|  }
   39|  63.1k|  for (int i = 0; i <= vstorage->MaxInputLevel(); i++) {
  ------------------
  |  Branch (39:19): [True: 54.1k, False: 9.02k]
  ------------------
   40|  54.1k|    if (vstorage->CompactionScore(i) >= 1) {
  ------------------
  |  Branch (40:9): [True: 0, False: 54.1k]
  ------------------
   41|      0|      return true;
   42|      0|    }
   43|  54.1k|  }
   44|  9.02k|  return false;
   45|  9.02k|}

_ZN7rocksdb21LevelCompactionPickerC2ERKNS_16ImmutableOptionsEPKNS_21InternalKeyComparatorE:
   22|  9.02k|      : CompactionPicker(ioptions, icmp) {}

_ZN7rocksdb14FileTtlBoosterC2Emmii:
   47|   162k|      : current_time_(current_time) {
   48|   162k|    if (ttl == 0 || level == 0 || level >= num_non_empty_levels - 1) {
  ------------------
  |  Branch (48:9): [True: 0, False: 162k]
  |  Branch (48:21): [True: 27.0k, False: 135k]
  |  Branch (48:35): [True: 135k, False: 0]
  ------------------
   49|   162k|      enabled_ = false;
   50|   162k|      boost_age_start_ = 0;
   51|   162k|      boost_step_ = 1;
   52|   162k|    } else {
   53|      0|      enabled_ = true;
   54|      0|      uint64_t all_boost_start_age = ttl / 2;
   55|      0|      uint64_t all_boost_age_range = (ttl / 32) * 31 - all_boost_start_age;
   56|       |      // TODO(cbi): more reasonable algorithm that gives different values
   57|       |      //   when num_non_empty_levels - level - 1 > 63.
   58|      0|      uint64_t boost_age_range =
   59|      0|          all_boost_age_range >> std::min(63, num_non_empty_levels - level - 1);
   60|      0|      boost_age_start_ = all_boost_start_age + boost_age_range;
   61|      0|      const uint64_t kBoostRatio = 16;
   62|       |      // prevent 0 value to avoid divide 0 error.
   63|      0|      boost_step_ = std::max(boost_age_range / kBoostRatio, uint64_t{1});
   64|      0|    }
   65|   162k|  }
_ZN7rocksdb14FileTtlBooster13GetBoostScoreEPNS_12FileMetaDataE:
   67|  4.48k|  uint64_t GetBoostScore(FileMetaData* f) {
   68|  4.48k|    if (!enabled_) {
  ------------------
  |  Branch (68:9): [True: 4.48k, False: 0]
  ------------------
   69|  4.48k|      return 1;
   70|  4.48k|    }
   71|      0|    uint64_t oldest_ancester_time = f->TryGetOldestAncesterTime();
   72|      0|    if (oldest_ancester_time >= current_time_) {
  ------------------
  |  Branch (72:9): [True: 0, False: 0]
  ------------------
   73|      0|      return 1;
   74|      0|    }
   75|      0|    uint64_t age = current_time_ - oldest_ancester_time;
   76|      0|    if (age > boost_age_start_) {
  ------------------
  |  Branch (76:9): [True: 0, False: 0]
  ------------------
   77|       |      // Use integer just for convenience.
   78|       |      // We could make all file_to_order double if we want.
   79|       |      // Technically this can overflow if users override timing and
   80|       |      // give a very high current time. Ignore the case for simplicity.
   81|       |      // Boosting is addition to current value, so +1. This will effectively
   82|       |      // make boosting to kick in after the first boost_step_ is reached.
   83|      0|      return (age - boost_age_start_) / boost_step_ + 1;
   84|      0|    }
   85|      0|    return 1;
   86|      0|  }

_ZN7rocksdb21SstPartitionerFactory16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIS0_EE:
   76|  9.02k|    std::shared_ptr<SstPartitionerFactory>* result) {
   77|  9.02k|  static std::once_flag once;
   78|  9.02k|  std::call_once(once, [&]() {
   79|  9.02k|    RegisterSstPartitionerFactories(*(ObjectLibrary::Default().get()), "");
   80|  9.02k|  });
   81|  9.02k|  return LoadSharedObject<SstPartitionerFactory>(options, value, result);
   82|  9.02k|}
sst_partitioner.cc:_ZZN7rocksdb21SstPartitionerFactory16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIS0_EEENK3$_0clEv:
   78|      1|  std::call_once(once, [&]() {
   79|      1|    RegisterSstPartitionerFactories(*(ObjectLibrary::Default().get()), "");
   80|      1|  });
sst_partitioner.cc:_ZN7rocksdb12_GLOBAL__N_131RegisterSstPartitionerFactoriesERNS_13ObjectLibraryERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
   61|      1|                                           const std::string& /*arg*/) {
   62|      1|  library.AddFactory<SstPartitionerFactory>(
   63|      1|      SstPartitionerFixedPrefixFactory::kClassName(),
   64|      1|      [](const std::string& /*uri*/,
   65|      1|         std::unique_ptr<SstPartitionerFactory>* guard,
   66|      1|         std::string* /* errmsg */) {
   67|      1|        guard->reset(new SstPartitionerFixedPrefixFactory(0));
   68|      1|        return guard->get();
   69|      1|      });
   70|      1|  return 1;
   71|      1|}

_ZN7rocksdb19GetCompressionFlushERKNS_18ImmutableCFOptionsERKNS_16MutableCFOptionsE:
  125|  4.48k|    const MutableCFOptions& mutable_cf_options) {
  126|       |  // Compressing memtable flushes might not help unless the sequential load
  127|       |  // optimization is used for leveled compaction. Otherwise the CPU and
  128|       |  // latency overhead is not offset by saving much space.
  129|  4.48k|  if (ioptions.compaction_style == kCompactionStyleUniversal &&
  ------------------
  |  Branch (129:7): [True: 0, False: 4.48k]
  ------------------
  130|  4.48k|      mutable_cf_options.compaction_options_universal
  ------------------
  |  Branch (130:7): [True: 0, False: 0]
  ------------------
  131|      0|              .compression_size_percent >= 0) {
  132|      0|    return kNoCompression;
  133|      0|  }
  134|  4.48k|  if (mutable_cf_options.compression_per_level.empty()) {
  ------------------
  |  Branch (134:7): [True: 4.48k, False: 0]
  ------------------
  135|  4.48k|    return mutable_cf_options.compression;
  136|  4.48k|  } else {
  137|       |    // For leveled compress when min_level_to_compress != 0.
  138|      0|    return mutable_cf_options.compression_per_level[0];
  139|      0|  }
  140|  4.48k|}
_ZN7rocksdb6DBImplC2ERKNS_9DBOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbb:
  258|  9.02k|      lock_wal_count_(0) {
  259|       |  // !batch_per_trx_ implies seq_per_batch_ because it is only unset for
  260|       |  // WriteUnprepared, which should use seq_per_batch_.
  261|  9.02k|  assert(batch_per_txn_ || seq_per_batch_);
  262|       |
  263|       |  // Reserve ten files or so for other uses and give the rest to TableCache.
  264|       |  // Give a large number for setting of "infinite" open files.
  265|  9.02k|  const int table_cache_size = (mutable_db_options_.max_open_files == -1)
  ------------------
  |  Branch (265:32): [True: 9.02k, False: 0]
  ------------------
  266|  9.02k|                                   ? TableCache::kInfiniteCapacity
  267|  9.02k|                                   : mutable_db_options_.max_open_files - 10;
  268|  9.02k|  LRUCacheOptions co;
  269|  9.02k|  co.capacity = table_cache_size;
  270|  9.02k|  co.num_shard_bits = immutable_db_options_.table_cache_numshardbits;
  271|  9.02k|  co.metadata_charge_policy = kDontChargeCacheMetadata;
  272|       |  // TODO: Consider a non-fixed seed once test fallout (prefetch_test) is
  273|       |  // dealt with
  274|  9.02k|  co.hash_seed = 0;
  275|  9.02k|  table_cache_ = NewLRUCache(co);
  276|  9.02k|  SetDbSessionId();
  277|  9.02k|  assert(!db_session_id_.empty());
  278|       |
  279|  9.02k|  periodic_task_functions_.emplace(PeriodicTaskType::kDumpStats,
  280|  9.02k|                                   [this]() { this->DumpStats(); });
  281|  9.02k|  periodic_task_functions_.emplace(PeriodicTaskType::kPersistStats,
  282|  9.02k|                                   [this]() { this->PersistStats(); });
  283|  9.02k|  periodic_task_functions_.emplace(PeriodicTaskType::kFlushInfoLog,
  284|  9.02k|                                   [this]() { this->FlushInfoLog(); });
  285|  9.02k|  periodic_task_functions_.emplace(
  286|  9.02k|      PeriodicTaskType::kRecordSeqnoTime, [this]() {
  287|  9.02k|        this->RecordSeqnoToTimeMapping(/*populate_historical_seconds=*/0);
  288|  9.02k|      });
  289|       |
  290|  9.02k|  versions_.reset(new VersionSet(
  291|  9.02k|      dbname_, &immutable_db_options_, file_options_, table_cache_.get(),
  292|  9.02k|      write_buffer_manager_, &write_controller_, &block_cache_tracer_,
  293|  9.02k|      io_tracer_, db_id_, db_session_id_, options.daily_offpeak_time_utc,
  294|  9.02k|      &error_handler_, read_only));
  295|  9.02k|  column_family_memtables_.reset(
  296|  9.02k|      new ColumnFamilyMemTablesImpl(versions_->GetColumnFamilySet()));
  297|       |
  298|  9.02k|  DumpRocksDBBuildVersion(immutable_db_options_.info_log.get());
  299|  9.02k|  DumpDBFileSummary(immutable_db_options_, dbname_, db_session_id_);
  300|  9.02k|  immutable_db_options_.Dump(immutable_db_options_.info_log.get());
  301|  9.02k|  mutable_db_options_.Dump(immutable_db_options_.info_log.get());
  302|  9.02k|  DumpSupportInfo(immutable_db_options_.info_log.get());
  303|       |
  304|  9.02k|  max_total_wal_size_.store(mutable_db_options_.max_total_wal_size,
  305|  9.02k|                            std::memory_order_relaxed);
  306|  9.02k|  if (write_buffer_manager_) {
  ------------------
  |  Branch (306:7): [True: 9.02k, False: 0]
  ------------------
  307|  9.02k|    wbm_stall_.reset(new WBMStallInterface());
  308|  9.02k|  }
  309|  9.02k|}
_ZN7rocksdb6DBImpl23CancelAllBackgroundWorkEb:
  497|  9.02k|void DBImpl::CancelAllBackgroundWork(bool wait) {
  498|  9.02k|  ROCKS_LOG_INFO(immutable_db_options_.info_log,
  ------------------
  |  |   39|  9.02k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  9.02k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  9.02k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  9.02k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  499|  9.02k|                 "Shutdown: canceling all background work");
  500|  9.02k|  Status s = CancelPeriodicTaskScheduler();
  501|  9.02k|  s.PermitUncheckedError();
  502|       |
  503|  9.02k|  InstrumentedMutexLock l(&mutex_);
  504|  9.02k|  if (!shutting_down_.load(std::memory_order_acquire) &&
  ------------------
  |  Branch (504:7): [True: 9.02k, False: 0]
  ------------------
  505|  9.02k|      has_unpersisted_data_.load(std::memory_order_relaxed) &&
  ------------------
  |  Branch (505:7): [True: 0, False: 9.02k]
  ------------------
  506|  9.02k|      !mutable_db_options_.avoid_flush_during_shutdown) {
  ------------------
  |  Branch (506:7): [True: 0, False: 0]
  ------------------
  507|      0|    s = DBImpl::FlushAllColumnFamilies(FlushOptions(), FlushReason::kShutDown);
  508|      0|    s.PermitUncheckedError();  //**TODO: What to do on error?
  509|      0|  }
  510|       |
  511|  9.02k|  shutting_down_.store(true, std::memory_order_release);
  512|  9.02k|  bg_cv_.SignalAll();
  513|  9.02k|  if (!wait) {
  ------------------
  |  Branch (513:7): [True: 9.02k, False: 0]
  ------------------
  514|  9.02k|    return;
  515|  9.02k|  }
  516|      0|  WaitForBackgroundWork();
  517|      0|}
_ZN7rocksdb6DBImpl40MaybeReleaseTimestampedSnapshotsAndCheckEv:
  519|  9.02k|Status DBImpl::MaybeReleaseTimestampedSnapshotsAndCheck() {
  520|  9.02k|  size_t num_snapshots = 0;
  521|  9.02k|  ReleaseTimestampedSnapshotsOlderThan(std::numeric_limits<uint64_t>::max(),
  522|  9.02k|                                       &num_snapshots);
  523|       |
  524|       |  // If there is unreleased snapshot, fail the close call
  525|  9.02k|  if (num_snapshots > 0) {
  ------------------
  |  Branch (525:7): [True: 0, False: 9.02k]
  ------------------
  526|      0|    return Status::Aborted("Cannot close DB with unreleased snapshot.");
  527|      0|  }
  528|       |
  529|  9.02k|  return Status::OK();
  530|  9.02k|}
_ZN7rocksdb6DBImpl11CloseHelperEv:
  532|  9.02k|Status DBImpl::CloseHelper() {
  533|       |  // Guarantee that there is no background error recovery in progress before
  534|       |  // continuing with the shutdown
  535|  9.02k|  mutex_.Lock();
  536|  9.02k|  shutdown_initiated_ = true;
  537|  9.02k|  error_handler_.CancelErrorRecovery();
  538|  9.02k|  while (error_handler_.IsRecoveryInProgress()) {
  ------------------
  |  Branch (538:10): [True: 0, False: 9.02k]
  ------------------
  539|      0|    bg_cv_.Wait();
  540|      0|  }
  541|  9.02k|  mutex_.Unlock();
  542|       |
  543|       |  // Below check is added as recovery_error_ is not checked and it causes crash
  544|       |  // in DBSSTTest.DBWithMaxSpaceAllowedWithBlobFiles when space limit is
  545|       |  // reached.
  546|  9.02k|  error_handler_.GetRecoveryError().PermitUncheckedError();
  547|       |
  548|       |  // CancelAllBackgroundWork called with false means we just set the shutdown
  549|       |  // marker. After this we do a variant of the waiting and unschedule work
  550|       |  // (to consider: moving all the waiting into CancelAllBackgroundWork(true))
  551|  9.02k|  CancelAllBackgroundWork(false);
  552|       |
  553|       |  // Cancel manual compaction if there's any
  554|  9.02k|  if (HasPendingManualCompaction()) {
  ------------------
  |  Branch (554:7): [True: 0, False: 9.02k]
  ------------------
  555|      0|    DisableManualCompaction();
  556|      0|  }
  557|  9.02k|  mutex_.Lock();
  558|       |  // Unschedule all tasks for this DB
  559|  27.0k|  for (uint8_t i = 0; i < static_cast<uint8_t>(TaskType::kCount); i++) {
  ------------------
  |  Branch (559:23): [True: 18.0k, False: 9.02k]
  ------------------
  560|  18.0k|    env_->UnSchedule(GetTaskTag(i), Env::Priority::BOTTOM);
  561|  18.0k|    env_->UnSchedule(GetTaskTag(i), Env::Priority::LOW);
  562|  18.0k|    env_->UnSchedule(GetTaskTag(i), Env::Priority::HIGH);
  563|  18.0k|  }
  564|       |
  565|  9.02k|  Status ret = Status::OK();
  566|       |
  567|       |  // Wait for background work to finish
  568|  9.02k|  while (bg_bottom_compaction_scheduled_ || bg_compaction_scheduled_ ||
  ------------------
  |  Branch (568:10): [True: 0, False: 9.02k]
  |  Branch (568:45): [True: 0, False: 9.02k]
  ------------------
  569|  9.02k|         bg_flush_scheduled_ || bg_purge_scheduled_ ||
  ------------------
  |  Branch (569:10): [True: 0, False: 9.02k]
  |  Branch (569:33): [True: 0, False: 9.02k]
  ------------------
  570|  9.02k|         pending_purge_obsolete_files_ ||
  ------------------
  |  Branch (570:10): [True: 0, False: 9.02k]
  ------------------
  571|  9.02k|         error_handler_.IsRecoveryInProgress()) {
  ------------------
  |  Branch (571:10): [True: 0, False: 9.02k]
  ------------------
  572|      0|    TEST_SYNC_POINT("DBImpl::~DBImpl:WaitJob");
  573|      0|    bg_cv_.Wait();
  574|      0|  }
  575|  9.02k|  TEST_SYNC_POINT_CALLBACK("DBImpl::CloseHelper:PendingPurgeFinished",
  576|  9.02k|                           &files_grabbed_for_purge_);
  577|  9.02k|  EraseThreadStatusDbInfo();
  578|  9.02k|  flush_scheduler_.Clear();
  579|  9.02k|  trim_history_scheduler_.Clear();
  580|       |
  581|  9.02k|  while (!flush_queue_.empty()) {
  ------------------
  |  Branch (581:10): [True: 0, False: 9.02k]
  ------------------
  582|      0|    const FlushRequest& flush_req = PopFirstFromFlushQueue();
  583|      0|    for (const auto& iter : flush_req.cfd_to_max_mem_id_to_persist) {
  ------------------
  |  Branch (583:27): [True: 0, False: 0]
  ------------------
  584|      0|      iter.first->UnrefAndTryDelete();
  585|      0|    }
  586|      0|  }
  587|       |
  588|  9.02k|  while (!compaction_queue_.empty()) {
  ------------------
  |  Branch (588:10): [True: 0, False: 9.02k]
  ------------------
  589|      0|    auto cfd = PopFirstFromCompactionQueue();
  590|      0|    cfd->UnrefAndTryDelete();
  591|      0|  }
  592|       |
  593|  9.02k|  if (default_cf_handle_ != nullptr || persist_stats_cf_handle_ != nullptr) {
  ------------------
  |  Branch (593:7): [True: 9.02k, False: 0]
  |  Branch (593:40): [True: 0, False: 0]
  ------------------
  594|       |    // we need to delete handle outside of lock because it does its own locking
  595|  9.02k|    mutex_.Unlock();
  596|  9.02k|    if (default_cf_handle_) {
  ------------------
  |  Branch (596:9): [True: 9.02k, False: 0]
  ------------------
  597|  9.02k|      delete default_cf_handle_;
  598|  9.02k|      default_cf_handle_ = nullptr;
  599|  9.02k|    }
  600|  9.02k|    if (persist_stats_cf_handle_) {
  ------------------
  |  Branch (600:9): [True: 0, False: 9.02k]
  ------------------
  601|      0|      delete persist_stats_cf_handle_;
  602|      0|      persist_stats_cf_handle_ = nullptr;
  603|      0|    }
  604|  9.02k|    mutex_.Lock();
  605|  9.02k|  }
  606|       |
  607|       |  // Clean up obsolete files due to SuperVersion release.
  608|       |  // (1) Need to delete to obsolete files before closing because RepairDB()
  609|       |  // scans all existing files in the file system and builds manifest file.
  610|       |  // Keeping obsolete files confuses the repair process.
  611|       |  // (2) Need to check if we Open()/Recover() the DB successfully before
  612|       |  // deleting because if VersionSet recover fails (may be due to corrupted
  613|       |  // manifest file), it is not able to identify live files correctly. As a
  614|       |  // result, all "live" files can get deleted by accident. However, corrupted
  615|       |  // manifest is recoverable by RepairDB().
  616|  9.02k|  if (opened_successfully_) {
  ------------------
  |  Branch (616:7): [True: 9.02k, False: 0]
  ------------------
  617|  9.02k|    JobContext job_context(next_job_id_.fetch_add(1));
  618|  9.02k|    FindObsoleteFiles(&job_context, true);
  619|       |
  620|  9.02k|    mutex_.Unlock();
  621|       |    // manifest number starting from 2
  622|  9.02k|    job_context.manifest_file_number = 1;
  623|  9.02k|    if (job_context.HaveSomethingToDelete()) {
  ------------------
  |  Branch (623:9): [True: 9.02k, False: 0]
  ------------------
  624|  9.02k|      PurgeObsoleteFiles(job_context);
  625|  9.02k|    }
  626|  9.02k|    job_context.Clean();
  627|  9.02k|    mutex_.Lock();
  628|  9.02k|  }
  629|  9.02k|  {
  630|  9.02k|    InstrumentedMutexLock lock(&log_write_mutex_);
  631|  9.02k|    for (auto l : logs_to_free_) {
  ------------------
  |  Branch (631:17): [True: 0, False: 9.02k]
  ------------------
  632|      0|      delete l;
  633|      0|    }
  634|  9.02k|    for (auto& log : logs_) {
  ------------------
  |  Branch (634:20): [True: 9.02k, False: 9.02k]
  ------------------
  635|  9.02k|      uint64_t log_number = log.writer->get_log_number();
  636|  9.02k|      Status s = log.ClearWriter();
  637|  9.02k|      if (!s.ok()) {
  ------------------
  |  Branch (637:11): [True: 0, False: 9.02k]
  ------------------
  638|      0|        ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  639|      0|            immutable_db_options_.info_log,
  640|      0|            "Unable to clear writer for WAL %s with error -- %s",
  641|      0|            LogFileName(immutable_db_options_.GetWalDir(), log_number).c_str(),
  642|      0|            s.ToString().c_str());
  643|       |        // Retain the first error
  644|      0|        if (ret.ok()) {
  ------------------
  |  Branch (644:13): [True: 0, False: 0]
  ------------------
  645|      0|          ret = s;
  646|      0|        }
  647|      0|      }
  648|  9.02k|    }
  649|  9.02k|    logs_.clear();
  650|  9.02k|  }
  651|       |
  652|       |  // Table cache may have table handles holding blocks from the block cache.
  653|       |  // We need to release them before the block cache is destroyed. The block
  654|       |  // cache may be destroyed inside versions_.reset(), when column family data
  655|       |  // list is destroyed, so leaving handles in table cache after
  656|       |  // versions_.reset() may cause issues.
  657|       |  // Here we clean all unreferenced handles in table cache.
  658|       |  // Now we assume all user queries have finished, so only version set itself
  659|       |  // can possibly hold the blocks from block cache. After releasing unreferenced
  660|       |  // handles here, only handles held by version set left and inside
  661|       |  // versions_.reset(), we will release them. There, we need to make sure every
  662|       |  // time a handle is released, we erase it from the cache too. By doing that,
  663|       |  // we can guarantee that after versions_.reset(), table cache is empty
  664|       |  // so the cache can be safely destroyed.
  665|  9.02k|  table_cache_->EraseUnRefEntries();
  666|       |
  667|  9.02k|  for (auto& txn_entry : recovered_transactions_) {
  ------------------
  |  Branch (667:24): [True: 0, False: 9.02k]
  ------------------
  668|      0|    delete txn_entry.second;
  669|      0|  }
  670|       |
  671|       |  // versions need to be destroyed before table_cache since it can hold
  672|       |  // references to table_cache.
  673|  9.02k|  {
  674|  9.02k|    Status s = versions_->Close(directories_.GetDbDir(), &mutex_);
  675|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (675:9): [True: 0, False: 9.02k]
  ------------------
  676|      0|      ROCKS_LOG_ERROR(immutable_db_options_.info_log,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  677|      0|                      "Unable to close MANIFEST with error -- %s",
  678|      0|                      s.ToString().c_str());
  679|      0|      if (ret.ok()) {
  ------------------
  |  Branch (679:11): [True: 0, False: 0]
  ------------------
  680|      0|        ret = s;
  681|      0|      }
  682|      0|    }
  683|  9.02k|  }
  684|       |
  685|  9.02k|  versions_.reset();
  686|  9.02k|  mutex_.Unlock();
  687|  9.02k|  if (db_lock_ != nullptr) {
  ------------------
  |  Branch (687:7): [True: 9.02k, False: 0]
  ------------------
  688|       |    // TODO: Check for unlock error
  689|  9.02k|    env_->UnlockFile(db_lock_).PermitUncheckedError();
  690|  9.02k|  }
  691|       |
  692|  9.02k|  ROCKS_LOG_INFO(immutable_db_options_.info_log, "Shutdown complete");
  ------------------
  |  |   39|  9.02k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  9.02k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  9.02k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  9.02k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  693|  9.02k|  LogFlush(immutable_db_options_.info_log);
  694|       |
  695|       |  // If the sst_file_manager was allocated by us during DB::Open(), ccall
  696|       |  // Close() on it before closing the info_log. Otherwise, background thread
  697|       |  // in SstFileManagerImpl might try to log something
  698|  9.02k|  if (immutable_db_options_.sst_file_manager && own_sfm_) {
  ------------------
  |  Branch (698:7): [True: 9.02k, False: 0]
  |  Branch (698:49): [True: 9.02k, False: 0]
  ------------------
  699|  9.02k|    auto sfm = static_cast<SstFileManagerImpl*>(
  700|  9.02k|        immutable_db_options_.sst_file_manager.get());
  701|  9.02k|    sfm->Close();
  702|  9.02k|  }
  703|       |
  704|  9.02k|  if (immutable_db_options_.info_log && own_info_log_) {
  ------------------
  |  Branch (704:7): [True: 9.02k, False: 0]
  |  Branch (704:41): [True: 9.02k, False: 0]
  ------------------
  705|  9.02k|    Status s = immutable_db_options_.info_log->Close();
  706|  9.02k|    if (!s.ok() && !s.IsNotSupported() && ret.ok()) {
  ------------------
  |  Branch (706:9): [True: 0, False: 9.02k]
  |  Branch (706:20): [True: 0, False: 0]
  |  Branch (706:43): [True: 0, False: 0]
  ------------------
  707|      0|      ret = s;
  708|      0|    }
  709|  9.02k|  }
  710|       |
  711|  9.02k|  if (write_buffer_manager_ && wbm_stall_) {
  ------------------
  |  Branch (711:7): [True: 9.02k, False: 0]
  |  Branch (711:32): [True: 9.02k, False: 0]
  ------------------
  712|  9.02k|    write_buffer_manager_->RemoveDBFromQueue(wbm_stall_.get());
  713|  9.02k|  }
  714|       |
  715|  9.02k|  IOStatus io_s = directories_.Close(IOOptions(), nullptr /* dbg */);
  716|  9.02k|  if (!io_s.ok()) {
  ------------------
  |  Branch (716:7): [True: 0, False: 9.02k]
  ------------------
  717|      0|    ret = io_s;
  718|      0|  }
  719|  9.02k|  if (ret.IsAborted()) {
  ------------------
  |  Branch (719:7): [True: 0, False: 9.02k]
  ------------------
  720|       |    // Reserve IsAborted() error for those where users didn't release
  721|       |    // certain resource and they can release them and come back and
  722|       |    // retry. In this case, we wrap this exception to something else.
  723|      0|    return Status::Incomplete(ret.ToString());
  724|      0|  }
  725|       |
  726|  9.02k|  return ret;
  727|  9.02k|}
_ZN7rocksdb6DBImpl9CloseImplEv:
  729|  9.02k|Status DBImpl::CloseImpl() { return CloseHelper(); }
_ZN7rocksdb6DBImplD2Ev:
  731|  9.02k|DBImpl::~DBImpl() {
  732|  9.02k|  ThreadStatus::OperationType cur_op_type =
  733|  9.02k|      ThreadStatusUtil::GetThreadOperation();
  734|  9.02k|  ThreadStatusUtil::SetThreadOperation(ThreadStatus::OperationType::OP_UNKNOWN);
  735|       |
  736|       |  // TODO: remove this.
  737|  9.02k|  init_logger_creation_s_.PermitUncheckedError();
  738|       |
  739|  9.02k|  InstrumentedMutexLock closing_lock_guard(&closing_mutex_);
  740|  9.02k|  if (!closed_) {
  ------------------
  |  Branch (740:7): [True: 0, False: 9.02k]
  ------------------
  741|      0|    closed_ = true;
  742|       |
  743|      0|    {
  744|      0|      const Status s = MaybeReleaseTimestampedSnapshotsAndCheck();
  745|      0|      s.PermitUncheckedError();
  746|      0|    }
  747|       |
  748|      0|    closing_status_ = CloseImpl();
  749|      0|    closing_status_.PermitUncheckedError();
  750|      0|  }
  751|  9.02k|  ThreadStatusUtil::SetThreadOperation(cur_op_type);
  752|  9.02k|}
_ZNK7rocksdb6DBImpl16MaybeIgnoreErrorEPNS_6StatusE:
  754|  1.36M|void DBImpl::MaybeIgnoreError(Status* s) const {
  755|  1.36M|  if (s->ok() || immutable_db_options_.paranoid_checks) {
  ------------------
  |  Branch (755:7): [True: 1.36M, False: 0]
  |  Branch (755:18): [True: 0, False: 0]
  ------------------
  756|       |    // No change needed
  757|  1.36M|  } else {
  758|      0|    ROCKS_LOG_WARN(immutable_db_options_.info_log, "Ignoring error %s",
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  759|      0|                   s->ToString().c_str());
  760|      0|    *s = Status::OK();
  761|      0|  }
  762|  1.36M|}
_ZN7rocksdb6DBImpl23CreateArchivalDirectoryEv:
  764|  9.02k|const Status DBImpl::CreateArchivalDirectory() {
  765|  9.02k|  if (immutable_db_options_.WAL_ttl_seconds > 0 ||
  ------------------
  |  Branch (765:7): [True: 0, False: 9.02k]
  ------------------
  766|  9.02k|      immutable_db_options_.WAL_size_limit_MB > 0) {
  ------------------
  |  Branch (766:7): [True: 0, False: 9.02k]
  ------------------
  767|      0|    std::string archivalPath =
  768|      0|        ArchivalDirectory(immutable_db_options_.GetWalDir());
  769|      0|    return env_->CreateDirIfMissing(archivalPath);
  770|      0|  }
  771|  9.02k|  return Status::OK();
  772|  9.02k|}
_ZN7rocksdb6DBImpl15PrintStatisticsEv:
  774|     46|void DBImpl::PrintStatistics() {
  775|     46|  auto dbstats = immutable_db_options_.stats;
  776|     46|  if (dbstats) {
  ------------------
  |  Branch (776:7): [True: 0, False: 46]
  ------------------
  777|      0|    ROCKS_LOG_INFO(immutable_db_options_.info_log, "STATISTICS:\n %s",
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  778|      0|                   dbstats->ToString().c_str());
  779|      0|  }
  780|     46|}
_ZN7rocksdb6DBImpl26StartPeriodicTaskSchedulerEv:
  782|  9.02k|Status DBImpl::StartPeriodicTaskScheduler() {
  783|       |#ifndef NDEBUG
  784|       |  // It only used by test to disable scheduler
  785|       |  bool disable_scheduler = false;
  786|       |  TEST_SYNC_POINT_CALLBACK(
  787|       |      "DBImpl::StartPeriodicTaskScheduler:DisableScheduler",
  788|       |      &disable_scheduler);
  789|       |  if (disable_scheduler) {
  790|       |    return Status::OK();
  791|       |  }
  792|       |
  793|       |  {
  794|       |    InstrumentedMutexLock l(&mutex_);
  795|       |    TEST_SYNC_POINT_CALLBACK("DBImpl::StartPeriodicTaskScheduler:Init",
  796|       |                             &periodic_task_scheduler_);
  797|       |  }
  798|       |
  799|       |#endif  // !NDEBUG
  800|  9.02k|  if (mutable_db_options_.stats_dump_period_sec > 0) {
  ------------------
  |  Branch (800:7): [True: 9.02k, False: 0]
  ------------------
  801|  9.02k|    Status s = periodic_task_scheduler_.Register(
  802|  9.02k|        PeriodicTaskType::kDumpStats,
  803|  9.02k|        periodic_task_functions_.at(PeriodicTaskType::kDumpStats),
  804|  9.02k|        mutable_db_options_.stats_dump_period_sec);
  805|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (805:9): [True: 0, False: 9.02k]
  ------------------
  806|      0|      return s;
  807|      0|    }
  808|  9.02k|  }
  809|  9.02k|  if (mutable_db_options_.stats_persist_period_sec > 0) {
  ------------------
  |  Branch (809:7): [True: 9.02k, False: 0]
  ------------------
  810|  9.02k|    Status s = periodic_task_scheduler_.Register(
  811|  9.02k|        PeriodicTaskType::kPersistStats,
  812|  9.02k|        periodic_task_functions_.at(PeriodicTaskType::kPersistStats),
  813|  9.02k|        mutable_db_options_.stats_persist_period_sec);
  814|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (814:9): [True: 0, False: 9.02k]
  ------------------
  815|      0|      return s;
  816|      0|    }
  817|  9.02k|  }
  818|       |
  819|  9.02k|  Status s = periodic_task_scheduler_.Register(
  820|  9.02k|      PeriodicTaskType::kFlushInfoLog,
  821|  9.02k|      periodic_task_functions_.at(PeriodicTaskType::kFlushInfoLog));
  822|       |
  823|  9.02k|  return s;
  824|  9.02k|}
_ZN7rocksdb6DBImpl29RegisterRecordSeqnoTimeWorkerERKNS_11ReadOptionsERKNS_12WriteOptionsEb:
  828|  9.02k|                                             bool is_new_db) {
  829|  9.02k|  options_mutex_.AssertHeld();
  830|       |
  831|  9.02k|  uint64_t min_preserve_seconds = std::numeric_limits<uint64_t>::max();
  832|  9.02k|  uint64_t max_preserve_seconds = std::numeric_limits<uint64_t>::min();
  833|  9.02k|  bool mapping_was_empty = false;
  834|  9.02k|  {
  835|  9.02k|    InstrumentedMutexLock l(&mutex_);
  836|       |
  837|  9.02k|    for (auto cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (837:19): [True: 9.02k, False: 9.02k]
  ------------------
  838|       |      // preserve time is the max of 2 options.
  839|  9.02k|      uint64_t preserve_seconds =
  840|  9.02k|          std::max(cfd->ioptions()->preserve_internal_time_seconds,
  841|  9.02k|                   cfd->ioptions()->preclude_last_level_data_seconds);
  842|  9.02k|      if (!cfd->IsDropped() && preserve_seconds > 0) {
  ------------------
  |  Branch (842:11): [True: 9.02k, False: 0]
  |  Branch (842:32): [True: 0, False: 9.02k]
  ------------------
  843|      0|        min_preserve_seconds = std::min(preserve_seconds, min_preserve_seconds);
  844|      0|        max_preserve_seconds = std::max(preserve_seconds, max_preserve_seconds);
  845|      0|      }
  846|  9.02k|    }
  847|  9.02k|    if (min_preserve_seconds == std::numeric_limits<uint64_t>::max()) {
  ------------------
  |  Branch (847:9): [True: 9.02k, False: 0]
  ------------------
  848|       |      // Don't track
  849|  9.02k|      seqno_to_time_mapping_.SetCapacity(0);
  850|  9.02k|      seqno_to_time_mapping_.SetMaxTimeSpan(UINT64_MAX);
  851|  9.02k|    } else {
  852|      0|      uint64_t cap = std::min(kMaxSeqnoToTimeEntries,
  853|      0|                              max_preserve_seconds * kMaxSeqnoTimePairsPerCF /
  854|      0|                                  min_preserve_seconds);
  855|      0|      seqno_to_time_mapping_.SetCapacity(cap);
  856|      0|      seqno_to_time_mapping_.SetMaxTimeSpan(max_preserve_seconds);
  857|      0|    }
  858|  9.02k|    mapping_was_empty = seqno_to_time_mapping_.Empty();
  859|  9.02k|  }
  860|       |
  861|  9.02k|  uint64_t seqno_time_cadence = 0;
  862|  9.02k|  if (min_preserve_seconds != std::numeric_limits<uint64_t>::max()) {
  ------------------
  |  Branch (862:7): [True: 0, False: 9.02k]
  ------------------
  863|       |    // round up to 1 when the time_duration is smaller than
  864|       |    // kMaxSeqnoTimePairsPerCF
  865|      0|    seqno_time_cadence = (min_preserve_seconds + kMaxSeqnoTimePairsPerCF - 1) /
  866|      0|                         kMaxSeqnoTimePairsPerCF;
  867|      0|  }
  868|       |
  869|  9.02k|  TEST_SYNC_POINT_CALLBACK(
  870|  9.02k|      "DBImpl::RegisterRecordSeqnoTimeWorker:BeforePeriodicTaskType", nullptr);
  871|       |
  872|  9.02k|  Status s;
  873|  9.02k|  if (seqno_time_cadence == 0) {
  ------------------
  |  Branch (873:7): [True: 9.02k, False: 0]
  ------------------
  874|  9.02k|    s = periodic_task_scheduler_.Unregister(PeriodicTaskType::kRecordSeqnoTime);
  875|  9.02k|  } else {
  876|       |    // Before registering the periodic task, we need to be sure to fulfill two
  877|       |    // promises:
  878|       |    // 1) Any DB created with preserve/preclude options set from the beginning
  879|       |    // will get pre-allocated seqnos with pre-populated time mappings back to
  880|       |    // the times we are interested in. (This will enable future import of data
  881|       |    // while preserving rough write time. We can only do this reliably from
  882|       |    // DB::Open, as otherwise there could be a race between CreateColumnFamily
  883|       |    // and the first Write to the DB, and seqno-to-time mappings need to be
  884|       |    // monotonic.
  885|       |    // 2) In any DB, any data written after setting preserve/preclude options
  886|       |    // must have a reasonable time estimate (so that we can accurately place
  887|       |    // the data), which means at least one entry in seqno_to_time_mapping_.
  888|       |    //
  889|       |    // FIXME: We don't currently guarantee that if the first column family with
  890|       |    // that setting is added or configured after initial DB::Open but before
  891|       |    // the first user Write. Fixing this causes complications with the crash
  892|       |    // test because if DB starts without preserve/preclude option, does some
  893|       |    // user writes but all those writes are lost in crash, then re-opens with
  894|       |    // preserve/preclude option, it sees seqno==1 which looks like one of the
  895|       |    // user writes was recovered, when actually it was not.
  896|      0|    bool last_seqno_zero = GetLatestSequenceNumber() == 0;
  897|      0|    assert(!is_new_db || last_seqno_zero);
  898|      0|    if (is_new_db && last_seqno_zero) {
  ------------------
  |  Branch (898:9): [True: 0, False: 0]
  |  Branch (898:22): [True: 0, False: 0]
  ------------------
  899|       |      // Pre-allocate seqnos and pre-populate historical mapping
  900|      0|      assert(mapping_was_empty);
  901|       |
  902|       |      // We can simply modify these, before writes are allowed
  903|      0|      constexpr uint64_t kMax = kMaxSeqnoTimePairsPerSST;
  904|      0|      versions_->SetLastAllocatedSequence(kMax);
  905|      0|      versions_->SetLastPublishedSequence(kMax);
  906|      0|      versions_->SetLastSequence(kMax);
  907|       |
  908|       |      // And record in manifest, to avoid going backwards in seqno on re-open
  909|       |      // (potentially with different options). Concurrency is simple because we
  910|       |      // are in DB::Open
  911|      0|      {
  912|      0|        InstrumentedMutexLock l(&mutex_);
  913|      0|        VersionEdit edit;
  914|      0|        edit.SetLastSequence(kMax);
  915|      0|        s = versions_->LogAndApplyToDefaultColumnFamily(
  916|      0|            read_options, write_options, &edit, &mutex_,
  917|      0|            directories_.GetDbDir());
  918|      0|        if (!s.ok() && versions_->io_status().IsIOError()) {
  ------------------
  |  Branch (918:13): [True: 0, False: 0]
  |  Branch (918:24): [True: 0, False: 0]
  ------------------
  919|      0|          error_handler_.SetBGError(versions_->io_status(),
  920|      0|                                    BackgroundErrorReason::kManifestWrite);
  921|      0|        }
  922|      0|      }
  923|       |
  924|       |      // Pre-populate mappings for reserved sequence numbers.
  925|      0|      RecordSeqnoToTimeMapping(max_preserve_seconds);
  926|      0|    } else if (mapping_was_empty) {
  ------------------
  |  Branch (926:16): [True: 0, False: 0]
  ------------------
  927|      0|      if (!last_seqno_zero) {
  ------------------
  |  Branch (927:11): [True: 0, False: 0]
  ------------------
  928|       |        // Ensure at least one mapping (or log a warning)
  929|      0|        RecordSeqnoToTimeMapping(/*populate_historical_seconds=*/0);
  930|      0|      } else {
  931|       |        // FIXME (see limitation described above)
  932|      0|      }
  933|      0|    }
  934|       |
  935|      0|    s = periodic_task_scheduler_.Register(
  936|      0|        PeriodicTaskType::kRecordSeqnoTime,
  937|      0|        periodic_task_functions_.at(PeriodicTaskType::kRecordSeqnoTime),
  938|      0|        seqno_time_cadence);
  939|      0|  }
  940|       |
  941|  9.02k|  return s;
  942|  9.02k|}
_ZN7rocksdb6DBImpl27CancelPeriodicTaskSchedulerEv:
  944|  9.02k|Status DBImpl::CancelPeriodicTaskScheduler() {
  945|  9.02k|  Status s = Status::OK();
  946|  9.02k|  for (uint8_t task_type = 0;
  947|  45.1k|       task_type < static_cast<uint8_t>(PeriodicTaskType::kMax); task_type++) {
  ------------------
  |  Branch (947:8): [True: 36.1k, False: 9.02k]
  ------------------
  948|  36.1k|    s = periodic_task_scheduler_.Unregister(
  949|  36.1k|        static_cast<PeriodicTaskType>(task_type));
  950|  36.1k|    if (!s.ok()) {
  ------------------
  |  Branch (950:9): [True: 0, False: 36.1k]
  ------------------
  951|      0|      ROCKS_LOG_WARN(immutable_db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  952|      0|                     "Failed to unregister periodic task %d, status: %s",
  953|      0|                     task_type, s.ToString().c_str());
  954|      0|    }
  955|  36.1k|  }
  956|  9.02k|  return s;
  957|  9.02k|}
_ZN7rocksdb6DBImpl9DumpStatsEv:
 1126|     46|void DBImpl::DumpStats() {
 1127|     46|  TEST_SYNC_POINT("DBImpl::DumpStats:1");
 1128|     46|  std::string stats;
 1129|     46|  if (shutdown_initiated_) {
  ------------------
  |  Branch (1129:7): [True: 0, False: 46]
  ------------------
 1130|      0|    return;
 1131|      0|  }
 1132|       |
 1133|       |  // Also probe block cache(s) for problems, dump to info log
 1134|     46|  UnorderedSet<Cache*> probed_caches;
 1135|     46|  TEST_SYNC_POINT("DBImpl::DumpStats:StartRunning");
 1136|     46|  {
 1137|     46|    InstrumentedMutexLock l(&mutex_);
 1138|     46|    for (auto cfd : versions_->GetRefedColumnFamilySet()) {
  ------------------
  |  Branch (1138:19): [True: 46, False: 46]
  ------------------
 1139|     46|      if (!cfd->initialized()) {
  ------------------
  |  Branch (1139:11): [True: 0, False: 46]
  ------------------
 1140|      0|        continue;
 1141|      0|      }
 1142|       |
 1143|       |      // Release DB mutex for gathering cache entry stats. Pass over all
 1144|       |      // column families for this first so that other stats are dumped
 1145|       |      // near-atomically.
 1146|     46|      InstrumentedMutexUnlock u(&mutex_);
 1147|     46|      cfd->internal_stats()->CollectCacheEntryStats(/*foreground=*/false);
 1148|       |
 1149|       |      // Probe block cache for problems (if not already via another CF)
 1150|     46|      if (immutable_db_options_.info_log) {
  ------------------
  |  Branch (1150:11): [True: 46, False: 0]
  ------------------
 1151|     46|        auto* table_factory = cfd->ioptions()->table_factory.get();
 1152|     46|        assert(table_factory != nullptr);
 1153|     46|        Cache* cache =
 1154|     46|            table_factory->GetOptions<Cache>(TableFactory::kBlockCacheOpts());
 1155|     46|        if (cache && probed_caches.insert(cache).second) {
  ------------------
  |  Branch (1155:13): [True: 46, False: 0]
  |  Branch (1155:13): [True: 46, False: 0]
  |  Branch (1155:22): [True: 46, False: 0]
  ------------------
 1156|     46|          cache->ReportProblems(immutable_db_options_.info_log);
 1157|     46|        }
 1158|     46|      }
 1159|     46|    }
 1160|       |
 1161|     46|    const std::string* property = &DB::Properties::kDBStats;
 1162|     46|    const DBPropertyInfo* property_info = GetPropertyInfo(*property);
 1163|     46|    assert(property_info != nullptr);
 1164|     46|    assert(!property_info->need_out_of_mutex);
 1165|     46|    default_cf_internal_stats_->GetStringProperty(*property_info, *property,
 1166|     46|                                                  &stats);
 1167|       |
 1168|     46|    property = &InternalStats::kPeriodicCFStats;
 1169|     46|    property_info = GetPropertyInfo(*property);
 1170|     46|    assert(property_info != nullptr);
 1171|     46|    assert(!property_info->need_out_of_mutex);
 1172|     46|    for (auto cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (1172:19): [True: 46, False: 46]
  ------------------
 1173|     46|      if (cfd->initialized()) {
  ------------------
  |  Branch (1173:11): [True: 46, False: 0]
  ------------------
 1174|     46|        cfd->internal_stats()->GetStringProperty(*property_info, *property,
 1175|     46|                                                 &stats);
 1176|     46|      }
 1177|     46|    }
 1178|     46|  }
 1179|     46|  TEST_SYNC_POINT("DBImpl::DumpStats:2");
 1180|     46|  ROCKS_LOG_INFO(immutable_db_options_.info_log,
  ------------------
  |  |   39|     46|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|     46|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|     46|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|     46|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|     46|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1181|     46|                 "------- DUMPING STATS -------");
 1182|     46|  ROCKS_LOG_INFO(immutable_db_options_.info_log, "%s", stats.c_str());
  ------------------
  |  |   39|     46|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|     46|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|     46|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|     46|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|     46|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1183|     46|  if (immutable_db_options_.dump_malloc_stats) {
  ------------------
  |  Branch (1183:7): [True: 0, False: 46]
  ------------------
 1184|      0|    stats.clear();
 1185|      0|    DumpMallocStats(&stats);
 1186|      0|    if (!stats.empty()) {
  ------------------
  |  Branch (1186:9): [True: 0, False: 0]
  ------------------
 1187|      0|      ROCKS_LOG_INFO(immutable_db_options_.info_log,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1188|      0|                     "------- Malloc STATS -------");
 1189|      0|      ROCKS_LOG_INFO(immutable_db_options_.info_log, "%s", stats.c_str());
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1190|      0|    }
 1191|      0|  }
 1192|       |
 1193|     46|  PrintStatistics();
 1194|     46|}
_ZN7rocksdb6DBImpl12FlushInfoLogEv:
 1200|    902|void DBImpl::FlushInfoLog() {
 1201|    902|  if (shutdown_initiated_) {
  ------------------
  |  Branch (1201:7): [True: 0, False: 902]
  ------------------
 1202|      0|    return;
 1203|      0|  }
 1204|    902|  TEST_SYNC_POINT("DBImpl::FlushInfoLog:StartRunning");
 1205|    902|  LogFlush(immutable_db_options_.info_log);
 1206|    902|}
_ZN7rocksdb6DBImpl16WALBufferIsEmptyEv:
 1545|  9.02k|bool DBImpl::WALBufferIsEmpty() {
 1546|  9.02k|  InstrumentedMutexLock l(&log_write_mutex_);
 1547|  9.02k|  log::Writer* cur_log_writer = logs_.back().writer;
 1548|  9.02k|  auto res = cur_log_writer->BufferIsEmpty();
 1549|  9.02k|  return res;
 1550|  9.02k|}
_ZN7rocksdb6DBImpl19NewInternalIteratorERKNS_11ReadOptionsEPNS_16ColumnFamilyDataEPNS_12SuperVersionEPNS_5ArenaEmbPNS_18ArenaWrappedDBIterE:
 2053|  4.51k|    bool allow_unprepared_value, ArenaWrappedDBIter* db_iter) {
 2054|  4.51k|  InternalIterator* internal_iter;
 2055|  4.51k|  assert(arena != nullptr);
 2056|       |  // Need to create internal iterator from the arena.
 2057|  4.51k|  MergeIteratorBuilder merge_iter_builder(
 2058|  4.51k|      &cfd->internal_comparator(), arena,
 2059|  4.51k|      !read_options.total_order_seek &&
  ------------------
  |  Branch (2059:7): [True: 4.51k, False: 0]
  ------------------
 2060|  4.51k|          super_version->mutable_cf_options.prefix_extractor != nullptr,
  ------------------
  |  Branch (2060:11): [True: 0, False: 4.51k]
  ------------------
 2061|  4.51k|      read_options.iterate_upper_bound);
 2062|       |  // Collect iterator for mutable memtable
 2063|  4.51k|  auto mem_iter = super_version->mem->NewIterator(
 2064|  4.51k|      read_options, super_version->GetSeqnoToTimeMapping(), arena);
 2065|  4.51k|  Status s;
 2066|  4.51k|  if (!read_options.ignore_range_deletions) {
  ------------------
  |  Branch (2066:7): [True: 4.51k, False: 0]
  ------------------
 2067|  4.51k|    std::unique_ptr<TruncatedRangeDelIterator> mem_tombstone_iter;
 2068|  4.51k|    auto range_del_iter = super_version->mem->NewRangeTombstoneIterator(
 2069|  4.51k|        read_options, sequence, false /* immutable_memtable */);
 2070|  4.51k|    if (range_del_iter == nullptr || range_del_iter->empty()) {
  ------------------
  |  Branch (2070:9): [True: 4.51k, False: 0]
  |  Branch (2070:38): [True: 0, False: 0]
  ------------------
 2071|  4.51k|      delete range_del_iter;
 2072|  4.51k|    } else {
 2073|      0|      mem_tombstone_iter = std::make_unique<TruncatedRangeDelIterator>(
 2074|      0|          std::unique_ptr<FragmentedRangeTombstoneIterator>(range_del_iter),
 2075|      0|          &cfd->ioptions()->internal_comparator, nullptr /* smallest */,
 2076|      0|          nullptr /* largest */);
 2077|      0|    }
 2078|  4.51k|    merge_iter_builder.AddPointAndTombstoneIterator(
 2079|  4.51k|        mem_iter, std::move(mem_tombstone_iter));
 2080|  4.51k|  } else {
 2081|      0|    merge_iter_builder.AddIterator(mem_iter);
 2082|      0|  }
 2083|       |
 2084|       |  // Collect all needed child iterators for immutable memtables
 2085|  4.51k|  if (s.ok()) {
  ------------------
  |  Branch (2085:7): [True: 4.51k, False: 0]
  ------------------
 2086|  4.51k|    super_version->imm->AddIterators(
 2087|  4.51k|        read_options, super_version->GetSeqnoToTimeMapping(),
 2088|  4.51k|        &merge_iter_builder, !read_options.ignore_range_deletions);
 2089|  4.51k|  }
 2090|  4.51k|  TEST_SYNC_POINT_CALLBACK("DBImpl::NewInternalIterator:StatusCallback", &s);
 2091|  4.51k|  if (s.ok()) {
  ------------------
  |  Branch (2091:7): [True: 4.51k, False: 0]
  ------------------
 2092|       |    // Collect iterators for files in L0 - Ln
 2093|  4.51k|    if (read_options.read_tier != kMemtableTier) {
  ------------------
  |  Branch (2093:9): [True: 4.51k, False: 0]
  ------------------
 2094|  4.51k|      super_version->current->AddIterators(read_options, file_options_,
 2095|  4.51k|                                           &merge_iter_builder,
 2096|  4.51k|                                           allow_unprepared_value);
 2097|  4.51k|    }
 2098|  4.51k|    internal_iter = merge_iter_builder.Finish(
 2099|  4.51k|        read_options.ignore_range_deletions ? nullptr : db_iter);
  ------------------
  |  Branch (2099:9): [True: 0, False: 4.51k]
  ------------------
 2100|  4.51k|    SuperVersionHandle* cleanup = new SuperVersionHandle(
 2101|  4.51k|        this, &mutex_, super_version,
 2102|  4.51k|        read_options.background_purge_on_iterator_cleanup ||
  ------------------
  |  Branch (2102:9): [True: 0, False: 4.51k]
  ------------------
 2103|  4.51k|            immutable_db_options_.avoid_unnecessary_blocking_io);
  ------------------
  |  Branch (2103:13): [True: 0, False: 4.51k]
  ------------------
 2104|  4.51k|    internal_iter->RegisterCleanup(CleanupSuperVersionHandle, cleanup, nullptr);
 2105|       |
 2106|  4.51k|    return internal_iter;
 2107|  4.51k|  } else {
 2108|      0|    CleanupSuperVersion(super_version);
 2109|      0|  }
 2110|      0|  return NewErrorInternalIterator<Slice>(s, arena);
 2111|  4.51k|}
_ZNK7rocksdb6DBImpl19DefaultColumnFamilyEv:
 2113|  1.36M|ColumnFamilyHandle* DBImpl::DefaultColumnFamily() const {
 2114|  1.36M|  return default_cf_handle_;
 2115|  1.36M|}
_ZN7rocksdb6DBImpl11NewIteratorERKNS_11ReadOptionsEPNS_18ColumnFamilyHandleE:
 3781|  4.51k|                              ColumnFamilyHandle* column_family) {
 3782|  4.51k|  if (_read_options.io_activity != Env::IOActivity::kUnknown &&
  ------------------
  |  Branch (3782:7): [True: 0, False: 4.51k]
  ------------------
 3783|  4.51k|      _read_options.io_activity != Env::IOActivity::kDBIterator) {
  ------------------
  |  Branch (3783:7): [True: 0, False: 0]
  ------------------
 3784|      0|    return NewErrorIterator(Status::InvalidArgument(
 3785|      0|        "Can only call NewIterator with `ReadOptions::io_activity` is "
 3786|      0|        "`Env::IOActivity::kUnknown` or `Env::IOActivity::kDBIterator`"));
 3787|      0|  }
 3788|  4.51k|  ReadOptions read_options(_read_options);
 3789|  4.51k|  if (read_options.io_activity == Env::IOActivity::kUnknown) {
  ------------------
  |  Branch (3789:7): [True: 4.51k, False: 0]
  ------------------
 3790|  4.51k|    read_options.io_activity = Env::IOActivity::kDBIterator;
 3791|  4.51k|  }
 3792|       |
 3793|  4.51k|  if (read_options.managed) {
  ------------------
  |  Branch (3793:7): [True: 0, False: 4.51k]
  ------------------
 3794|      0|    return NewErrorIterator(
 3795|      0|        Status::NotSupported("Managed iterator is not supported anymore."));
 3796|      0|  }
 3797|  4.51k|  Iterator* result = nullptr;
 3798|  4.51k|  if (read_options.read_tier == kPersistedTier) {
  ------------------
  |  Branch (3798:7): [True: 0, False: 4.51k]
  ------------------
 3799|      0|    return NewErrorIterator(Status::NotSupported(
 3800|      0|        "ReadTier::kPersistedData is not yet supported in iterators."));
 3801|      0|  }
 3802|  4.51k|  assert(column_family);
 3803|       |
 3804|  4.51k|  if (read_options.timestamp) {
  ------------------
  |  Branch (3804:7): [True: 0, False: 4.51k]
  ------------------
 3805|      0|    const Status s =
 3806|      0|        FailIfTsMismatchCf(column_family, *(read_options.timestamp));
 3807|      0|    if (!s.ok()) {
  ------------------
  |  Branch (3807:9): [True: 0, False: 0]
  ------------------
 3808|      0|      return NewErrorIterator(s);
 3809|      0|    }
 3810|  4.51k|  } else {
 3811|  4.51k|    const Status s = FailIfCfHasTs(column_family);
 3812|  4.51k|    if (!s.ok()) {
  ------------------
  |  Branch (3812:9): [True: 0, False: 4.51k]
  ------------------
 3813|      0|      return NewErrorIterator(s);
 3814|      0|    }
 3815|  4.51k|  }
 3816|       |
 3817|  4.51k|  auto cfh = static_cast_with_check<ColumnFamilyHandleImpl>(column_family);
 3818|  4.51k|  assert(cfh != nullptr);
 3819|  4.51k|  ColumnFamilyData* cfd = cfh->cfd();
 3820|  4.51k|  assert(cfd != nullptr);
 3821|  4.51k|  SuperVersion* sv = cfd->GetReferencedSuperVersion(this);
 3822|  4.51k|  if (read_options.timestamp && read_options.timestamp->size() > 0) {
  ------------------
  |  Branch (3822:7): [True: 0, False: 4.51k]
  |  Branch (3822:33): [True: 0, False: 0]
  ------------------
 3823|      0|    const Status s =
 3824|      0|        FailIfReadCollapsedHistory(cfd, sv, *(read_options.timestamp));
 3825|      0|    if (!s.ok()) {
  ------------------
  |  Branch (3825:9): [True: 0, False: 0]
  ------------------
 3826|      0|      CleanupSuperVersion(sv);
 3827|      0|      return NewErrorIterator(s);
 3828|      0|    }
 3829|      0|  }
 3830|  4.51k|  if (read_options.tailing) {
  ------------------
  |  Branch (3830:7): [True: 0, False: 4.51k]
  ------------------
 3831|      0|    auto iter = new ForwardIterator(this, read_options, cfd, sv,
 3832|      0|                                    /* allow_unprepared_value */ true);
 3833|      0|    result = NewDBIterator(
 3834|      0|        env_, read_options, *cfd->ioptions(), sv->mutable_cf_options,
 3835|      0|        cfd->user_comparator(), iter, sv->current, kMaxSequenceNumber,
 3836|      0|        sv->mutable_cf_options.max_sequential_skip_in_iterations,
 3837|      0|        nullptr /* read_callback */, cfh);
 3838|  4.51k|  } else {
 3839|       |    // Note: no need to consider the special case of
 3840|       |    // last_seq_same_as_publish_seq_==false since NewIterator is overridden in
 3841|       |    // WritePreparedTxnDB
 3842|  4.51k|    result = NewIteratorImpl(read_options, cfh, sv,
 3843|  4.51k|                             (read_options.snapshot != nullptr)
  ------------------
  |  Branch (3843:30): [True: 0, False: 4.51k]
  ------------------
 3844|  4.51k|                                 ? read_options.snapshot->GetSequenceNumber()
 3845|  4.51k|                                 : kMaxSequenceNumber,
 3846|  4.51k|                             nullptr /* read_callback */);
 3847|  4.51k|  }
 3848|  4.51k|  return result;
 3849|  4.51k|}
_ZN7rocksdb6DBImpl15NewIteratorImplERKNS_11ReadOptionsEPNS_22ColumnFamilyHandleImplEPNS_12SuperVersionEmPNS_12ReadCallbackEbb:
 3854|  4.51k|    bool expose_blob_index, bool allow_refresh) {
 3855|  4.51k|  TEST_SYNC_POINT("DBImpl::NewIterator:1");
 3856|  4.51k|  TEST_SYNC_POINT("DBImpl::NewIterator:2");
 3857|       |
 3858|  4.51k|  if (snapshot == kMaxSequenceNumber) {
  ------------------
  |  Branch (3858:7): [True: 4.51k, False: 0]
  ------------------
 3859|       |    // Note that the snapshot is assigned AFTER referencing the super
 3860|       |    // version because otherwise a flush happening in between may compact away
 3861|       |    // data for the snapshot, so the reader would see neither data that was be
 3862|       |    // visible to the snapshot before compaction nor the newer data inserted
 3863|       |    // afterwards.
 3864|       |    // Note that the super version might not contain all the data available
 3865|       |    // to this snapshot, but in that case it can see all the data in the
 3866|       |    // super version, which is a valid consistent state after the user
 3867|       |    // calls NewIterator().
 3868|  4.51k|    snapshot = versions_->LastSequence();
 3869|  4.51k|    TEST_SYNC_POINT("DBImpl::NewIterator:3");
 3870|  4.51k|    TEST_SYNC_POINT("DBImpl::NewIterator:4");
 3871|  4.51k|  }
 3872|       |
 3873|       |  // Try to generate a DB iterator tree in continuous memory area to be
 3874|       |  // cache friendly. Here is an example of result:
 3875|       |  // +-------------------------------+
 3876|       |  // |                               |
 3877|       |  // | ArenaWrappedDBIter            |
 3878|       |  // |  +                            |
 3879|       |  // |  +---> Inner Iterator   ------------+
 3880|       |  // |  |                            |     |
 3881|       |  // |  |    +-- -- -- -- -- -- -- --+     |
 3882|       |  // |  +--- | Arena                 |     |
 3883|       |  // |       |                       |     |
 3884|       |  // |          Allocated Memory:    |     |
 3885|       |  // |       |   +-------------------+     |
 3886|       |  // |       |   | DBIter            | <---+
 3887|       |  // |           |  +                |
 3888|       |  // |       |   |  +-> iter_  ------------+
 3889|       |  // |       |   |                   |     |
 3890|       |  // |       |   +-------------------+     |
 3891|       |  // |       |   | MergingIterator   | <---+
 3892|       |  // |           |  +                |
 3893|       |  // |       |   |  +->child iter1  ------------+
 3894|       |  // |       |   |  |                |          |
 3895|       |  // |           |  +->child iter2  ----------+ |
 3896|       |  // |       |   |  |                |        | |
 3897|       |  // |       |   |  +->child iter3  --------+ | |
 3898|       |  // |           |                   |      | | |
 3899|       |  // |       |   +-------------------+      | | |
 3900|       |  // |       |   | Iterator1         | <--------+
 3901|       |  // |       |   +-------------------+      | |
 3902|       |  // |       |   | Iterator2         | <------+
 3903|       |  // |       |   +-------------------+      |
 3904|       |  // |       |   | Iterator3         | <----+
 3905|       |  // |       |   +-------------------+
 3906|       |  // |       |                       |
 3907|       |  // +-------+-----------------------+
 3908|       |  //
 3909|       |  // ArenaWrappedDBIter inlines an arena area where all the iterators in
 3910|       |  // the iterator tree are allocated in the order of being accessed when
 3911|       |  // querying.
 3912|       |  // Laying out the iterators in the order of being accessed makes it more
 3913|       |  // likely that any iterator pointer is close to the iterator it points to so
 3914|       |  // that they are likely to be in the same cache line and/or page.
 3915|  4.51k|  ArenaWrappedDBIter* db_iter = NewArenaWrappedDbIterator(
 3916|  4.51k|      env_, read_options, *cfh->cfd()->ioptions(), sv->mutable_cf_options,
 3917|  4.51k|      sv->current, snapshot,
 3918|  4.51k|      sv->mutable_cf_options.max_sequential_skip_in_iterations,
 3919|  4.51k|      sv->version_number, read_callback, cfh, expose_blob_index, allow_refresh);
 3920|       |
 3921|  4.51k|  InternalIterator* internal_iter = NewInternalIterator(
 3922|  4.51k|      db_iter->GetReadOptions(), cfh->cfd(), sv, db_iter->GetArena(), snapshot,
 3923|  4.51k|      /* allow_unprepared_value */ true, db_iter);
 3924|  4.51k|  db_iter->SetIterUnderDBIter(internal_iter);
 3925|       |
 3926|  4.51k|  return db_iter;
 3927|  4.51k|}
_ZN7rocksdb6DBImpl36ReleaseTimestampedSnapshotsOlderThanEmPm:
 4076|  9.02k|                                                  size_t* remaining_total_ss) {
 4077|  9.02k|  autovector<std::shared_ptr<const SnapshotImpl>> snapshots_to_release;
 4078|  9.02k|  {
 4079|  9.02k|    InstrumentedMutexLock lock_guard(&mutex_);
 4080|  9.02k|    timestamped_snapshots_.ReleaseSnapshotsOlderThan(ts, snapshots_to_release);
 4081|  9.02k|  }
 4082|  9.02k|  snapshots_to_release.clear();
 4083|       |
 4084|  9.02k|  if (remaining_total_ss) {
  ------------------
  |  Branch (4084:7): [True: 9.02k, False: 0]
  ------------------
 4085|  9.02k|    InstrumentedMutexLock lock_guard(&mutex_);
 4086|  9.02k|    *remaining_total_ss = static_cast<size_t>(snapshots_.count());
 4087|  9.02k|  }
 4088|  9.02k|}
_ZNK7rocksdb6DBImpl7GetNameEv:
 4374|  49.6k|const std::string& DBImpl::GetName() const { return dbname_; }
_ZNK7rocksdb6DBImpl6GetEnvEv:
 4376|  27.0k|Env* DBImpl::GetEnv() const { return env_; }
_ZN7rocksdb6DBImpl40CaptureCurrentFileNumberInPendingOutputsEv:
 4738|  4.48k|DBImpl::CaptureCurrentFileNumberInPendingOutputs() {
 4739|       |  // We need to remember the iterator of our insert, because after the
 4740|       |  // background job is done, we need to remove that element from
 4741|       |  // pending_outputs_.
 4742|  4.48k|  pending_outputs_.push_back(versions_->current_next_file_number());
 4743|  4.48k|  auto pending_outputs_inserted_elem = pending_outputs_.end();
 4744|  4.48k|  --pending_outputs_inserted_elem;
 4745|  4.48k|  return pending_outputs_inserted_elem;
 4746|  4.48k|}
_ZN7rocksdb6DBImpl35ReleaseFileNumberFromPendingOutputsERNSt3__110unique_ptrINS1_15__list_iteratorImPvEENS1_14default_deleteIS5_EEEE:
 4749|  4.48k|    std::unique_ptr<std::list<uint64_t>::iterator>& v) {
 4750|  4.48k|  if (v.get() != nullptr) {
  ------------------
  |  Branch (4750:7): [True: 4.48k, False: 0]
  ------------------
 4751|  4.48k|    pending_outputs_.erase(*v.get());
 4752|  4.48k|    v.reset();
 4753|  4.48k|  }
 4754|  4.48k|}
_ZN7rocksdb6DBImpl26GetAllColumnFamilyMetaDataEPNSt3__16vectorINS_20ColumnFamilyMetaDataENS1_9allocatorIS3_EEEE:
 5025|  9.02k|    std::vector<ColumnFamilyMetaData>* metadata) {
 5026|  9.02k|  InstrumentedMutexLock l(&mutex_);
 5027|  9.02k|  for (auto cfd : *(versions_->GetColumnFamilySet())) {
  ------------------
  |  Branch (5027:17): [True: 9.02k, False: 9.02k]
  ------------------
 5028|  9.02k|    {
 5029|  9.02k|      metadata->emplace_back();
 5030|  9.02k|      cfd->current()->GetColumnFamilyMetaData(&metadata->back());
 5031|  9.02k|    }
 5032|  9.02k|  }
 5033|  9.02k|}
_ZN7rocksdb6DBImpl16CheckConsistencyEv:
 5035|  9.02k|Status DBImpl::CheckConsistency() {
 5036|  9.02k|  mutex_.AssertHeld();
 5037|  9.02k|  std::vector<LiveFileMetaData> metadata;
 5038|  9.02k|  versions_->GetLiveFilesMetaData(&metadata);
 5039|  9.02k|  TEST_SYNC_POINT("DBImpl::CheckConsistency:AfterGetLiveFilesMetaData");
 5040|       |
 5041|  9.02k|  std::string corruption_messages;
 5042|       |
 5043|  9.02k|  if (immutable_db_options_.skip_checking_sst_file_sizes_on_db_open) {
  ------------------
  |  Branch (5043:7): [True: 0, False: 9.02k]
  ------------------
 5044|       |    // Instead of calling GetFileSize() for each expected file, call
 5045|       |    // GetChildren() for the DB directory and check that all expected files
 5046|       |    // are listed, without checking their sizes.
 5047|       |    // Since sst files might be in different directories, do it for each
 5048|       |    // directory separately.
 5049|      0|    std::map<std::string, std::vector<std::string>> files_by_directory;
 5050|      0|    for (const auto& md : metadata) {
  ------------------
  |  Branch (5050:25): [True: 0, False: 0]
  ------------------
 5051|       |      // md.name has a leading "/". Remove it.
 5052|      0|      std::string fname = md.name;
 5053|      0|      if (!fname.empty() && fname[0] == '/') {
  ------------------
  |  Branch (5053:11): [True: 0, False: 0]
  |  Branch (5053:29): [True: 0, False: 0]
  ------------------
 5054|      0|        fname = fname.substr(1);
 5055|      0|      }
 5056|      0|      files_by_directory[md.db_path].push_back(fname);
 5057|      0|    }
 5058|       |
 5059|      0|    IOOptions io_opts;
 5060|      0|    io_opts.do_not_recurse = true;
 5061|      0|    for (const auto& dir_files : files_by_directory) {
  ------------------
  |  Branch (5061:32): [True: 0, False: 0]
  ------------------
 5062|      0|      std::string directory = dir_files.first;
 5063|      0|      std::vector<std::string> existing_files;
 5064|      0|      Status s = fs_->GetChildren(directory, io_opts, &existing_files,
 5065|      0|                                  /*IODebugContext*=*/nullptr);
 5066|      0|      if (!s.ok()) {
  ------------------
  |  Branch (5066:11): [True: 0, False: 0]
  ------------------
 5067|      0|        corruption_messages +=
 5068|      0|            "Can't list files in " + directory + ": " + s.ToString() + "\n";
 5069|      0|        continue;
 5070|      0|      }
 5071|      0|      std::sort(existing_files.begin(), existing_files.end());
 5072|       |
 5073|      0|      for (const std::string& fname : dir_files.second) {
  ------------------
  |  Branch (5073:37): [True: 0, False: 0]
  ------------------
 5074|      0|        if (!std::binary_search(existing_files.begin(), existing_files.end(),
  ------------------
  |  Branch (5074:13): [True: 0, False: 0]
  |  Branch (5074:13): [True: 0, False: 0]
  ------------------
 5075|      0|                                fname) &&
 5076|      0|            !std::binary_search(existing_files.begin(), existing_files.end(),
  ------------------
  |  Branch (5076:13): [True: 0, False: 0]
  ------------------
 5077|      0|                                Rocks2LevelTableFileName(fname))) {
 5078|      0|          corruption_messages +=
 5079|      0|              "Missing sst file " + fname + " in " + directory + "\n";
 5080|      0|        }
 5081|      0|      }
 5082|      0|    }
 5083|  9.02k|  } else {
 5084|  9.02k|    for (const auto& md : metadata) {
  ------------------
  |  Branch (5084:25): [True: 0, False: 9.02k]
  ------------------
 5085|       |      // md.name has a leading "/".
 5086|      0|      std::string file_path = md.db_path + md.name;
 5087|       |
 5088|      0|      uint64_t fsize = 0;
 5089|      0|      TEST_SYNC_POINT("DBImpl::CheckConsistency:BeforeGetFileSize");
 5090|      0|      Status s = env_->GetFileSize(file_path, &fsize);
 5091|      0|      if (!s.ok() &&
  ------------------
  |  Branch (5091:11): [True: 0, False: 0]
  |  Branch (5091:11): [True: 0, False: 0]
  ------------------
 5092|      0|          env_->GetFileSize(Rocks2LevelTableFileName(file_path), &fsize).ok()) {
  ------------------
  |  Branch (5092:11): [True: 0, False: 0]
  ------------------
 5093|      0|        s = Status::OK();
 5094|      0|      }
 5095|      0|      if (!s.ok()) {
  ------------------
  |  Branch (5095:11): [True: 0, False: 0]
  ------------------
 5096|      0|        corruption_messages +=
 5097|      0|            "Can't access " + md.name + ": " + s.ToString() + "\n";
 5098|      0|      } else if (fsize != md.size) {
  ------------------
  |  Branch (5098:18): [True: 0, False: 0]
  ------------------
 5099|      0|        corruption_messages += "Sst file size mismatch: " + file_path +
 5100|      0|                               ". Size recorded in manifest " +
 5101|      0|                               std::to_string(md.size) + ", actual size " +
 5102|      0|                               std::to_string(fsize) + "\n";
 5103|      0|      }
 5104|      0|    }
 5105|  9.02k|  }
 5106|       |
 5107|  9.02k|  if (corruption_messages.size() == 0) {
  ------------------
  |  Branch (5107:7): [True: 9.02k, False: 0]
  ------------------
 5108|  9.02k|    return Status::OK();
 5109|  9.02k|  } else {
 5110|      0|    return Status::Corruption(corruption_messages);
 5111|      0|  }
 5112|  9.02k|}
_ZNK7rocksdb6DBImpl29GetDbIdentityFromIdentityFileEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 5119|  9.02k|Status DBImpl::GetDbIdentityFromIdentityFile(std::string* identity) const {
 5120|  9.02k|  std::string idfilename = IdentityFileName(dbname_);
 5121|  9.02k|  const FileOptions soptions;
 5122|       |
 5123|  9.02k|  Status s = ReadFileToString(fs_.get(), idfilename, identity);
 5124|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (5124:7): [True: 0, False: 9.02k]
  ------------------
 5125|      0|    return s;
 5126|      0|  }
 5127|       |
 5128|       |  // If last character is '\n' remove it from identity. (Old implementations
 5129|       |  // of Env::GenerateUniqueId() would include a trailing '\n'.)
 5130|  9.02k|  if (identity->size() > 0 && identity->back() == '\n') {
  ------------------
  |  Branch (5130:7): [True: 9.02k, False: 0]
  |  Branch (5130:31): [True: 0, False: 9.02k]
  ------------------
 5131|      0|    identity->pop_back();
 5132|      0|  }
 5133|  9.02k|  return s;
 5134|  9.02k|}
_ZN7rocksdb6DBImpl19GenerateDbSessionIdEPNS_3EnvE:
 5150|  9.02k|std::string DBImpl::GenerateDbSessionId(Env*) {
 5151|       |  // See SemiStructuredUniqueIdGen for its desirable properties.
 5152|  9.02k|  auto gen = DbSessionIdGen();
 5153|       |
 5154|  9.02k|  uint64_t lo, hi;
 5155|  9.02k|  gen->GenerateNext(&hi, &lo);
 5156|  9.02k|  if (lo == 0) {
  ------------------
  |  Branch (5156:7): [True: 0, False: 9.02k]
  ------------------
 5157|       |    // Avoid emitting session ID with lo==0, so that SST unique
 5158|       |    // IDs can be more easily ensured non-zero
 5159|      0|    gen->GenerateNext(&hi, &lo);
 5160|      0|    assert(lo != 0);
 5161|      0|  }
 5162|  9.02k|  return EncodeSessionId(hi, lo);
 5163|  9.02k|}
_ZN7rocksdb6DBImpl14SetDbSessionIdEv:
 5165|  9.02k|void DBImpl::SetDbSessionId() {
 5166|  9.02k|  db_session_id_ = GenerateDbSessionId(env_);
 5167|  9.02k|  TEST_SYNC_POINT_CALLBACK("DBImpl::SetDbSessionId", &db_session_id_);
 5168|  9.02k|}
_ZN7rocksdb2DBD2Ev:
 5208|  9.02k|DB::~DB() = default;
_ZN7rocksdb6DBImpl5CloseEv:
 5210|  9.02k|Status DBImpl::Close() {
 5211|  9.02k|  InstrumentedMutexLock closing_lock_guard(&closing_mutex_);
 5212|  9.02k|  if (closed_) {
  ------------------
  |  Branch (5212:7): [True: 0, False: 9.02k]
  ------------------
 5213|      0|    return closing_status_;
 5214|      0|  }
 5215|       |
 5216|  9.02k|  {
 5217|  9.02k|    const Status s = MaybeReleaseTimestampedSnapshotsAndCheck();
 5218|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (5218:9): [True: 0, False: 9.02k]
  ------------------
 5219|      0|      return s;
 5220|      0|    }
 5221|  9.02k|  }
 5222|       |
 5223|  9.02k|  closing_status_ = CloseImpl();
 5224|  9.02k|  closed_ = true;
 5225|  9.02k|  return closing_status_;
 5226|  9.02k|}
_ZN7rocksdb8SnapshotD2Ev:
 5235|  9.02k|Snapshot::~Snapshot() = default;
_ZN7rocksdb9DestroyDBERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_7OptionsERKNS0_6vectorINS_22ColumnFamilyDescriptorENS4_ISD_EEEE:
 5238|  4.51k|                 const std::vector<ColumnFamilyDescriptor>& column_families) {
 5239|  4.51k|  ImmutableDBOptions soptions(SanitizeOptions(dbname, options));
 5240|  4.51k|  Env* env = soptions.env;
 5241|  4.51k|  std::vector<std::string> filenames;
 5242|  4.51k|  bool wal_in_db_path = soptions.IsWalDirSameAsDBPath();
 5243|       |
 5244|       |  // Reset the logger because it holds a handle to the
 5245|       |  // log file and prevents cleanup and directory removal
 5246|  4.51k|  soptions.info_log.reset();
 5247|  4.51k|  IOOptions io_opts;
 5248|       |  // Ignore error in case directory does not exist
 5249|  4.51k|  soptions.fs
 5250|  4.51k|      ->GetChildren(dbname, io_opts, &filenames,
 5251|  4.51k|                    /*IODebugContext*=*/nullptr)
 5252|  4.51k|      .PermitUncheckedError();
 5253|       |
 5254|  4.51k|  FileLock* lock;
 5255|  4.51k|  const std::string lockname = LockFileName(dbname);
 5256|  4.51k|  Status result = env->LockFile(lockname, &lock);
 5257|  4.51k|  if (result.ok()) {
  ------------------
  |  Branch (5257:7): [True: 4.51k, False: 0]
  ------------------
 5258|  4.51k|    uint64_t number;
 5259|  4.51k|    FileType type;
 5260|  4.51k|    InfoLogPrefix info_log_prefix(!soptions.db_log_dir.empty(), dbname);
 5261|  49.6k|    for (const auto& fname : filenames) {
  ------------------
  |  Branch (5261:28): [True: 49.6k, False: 4.51k]
  ------------------
 5262|  49.6k|      if (ParseFileName(fname, &number, info_log_prefix.prefix, &type) &&
  ------------------
  |  Branch (5262:11): [True: 49.6k, False: 0]
  ------------------
 5263|  49.6k|          type != kDBLockFile) {  // Lock file will be deleted at end
  ------------------
  |  Branch (5263:11): [True: 45.1k, False: 4.51k]
  ------------------
 5264|  45.1k|        Status del;
 5265|  45.1k|        std::string path_to_delete = dbname + "/" + fname;
 5266|  45.1k|        if (type == kMetaDatabase) {
  ------------------
  |  Branch (5266:13): [True: 0, False: 45.1k]
  ------------------
 5267|      0|          del = DestroyDB(path_to_delete, options);
 5268|  45.1k|        } else if (type == kTableFile || type == kWalFile ||
  ------------------
  |  Branch (5268:20): [True: 4.48k, False: 40.6k]
  |  Branch (5268:42): [True: 4.51k, False: 36.1k]
  ------------------
 5269|  45.1k|                   type == kBlobFile) {
  ------------------
  |  Branch (5269:20): [True: 0, False: 36.1k]
  ------------------
 5270|  8.99k|          del = DeleteDBFile(
 5271|  8.99k|              &soptions, path_to_delete, dbname,
 5272|  8.99k|              /*force_bg=*/false,
 5273|  8.99k|              /*force_fg=*/(type == kWalFile) ? !wal_in_db_path : false);
  ------------------
  |  Branch (5273:28): [True: 4.51k, False: 4.48k]
  ------------------
 5274|  36.1k|        } else {
 5275|  36.1k|          del = env->DeleteFile(path_to_delete);
 5276|  36.1k|        }
 5277|  45.1k|        if (!del.ok() && result.ok()) {
  ------------------
  |  Branch (5277:13): [True: 0, False: 45.1k]
  |  Branch (5277:26): [True: 0, False: 0]
  ------------------
 5278|      0|          result = del;
 5279|      0|        }
 5280|  45.1k|      }
 5281|  49.6k|    }
 5282|       |
 5283|  4.51k|    std::set<std::string> paths;
 5284|  4.51k|    for (const DbPath& db_path : options.db_paths) {
  ------------------
  |  Branch (5284:32): [True: 0, False: 4.51k]
  ------------------
 5285|      0|      paths.insert(db_path.path);
 5286|      0|    }
 5287|  4.51k|    for (const ColumnFamilyDescriptor& cf : column_families) {
  ------------------
  |  Branch (5287:43): [True: 0, False: 4.51k]
  ------------------
 5288|      0|      for (const DbPath& cf_path : cf.options.cf_paths) {
  ------------------
  |  Branch (5288:34): [True: 0, False: 0]
  ------------------
 5289|      0|        paths.insert(cf_path.path);
 5290|      0|      }
 5291|      0|    }
 5292|       |
 5293|  4.51k|    for (const auto& path : paths) {
  ------------------
  |  Branch (5293:27): [True: 0, False: 4.51k]
  ------------------
 5294|      0|      if (soptions.fs
  ------------------
  |  Branch (5294:11): [True: 0, False: 0]
  ------------------
 5295|      0|              ->GetChildren(path, io_opts, &filenames,
 5296|      0|                            /*IODebugContext*=*/nullptr)
 5297|      0|              .ok()) {
 5298|      0|        for (const auto& fname : filenames) {
  ------------------
  |  Branch (5298:32): [True: 0, False: 0]
  ------------------
 5299|      0|          if (ParseFileName(fname, &number, &type) &&
  ------------------
  |  Branch (5299:15): [True: 0, False: 0]
  ------------------
 5300|      0|              (type == kTableFile ||
  ------------------
  |  Branch (5300:16): [True: 0, False: 0]
  ------------------
 5301|      0|               type == kBlobFile)) {  // Lock file will be deleted at end
  ------------------
  |  Branch (5301:16): [True: 0, False: 0]
  ------------------
 5302|      0|            std::string file_path = path + "/" + fname;
 5303|      0|            Status del = DeleteDBFile(&soptions, file_path, dbname,
 5304|      0|                                      /*force_bg=*/false, /*force_fg=*/false);
 5305|      0|            if (!del.ok() && result.ok()) {
  ------------------
  |  Branch (5305:17): [True: 0, False: 0]
  |  Branch (5305:30): [True: 0, False: 0]
  ------------------
 5306|      0|              result = del;
 5307|      0|            }
 5308|      0|          }
 5309|      0|        }
 5310|       |        // TODO: Should we return an error if we cannot delete the directory?
 5311|      0|        env->DeleteDir(path).PermitUncheckedError();
 5312|      0|      }
 5313|      0|    }
 5314|       |
 5315|  4.51k|    std::vector<std::string> walDirFiles;
 5316|  4.51k|    std::string archivedir = ArchivalDirectory(dbname);
 5317|  4.51k|    bool wal_dir_exists = false;
 5318|  4.51k|    if (!soptions.IsWalDirSameAsDBPath(dbname)) {
  ------------------
  |  Branch (5318:9): [True: 0, False: 4.51k]
  ------------------
 5319|      0|      wal_dir_exists =
 5320|      0|          soptions.fs
 5321|      0|              ->GetChildren(soptions.wal_dir, io_opts, &walDirFiles,
 5322|      0|                            /*IODebugContext*=*/nullptr)
 5323|      0|              .ok();
 5324|      0|      archivedir = ArchivalDirectory(soptions.wal_dir);
 5325|      0|    }
 5326|       |
 5327|       |    // Archive dir may be inside wal dir or dbname and should be
 5328|       |    // processed and removed before those otherwise we have issues
 5329|       |    // removing them
 5330|  4.51k|    std::vector<std::string> archiveFiles;
 5331|  4.51k|    if (soptions.fs
  ------------------
  |  Branch (5331:9): [True: 0, False: 4.51k]
  ------------------
 5332|  4.51k|            ->GetChildren(archivedir, io_opts, &archiveFiles,
 5333|  4.51k|                          /*IODebugContext*=*/nullptr)
 5334|  4.51k|            .ok()) {
 5335|       |      // Delete archival files.
 5336|      0|      for (const auto& file : archiveFiles) {
  ------------------
  |  Branch (5336:29): [True: 0, False: 0]
  ------------------
 5337|      0|        if (ParseFileName(file, &number, &type) && type == kWalFile) {
  ------------------
  |  Branch (5337:13): [True: 0, False: 0]
  |  Branch (5337:52): [True: 0, False: 0]
  ------------------
 5338|      0|          Status del =
 5339|      0|              DeleteDBFile(&soptions, archivedir + "/" + file, archivedir,
 5340|      0|                           /*force_bg=*/false, /*force_fg=*/!wal_in_db_path);
 5341|      0|          if (!del.ok() && result.ok()) {
  ------------------
  |  Branch (5341:15): [True: 0, False: 0]
  |  Branch (5341:28): [True: 0, False: 0]
  ------------------
 5342|      0|            result = del;
 5343|      0|          }
 5344|      0|        }
 5345|      0|      }
 5346|       |      // Ignore error in case dir contains other files
 5347|      0|      env->DeleteDir(archivedir).PermitUncheckedError();
 5348|      0|    }
 5349|       |
 5350|       |    // Delete log files in the WAL dir
 5351|  4.51k|    if (wal_dir_exists) {
  ------------------
  |  Branch (5351:9): [True: 0, False: 4.51k]
  ------------------
 5352|      0|      for (const auto& file : walDirFiles) {
  ------------------
  |  Branch (5352:29): [True: 0, False: 0]
  ------------------
 5353|      0|        if (ParseFileName(file, &number, &type) && type == kWalFile) {
  ------------------
  |  Branch (5353:13): [True: 0, False: 0]
  |  Branch (5353:52): [True: 0, False: 0]
  ------------------
 5354|      0|          Status del =
 5355|      0|              DeleteDBFile(&soptions, LogFileName(soptions.wal_dir, number),
 5356|      0|                           soptions.wal_dir, /*force_bg=*/false,
 5357|      0|                           /*force_fg=*/!wal_in_db_path);
 5358|      0|          if (!del.ok() && result.ok()) {
  ------------------
  |  Branch (5358:15): [True: 0, False: 0]
  |  Branch (5358:28): [True: 0, False: 0]
  ------------------
 5359|      0|            result = del;
 5360|      0|          }
 5361|      0|        }
 5362|      0|      }
 5363|       |      // Ignore error in case dir contains other files
 5364|      0|      env->DeleteDir(soptions.wal_dir).PermitUncheckedError();
 5365|      0|    }
 5366|       |
 5367|       |    // Ignore error since state is already gone
 5368|  4.51k|    env->UnlockFile(lock).PermitUncheckedError();
 5369|  4.51k|    env->DeleteFile(lockname).PermitUncheckedError();
 5370|       |
 5371|       |    // sst_file_manager holds a ref to the logger. Make sure the logger is
 5372|       |    // gone before trying to remove the directory.
 5373|  4.51k|    soptions.sst_file_manager.reset();
 5374|       |
 5375|       |    // Ignore error in case dir contains other files
 5376|  4.51k|    env->DeleteDir(dbname).PermitUncheckedError();
 5377|  4.51k|    ;
 5378|  4.51k|  }
 5379|  4.51k|  return result;
 5380|  4.51k|}
_ZN7rocksdb6DBImpl16WriteOptionsFileERKNS_12WriteOptionsEb:
 5383|  9.02k|                                bool db_mutex_already_held) {
 5384|  9.02k|  options_mutex_.AssertHeld();
 5385|       |
 5386|  9.02k|  if (db_mutex_already_held) {
  ------------------
  |  Branch (5386:7): [True: 9.02k, False: 0]
  ------------------
 5387|  9.02k|    mutex_.AssertHeld();
 5388|  9.02k|  } else {
 5389|      0|    mutex_.Lock();
 5390|      0|  }
 5391|       |
 5392|  9.02k|  std::vector<std::string> cf_names;
 5393|  9.02k|  std::vector<ColumnFamilyOptions> cf_opts;
 5394|       |
 5395|       |  // This part requires mutex to protect the column family options
 5396|  9.02k|  for (auto cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (5396:17): [True: 9.02k, False: 9.02k]
  ------------------
 5397|  9.02k|    if (cfd->IsDropped()) {
  ------------------
  |  Branch (5397:9): [True: 0, False: 9.02k]
  ------------------
 5398|      0|      continue;
 5399|      0|    }
 5400|  9.02k|    cf_names.push_back(cfd->GetName());
 5401|  9.02k|    cf_opts.push_back(cfd->GetLatestCFOptions());
 5402|  9.02k|  }
 5403|       |
 5404|  9.02k|  DBOptions db_options =
 5405|  9.02k|      BuildDBOptions(immutable_db_options_, mutable_db_options_);
 5406|       |
 5407|       |  // Unlock during expensive operations.
 5408|  9.02k|  mutex_.Unlock();
 5409|       |
 5410|  9.02k|  TEST_SYNC_POINT("DBImpl::WriteOptionsFile:1");
 5411|  9.02k|  TEST_SYNC_POINT("DBImpl::WriteOptionsFile:2");
 5412|  9.02k|  TEST_SYNC_POINT_CALLBACK("DBImpl::WriteOptionsFile:PersistOptions",
 5413|  9.02k|                           &db_options);
 5414|       |
 5415|  9.02k|  std::string file_name =
 5416|  9.02k|      TempOptionsFileName(GetName(), versions_->NewFileNumber());
 5417|  9.02k|  Status s = PersistRocksDBOptions(write_options, db_options, cf_names, cf_opts,
 5418|  9.02k|                                   file_name, fs_.get());
 5419|       |
 5420|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (5420:7): [True: 9.02k, False: 0]
  ------------------
 5421|  9.02k|    s = RenameTempFileToOptionsFile(file_name);
 5422|  9.02k|  }
 5423|       |
 5424|  9.02k|  if (!s.ok() && GetEnv()->FileExists(file_name).ok()) {
  ------------------
  |  Branch (5424:7): [True: 0, False: 9.02k]
  |  Branch (5424:7): [True: 0, False: 9.02k]
  |  Branch (5424:18): [True: 0, False: 0]
  ------------------
 5425|      0|    if (!GetEnv()->DeleteFile(file_name).ok()) {
  ------------------
  |  Branch (5425:9): [True: 0, False: 0]
  ------------------
 5426|      0|      ROCKS_LOG_WARN(immutable_db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 5427|      0|                     "Unable to delete temp options file %s",
 5428|      0|                     file_name.c_str());
 5429|      0|    }
 5430|      0|  }
 5431|       |
 5432|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (5432:7): [True: 0, False: 9.02k]
  ------------------
 5433|      0|    ROCKS_LOG_WARN(immutable_db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 5434|      0|                   "Unnable to persist options -- %s", s.ToString().c_str());
 5435|      0|    if (immutable_db_options_.fail_if_options_file_error) {
  ------------------
  |  Branch (5435:9): [True: 0, False: 0]
  ------------------
 5436|      0|      s = Status::IOError("Unable to persist options.", s.ToString().c_str());
 5437|      0|    } else {
 5438|       |      // Ignore error
 5439|      0|      s = Status::OK();
 5440|      0|    }
 5441|      0|  }
 5442|       |
 5443|       |  // Restore lock if appropriate
 5444|  9.02k|  if (db_mutex_already_held) {
  ------------------
  |  Branch (5444:7): [True: 9.02k, False: 0]
  ------------------
 5445|  9.02k|    mutex_.Lock();
 5446|  9.02k|  }
 5447|  9.02k|  return s;
 5448|  9.02k|}
_ZN7rocksdb6DBImpl26DeleteObsoleteOptionsFilesEv:
 5468|  9.02k|Status DBImpl::DeleteObsoleteOptionsFiles() {
 5469|  9.02k|  std::vector<std::string> filenames;
 5470|       |  // use ordered map to store keep the filenames sorted from the newest
 5471|       |  // to the oldest.
 5472|  9.02k|  std::map<uint64_t, std::string> options_filenames;
 5473|  9.02k|  Status s;
 5474|  9.02k|  IOOptions io_opts;
 5475|  9.02k|  io_opts.do_not_recurse = true;
 5476|  9.02k|  s = fs_->GetChildren(GetName(), io_opts, &filenames,
 5477|  9.02k|                       /*IODebugContext*=*/nullptr);
 5478|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (5478:7): [True: 0, False: 9.02k]
  ------------------
 5479|      0|    return s;
 5480|      0|  }
 5481|  90.2k|  for (auto& filename : filenames) {
  ------------------
  |  Branch (5481:23): [True: 90.2k, False: 9.02k]
  ------------------
 5482|  90.2k|    uint64_t file_number;
 5483|  90.2k|    FileType type;
 5484|  90.2k|    if (ParseFileName(filename, &file_number, &type) && type == kOptionsFile) {
  ------------------
  |  Branch (5484:9): [True: 76.7k, False: 13.5k]
  |  Branch (5484:57): [True: 13.5k, False: 63.1k]
  ------------------
 5485|  13.5k|      options_filenames.insert(
 5486|  13.5k|          {std::numeric_limits<uint64_t>::max() - file_number,
 5487|  13.5k|           GetName() + "/" + filename});
 5488|  13.5k|    }
 5489|  90.2k|  }
 5490|       |
 5491|       |  // Keeps the latest 2 Options file
 5492|  9.02k|  const size_t kNumOptionsFilesKept = 2;
 5493|  9.02k|  DeleteOptionsFilesHelper(options_filenames, kNumOptionsFilesKept,
 5494|  9.02k|                           immutable_db_options_.info_log, GetEnv());
 5495|  9.02k|  return Status::OK();
 5496|  9.02k|}
_ZN7rocksdb6DBImpl27RenameTempFileToOptionsFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 5498|  9.02k|Status DBImpl::RenameTempFileToOptionsFile(const std::string& file_name) {
 5499|  9.02k|  Status s;
 5500|       |
 5501|  9.02k|  uint64_t options_file_number = versions_->NewFileNumber();
 5502|  9.02k|  std::string options_file_name =
 5503|  9.02k|      OptionsFileName(GetName(), options_file_number);
 5504|  9.02k|  uint64_t options_file_size = 0;
 5505|  9.02k|  s = GetEnv()->GetFileSize(file_name, &options_file_size);
 5506|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (5506:7): [True: 9.02k, False: 0]
  ------------------
 5507|       |    // Retry if the file name happen to conflict with an existing one.
 5508|  9.02k|    s = GetEnv()->RenameFile(file_name, options_file_name);
 5509|  9.02k|    std::unique_ptr<FSDirectory> dir_obj;
 5510|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (5510:9): [True: 9.02k, False: 0]
  ------------------
 5511|  9.02k|      s = fs_->NewDirectory(GetName(), IOOptions(), &dir_obj, nullptr);
 5512|  9.02k|    }
 5513|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (5513:9): [True: 9.02k, False: 0]
  ------------------
 5514|  9.02k|      s = dir_obj->FsyncWithDirOptions(IOOptions(), nullptr,
 5515|  9.02k|                                       DirFsyncOptions(options_file_name));
 5516|  9.02k|    }
 5517|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (5517:9): [True: 9.02k, False: 0]
  ------------------
 5518|  9.02k|      Status temp_s = dir_obj->Close(IOOptions(), nullptr);
 5519|       |      // The default Close() could return "NotSupproted" and we bypass it
 5520|       |      // if it is not impelmented. Detailed explanations can be found in
 5521|       |      // db/db_impl/db_impl.h
 5522|  9.02k|      if (!temp_s.ok()) {
  ------------------
  |  Branch (5522:11): [True: 0, False: 9.02k]
  ------------------
 5523|      0|        if (temp_s.IsNotSupported()) {
  ------------------
  |  Branch (5523:13): [True: 0, False: 0]
  ------------------
 5524|      0|          temp_s.PermitUncheckedError();
 5525|      0|        } else {
 5526|      0|          s = temp_s;
 5527|      0|        }
 5528|      0|      }
 5529|  9.02k|    }
 5530|  9.02k|  }
 5531|       |
 5532|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (5532:7): [True: 9.02k, False: 0]
  ------------------
 5533|  9.02k|    int my_disable_delete_obsolete_files;
 5534|       |
 5535|  9.02k|    {
 5536|  9.02k|      InstrumentedMutexLock l(&mutex_);
 5537|  9.02k|      versions_->options_file_number_ = options_file_number;
 5538|  9.02k|      versions_->options_file_size_ = options_file_size;
 5539|  9.02k|      my_disable_delete_obsolete_files = disable_delete_obsolete_files_;
 5540|  9.02k|    }
 5541|       |
 5542|  9.02k|    if (!my_disable_delete_obsolete_files) {
  ------------------
  |  Branch (5542:9): [True: 9.02k, False: 0]
  ------------------
 5543|       |      // TODO: Should we check for errors here?
 5544|  9.02k|      DeleteObsoleteOptionsFiles().PermitUncheckedError();
 5545|  9.02k|    }
 5546|  9.02k|  }
 5547|       |
 5548|  9.02k|  return s;
 5549|  9.02k|}
_ZNK7rocksdb6DBImpl21NewThreadStatusCfInfoEPNS_16ColumnFamilyDataE:
 5553|  9.02k|void DBImpl::NewThreadStatusCfInfo(ColumnFamilyData* cfd) const {
 5554|  9.02k|  if (immutable_db_options_.enable_thread_tracking) {
  ------------------
  |  Branch (5554:7): [True: 0, False: 9.02k]
  ------------------
 5555|      0|    ThreadStatusUtil::NewColumnFamilyInfo(this, cfd, cfd->GetName(),
 5556|      0|                                          cfd->ioptions()->env);
 5557|      0|  }
 5558|  9.02k|}
_ZNK7rocksdb6DBImpl23EraseThreadStatusDbInfoEv:
 5566|  9.02k|void DBImpl::EraseThreadStatusDbInfo() const {
 5567|  9.02k|  if (immutable_db_options_.enable_thread_tracking) {
  ------------------
  |  Branch (5567:7): [True: 0, False: 9.02k]
  ------------------
 5568|      0|    ThreadStatusUtil::EraseDatabaseInfo(this);
 5569|      0|  }
 5570|  9.02k|}
_ZN7rocksdb23DumpRocksDBBuildVersionEPNS_6LoggerE:
 5582|  9.02k|void DumpRocksDBBuildVersion(Logger* log) {
 5583|  9.02k|  ROCKS_LOG_HEADER(log, "RocksDB version: %s\n",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 5584|  9.02k|                   GetRocksVersionAsString().c_str());
 5585|  9.02k|  const auto& props = GetRocksBuildProperties();
 5586|  9.02k|  const auto& sha = props.find("rocksdb_build_git_sha");
 5587|  9.02k|  if (sha != props.end()) {
  ------------------
  |  Branch (5587:7): [True: 9.02k, False: 0]
  ------------------
 5588|  9.02k|    ROCKS_LOG_HEADER(log, "Git sha %s", sha->second.c_str());
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 5589|  9.02k|  }
 5590|  9.02k|  const auto date = props.find("rocksdb_build_date");
 5591|  9.02k|  if (date != props.end()) {
  ------------------
  |  Branch (5591:7): [True: 9.02k, False: 0]
  ------------------
 5592|  9.02k|    ROCKS_LOG_HEADER(log, "Compile date %s", date->second.c_str());
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 5593|  9.02k|  }
 5594|  9.02k|}
db_impl.cc:_ZN7rocksdb12_GLOBAL__N_115DumpSupportInfoEPNS_6LoggerE:
  143|  9.02k|void DumpSupportInfo(Logger* logger) {
  144|  9.02k|  ROCKS_LOG_HEADER(logger, "Compression algorithms supported:");
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  145|  90.2k|  for (auto& compression : OptionsHelper::compression_type_string_map) {
  ------------------
  |  Branch (145:26): [True: 90.2k, False: 9.02k]
  ------------------
  146|  90.2k|    if (compression.second != kNoCompression &&
  ------------------
  |  Branch (146:9): [True: 81.2k, False: 9.02k]
  ------------------
  147|  90.2k|        compression.second != kDisableCompressionOption) {
  ------------------
  |  Branch (147:9): [True: 72.2k, False: 9.02k]
  ------------------
  148|  72.2k|      ROCKS_LOG_HEADER(logger, "\t%s supported: %d", compression.first.c_str(),
  ------------------
  |  |   29|  72.2k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  72.2k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  149|  72.2k|                       CompressionTypeSupported(compression.second));
  150|  72.2k|    }
  151|  90.2k|  }
  152|  9.02k|  ROCKS_LOG_HEADER(logger, "Fast CRC32 supported: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  153|  9.02k|                   crc32c::IsFastCrc32Supported().c_str());
  154|       |
  155|  9.02k|  ROCKS_LOG_HEADER(logger, "DMutex implementation: %s", DMutex::kName());
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  156|       |
  157|  9.02k|  bool jemalloc_supported = false;
  158|       |#ifdef ROCKSDB_JEMALLOC
  159|       |  jemalloc_supported = HasJemalloc();
  160|       |#endif
  161|  9.02k|  ROCKS_LOG_HEADER(logger, "Jemalloc supported: %d", jemalloc_supported);
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  162|  9.02k|}
db_impl.cc:_ZN7rocksdb12_GLOBAL__N_118SuperVersionHandleC2EPNS_6DBImplEPNS_17InstrumentedMutexEPNS_12SuperVersionEb:
 1997|  4.51k|        background_purge(_background_purge) {}
db_impl.cc:_ZN7rocksdb12_GLOBAL__N_125CleanupSuperVersionHandleEPvS1_:
 2005|  4.51k|static void CleanupSuperVersionHandle(void* arg1, void* /*arg2*/) {
 2006|  4.51k|  SuperVersionHandle* sv_handle = static_cast<SuperVersionHandle*>(arg1);
 2007|       |
 2008|  4.51k|  if (sv_handle->super_version->Unref()) {
  ------------------
  |  Branch (2008:7): [True: 0, False: 4.51k]
  ------------------
 2009|       |    // Job id == 0 means that this is not our background process, but rather
 2010|       |    // user thread
 2011|      0|    JobContext job_context(0);
 2012|       |
 2013|      0|    sv_handle->mu->Lock();
 2014|      0|    sv_handle->super_version->Cleanup();
 2015|      0|    sv_handle->db->FindObsoleteFiles(&job_context, false, true);
 2016|      0|    if (sv_handle->background_purge) {
  ------------------
  |  Branch (2016:9): [True: 0, False: 0]
  ------------------
 2017|      0|      sv_handle->db->ScheduleBgLogWriterClose(&job_context);
 2018|      0|      sv_handle->db->AddSuperVersionsToFreeQueue(sv_handle->super_version);
 2019|      0|      sv_handle->db->SchedulePurge();
 2020|      0|    }
 2021|      0|    sv_handle->mu->Unlock();
 2022|       |
 2023|      0|    if (!sv_handle->background_purge) {
  ------------------
  |  Branch (2023:9): [True: 0, False: 0]
  ------------------
 2024|      0|      delete sv_handle->super_version;
 2025|      0|    }
 2026|      0|    if (job_context.HaveSomethingToDelete()) {
  ------------------
  |  Branch (2026:9): [True: 0, False: 0]
  ------------------
 2027|      0|      sv_handle->db->PurgeObsoleteFiles(job_context,
 2028|      0|                                        sv_handle->background_purge);
 2029|      0|    }
 2030|      0|    job_context.Clean();
 2031|      0|  }
 2032|       |
 2033|  4.51k|  delete sv_handle;
 2034|  4.51k|}
db_impl.cc:_ZN7rocksdb12_GLOBAL__N_114DbSessionIdGenEv:
 5142|  9.02k|SemiStructuredUniqueIdGen* DbSessionIdGen() {
 5143|  9.02k|  static SemiStructuredUniqueIdGen gen;
 5144|  9.02k|  return &gen;
 5145|  9.02k|}
db_impl.cc:_ZN7rocksdb12_GLOBAL__N_124DeleteOptionsFilesHelperERKNSt3__13mapImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_4lessImEENS6_INS1_4pairIKmS8_EEEEEEmRKNS1_10shared_ptrINS_6LoggerEEEPNS_3EnvE:
 5454|  9.02k|                              Env* env) {
 5455|  9.02k|  if (filenames.size() <= num_files_to_keep) {
  ------------------
  |  Branch (5455:7): [True: 9.02k, False: 0]
  ------------------
 5456|  9.02k|    return;
 5457|  9.02k|  }
 5458|      0|  for (auto iter = std::next(filenames.begin(), num_files_to_keep);
 5459|      0|       iter != filenames.end(); ++iter) {
  ------------------
  |  Branch (5459:8): [True: 0, False: 0]
  ------------------
 5460|      0|    if (!env->DeleteFile(iter->second).ok()) {
  ------------------
  |  Branch (5460:9): [True: 0, False: 0]
  ------------------
 5461|      0|      ROCKS_LOG_WARN(info_log, "Unable to delete options file %s",
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 5462|      0|                     iter->second.c_str());
 5463|      0|    }
 5464|      0|  }
 5465|      0|}
db_impl.cc:_ZZN7rocksdb6DBImplC1ERKNS_9DBOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbbENK3$_0clEv:
  280|     46|                                   [this]() { this->DumpStats(); });
db_impl.cc:_ZZN7rocksdb6DBImplC1ERKNS_9DBOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEbbbENK3$_2clEv:
  284|    902|                                   [this]() { this->FlushInfoLog(); });

_ZN7rocksdb6DBImpl17WBMStallInterfaceC2Ev:
 1283|  9.02k|    WBMStallInterface() : state_cv_(&state_mutex_) {
 1284|  9.02k|      MutexLock lock(&state_mutex_);
 1285|  9.02k|      state_ = State::RUNNING;
 1286|  9.02k|    }
_ZN7rocksdb6DBImpl17WBMStallInterface6SignalEv:
 1306|  9.02k|    void Signal() override {
 1307|  9.02k|      {
 1308|  9.02k|        MutexLock lock(&state_mutex_);
 1309|  9.02k|        state_ = State::RUNNING;
 1310|  9.02k|      }
 1311|  9.02k|      state_cv_.Signal();
 1312|  9.02k|    }
_ZN7rocksdb11Directories8GetDbDirEv:
  112|  22.5k|  FSDirectory* GetDbDir() { return db_dir_.get(); }
_ZN7rocksdb6DBImpl10GetTaskTagEh:
 2126|  54.1k|  inline void* GetTaskTag(uint8_t type) {
 2127|  54.1k|    return static_cast<uint8_t*>(static_cast<void*>(this)) + type;
 2128|  54.1k|  }
_ZN7rocksdb6DBImpl15LogWriterNumber11ClearWriterEv:
 1726|  9.02k|    Status ClearWriter() {
 1727|  9.02k|      Status s;
 1728|  9.02k|      if (writer->file()) {
  ------------------
  |  Branch (1728:11): [True: 9.02k, False: 0]
  ------------------
 1729|       |        // TODO: plumb Env::IOActivity, Env::IOPriority
 1730|  9.02k|        s = writer->WriteBuffer(WriteOptions());
 1731|  9.02k|      }
 1732|  9.02k|      delete writer;
 1733|  9.02k|      writer = nullptr;
 1734|  9.02k|      return s;
 1735|  9.02k|    }
_ZN7rocksdb11Directories5CloseERKNS_9IOOptionsEPNS_14IODebugContextE:
  114|  9.02k|  IOStatus Close(const IOOptions& options, IODebugContext* dbg) {
  115|       |    // close all directories for all database paths
  116|  9.02k|    IOStatus s = IOStatus::OK();
  117|       |
  118|       |    // The default implementation for Close() in Directory/FSDirectory class
  119|       |    // "NotSupported" status, the upper level interface should be able to
  120|       |    // handle this error so that Close() does not fail after upgrading when
  121|       |    // run on FileSystems that have not implemented `Directory::Close()` or
  122|       |    // `FSDirectory::Close()` yet
  123|       |
  124|  9.02k|    if (db_dir_) {
  ------------------
  |  Branch (124:9): [True: 9.02k, False: 0]
  ------------------
  125|  9.02k|      IOStatus temp_s = db_dir_->Close(options, dbg);
  126|  9.02k|      if (!temp_s.ok() && !temp_s.IsNotSupported() && s.ok()) {
  ------------------
  |  Branch (126:11): [True: 0, False: 9.02k]
  |  Branch (126:27): [True: 0, False: 0]
  |  Branch (126:55): [True: 0, False: 0]
  ------------------
  127|      0|        s = std::move(temp_s);
  128|      0|      }
  129|  9.02k|    }
  130|       |
  131|       |    // Attempt to close everything even if one fails
  132|  9.02k|    s.PermitUncheckedError();
  133|       |
  134|  9.02k|    if (wal_dir_) {
  ------------------
  |  Branch (134:9): [True: 0, False: 9.02k]
  ------------------
  135|      0|      IOStatus temp_s = wal_dir_->Close(options, dbg);
  136|      0|      if (!temp_s.ok() && !temp_s.IsNotSupported() && s.ok()) {
  ------------------
  |  Branch (136:11): [True: 0, False: 0]
  |  Branch (136:27): [True: 0, False: 0]
  |  Branch (136:55): [True: 0, False: 0]
  ------------------
  137|      0|        s = std::move(temp_s);
  138|      0|      }
  139|      0|    }
  140|       |
  141|  9.02k|    s.PermitUncheckedError();
  142|       |
  143|  9.02k|    for (auto& data_dir_ptr : data_dirs_) {
  ------------------
  |  Branch (143:29): [True: 9.02k, False: 9.02k]
  ------------------
  144|  9.02k|      if (data_dir_ptr) {
  ------------------
  |  Branch (144:11): [True: 0, False: 9.02k]
  ------------------
  145|      0|        IOStatus temp_s = data_dir_ptr->Close(options, dbg);
  146|      0|        if (!temp_s.ok() && !temp_s.IsNotSupported() && s.ok()) {
  ------------------
  |  Branch (146:13): [True: 0, False: 0]
  |  Branch (146:29): [True: 0, False: 0]
  |  Branch (146:57): [True: 0, False: 0]
  ------------------
  147|      0|          s = std::move(temp_s);
  148|      0|        }
  149|      0|      }
  150|  9.02k|    }
  151|       |
  152|       |    // Ready for caller
  153|  9.02k|    s.MustCheck();
  154|  9.02k|    return s;
  155|  9.02k|  }
_ZN7rocksdb6DBImpl12WriteContextC2Eb:
 1697|  1.36M|        : superversion_context(create_superversion) {}
_ZN7rocksdb6DBImpl12WriteContextD2Ev:
 1699|  1.36M|    ~WriteContext() {
 1700|  1.36M|      superversion_context.Clean();
 1701|  1.36M|      for (auto& m : memtables_to_free_) {
  ------------------
  |  Branch (1701:20): [True: 0, False: 1.36M]
  ------------------
 1702|      0|        delete m;
 1703|      0|      }
 1704|  1.36M|    }
_ZNK7rocksdb6DBImpl13FailIfCfHasTsEPKNS_18ColumnFamilyHandleE:
 2993|  1.36M|    const ColumnFamilyHandle* column_family) const {
 2994|  1.36M|  if (!column_family) {
  ------------------
  |  Branch (2994:7): [True: 0, False: 1.36M]
  ------------------
 2995|      0|    return Status::InvalidArgument("column family handle cannot be null");
 2996|      0|  }
 2997|  1.36M|  assert(column_family);
 2998|  1.36M|  const Comparator* const ucmp = column_family->GetComparator();
 2999|  1.36M|  assert(ucmp);
 3000|  1.36M|  if (ucmp->timestamp_size() > 0) {
  ------------------
  |  Branch (3000:7): [True: 0, False: 1.36M]
  ------------------
 3001|      0|    std::ostringstream oss;
 3002|      0|    oss << "cannot call this method on column family "
 3003|      0|        << column_family->GetName() << " that enables timestamp";
 3004|      0|    return Status::InvalidArgument(oss.str());
 3005|      0|  }
 3006|  1.36M|  return Status::OK();
 3007|  1.36M|}
_ZNK7rocksdb6DBImpl16OwnTablesAndLogsEv:
 1581|  18.0k|  virtual bool OwnTablesAndLogs() const { return true; }
_ZNK7rocksdb6DBImpl9allow_2pcEv:
  998|  9.02k|  bool allow_2pc() const { return immutable_db_options_.allow_2pc; }
_ZNK7rocksdb6DBImpl5mutexEv:
 1072|  9.02k|  InstrumentedMutex* mutex() const { return &mutex_; }
_ZN7rocksdb6DBImpl15RecoveryContextD2Ev:
 1419|  9.02k|    ~RecoveryContext() {
 1420|  9.02k|      for (auto& edit_list : edit_lists_) {
  ------------------
  |  Branch (1420:28): [True: 9.02k, False: 9.02k]
  ------------------
 1421|  18.0k|        for (auto* edit : edit_list) {
  ------------------
  |  Branch (1421:25): [True: 18.0k, False: 9.02k]
  ------------------
 1422|  18.0k|          delete edit;
 1423|  18.0k|        }
 1424|  9.02k|      }
 1425|  9.02k|    }
_ZN7rocksdb6DBImpl15RecoveryContext18UpdateVersionEditsEPNS_16ColumnFamilyDataERKNS_11VersionEditE:
 1427|  18.0k|    void UpdateVersionEdits(ColumnFamilyData* cfd, const VersionEdit& edit) {
 1428|  18.0k|      assert(cfd != nullptr);
 1429|  18.0k|      if (map_.find(cfd->GetID()) == map_.end()) {
  ------------------
  |  Branch (1429:11): [True: 9.02k, False: 9.02k]
  ------------------
 1430|  9.02k|        uint32_t size = static_cast<uint32_t>(map_.size());
 1431|  9.02k|        map_.emplace(cfd->GetID(), size);
 1432|  9.02k|        cfds_.emplace_back(cfd);
 1433|  9.02k|        mutable_cf_opts_.emplace_back(cfd->GetLatestMutableCFOptions());
 1434|  9.02k|        edit_lists_.emplace_back(autovector<VersionEdit*>());
 1435|  9.02k|      }
 1436|  18.0k|      uint32_t i = map_[cfd->GetID()];
 1437|  18.0k|      edit_lists_[i].emplace_back(new VersionEdit(edit));
 1438|  18.0k|    }
_ZN7rocksdb6DBImpl17LogFileNumberSizeC2Em:
 1708|  13.5k|    explicit LogFileNumberSize(uint64_t _number) : number(_number) {}
_ZN7rocksdb6DBImpl17LogFileNumberSize7AddSizeEm:
 1710|  1.36M|    void AddSize(uint64_t new_size) { size += new_size; }
_ZN7rocksdb6DBImpl15LogWriterNumberC2EmPNS_3log6WriterE:
 1719|  9.02k|        : number(_number), writer(_writer) {}
_ZN7rocksdb6DBImpl10LogContextC2Eb:
 1779|  1.36M|        : need_log_sync(need_sync), need_log_dir_sync(need_sync) {}
_ZN7rocksdb6DBImpl21CalculateWALWriteHintEv:
 2376|  9.02k|  Env::WriteLifeTimeHint CalculateWALWriteHint() { return Env::WLTH_SHORT; }
column_family.cc:_ZN7rocksdbL11ClipToRangeImmEEvPT_T0_S3_:
 2987|  22.5k|static void ClipToRange(T* ptr, V minvalue, V maxvalue) {
 2988|  22.5k|  if (static_cast<V>(*ptr) > maxvalue) *ptr = maxvalue;
  ------------------
  |  Branch (2988:7): [True: 0, False: 22.5k]
  ------------------
 2989|  22.5k|  if (static_cast<V>(*ptr) < minvalue) *ptr = minvalue;
  ------------------
  |  Branch (2989:7): [True: 0, False: 22.5k]
  ------------------
 2990|  22.5k|}

_ZN7rocksdb6DBImpl30MaybeScheduleFlushOrCompactionEv:
 2824|  18.0k|void DBImpl::MaybeScheduleFlushOrCompaction() {
 2825|  18.0k|  mutex_.AssertHeld();
 2826|  18.0k|  TEST_SYNC_POINT("DBImpl::MaybeScheduleFlushOrCompaction:Start");
 2827|  18.0k|  if (!opened_successfully_) {
  ------------------
  |  Branch (2827:7): [True: 9.02k, False: 9.02k]
  ------------------
 2828|       |    // Compaction may introduce data race to DB open
 2829|  9.02k|    return;
 2830|  9.02k|  }
 2831|  9.02k|  if (bg_work_paused_ > 0) {
  ------------------
  |  Branch (2831:7): [True: 0, False: 9.02k]
  ------------------
 2832|       |    // we paused the background work
 2833|      0|    return;
 2834|  9.02k|  } else if (error_handler_.IsBGWorkStopped() &&
  ------------------
  |  Branch (2834:14): [True: 0, False: 9.02k]
  ------------------
 2835|  9.02k|             !error_handler_.IsRecoveryInProgress()) {
  ------------------
  |  Branch (2835:14): [True: 0, False: 0]
  ------------------
 2836|       |    // There has been a hard error and this call is not part of the recovery
 2837|       |    // sequence. Bail out here so we don't get into an endless loop of
 2838|       |    // scheduling BG work which will again call this function
 2839|       |    //
 2840|       |    // Note that a non-recovery flush can still be scheduled if
 2841|       |    // error_handler_.IsRecoveryInProgress() returns true. We rely on
 2842|       |    // BackgroundCallFlush() to check flush reason and drop non-recovery
 2843|       |    // flushes.
 2844|      0|    return;
 2845|  9.02k|  } else if (shutting_down_.load(std::memory_order_acquire)) {
  ------------------
  |  Branch (2845:14): [True: 0, False: 9.02k]
  ------------------
 2846|       |    // DB is being deleted; no more background compactions
 2847|      0|    return;
 2848|      0|  }
 2849|  9.02k|  auto bg_job_limits = GetBGJobLimits();
 2850|  9.02k|  bool is_flush_pool_empty =
 2851|  9.02k|      env_->GetBackgroundThreads(Env::Priority::HIGH) == 0;
 2852|  9.02k|  while (!is_flush_pool_empty && unscheduled_flushes_ > 0 &&
  ------------------
  |  Branch (2852:10): [True: 9.02k, False: 0]
  |  Branch (2852:34): [True: 0, False: 9.02k]
  ------------------
 2853|  9.02k|         bg_flush_scheduled_ < bg_job_limits.max_flushes) {
  ------------------
  |  Branch (2853:10): [True: 0, False: 0]
  ------------------
 2854|      0|    TEST_SYNC_POINT_CALLBACK(
 2855|      0|        "DBImpl::MaybeScheduleFlushOrCompaction:BeforeSchedule",
 2856|      0|        &unscheduled_flushes_);
 2857|      0|    bg_flush_scheduled_++;
 2858|      0|    FlushThreadArg* fta = new FlushThreadArg;
 2859|      0|    fta->db_ = this;
 2860|      0|    fta->thread_pri_ = Env::Priority::HIGH;
 2861|      0|    env_->Schedule(&DBImpl::BGWorkFlush, fta, Env::Priority::HIGH, this,
 2862|      0|                   &DBImpl::UnscheduleFlushCallback);
 2863|      0|    --unscheduled_flushes_;
 2864|      0|    TEST_SYNC_POINT_CALLBACK(
 2865|      0|        "DBImpl::MaybeScheduleFlushOrCompaction:AfterSchedule:0",
 2866|      0|        &unscheduled_flushes_);
 2867|      0|  }
 2868|       |
 2869|       |  // special case -- if high-pri (flush) thread pool is empty, then schedule
 2870|       |  // flushes in low-pri (compaction) thread pool.
 2871|  9.02k|  if (is_flush_pool_empty) {
  ------------------
  |  Branch (2871:7): [True: 0, False: 9.02k]
  ------------------
 2872|      0|    while (unscheduled_flushes_ > 0 &&
  ------------------
  |  Branch (2872:12): [True: 0, False: 0]
  ------------------
 2873|      0|           bg_flush_scheduled_ + bg_compaction_scheduled_ <
  ------------------
  |  Branch (2873:12): [True: 0, False: 0]
  ------------------
 2874|      0|               bg_job_limits.max_flushes) {
 2875|      0|      bg_flush_scheduled_++;
 2876|      0|      FlushThreadArg* fta = new FlushThreadArg;
 2877|      0|      fta->db_ = this;
 2878|      0|      fta->thread_pri_ = Env::Priority::LOW;
 2879|      0|      env_->Schedule(&DBImpl::BGWorkFlush, fta, Env::Priority::LOW, this,
 2880|      0|                     &DBImpl::UnscheduleFlushCallback);
 2881|      0|      --unscheduled_flushes_;
 2882|      0|    }
 2883|      0|  }
 2884|       |
 2885|  9.02k|  if (bg_compaction_paused_ > 0) {
  ------------------
  |  Branch (2885:7): [True: 0, False: 9.02k]
  ------------------
 2886|       |    // we paused the background compaction
 2887|      0|    return;
 2888|  9.02k|  } else if (error_handler_.IsBGWorkStopped()) {
  ------------------
  |  Branch (2888:14): [True: 0, False: 9.02k]
  ------------------
 2889|       |    // Compaction is not part of the recovery sequence from a hard error. We
 2890|       |    // might get here because recovery might do a flush and install a new
 2891|       |    // super version, which will try to schedule pending compactions. Bail
 2892|       |    // out here and let the higher level recovery handle compactions
 2893|      0|    return;
 2894|      0|  }
 2895|       |
 2896|  9.02k|  if (HasExclusiveManualCompaction()) {
  ------------------
  |  Branch (2896:7): [True: 0, False: 9.02k]
  ------------------
 2897|       |    // only manual compactions are allowed to run. don't schedule automatic
 2898|       |    // compactions
 2899|      0|    TEST_SYNC_POINT("DBImpl::MaybeScheduleFlushOrCompaction:Conflict");
 2900|      0|    return;
 2901|      0|  }
 2902|       |
 2903|  9.02k|  while (bg_compaction_scheduled_ + bg_bottom_compaction_scheduled_ <
  ------------------
  |  Branch (2903:10): [True: 9.02k, False: 0]
  ------------------
 2904|  9.02k|             bg_job_limits.max_compactions &&
 2905|  9.02k|         unscheduled_compactions_ > 0) {
  ------------------
  |  Branch (2905:10): [True: 0, False: 9.02k]
  ------------------
 2906|      0|    CompactionArg* ca = new CompactionArg;
 2907|      0|    ca->db = this;
 2908|      0|    ca->compaction_pri_ = Env::Priority::LOW;
 2909|      0|    ca->prepicked_compaction = nullptr;
 2910|      0|    bg_compaction_scheduled_++;
 2911|      0|    unscheduled_compactions_--;
 2912|      0|    env_->Schedule(&DBImpl::BGWorkCompaction, ca, Env::Priority::LOW, this,
 2913|      0|                   &DBImpl::UnscheduleCompactionCallback);
 2914|      0|  }
 2915|  9.02k|}
_ZNK7rocksdb6DBImpl14GetBGJobLimitsEv:
 2917|  9.02k|DBImpl::BGJobLimits DBImpl::GetBGJobLimits() const {
 2918|  9.02k|  mutex_.AssertHeld();
 2919|  9.02k|  return GetBGJobLimits(mutable_db_options_.max_background_flushes,
 2920|  9.02k|                        mutable_db_options_.max_background_compactions,
 2921|  9.02k|                        mutable_db_options_.max_background_jobs,
 2922|  9.02k|                        write_controller_.NeedSpeedupCompaction());
 2923|  9.02k|}
_ZN7rocksdb6DBImpl14GetBGJobLimitsEiiib:
 2928|  22.5k|                                           bool parallelize_compactions) {
 2929|  22.5k|  BGJobLimits res;
 2930|  22.5k|  if (max_background_flushes == -1 && max_background_compactions == -1) {
  ------------------
  |  Branch (2930:7): [True: 22.5k, False: 0]
  |  Branch (2930:39): [True: 22.5k, False: 0]
  ------------------
 2931|       |    // for our first stab implementing max_background_jobs, simply allocate a
 2932|       |    // quarter of the threads to flushes.
 2933|  22.5k|    res.max_flushes = std::max(1, max_background_jobs / 4);
 2934|  22.5k|    res.max_compactions = std::max(1, max_background_jobs - res.max_flushes);
 2935|  22.5k|  } else {
 2936|       |    // compatibility code in case users haven't migrated to max_background_jobs,
 2937|       |    // which automatically computes flush/compaction limits
 2938|      0|    res.max_flushes = std::max(1, max_background_flushes);
 2939|      0|    res.max_compactions = std::max(1, max_background_compactions);
 2940|      0|  }
 2941|  22.5k|  if (!parallelize_compactions) {
  ------------------
  |  Branch (2941:7): [True: 9.02k, False: 13.5k]
  ------------------
 2942|       |    // throttle background compactions until we deem necessary
 2943|  9.02k|    res.max_compactions = 1;
 2944|  9.02k|  }
 2945|  22.5k|  return res;
 2946|  22.5k|}
_ZN7rocksdb6DBImpl25SchedulePendingCompactionEPNS_16ColumnFamilyDataE:
 3044|  9.02k|void DBImpl::SchedulePendingCompaction(ColumnFamilyData* cfd) {
 3045|  9.02k|  mutex_.AssertHeld();
 3046|  9.02k|  if (reject_new_background_jobs_) {
  ------------------
  |  Branch (3046:7): [True: 0, False: 9.02k]
  ------------------
 3047|      0|    return;
 3048|      0|  }
 3049|  9.02k|  if (!cfd->queued_for_compaction() && cfd->NeedsCompaction()) {
  ------------------
  |  Branch (3049:7): [True: 9.02k, False: 0]
  |  Branch (3049:40): [True: 0, False: 9.02k]
  ------------------
 3050|      0|    TEST_SYNC_POINT_CALLBACK("SchedulePendingCompaction::cfd",
 3051|      0|                             static_cast<void*>(cfd));
 3052|      0|    AddToCompactionQueue(cfd);
 3053|      0|    ++unscheduled_compactions_;
 3054|      0|  }
 3055|  9.02k|}
_ZN7rocksdb6DBImpl26HasPendingManualCompactionEv:
 4047|  9.02k|bool DBImpl::HasPendingManualCompaction() {
 4048|  9.02k|  return (!manual_compaction_dequeue_.empty());
 4049|  9.02k|}
_ZN7rocksdb6DBImpl28HasExclusiveManualCompactionEv:
 4112|  9.02k|bool DBImpl::HasExclusiveManualCompaction() {
 4113|       |  // Remove from priority queue
 4114|  9.02k|  std::deque<ManualCompactionState*>::iterator it =
 4115|  9.02k|      manual_compaction_dequeue_.begin();
 4116|  9.02k|  while (it != manual_compaction_dequeue_.end()) {
  ------------------
  |  Branch (4116:10): [True: 0, False: 9.02k]
  ------------------
 4117|      0|    if ((*it)->exclusive) {
  ------------------
  |  Branch (4117:9): [True: 0, False: 0]
  ------------------
 4118|      0|      return true;
 4119|      0|    }
 4120|      0|    ++it;
 4121|      0|  }
 4122|  9.02k|  return false;
 4123|  9.02k|}
_ZN7rocksdb6DBImpl34InstallSuperVersionAndScheduleWorkEPNS_16ColumnFamilyDataEPNS_19SuperVersionContextERKNS_16MutableCFOptionsE:
 4240|  9.02k|    const MutableCFOptions& mutable_cf_options) {
 4241|  9.02k|  mutex_.AssertHeld();
 4242|       |
 4243|       |  // Update max_total_in_memory_state_
 4244|  9.02k|  size_t old_memtable_size = 0;
 4245|  9.02k|  auto* old_sv = cfd->GetSuperVersion();
 4246|  9.02k|  if (old_sv) {
  ------------------
  |  Branch (4246:7): [True: 0, False: 9.02k]
  ------------------
 4247|      0|    old_memtable_size = old_sv->mutable_cf_options.write_buffer_size *
 4248|      0|                        old_sv->mutable_cf_options.max_write_buffer_number;
 4249|      0|  }
 4250|       |
 4251|       |  // this branch is unlikely to step in
 4252|  9.02k|  if (UNLIKELY(sv_context->new_superversion == nullptr)) {
  ------------------
  |  |   14|  9.02k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 9.02k]
  |  |  ------------------
  ------------------
 4253|      0|    sv_context->NewSuperVersion();
 4254|      0|  }
 4255|  9.02k|  cfd->InstallSuperVersion(sv_context, mutable_cf_options);
 4256|       |
 4257|       |  // There may be a small data race here. The snapshot tricking bottommost
 4258|       |  // compaction may already be released here. But assuming there will always be
 4259|       |  // newer snapshot created and released frequently, the compaction will be
 4260|       |  // triggered soon anyway.
 4261|  9.02k|  bottommost_files_mark_threshold_ = kMaxSequenceNumber;
 4262|  9.02k|  for (auto* my_cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (4262:21): [True: 9.02k, False: 9.02k]
  ------------------
 4263|  9.02k|    if (!my_cfd->ioptions()->allow_ingest_behind) {
  ------------------
  |  Branch (4263:9): [True: 9.02k, False: 0]
  ------------------
 4264|  9.02k|      bottommost_files_mark_threshold_ = std::min(
 4265|  9.02k|          bottommost_files_mark_threshold_,
 4266|  9.02k|          my_cfd->current()->storage_info()->bottommost_files_mark_threshold());
 4267|  9.02k|    }
 4268|  9.02k|  }
 4269|       |
 4270|       |  // Whenever we install new SuperVersion, we might need to issue new flushes or
 4271|       |  // compactions.
 4272|  9.02k|  SchedulePendingCompaction(cfd);
 4273|  9.02k|  MaybeScheduleFlushOrCompaction();
 4274|       |
 4275|       |  // Update max_total_in_memory_state_
 4276|  9.02k|  max_total_in_memory_state_ = max_total_in_memory_state_ - old_memtable_size +
 4277|  9.02k|                               mutable_cf_options.write_buffer_size *
 4278|  9.02k|                                   mutable_cf_options.max_write_buffer_number;
 4279|  9.02k|}
_ZNK7rocksdb6DBImpl11ShouldPurgeEm:
 4286|   166k|bool DBImpl::ShouldPurge(uint64_t file_number) const {
 4287|   166k|  return files_grabbed_for_purge_.find(file_number) ==
  ------------------
  |  Branch (4287:10): [True: 166k, False: 0]
  ------------------
 4288|   166k|             files_grabbed_for_purge_.end() &&
 4289|   166k|         purge_files_.find(file_number) == purge_files_.end();
  ------------------
  |  Branch (4289:10): [True: 166k, False: 0]
  ------------------
 4290|   166k|}

_ZN7rocksdb6DBImpl18MinLogNumberToKeepEv:
   27|  22.5k|uint64_t DBImpl::MinLogNumberToKeep() {
   28|  22.5k|  return versions_->min_log_number_to_keep();
   29|  22.5k|}
_ZN7rocksdb6DBImpl26MinObsoleteSstNumberToKeepEv:
   33|  18.0k|uint64_t DBImpl::MinObsoleteSstNumberToKeep() {
   34|  18.0k|  mutex_.AssertHeld();
   35|  18.0k|  if (!pending_outputs_.empty()) {
  ------------------
  |  Branch (35:7): [True: 0, False: 18.0k]
  ------------------
   36|      0|    return *pending_outputs_.begin();
   37|      0|  }
   38|  18.0k|  return std::numeric_limits<uint64_t>::max();
   39|  18.0k|}
_ZN7rocksdb6DBImpl17FindObsoleteFilesEPNS_10JobContextEbb:
  117|  18.0k|                               bool no_full_scan) {
  118|  18.0k|  mutex_.AssertHeld();
  119|       |
  120|       |  // if deletion is disabled, do nothing
  121|  18.0k|  if (disable_delete_obsolete_files_ > 0) {
  ------------------
  |  Branch (121:7): [True: 0, False: 18.0k]
  ------------------
  122|      0|    return;
  123|      0|  }
  124|       |
  125|  18.0k|  bool doing_the_full_scan = false;
  126|       |
  127|       |  // logic for figuring out if we're doing the full scan
  128|  18.0k|  if (no_full_scan) {
  ------------------
  |  Branch (128:7): [True: 0, False: 18.0k]
  ------------------
  129|      0|    doing_the_full_scan = false;
  130|  18.0k|  } else if (force ||
  ------------------
  |  Branch (130:14): [True: 18.0k, False: 0]
  ------------------
  131|  18.0k|             mutable_db_options_.delete_obsolete_files_period_micros == 0) {
  ------------------
  |  Branch (131:14): [True: 0, False: 0]
  ------------------
  132|  18.0k|    doing_the_full_scan = true;
  133|  18.0k|  } else {
  134|      0|    const uint64_t now_micros = immutable_db_options_.clock->NowMicros();
  135|      0|    if ((delete_obsolete_files_last_run_ +
  ------------------
  |  Branch (135:9): [True: 0, False: 0]
  ------------------
  136|      0|         mutable_db_options_.delete_obsolete_files_period_micros) <
  137|      0|        now_micros) {
  138|      0|      doing_the_full_scan = true;
  139|      0|      delete_obsolete_files_last_run_ = now_micros;
  140|      0|    }
  141|      0|  }
  142|       |
  143|       |  // don't delete files that might be currently written to from compaction
  144|       |  // threads
  145|       |  // Since job_context->min_pending_output is set, until file scan finishes,
  146|       |  // mutex_ cannot be released. Otherwise, we might see no min_pending_output
  147|       |  // here but later find newer generated unfinalized files while scanning.
  148|  18.0k|  job_context->min_pending_output = MinObsoleteSstNumberToKeep();
  149|  18.0k|  job_context->files_to_quarantine = error_handler_.GetFilesToQuarantine();
  150|       |
  151|       |  // Get obsolete files.  This function will also update the list of
  152|       |  // pending files in VersionSet().
  153|  18.0k|  versions_->GetObsoleteFiles(
  154|  18.0k|      &job_context->sst_delete_files, &job_context->blob_delete_files,
  155|  18.0k|      &job_context->manifest_delete_files, job_context->min_pending_output);
  156|       |
  157|       |  // Mark the elements in job_context->sst_delete_files and
  158|       |  // job_context->blob_delete_files as "grabbed for purge" so that other threads
  159|       |  // calling FindObsoleteFiles with full_scan=true will not add these files to
  160|       |  // candidate list for purge.
  161|  18.0k|  for (const auto& sst_to_del : job_context->sst_delete_files) {
  ------------------
  |  Branch (161:31): [True: 0, False: 18.0k]
  ------------------
  162|      0|    MarkAsGrabbedForPurge(sst_to_del.metadata->fd.GetNumber());
  163|      0|  }
  164|       |
  165|  18.0k|  for (const auto& blob_file : job_context->blob_delete_files) {
  ------------------
  |  Branch (165:30): [True: 0, False: 18.0k]
  ------------------
  166|      0|    MarkAsGrabbedForPurge(blob_file.GetBlobFileNumber());
  167|      0|  }
  168|       |
  169|       |  // store the current filenum, lognum, etc
  170|  18.0k|  job_context->manifest_file_number = versions_->manifest_file_number();
  171|  18.0k|  job_context->pending_manifest_file_number =
  172|  18.0k|      versions_->pending_manifest_file_number();
  173|  18.0k|  job_context->log_number = MinLogNumberToKeep();
  174|  18.0k|  job_context->prev_log_number = versions_->prev_log_number();
  175|       |
  176|  18.0k|  if (doing_the_full_scan) {
  ------------------
  |  Branch (176:7): [True: 18.0k, False: 0]
  ------------------
  177|  18.0k|    versions_->AddLiveFiles(&job_context->sst_live, &job_context->blob_live);
  178|  18.0k|    InfoLogPrefix info_log_prefix(!immutable_db_options_.db_log_dir.empty(),
  179|  18.0k|                                  dbname_);
  180|       |    // PurgeObsoleteFiles will dedupe duplicate files.
  181|  18.0k|    IOOptions io_opts;
  182|  18.0k|    io_opts.do_not_recurse = true;
  183|  18.0k|    for (auto& path : CollectAllDBPaths()) {
  ------------------
  |  Branch (183:21): [True: 18.0k, False: 18.0k]
  ------------------
  184|       |      // set of all files in the directory. We'll exclude files that are still
  185|       |      // alive in the subsequent processings.
  186|  18.0k|      std::vector<std::string> files;
  187|  18.0k|      Status s = immutable_db_options_.fs->GetChildren(
  188|  18.0k|          path, io_opts, &files, /*IODebugContext*=*/nullptr);
  189|  18.0k|      s.PermitUncheckedError();  // TODO: What should we do on error?
  190|   166k|      for (const std::string& file : files) {
  ------------------
  |  Branch (190:36): [True: 166k, False: 18.0k]
  ------------------
  191|   166k|        uint64_t number;
  192|   166k|        FileType type;
  193|       |        // 1. If we cannot parse the file name, we skip;
  194|       |        // 2. If the file with file_number equals number has already been
  195|       |        // grabbed for purge by another compaction job, or it has already been
  196|       |        // schedule for purge, we also skip it if we
  197|       |        // are doing full scan in order to avoid double deletion of the same
  198|       |        // file under race conditions. See
  199|       |        // https://github.com/facebook/rocksdb/issues/3573
  200|   166k|        if (!ParseFileName(file, &number, info_log_prefix.prefix, &type) ||
  ------------------
  |  Branch (200:13): [True: 0, False: 166k]
  ------------------
  201|   166k|            !ShouldPurge(number)) {
  ------------------
  |  Branch (201:13): [True: 0, False: 166k]
  ------------------
  202|      0|          continue;
  203|      0|        }
  204|       |
  205|       |        // TODO(icanadi) clean up this mess to avoid having one-off "/"
  206|       |        // prefixes
  207|   166k|        job_context->full_scan_candidate_files.emplace_back("/" + file, path);
  208|   166k|      }
  209|  18.0k|    }
  210|       |
  211|       |    // Add log files in wal_dir
  212|  18.0k|    if (!immutable_db_options_.IsWalDirSameAsDBPath(dbname_)) {
  ------------------
  |  Branch (212:9): [True: 0, False: 18.0k]
  ------------------
  213|      0|      std::vector<std::string> log_files;
  214|      0|      Status s = immutable_db_options_.fs->GetChildren(
  215|      0|          immutable_db_options_.wal_dir, io_opts, &log_files,
  216|      0|          /*IODebugContext*=*/nullptr);
  217|      0|      s.PermitUncheckedError();  // TODO: What should we do on error?
  218|      0|      for (const std::string& log_file : log_files) {
  ------------------
  |  Branch (218:40): [True: 0, False: 0]
  ------------------
  219|      0|        job_context->full_scan_candidate_files.emplace_back(
  220|      0|            log_file, immutable_db_options_.wal_dir);
  221|      0|      }
  222|      0|    }
  223|       |
  224|       |    // Add info log files in db_log_dir
  225|  18.0k|    if (!immutable_db_options_.db_log_dir.empty() &&
  ------------------
  |  Branch (225:9): [True: 0, False: 18.0k]
  ------------------
  226|  18.0k|        immutable_db_options_.db_log_dir != dbname_) {
  ------------------
  |  Branch (226:9): [True: 0, False: 0]
  ------------------
  227|      0|      std::vector<std::string> info_log_files;
  228|      0|      Status s = immutable_db_options_.fs->GetChildren(
  229|      0|          immutable_db_options_.db_log_dir, io_opts, &info_log_files,
  230|      0|          /*IODebugContext*=*/nullptr);
  231|      0|      s.PermitUncheckedError();  // TODO: What should we do on error?
  232|      0|      for (std::string& log_file : info_log_files) {
  ------------------
  |  Branch (232:34): [True: 0, False: 0]
  ------------------
  233|      0|        job_context->full_scan_candidate_files.emplace_back(
  234|      0|            log_file, immutable_db_options_.db_log_dir);
  235|      0|      }
  236|      0|    }
  237|  18.0k|  } else {
  238|       |    // Instead of filling ob_context->sst_live and job_context->blob_live,
  239|       |    // directly remove files that show up in any Version. This is because
  240|       |    // candidate files tend to be a small percentage of all files, so it is
  241|       |    // usually cheaper to check them against every version, compared to
  242|       |    // building a map for all files.
  243|      0|    versions_->RemoveLiveFiles(job_context->sst_delete_files,
  244|      0|                               job_context->blob_delete_files);
  245|      0|  }
  246|       |
  247|       |  // Before potentially releasing mutex and waiting on condvar, increment
  248|       |  // pending_purge_obsolete_files_ so that another thread executing
  249|       |  // `GetSortedWals` will wait until this thread finishes execution since the
  250|       |  // other thread will be waiting for `pending_purge_obsolete_files_`.
  251|       |  // pending_purge_obsolete_files_ MUST be decremented if there is nothing to
  252|       |  // delete.
  253|  18.0k|  ++pending_purge_obsolete_files_;
  254|       |
  255|  18.0k|  Defer cleanup([job_context, this]() {
  256|  18.0k|    assert(job_context != nullptr);
  257|  18.0k|    if (!job_context->HaveSomethingToDelete()) {
  258|  18.0k|      mutex_.AssertHeld();
  259|  18.0k|      --pending_purge_obsolete_files_;
  260|  18.0k|    }
  261|  18.0k|  });
  262|       |
  263|       |  // logs_ is empty when called during recovery, in which case there can't yet
  264|       |  // be any tracked obsolete logs
  265|  18.0k|  log_write_mutex_.Lock();
  266|       |
  267|  18.0k|  if (alive_log_files_.empty() || logs_.empty()) {
  ------------------
  |  Branch (267:7): [True: 0, False: 18.0k]
  |  Branch (267:35): [True: 0, False: 18.0k]
  ------------------
  268|      0|    mutex_.AssertHeld();
  269|       |    // We may reach here if the db is DBImplSecondary
  270|      0|    log_write_mutex_.Unlock();
  271|      0|    return;
  272|      0|  }
  273|       |
  274|  18.0k|  bool mutex_unlocked = false;
  275|  18.0k|  if (!alive_log_files_.empty() && !logs_.empty()) {
  ------------------
  |  Branch (275:7): [True: 18.0k, False: 0]
  |  Branch (275:36): [True: 18.0k, False: 0]
  ------------------
  276|  18.0k|    uint64_t min_log_number = job_context->log_number;
  277|  18.0k|    size_t num_alive_log_files = alive_log_files_.size();
  278|       |    // find newly obsoleted log files
  279|  18.0k|    while (alive_log_files_.begin()->number < min_log_number) {
  ------------------
  |  Branch (279:12): [True: 0, False: 18.0k]
  ------------------
  280|      0|      auto& earliest = *alive_log_files_.begin();
  281|      0|      if (immutable_db_options_.recycle_log_file_num >
  ------------------
  |  Branch (281:11): [True: 0, False: 0]
  ------------------
  282|      0|              log_recycle_files_.size() &&
  283|      0|          earliest.number >= MinLogNumberToRecycle()) {
  ------------------
  |  Branch (283:11): [True: 0, False: 0]
  ------------------
  284|      0|        ROCKS_LOG_INFO(immutable_db_options_.info_log,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  285|      0|                       "adding log %" PRIu64 " to recycle list\n",
  286|      0|                       earliest.number);
  287|      0|        log_recycle_files_.push_back(earliest.number);
  288|      0|      } else {
  289|      0|        job_context->log_delete_files.push_back(earliest.number);
  290|      0|      }
  291|      0|      if (job_context->size_log_to_delete == 0) {
  ------------------
  |  Branch (291:11): [True: 0, False: 0]
  ------------------
  292|      0|        job_context->prev_total_log_size = total_log_size_;
  293|      0|        job_context->num_alive_log_files = num_alive_log_files;
  294|      0|      }
  295|      0|      job_context->size_log_to_delete += earliest.size;
  296|      0|      total_log_size_ -= earliest.size;
  297|      0|      alive_log_files_.pop_front();
  298|       |
  299|       |      // Current log should always stay alive since it can't have
  300|       |      // number < MinLogNumber().
  301|      0|      assert(alive_log_files_.size());
  302|      0|    }
  303|  18.0k|    log_write_mutex_.Unlock();
  304|  18.0k|    mutex_.Unlock();
  305|  18.0k|    mutex_unlocked = true;
  306|  18.0k|    TEST_SYNC_POINT_CALLBACK("FindObsoleteFiles::PostMutexUnlock", nullptr);
  307|  18.0k|    log_write_mutex_.Lock();
  308|  18.0k|    while (!logs_.empty() && logs_.front().number < min_log_number) {
  ------------------
  |  Branch (308:12): [True: 18.0k, False: 0]
  |  Branch (308:30): [True: 0, False: 18.0k]
  ------------------
  309|      0|      auto& log = logs_.front();
  310|      0|      if (log.IsSyncing()) {
  ------------------
  |  Branch (310:11): [True: 0, False: 0]
  ------------------
  311|      0|        log_sync_cv_.Wait();
  312|       |        // logs_ could have changed while we were waiting.
  313|      0|        continue;
  314|      0|      }
  315|       |      // This WAL file is not live, so it's OK if we never sync the rest of it.
  316|       |      // If it's already closed, then it's been fully synced. If
  317|       |      // !background_close_inactive_wals then we need to Close it before
  318|       |      // removing from logs_ but not blocking while holding log_write_mutex_.
  319|      0|      if (!immutable_db_options_.background_close_inactive_wals &&
  ------------------
  |  Branch (319:11): [True: 0, False: 0]
  ------------------
  320|      0|          log.writer->file()) {
  ------------------
  |  Branch (320:11): [True: 0, False: 0]
  ------------------
  321|       |        // We are taking ownership of and pinning the front entry, so we can
  322|       |        // expect it to be the same after releasing and re-acquiring the lock
  323|      0|        log.PrepareForSync();
  324|      0|        log_write_mutex_.Unlock();
  325|       |        // TODO: maybe check the return value of Close.
  326|       |        // TODO: plumb Env::IOActivity, Env::IOPriority
  327|      0|        auto s = log.writer->file()->Close({});
  328|      0|        s.PermitUncheckedError();
  329|      0|        log_write_mutex_.Lock();
  330|      0|        log.writer->PublishIfClosed();
  331|      0|        assert(&log == &logs_.front());
  332|      0|        log.FinishSync();
  333|      0|        log_sync_cv_.SignalAll();
  334|      0|      }
  335|      0|      logs_to_free_.push_back(log.ReleaseWriter());
  336|      0|      logs_.pop_front();
  337|      0|    }
  338|       |    // Current log cannot be obsolete.
  339|  18.0k|    assert(!logs_.empty());
  340|  18.0k|  }
  341|       |
  342|       |  // We're just cleaning up for DB::Write().
  343|  18.0k|  assert(job_context->logs_to_free.empty());
  344|  18.0k|  job_context->logs_to_free = logs_to_free_;
  345|       |
  346|  18.0k|  logs_to_free_.clear();
  347|  18.0k|  log_write_mutex_.Unlock();
  348|  18.0k|  if (mutex_unlocked) {
  ------------------
  |  Branch (348:7): [True: 18.0k, False: 0]
  ------------------
  349|  18.0k|    mutex_.Lock();
  350|  18.0k|  }
  351|  18.0k|  job_context->log_recycle_files.assign(log_recycle_files_.begin(),
  352|  18.0k|                                        log_recycle_files_.end());
  353|  18.0k|}
_ZN7rocksdb6DBImpl22DeleteObsoleteFileImplEiRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_NS_8FileTypeEm:
  358|  13.5k|                                    FileType type, uint64_t number) {
  359|  13.5k|  TEST_SYNC_POINT_CALLBACK("DBImpl::DeleteObsoleteFileImpl::BeforeDeletion",
  360|  13.5k|                           const_cast<std::string*>(&fname));
  361|       |
  362|  13.5k|  Status file_deletion_status;
  363|  13.5k|  if (type == kTableFile || type == kBlobFile || type == kWalFile) {
  ------------------
  |  Branch (363:7): [True: 0, False: 13.5k]
  |  Branch (363:29): [True: 0, False: 13.5k]
  |  Branch (363:50): [True: 4.51k, False: 9.02k]
  ------------------
  364|       |    // Rate limit WAL deletion only if its in the DB dir
  365|  4.51k|    file_deletion_status = DeleteDBFile(
  366|  4.51k|        &immutable_db_options_, fname, path_to_sync,
  367|  4.51k|        /*force_bg=*/false,
  368|  4.51k|        /*force_fg=*/(type == kWalFile) ? !wal_in_db_path_ : false);
  ------------------
  |  Branch (368:22): [True: 4.51k, False: 0]
  ------------------
  369|  9.02k|  } else {
  370|  9.02k|    file_deletion_status = env_->DeleteFile(fname);
  371|  9.02k|  }
  372|  13.5k|  TEST_SYNC_POINT_CALLBACK("DBImpl::DeleteObsoleteFileImpl:AfterDeletion",
  373|  13.5k|                           &file_deletion_status);
  374|  13.5k|  if (file_deletion_status.ok()) {
  ------------------
  |  Branch (374:7): [True: 13.5k, False: 0]
  ------------------
  375|  13.5k|    ROCKS_LOG_DEBUG(immutable_db_options_.info_log,
  ------------------
  |  |   36|  13.5k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::DEBUG_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  13.5k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  13.5k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  13.5k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  13.5k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  376|  13.5k|                    "[JOB %d] Delete %s type=%d #%" PRIu64 " -- %s\n", job_id,
  377|  13.5k|                    fname.c_str(), type, number,
  378|  13.5k|                    file_deletion_status.ToString().c_str());
  379|  13.5k|  } else if (env_->FileExists(fname).IsNotFound()) {
  ------------------
  |  Branch (379:14): [True: 0, False: 0]
  ------------------
  380|      0|    ROCKS_LOG_INFO(
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  381|      0|        immutable_db_options_.info_log,
  382|      0|        "[JOB %d] Tried to delete a non-existing file %s type=%d #%" PRIu64
  383|      0|        " -- %s\n",
  384|      0|        job_id, fname.c_str(), type, number,
  385|      0|        file_deletion_status.ToString().c_str());
  386|      0|  } else {
  387|      0|    ROCKS_LOG_ERROR(immutable_db_options_.info_log,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  388|      0|                    "[JOB %d] Failed to delete %s type=%d #%" PRIu64 " -- %s\n",
  389|      0|                    job_id, fname.c_str(), type, number,
  390|      0|                    file_deletion_status.ToString().c_str());
  391|      0|  }
  392|  13.5k|  if (type == kTableFile) {
  ------------------
  |  Branch (392:7): [True: 0, False: 13.5k]
  ------------------
  393|      0|    EventHelpers::LogAndNotifyTableFileDeletion(
  394|      0|        &event_logger_, job_id, number, fname, file_deletion_status, GetName(),
  395|      0|        immutable_db_options_.listeners);
  396|      0|  }
  397|  13.5k|  if (type == kBlobFile) {
  ------------------
  |  Branch (397:7): [True: 0, False: 13.5k]
  ------------------
  398|      0|    EventHelpers::LogAndNotifyBlobFileDeletion(
  399|      0|        &event_logger_, immutable_db_options_.listeners, job_id, number, fname,
  400|      0|        file_deletion_status, GetName());
  401|      0|  }
  402|  13.5k|}
_ZN7rocksdb6DBImpl18PurgeObsoleteFilesERNS_10JobContextEb:
  408|  18.0k|void DBImpl::PurgeObsoleteFiles(JobContext& state, bool schedule_only) {
  409|  18.0k|  TEST_SYNC_POINT("DBImpl::PurgeObsoleteFiles:Begin");
  410|       |  // we'd better have sth to delete
  411|  18.0k|  assert(state.HaveSomethingToDelete());
  412|       |
  413|       |  // FindObsoleteFiles() should've populated this so nonzero
  414|  18.0k|  assert(state.manifest_file_number != 0);
  415|       |
  416|       |  // Now, convert lists to unordered sets, WITHOUT mutex held; set is slow.
  417|  18.0k|  std::unordered_set<uint64_t> sst_live_set(state.sst_live.begin(),
  418|  18.0k|                                            state.sst_live.end());
  419|  18.0k|  std::unordered_set<uint64_t> blob_live_set(state.blob_live.begin(),
  420|  18.0k|                                             state.blob_live.end());
  421|  18.0k|  std::unordered_set<uint64_t> log_recycle_files_set(
  422|  18.0k|      state.log_recycle_files.begin(), state.log_recycle_files.end());
  423|  18.0k|  std::unordered_set<uint64_t> quarantine_files_set(
  424|  18.0k|      state.files_to_quarantine.begin(), state.files_to_quarantine.end());
  425|       |
  426|  18.0k|  auto candidate_files = state.full_scan_candidate_files;
  427|  18.0k|  candidate_files.reserve(
  428|  18.0k|      candidate_files.size() + state.sst_delete_files.size() +
  429|  18.0k|      state.blob_delete_files.size() + state.log_delete_files.size() +
  430|  18.0k|      state.manifest_delete_files.size());
  431|       |  // We may ignore the dbname when generating the file names.
  432|  18.0k|  for (auto& file : state.sst_delete_files) {
  ------------------
  |  Branch (432:19): [True: 0, False: 18.0k]
  ------------------
  433|      0|    auto* handle = file.metadata->table_reader_handle;
  434|      0|    if (file.only_delete_metadata) {
  ------------------
  |  Branch (434:9): [True: 0, False: 0]
  ------------------
  435|      0|      if (handle) {
  ------------------
  |  Branch (435:11): [True: 0, False: 0]
  ------------------
  436|       |        // Simply release handle of file that is not being deleted
  437|      0|        table_cache_->Release(handle);
  438|      0|      }
  439|      0|    } else {
  440|       |      // File is being deleted (actually obsolete)
  441|      0|      auto number = file.metadata->fd.GetNumber();
  442|      0|      candidate_files.emplace_back(MakeTableFileName(number), file.path);
  443|      0|      if (handle == nullptr) {
  ------------------
  |  Branch (443:11): [True: 0, False: 0]
  ------------------
  444|       |        // For files not "pinned" in table cache
  445|      0|        handle = TableCache::Lookup(table_cache_.get(), number);
  446|      0|      }
  447|      0|      if (handle) {
  ------------------
  |  Branch (447:11): [True: 0, False: 0]
  ------------------
  448|      0|        TableCache::ReleaseObsolete(table_cache_.get(), handle,
  449|      0|                                    file.uncache_aggressiveness);
  450|      0|      }
  451|      0|    }
  452|      0|    file.DeleteMetadata();
  453|      0|  }
  454|       |
  455|  18.0k|  for (const auto& blob_file : state.blob_delete_files) {
  ------------------
  |  Branch (455:30): [True: 0, False: 18.0k]
  ------------------
  456|      0|    candidate_files.emplace_back(BlobFileName(blob_file.GetBlobFileNumber()),
  457|      0|                                 blob_file.GetPath());
  458|      0|  }
  459|       |
  460|  18.0k|  auto wal_dir = immutable_db_options_.GetWalDir();
  461|  18.0k|  for (auto file_num : state.log_delete_files) {
  ------------------
  |  Branch (461:22): [True: 0, False: 18.0k]
  ------------------
  462|      0|    if (file_num > 0) {
  ------------------
  |  Branch (462:9): [True: 0, False: 0]
  ------------------
  463|      0|      candidate_files.emplace_back(LogFileName(file_num), wal_dir);
  464|      0|    }
  465|      0|  }
  466|  18.0k|  for (const auto& filename : state.manifest_delete_files) {
  ------------------
  |  Branch (466:29): [True: 9.02k, False: 18.0k]
  ------------------
  467|  9.02k|    candidate_files.emplace_back(filename, dbname_);
  468|  9.02k|  }
  469|       |
  470|       |  // dedup state.candidate_files so we don't try to delete the same
  471|       |  // file twice
  472|  18.0k|  std::sort(candidate_files.begin(), candidate_files.end(),
  473|  18.0k|            [](const JobContext::CandidateFileInfo& lhs,
  474|  18.0k|               const JobContext::CandidateFileInfo& rhs) {
  475|  18.0k|              if (lhs.file_name < rhs.file_name) {
  476|  18.0k|                return true;
  477|  18.0k|              } else if (lhs.file_name > rhs.file_name) {
  478|  18.0k|                return false;
  479|  18.0k|              } else {
  480|  18.0k|                return (lhs.file_path < rhs.file_path);
  481|  18.0k|              }
  482|  18.0k|            });
  483|  18.0k|  candidate_files.erase(
  484|  18.0k|      std::unique(candidate_files.begin(), candidate_files.end()),
  485|  18.0k|      candidate_files.end());
  486|       |
  487|  18.0k|  if (state.prev_total_log_size > 0) {
  ------------------
  |  Branch (487:7): [True: 0, False: 18.0k]
  ------------------
  488|      0|    ROCKS_LOG_INFO(immutable_db_options_.info_log,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  489|      0|                   "[JOB %d] Try to delete WAL files size %" PRIu64
  490|      0|                   ", prev total WAL file size %" PRIu64
  491|      0|                   ", number of live WAL files %" ROCKSDB_PRIszt ".\n",
  492|      0|                   state.job_id, state.size_log_to_delete,
  493|      0|                   state.prev_total_log_size, state.num_alive_log_files);
  494|      0|  }
  495|       |
  496|  18.0k|  std::vector<std::string> old_info_log_files;
  497|  18.0k|  InfoLogPrefix info_log_prefix(!immutable_db_options_.db_log_dir.empty(),
  498|  18.0k|                                dbname_);
  499|       |
  500|       |  // File numbers of most recent two OPTIONS file in candidate_files (found in
  501|       |  // previos FindObsoleteFiles(full_scan=true))
  502|       |  // At this point, there must not be any duplicate file numbers in
  503|       |  // candidate_files.
  504|  18.0k|  uint64_t optsfile_num1 = std::numeric_limits<uint64_t>::min();
  505|  18.0k|  uint64_t optsfile_num2 = std::numeric_limits<uint64_t>::min();
  506|   166k|  for (const auto& candidate_file : candidate_files) {
  ------------------
  |  Branch (506:35): [True: 166k, False: 18.0k]
  ------------------
  507|   166k|    const std::string& fname = candidate_file.file_name;
  508|   166k|    uint64_t number;
  509|   166k|    FileType type;
  510|   166k|    if (!ParseFileName(fname, &number, info_log_prefix.prefix, &type) ||
  ------------------
  |  Branch (510:9): [True: 0, False: 166k]
  ------------------
  511|   166k|        type != kOptionsFile) {
  ------------------
  |  Branch (511:9): [True: 139k, False: 27.0k]
  ------------------
  512|   139k|      continue;
  513|   139k|    }
  514|  27.0k|    if (number > optsfile_num1) {
  ------------------
  |  Branch (514:9): [True: 27.0k, False: 0]
  ------------------
  515|  27.0k|      optsfile_num2 = optsfile_num1;
  516|  27.0k|      optsfile_num1 = number;
  517|  27.0k|    } else if (number > optsfile_num2) {
  ------------------
  |  Branch (517:16): [True: 0, False: 0]
  ------------------
  518|      0|      optsfile_num2 = number;
  519|      0|    }
  520|  27.0k|  }
  521|       |
  522|       |  // Close WALs before trying to delete them.
  523|  18.0k|  for (const auto w : state.logs_to_free) {
  ------------------
  |  Branch (523:21): [True: 0, False: 18.0k]
  ------------------
  524|       |    // TODO: maybe check the return value of Close.
  525|       |    // TODO: plumb Env::IOActivity, Env::IOPriority
  526|      0|    auto s = w->Close({});
  527|      0|    s.PermitUncheckedError();
  528|      0|  }
  529|       |
  530|  18.0k|  bool own_files = OwnTablesAndLogs();
  531|  18.0k|  std::unordered_set<uint64_t> files_to_del;
  532|   166k|  for (const auto& candidate_file : candidate_files) {
  ------------------
  |  Branch (532:35): [True: 166k, False: 18.0k]
  ------------------
  533|   166k|    const std::string& to_delete = candidate_file.file_name;
  534|   166k|    uint64_t number;
  535|   166k|    FileType type;
  536|       |    // Ignore file if we cannot recognize it.
  537|   166k|    if (!ParseFileName(to_delete, &number, info_log_prefix.prefix, &type)) {
  ------------------
  |  Branch (537:9): [True: 0, False: 166k]
  ------------------
  538|      0|      continue;
  539|      0|    }
  540|       |
  541|   166k|    if (quarantine_files_set.find(number) != quarantine_files_set.end()) {
  ------------------
  |  Branch (541:9): [True: 0, False: 166k]
  ------------------
  542|      0|      continue;
  543|      0|    }
  544|       |
  545|   166k|    bool keep = true;
  546|   166k|    switch (type) {
  ------------------
  |  Branch (546:13): [True: 0, False: 166k]
  ------------------
  547|  22.5k|      case kWalFile:
  ------------------
  |  Branch (547:7): [True: 22.5k, False: 144k]
  ------------------
  548|  22.5k|        keep = ((number >= state.log_number) ||
  ------------------
  |  Branch (548:17): [True: 18.0k, False: 4.51k]
  ------------------
  549|  22.5k|                (number == state.prev_log_number) ||
  ------------------
  |  Branch (549:17): [True: 0, False: 4.51k]
  ------------------
  550|  22.5k|                (log_recycle_files_set.find(number) !=
  ------------------
  |  Branch (550:17): [True: 0, False: 4.51k]
  ------------------
  551|  4.51k|                 log_recycle_files_set.end()));
  552|  22.5k|        break;
  553|  27.0k|      case kDescriptorFile:
  ------------------
  |  Branch (553:7): [True: 27.0k, False: 139k]
  ------------------
  554|       |        // Keep my manifest file, and any newer incarnations'
  555|       |        // (can happen during manifest roll)
  556|  27.0k|        keep = (number >= state.manifest_file_number);
  557|  27.0k|        break;
  558|  8.96k|      case kTableFile:
  ------------------
  |  Branch (558:7): [True: 8.96k, False: 157k]
  ------------------
  559|       |        // If the second condition is not there, this makes
  560|       |        // DontDeletePendingOutputs fail
  561|  8.96k|        keep = (sst_live_set.find(number) != sst_live_set.end()) ||
  ------------------
  |  Branch (561:16): [True: 8.96k, False: 0]
  ------------------
  562|  8.96k|               number >= state.min_pending_output;
  ------------------
  |  Branch (562:16): [True: 0, False: 0]
  ------------------
  563|  8.96k|        if (!keep) {
  ------------------
  |  Branch (563:13): [True: 0, False: 8.96k]
  ------------------
  564|      0|          files_to_del.insert(number);
  565|      0|        }
  566|  8.96k|        break;
  567|      0|      case kBlobFile:
  ------------------
  |  Branch (567:7): [True: 0, False: 166k]
  ------------------
  568|      0|        keep = number >= state.min_pending_output ||
  ------------------
  |  Branch (568:16): [True: 0, False: 0]
  ------------------
  569|      0|               (blob_live_set.find(number) != blob_live_set.end());
  ------------------
  |  Branch (569:16): [True: 0, False: 0]
  ------------------
  570|      0|        if (!keep) {
  ------------------
  |  Branch (570:13): [True: 0, False: 0]
  ------------------
  571|      0|          files_to_del.insert(number);
  572|      0|        }
  573|      0|        break;
  574|      0|      case kTempFile:
  ------------------
  |  Branch (574:7): [True: 0, False: 166k]
  ------------------
  575|       |        // Any temp files that are currently being written to must
  576|       |        // be recorded in pending_outputs_, which is inserted into "live".
  577|       |        // Also, SetCurrentFile creates a temp file when writing out new
  578|       |        // manifest, which is equal to state.pending_manifest_file_number. We
  579|       |        // should not delete that file
  580|       |        //
  581|       |        // TODO(yhchiang): carefully modify the third condition to safely
  582|       |        //                 remove the temp options files.
  583|      0|        keep = (sst_live_set.find(number) != sst_live_set.end()) ||
  ------------------
  |  Branch (583:16): [True: 0, False: 0]
  ------------------
  584|      0|               (blob_live_set.find(number) != blob_live_set.end()) ||
  ------------------
  |  Branch (584:16): [True: 0, False: 0]
  ------------------
  585|      0|               (number == state.pending_manifest_file_number) ||
  ------------------
  |  Branch (585:16): [True: 0, False: 0]
  ------------------
  586|      0|               (to_delete.find(kOptionsFileNamePrefix) != std::string::npos);
  ------------------
  |  Branch (586:16): [True: 0, False: 0]
  ------------------
  587|      0|        break;
  588|  27.0k|      case kInfoLogFile:
  ------------------
  |  Branch (588:7): [True: 27.0k, False: 139k]
  ------------------
  589|  27.0k|        keep = true;
  590|  27.0k|        if (number != 0) {
  ------------------
  |  Branch (590:13): [True: 9.02k, False: 18.0k]
  ------------------
  591|  9.02k|          old_info_log_files.push_back(to_delete);
  592|  9.02k|        }
  593|  27.0k|        break;
  594|  27.0k|      case kOptionsFile:
  ------------------
  |  Branch (594:7): [True: 27.0k, False: 139k]
  ------------------
  595|  27.0k|        keep = (number >= optsfile_num2);
  596|  27.0k|        break;
  597|  18.0k|      case kCurrentFile:
  ------------------
  |  Branch (597:7): [True: 18.0k, False: 148k]
  ------------------
  598|  36.1k|      case kDBLockFile:
  ------------------
  |  Branch (598:7): [True: 18.0k, False: 148k]
  ------------------
  599|  54.1k|      case kIdentityFile:
  ------------------
  |  Branch (599:7): [True: 18.0k, False: 148k]
  ------------------
  600|  54.1k|      case kMetaDatabase:
  ------------------
  |  Branch (600:7): [True: 0, False: 166k]
  ------------------
  601|  54.1k|        keep = true;
  602|  54.1k|        break;
  603|   166k|    }
  604|       |
  605|   166k|    if (keep) {
  ------------------
  |  Branch (605:9): [True: 153k, False: 13.5k]
  ------------------
  606|   153k|      continue;
  607|   153k|    }
  608|       |
  609|  13.5k|    std::string fname;
  610|  13.5k|    std::string dir_to_sync;
  611|  13.5k|    if (type == kTableFile) {
  ------------------
  |  Branch (611:9): [True: 0, False: 13.5k]
  ------------------
  612|      0|      fname = MakeTableFileName(candidate_file.file_path, number);
  613|      0|      dir_to_sync = candidate_file.file_path;
  614|  13.5k|    } else if (type == kBlobFile) {
  ------------------
  |  Branch (614:16): [True: 0, False: 13.5k]
  ------------------
  615|      0|      fname = BlobFileName(candidate_file.file_path, number);
  616|      0|      dir_to_sync = candidate_file.file_path;
  617|  13.5k|    } else {
  618|  13.5k|      dir_to_sync = (type == kWalFile) ? wal_dir : dbname_;
  ------------------
  |  Branch (618:21): [True: 4.51k, False: 9.02k]
  ------------------
  619|  13.5k|      fname = dir_to_sync +
  620|  13.5k|              ((!dir_to_sync.empty() && dir_to_sync.back() == '/') ||
  ------------------
  |  Branch (620:17): [True: 13.5k, False: 0]
  |  Branch (620:41): [True: 0, False: 13.5k]
  ------------------
  621|  13.5k|                       (!to_delete.empty() && to_delete.front() == '/')
  ------------------
  |  Branch (621:25): [True: 13.5k, False: 0]
  |  Branch (621:47): [True: 13.5k, False: 0]
  ------------------
  622|  13.5k|                   ? ""
  623|  13.5k|                   : "/") +
  624|  13.5k|              to_delete;
  625|  13.5k|    }
  626|       |
  627|  13.5k|    if (type == kWalFile && (immutable_db_options_.WAL_ttl_seconds > 0 ||
  ------------------
  |  Branch (627:9): [True: 4.51k, False: 9.02k]
  |  Branch (627:30): [True: 0, False: 4.51k]
  ------------------
  628|  4.51k|                             immutable_db_options_.WAL_size_limit_MB > 0)) {
  ------------------
  |  Branch (628:30): [True: 0, False: 4.51k]
  ------------------
  629|      0|      wal_manager_.ArchiveWALFile(fname, number);
  630|      0|      continue;
  631|      0|    }
  632|       |
  633|       |    // If I do not own these files, e.g. secondary instance with max_open_files
  634|       |    // = -1, then no need to delete or schedule delete these files since they
  635|       |    // will be removed by their owner, e.g. the primary instance.
  636|  13.5k|    if (!own_files) {
  ------------------
  |  Branch (636:9): [True: 0, False: 13.5k]
  ------------------
  637|      0|      continue;
  638|      0|    }
  639|  13.5k|    if (schedule_only) {
  ------------------
  |  Branch (639:9): [True: 0, False: 13.5k]
  ------------------
  640|      0|      InstrumentedMutexLock guard_lock(&mutex_);
  641|      0|      SchedulePendingPurge(fname, dir_to_sync, type, number, state.job_id);
  642|  13.5k|    } else {
  643|  13.5k|      DeleteObsoleteFileImpl(state.job_id, fname, dir_to_sync, type, number);
  644|  13.5k|    }
  645|  13.5k|  }
  646|       |
  647|  18.0k|  {
  648|       |    // After purging obsolete files, remove them from files_grabbed_for_purge_.
  649|  18.0k|    InstrumentedMutexLock guard_lock(&mutex_);
  650|  18.0k|    autovector<uint64_t> to_be_removed;
  651|  18.0k|    for (auto fn : files_grabbed_for_purge_) {
  ------------------
  |  Branch (651:18): [True: 0, False: 18.0k]
  ------------------
  652|      0|      if (files_to_del.count(fn) != 0) {
  ------------------
  |  Branch (652:11): [True: 0, False: 0]
  ------------------
  653|      0|        to_be_removed.emplace_back(fn);
  654|      0|      }
  655|      0|    }
  656|  18.0k|    for (auto fn : to_be_removed) {
  ------------------
  |  Branch (656:18): [True: 0, False: 18.0k]
  ------------------
  657|      0|      files_grabbed_for_purge_.erase(fn);
  658|      0|    }
  659|  18.0k|  }
  660|       |
  661|       |  // Delete old info log files.
  662|  18.0k|  size_t old_info_log_file_count = old_info_log_files.size();
  663|  18.0k|  if (old_info_log_file_count != 0 &&
  ------------------
  |  Branch (663:7): [True: 9.02k, False: 9.02k]
  ------------------
  664|  18.0k|      old_info_log_file_count >= immutable_db_options_.keep_log_file_num) {
  ------------------
  |  Branch (664:7): [True: 0, False: 9.02k]
  ------------------
  665|      0|    std::sort(old_info_log_files.begin(), old_info_log_files.end());
  666|      0|    size_t end =
  667|      0|        old_info_log_file_count - immutable_db_options_.keep_log_file_num;
  668|      0|    for (unsigned int i = 0; i <= end; i++) {
  ------------------
  |  Branch (668:30): [True: 0, False: 0]
  ------------------
  669|      0|      std::string& to_delete = old_info_log_files.at(i);
  670|      0|      std::string full_path_to_delete =
  671|      0|          (immutable_db_options_.db_log_dir.empty()
  ------------------
  |  Branch (671:12): [True: 0, False: 0]
  ------------------
  672|      0|               ? dbname_
  673|      0|               : immutable_db_options_.db_log_dir) +
  674|      0|          "/" + to_delete;
  675|      0|      ROCKS_LOG_INFO(immutable_db_options_.info_log,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  676|      0|                     "[JOB %d] Delete info log file %s\n", state.job_id,
  677|      0|                     full_path_to_delete.c_str());
  678|      0|      Status s = env_->DeleteFile(full_path_to_delete);
  679|      0|      if (!s.ok()) {
  ------------------
  |  Branch (679:11): [True: 0, False: 0]
  ------------------
  680|      0|        if (env_->FileExists(full_path_to_delete).IsNotFound()) {
  ------------------
  |  Branch (680:13): [True: 0, False: 0]
  ------------------
  681|      0|          ROCKS_LOG_INFO(
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  682|      0|              immutable_db_options_.info_log,
  683|      0|              "[JOB %d] Tried to delete non-existing info log file %s FAILED "
  684|      0|              "-- %s\n",
  685|      0|              state.job_id, to_delete.c_str(), s.ToString().c_str());
  686|      0|        } else {
  687|      0|          ROCKS_LOG_ERROR(immutable_db_options_.info_log,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  688|      0|                          "[JOB %d] Delete info log file %s FAILED -- %s\n",
  689|      0|                          state.job_id, to_delete.c_str(),
  690|      0|                          s.ToString().c_str());
  691|      0|        }
  692|      0|      }
  693|      0|    }
  694|      0|  }
  695|  18.0k|  wal_manager_.PurgeObsoleteWALFiles();
  696|  18.0k|  LogFlush(immutable_db_options_.info_log);
  697|  18.0k|  InstrumentedMutexLock l(&mutex_);
  698|  18.0k|  --pending_purge_obsolete_files_;
  699|  18.0k|  assert(pending_purge_obsolete_files_ >= 0);
  700|  18.0k|  if (schedule_only) {
  ------------------
  |  Branch (700:7): [True: 0, False: 18.0k]
  ------------------
  701|       |    // Must change from pending_purge_obsolete_files_ to bg_purge_scheduled_
  702|       |    // while holding mutex (for GetSortedWalFiles() etc.)
  703|      0|    SchedulePurge();
  704|      0|  }
  705|  18.0k|  if (pending_purge_obsolete_files_ == 0) {
  ------------------
  |  Branch (705:7): [True: 18.0k, False: 0]
  ------------------
  706|  18.0k|    bg_cv_.SignalAll();
  707|  18.0k|  }
  708|  18.0k|  TEST_SYNC_POINT("DBImpl::PurgeObsoleteFiles:End");
  709|  18.0k|}
_ZN7rocksdb6DBImpl19DeleteObsoleteFilesEv:
  711|  9.02k|void DBImpl::DeleteObsoleteFiles() {
  712|  9.02k|  mutex_.AssertHeld();
  713|  9.02k|  JobContext job_context(next_job_id_.fetch_add(1));
  714|  9.02k|  FindObsoleteFiles(&job_context, true);
  715|       |
  716|  9.02k|  mutex_.Unlock();
  717|  9.02k|  if (job_context.HaveSomethingToDelete()) {
  ------------------
  |  Branch (717:7): [True: 9.02k, False: 0]
  ------------------
  718|  9.02k|    bool defer_purge = immutable_db_options_.avoid_unnecessary_blocking_io;
  719|  9.02k|    PurgeObsoleteFiles(job_context, defer_purge);
  720|  9.02k|  }
  721|  9.02k|  job_context.Clean();
  722|  9.02k|  mutex_.Lock();
  723|  9.02k|}
_ZN7rocksdb6DBImpl7SetDBIdEONSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbPNS0_15RecoveryContextE:
  924|  9.02k|                     RecoveryContext* recovery_ctx) {
  925|  9.02k|  assert(db_id_.empty());
  926|  9.02k|  assert(!id.empty());
  927|  9.02k|  db_id_ = std::move(id);
  928|  9.02k|  if (!read_only && immutable_db_options_.write_dbid_to_manifest) {
  ------------------
  |  Branch (928:7): [True: 9.02k, False: 0]
  |  Branch (928:21): [True: 0, False: 9.02k]
  ------------------
  929|      0|    assert(recovery_ctx != nullptr);
  930|      0|    assert(versions_->GetColumnFamilySet() != nullptr);
  931|      0|    VersionEdit edit;
  932|      0|    edit.SetDBId(db_id_);
  933|      0|    versions_->db_id_ = db_id_;
  934|      0|    recovery_ctx->UpdateVersionEdits(
  935|      0|        versions_->GetColumnFamilySet()->GetDefault(), edit);
  936|      0|  }
  937|  9.02k|}
_ZN7rocksdb6DBImpl9SetupDBIdERKNS_12WriteOptionsEbPNS0_15RecoveryContextE:
  940|  9.02k|                         RecoveryContext* recovery_ctx) {
  941|  9.02k|  Status s;
  942|       |  // Check for the IDENTITY file and create it if not there or
  943|       |  // broken or not matching manifest
  944|  9.02k|  std::string db_id_in_file;
  945|  9.02k|  s = fs_->FileExists(IdentityFileName(dbname_), IOOptions(), nullptr);
  946|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (946:7): [True: 9.02k, False: 0]
  ------------------
  947|  9.02k|    s = GetDbIdentityFromIdentityFile(&db_id_in_file);
  948|  9.02k|    if (s.ok() && !db_id_in_file.empty()) {
  ------------------
  |  Branch (948:9): [True: 9.02k, False: 0]
  |  Branch (948:19): [True: 9.02k, False: 0]
  ------------------
  949|  9.02k|      if (db_id_.empty()) {
  ------------------
  |  Branch (949:11): [True: 9.02k, False: 0]
  ------------------
  950|       |        // Loaded from file and wasn't already known from manifest
  951|  9.02k|        SetDBId(std::move(db_id_in_file), read_only, recovery_ctx);
  952|  9.02k|        return s;
  953|  9.02k|      } else if (db_id_ == db_id_in_file) {
  ------------------
  |  Branch (953:18): [True: 0, False: 0]
  ------------------
  954|       |        // Loaded from file and matches manifest
  955|      0|        return s;
  956|      0|      }
  957|  9.02k|    }
  958|  9.02k|  }
  959|      0|  if (s.IsNotFound()) {
  ------------------
  |  Branch (959:7): [True: 0, False: 0]
  ------------------
  960|      0|    s = Status::OK();
  961|      0|  }
  962|      0|  if (!s.ok()) {
  ------------------
  |  Branch (962:7): [True: 0, False: 0]
  ------------------
  963|      0|    assert(s.IsIOError());
  964|      0|    return s;
  965|      0|  }
  966|       |  // Otherwise IDENTITY file is missing or no good.
  967|       |  // Generate new id if needed
  968|      0|  if (db_id_.empty()) {
  ------------------
  |  Branch (968:7): [True: 0, False: 0]
  ------------------
  969|      0|    SetDBId(env_->GenerateUniqueId(), read_only, recovery_ctx);
  970|      0|  }
  971|       |  // Persist it to IDENTITY file if allowed
  972|      0|  if (!read_only) {
  ------------------
  |  Branch (972:7): [True: 0, False: 0]
  ------------------
  973|      0|    s = SetIdentityFile(write_options, env_, dbname_, db_id_);
  974|      0|  }
  975|      0|  return s;
  976|      0|}
_ZN7rocksdb6DBImpl17CollectAllDBPathsEv:
  978|  36.1k|std::set<std::string> DBImpl::CollectAllDBPaths() {
  979|  36.1k|  std::set<std::string> all_db_paths;
  980|  36.1k|  all_db_paths.insert(NormalizePath(dbname_));
  981|  36.1k|  for (const auto& db_path : immutable_db_options_.db_paths) {
  ------------------
  |  Branch (981:28): [True: 36.1k, False: 36.1k]
  ------------------
  982|  36.1k|    all_db_paths.insert(NormalizePath(db_path.path));
  983|  36.1k|  }
  984|  36.1k|  for (const auto* cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (984:24): [True: 36.1k, False: 36.1k]
  ------------------
  985|  36.1k|    for (const auto& cf_path : cfd->ioptions()->cf_paths) {
  ------------------
  |  Branch (985:30): [True: 36.1k, False: 36.1k]
  ------------------
  986|  36.1k|      all_db_paths.insert(NormalizePath(cf_path.path));
  987|  36.1k|    }
  988|  36.1k|  }
  989|  36.1k|  return all_db_paths;
  990|  36.1k|}
_ZN7rocksdb6DBImpl25MaybeUpdateNextFileNumberEPNS0_15RecoveryContextE:
  992|  9.02k|Status DBImpl::MaybeUpdateNextFileNumber(RecoveryContext* recovery_ctx) {
  993|  9.02k|  mutex_.AssertHeld();
  994|  9.02k|  uint64_t next_file_number = versions_->current_next_file_number();
  995|  9.02k|  uint64_t largest_file_number = next_file_number;
  996|  9.02k|  Status s;
  997|  9.02k|  for (const auto& path : CollectAllDBPaths()) {
  ------------------
  |  Branch (997:25): [True: 9.02k, False: 9.02k]
  ------------------
  998|  9.02k|    std::vector<std::string> files;
  999|  9.02k|    s = env_->GetChildren(path, &files);
 1000|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (1000:9): [True: 0, False: 9.02k]
  ------------------
 1001|      0|      break;
 1002|      0|    }
 1003|  58.6k|    for (const auto& fname : files) {
  ------------------
  |  Branch (1003:28): [True: 58.6k, False: 9.02k]
  ------------------
 1004|  58.6k|      uint64_t number = 0;
 1005|  58.6k|      FileType type;
 1006|  58.6k|      if (!ParseFileName(fname, &number, &type)) {
  ------------------
  |  Branch (1006:11): [True: 13.5k, False: 45.1k]
  ------------------
 1007|  13.5k|        continue;
 1008|  13.5k|      }
 1009|  45.1k|      const std::string normalized_fpath = path + kFilePathSeparator + fname;
 1010|  45.1k|      largest_file_number = std::max(largest_file_number, number);
 1011|  45.1k|      if ((type == kTableFile || type == kBlobFile)) {
  ------------------
  |  Branch (1011:12): [True: 0, False: 45.1k]
  |  Branch (1011:34): [True: 0, False: 45.1k]
  ------------------
 1012|      0|        recovery_ctx->existing_data_files_.push_back(normalized_fpath);
 1013|      0|      }
 1014|  45.1k|    }
 1015|  9.02k|  }
 1016|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (1016:7): [True: 0, False: 9.02k]
  ------------------
 1017|      0|    return s;
 1018|      0|  }
 1019|       |
 1020|  9.02k|  if (largest_file_number >= next_file_number) {
  ------------------
  |  Branch (1020:7): [True: 9.02k, False: 0]
  ------------------
 1021|  9.02k|    versions_->next_file_number_.store(largest_file_number + 1);
 1022|  9.02k|  }
 1023|       |
 1024|  9.02k|  VersionEdit edit;
 1025|  9.02k|  edit.SetNextFile(versions_->next_file_number_.load());
 1026|  9.02k|  assert(versions_->GetColumnFamilySet());
 1027|  9.02k|  ColumnFamilyData* default_cfd = versions_->GetColumnFamilySet()->GetDefault();
 1028|  9.02k|  assert(default_cfd);
 1029|  9.02k|  recovery_ctx->UpdateVersionEdits(default_cfd, edit);
 1030|  9.02k|  return s;
 1031|  9.02k|}
db_impl_files.cc:_ZZN7rocksdb6DBImpl17FindObsoleteFilesEPNS_10JobContextEbbENK3$_0clEv:
  255|  18.0k|  Defer cleanup([job_context, this]() {
  256|  18.0k|    assert(job_context != nullptr);
  257|  18.0k|    if (!job_context->HaveSomethingToDelete()) {
  ------------------
  |  Branch (257:9): [True: 0, False: 18.0k]
  ------------------
  258|      0|      mutex_.AssertHeld();
  259|      0|      --pending_purge_obsolete_files_;
  260|      0|    }
  261|  18.0k|  });
db_impl_files.cc:_ZZN7rocksdb6DBImpl18PurgeObsoleteFilesERNS_10JobContextEbENK3$_0clERKNS1_17CandidateFileInfoES6_:
  474|   524k|               const JobContext::CandidateFileInfo& rhs) {
  475|   524k|              if (lhs.file_name < rhs.file_name) {
  ------------------
  |  Branch (475:19): [True: 402k, False: 121k]
  ------------------
  476|   402k|                return true;
  477|   402k|              } else if (lhs.file_name > rhs.file_name) {
  ------------------
  |  Branch (477:26): [True: 112k, False: 9.02k]
  ------------------
  478|   112k|                return false;
  479|   112k|              } else {
  480|  9.02k|                return (lhs.file_path < rhs.file_path);
  481|  9.02k|              }
  482|   524k|            });

_ZN7rocksdb15SanitizeOptionsERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_7OptionsEbPNS_6StatusE:
   34|  4.51k|                        bool read_only, Status* logger_creation_s) {
   35|  4.51k|  auto db_options =
   36|  4.51k|      SanitizeOptions(dbname, DBOptions(src), read_only, logger_creation_s);
   37|  4.51k|  ImmutableDBOptions immutable_db_options(db_options);
   38|  4.51k|  auto cf_options =
   39|  4.51k|      SanitizeOptions(immutable_db_options, ColumnFamilyOptions(src));
   40|  4.51k|  return Options(db_options, cf_options);
   41|  4.51k|}
_ZN7rocksdb15SanitizeOptionsERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_9DBOptionsEbPNS_6StatusE:
   44|  13.5k|                          bool read_only, Status* logger_creation_s) {
   45|  13.5k|  DBOptions result(src);
   46|       |
   47|  13.5k|  if (result.env == nullptr) {
  ------------------
  |  Branch (47:7): [True: 0, False: 13.5k]
  ------------------
   48|      0|    result.env = Env::Default();
   49|      0|  }
   50|       |
   51|       |  // result.max_open_files means an "infinite" open files.
   52|  13.5k|  if (result.max_open_files != -1) {
  ------------------
  |  Branch (52:7): [True: 0, False: 13.5k]
  ------------------
   53|      0|    int max_max_open_files = port::GetMaxOpenFiles();
   54|      0|    if (max_max_open_files == -1) {
  ------------------
  |  Branch (54:9): [True: 0, False: 0]
  ------------------
   55|      0|      max_max_open_files = 0x400000;
   56|      0|    }
   57|      0|    ClipToRange(&result.max_open_files, 20, max_max_open_files);
   58|      0|    TEST_SYNC_POINT_CALLBACK("SanitizeOptions::AfterChangeMaxOpenFiles",
   59|      0|                             &result.max_open_files);
   60|      0|  }
   61|       |
   62|  13.5k|  if (result.info_log == nullptr && !read_only) {
  ------------------
  |  Branch (62:7): [True: 13.5k, False: 0]
  |  Branch (62:37): [True: 13.5k, False: 0]
  ------------------
   63|  13.5k|    Status s = CreateLoggerFromOptions(dbname, result, &result.info_log);
   64|  13.5k|    if (!s.ok()) {
  ------------------
  |  Branch (64:9): [True: 0, False: 13.5k]
  ------------------
   65|       |      // No place suitable for logging
   66|      0|      result.info_log = nullptr;
   67|      0|      if (logger_creation_s) {
  ------------------
  |  Branch (67:11): [True: 0, False: 0]
  ------------------
   68|      0|        *logger_creation_s = s;
   69|      0|      }
   70|      0|    }
   71|  13.5k|  }
   72|       |
   73|  13.5k|  if (!result.write_buffer_manager) {
  ------------------
  |  Branch (73:7): [True: 13.5k, False: 0]
  ------------------
   74|  13.5k|    result.write_buffer_manager.reset(
   75|  13.5k|        new WriteBufferManager(result.db_write_buffer_size));
   76|  13.5k|  }
   77|  13.5k|  auto bg_job_limits = DBImpl::GetBGJobLimits(
   78|  13.5k|      result.max_background_flushes, result.max_background_compactions,
   79|  13.5k|      result.max_background_jobs, true /* parallelize_compactions */);
   80|  13.5k|  result.env->IncBackgroundThreadsIfNeeded(bg_job_limits.max_compactions,
   81|  13.5k|                                           Env::Priority::LOW);
   82|  13.5k|  result.env->IncBackgroundThreadsIfNeeded(bg_job_limits.max_flushes,
   83|  13.5k|                                           Env::Priority::HIGH);
   84|       |
   85|  13.5k|  if (result.rate_limiter.get() != nullptr) {
  ------------------
  |  Branch (85:7): [True: 0, False: 13.5k]
  ------------------
   86|      0|    if (result.bytes_per_sync == 0) {
  ------------------
  |  Branch (86:9): [True: 0, False: 0]
  ------------------
   87|      0|      result.bytes_per_sync = 1024 * 1024;
   88|      0|    }
   89|      0|  }
   90|       |
   91|  13.5k|  if (result.delayed_write_rate == 0) {
  ------------------
  |  Branch (91:7): [True: 13.5k, False: 0]
  ------------------
   92|  13.5k|    if (result.rate_limiter.get() != nullptr) {
  ------------------
  |  Branch (92:9): [True: 0, False: 13.5k]
  ------------------
   93|      0|      result.delayed_write_rate = result.rate_limiter->GetBytesPerSecond();
   94|      0|    }
   95|  13.5k|    if (result.delayed_write_rate == 0) {
  ------------------
  |  Branch (95:9): [True: 13.5k, False: 0]
  ------------------
   96|  13.5k|      result.delayed_write_rate = 16 * 1024 * 1024;
   97|  13.5k|    }
   98|  13.5k|  }
   99|       |
  100|  13.5k|  if (result.WAL_ttl_seconds > 0 || result.WAL_size_limit_MB > 0) {
  ------------------
  |  Branch (100:7): [True: 0, False: 13.5k]
  |  Branch (100:37): [True: 0, False: 13.5k]
  ------------------
  101|      0|    result.recycle_log_file_num = false;
  102|      0|  }
  103|       |
  104|  13.5k|  if (result.recycle_log_file_num &&
  ------------------
  |  Branch (104:7): [True: 0, False: 13.5k]
  ------------------
  105|  13.5k|      (result.wal_recovery_mode ==
  ------------------
  |  Branch (105:8): [True: 0, False: 0]
  ------------------
  106|      0|           WALRecoveryMode::kTolerateCorruptedTailRecords ||
  107|      0|       result.wal_recovery_mode == WALRecoveryMode::kAbsoluteConsistency)) {
  ------------------
  |  Branch (107:8): [True: 0, False: 0]
  ------------------
  108|       |    // - kTolerateCorruptedTailRecords is inconsistent with recycle log file
  109|       |    //   feature. WAL recycling expects recovery success upon encountering a
  110|       |    //   corrupt record at the point where new data ends and recycled data
  111|       |    //   remains at the tail. However, `kTolerateCorruptedTailRecords` must fail
  112|       |    //   upon encountering any such corrupt record, as it cannot differentiate
  113|       |    //   between this and a real corruption, which would cause committed updates
  114|       |    //   to be truncated -- a violation of the recovery guarantee.
  115|       |    // - kPointInTimeRecovery and kAbsoluteConsistency are incompatible with
  116|       |    //   recycle log file feature temporarily due to a bug found introducing a
  117|       |    //   hole in the recovered data
  118|       |    //   (https://github.com/facebook/rocksdb/pull/7252#issuecomment-673766236).
  119|       |    //   Besides this bug, we believe the features are fundamentally compatible.
  120|      0|    result.recycle_log_file_num = 0;
  121|      0|  }
  122|       |
  123|  13.5k|  if (result.db_paths.size() == 0) {
  ------------------
  |  Branch (123:7): [True: 13.5k, False: 0]
  ------------------
  124|  13.5k|    result.db_paths.emplace_back(dbname, std::numeric_limits<uint64_t>::max());
  125|  13.5k|  } else if (result.wal_dir.empty()) {
  ------------------
  |  Branch (125:14): [True: 0, False: 0]
  ------------------
  126|       |    // Use dbname as default
  127|      0|    result.wal_dir = dbname;
  128|      0|  }
  129|  13.5k|  if (!result.wal_dir.empty()) {
  ------------------
  |  Branch (129:7): [True: 0, False: 13.5k]
  ------------------
  130|       |    // If there is a wal_dir already set, check to see if the wal_dir is the
  131|       |    // same as the dbname AND the same as the db_path[0] (which must exist from
  132|       |    // a few lines ago). If the wal_dir matches both of these values, then clear
  133|       |    // the wal_dir value, which will make wal_dir == dbname.  Most likely this
  134|       |    // condition was the result of reading an old options file where we forced
  135|       |    // wal_dir to be set (to dbname).
  136|      0|    auto npath = NormalizePath(dbname + "/");
  137|      0|    if (npath == NormalizePath(result.wal_dir + "/") &&
  ------------------
  |  Branch (137:9): [True: 0, False: 0]
  |  Branch (137:9): [True: 0, False: 0]
  ------------------
  138|      0|        npath == NormalizePath(result.db_paths[0].path + "/")) {
  ------------------
  |  Branch (138:9): [True: 0, False: 0]
  ------------------
  139|      0|      result.wal_dir.clear();
  140|      0|    }
  141|      0|  }
  142|       |
  143|  13.5k|  if (!result.wal_dir.empty() && result.wal_dir.back() == '/') {
  ------------------
  |  Branch (143:7): [True: 0, False: 13.5k]
  |  Branch (143:34): [True: 0, False: 0]
  ------------------
  144|      0|    result.wal_dir = result.wal_dir.substr(0, result.wal_dir.size() - 1);
  145|      0|  }
  146|       |
  147|       |  // Force flush on DB open if 2PC is enabled, since with 2PC we have no
  148|       |  // guarantee that consecutive log files have consecutive sequence id, which
  149|       |  // make recovery complicated.
  150|  13.5k|  if (result.allow_2pc) {
  ------------------
  |  Branch (150:7): [True: 0, False: 13.5k]
  ------------------
  151|      0|    result.avoid_flush_during_recovery = false;
  152|      0|  }
  153|       |
  154|  13.5k|  ImmutableDBOptions immutable_db_options(result);
  155|  13.5k|  if (!immutable_db_options.IsWalDirSameAsDBPath()) {
  ------------------
  |  Branch (155:7): [True: 0, False: 13.5k]
  ------------------
  156|       |    // Either the WAL dir and db_paths[0]/db_name are not the same, or we
  157|       |    // cannot tell for sure. In either case, assume they're different and
  158|       |    // explicitly cleanup the trash log files (bypass DeleteScheduler)
  159|       |    // Do this first so even if we end up calling
  160|       |    // DeleteScheduler::CleanupDirectory on the same dir later, it will be
  161|       |    // safe
  162|      0|    std::vector<std::string> filenames;
  163|      0|    IOOptions io_opts;
  164|      0|    io_opts.do_not_recurse = true;
  165|      0|    auto wal_dir = immutable_db_options.GetWalDir();
  166|      0|    Status s = immutable_db_options.fs->GetChildren(
  167|      0|        wal_dir, io_opts, &filenames, /*IODebugContext*=*/nullptr);
  168|      0|    s.PermitUncheckedError();  //**TODO: What to do on error?
  169|      0|    for (std::string& filename : filenames) {
  ------------------
  |  Branch (169:32): [True: 0, False: 0]
  ------------------
  170|      0|      if (filename.find(".log.trash", filename.length() -
  ------------------
  |  Branch (170:11): [True: 0, False: 0]
  ------------------
  171|      0|                                          std::string(".log.trash").length()) !=
  172|      0|          std::string::npos) {
  173|      0|        std::string trash_file = wal_dir + "/" + filename;
  174|      0|        result.env->DeleteFile(trash_file).PermitUncheckedError();
  175|      0|      }
  176|      0|    }
  177|      0|  }
  178|       |
  179|       |  // Create a default SstFileManager for purposes of tracking compaction size
  180|       |  // and facilitating recovery from out of space errors.
  181|  13.5k|  if (result.sst_file_manager.get() == nullptr) {
  ------------------
  |  Branch (181:7): [True: 13.5k, False: 0]
  ------------------
  182|  13.5k|    std::shared_ptr<SstFileManager> sst_file_manager(
  183|  13.5k|        NewSstFileManager(result.env, result.info_log));
  184|  13.5k|    result.sst_file_manager = sst_file_manager;
  185|  13.5k|  }
  186|       |
  187|       |  // Supported wal compression types
  188|  13.5k|  if (!StreamingCompressionTypeSupported(result.wal_compression)) {
  ------------------
  |  Branch (188:7): [True: 0, False: 13.5k]
  ------------------
  189|      0|    result.wal_compression = kNoCompression;
  190|      0|    ROCKS_LOG_WARN(result.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  191|      0|                   "wal_compression is disabled since only zstd is supported");
  192|      0|  }
  193|       |
  194|  13.5k|  if (!result.paranoid_checks) {
  ------------------
  |  Branch (194:7): [True: 0, False: 13.5k]
  ------------------
  195|      0|    result.skip_checking_sst_file_sizes_on_db_open = true;
  196|      0|    ROCKS_LOG_INFO(result.info_log,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  197|      0|                   "file size check will be skipped during open.");
  198|      0|  }
  199|       |
  200|  13.5k|  return result;
  201|  13.5k|}
_ZN7rocksdb6DBImpl15ValidateOptionsERKNS_9DBOptionsERKNSt3__16vectorINS_22ColumnFamilyDescriptorENS4_9allocatorIS6_EEEE:
  220|  9.02k|    const std::vector<ColumnFamilyDescriptor>& column_families) {
  221|  9.02k|  Status s;
  222|  9.02k|  for (auto& cfd : column_families) {
  ------------------
  |  Branch (222:18): [True: 9.02k, False: 9.02k]
  ------------------
  223|  9.02k|    s = ColumnFamilyData::ValidateOptions(db_options, cfd.options);
  224|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (224:9): [True: 0, False: 9.02k]
  ------------------
  225|      0|      return s;
  226|      0|    }
  227|  9.02k|  }
  228|  9.02k|  s = ValidateOptions(db_options);
  229|  9.02k|  return s;
  230|  9.02k|}
_ZN7rocksdb6DBImpl15ValidateOptionsERKNS_9DBOptionsE:
  232|  9.02k|Status DBImpl::ValidateOptions(const DBOptions& db_options) {
  233|  9.02k|  if (db_options.db_paths.size() > 4) {
  ------------------
  |  Branch (233:7): [True: 0, False: 9.02k]
  ------------------
  234|      0|    return Status::NotSupported(
  235|      0|        "More than four DB paths are not supported yet. ");
  236|      0|  }
  237|       |
  238|  9.02k|  if (db_options.allow_mmap_reads && db_options.use_direct_reads) {
  ------------------
  |  Branch (238:7): [True: 0, False: 9.02k]
  |  Branch (238:38): [True: 0, False: 0]
  ------------------
  239|       |    // Protect against assert in PosixMMapReadableFile constructor
  240|      0|    return Status::NotSupported(
  241|      0|        "If memory mapped reads (allow_mmap_reads) are enabled "
  242|      0|        "then direct I/O reads (use_direct_reads) must be disabled. ");
  243|      0|  }
  244|       |
  245|  9.02k|  if (db_options.allow_mmap_writes &&
  ------------------
  |  Branch (245:7): [True: 0, False: 9.02k]
  ------------------
  246|  9.02k|      db_options.use_direct_io_for_flush_and_compaction) {
  ------------------
  |  Branch (246:7): [True: 0, False: 0]
  ------------------
  247|      0|    return Status::NotSupported(
  248|      0|        "If memory mapped writes (allow_mmap_writes) are enabled "
  249|      0|        "then direct I/O writes (use_direct_io_for_flush_and_compaction) must "
  250|      0|        "be disabled. ");
  251|      0|  }
  252|       |
  253|  9.02k|  if (db_options.keep_log_file_num == 0) {
  ------------------
  |  Branch (253:7): [True: 0, False: 9.02k]
  ------------------
  254|      0|    return Status::InvalidArgument("keep_log_file_num must be greater than 0");
  255|      0|  }
  256|       |
  257|  9.02k|  if (db_options.unordered_write &&
  ------------------
  |  Branch (257:7): [True: 0, False: 9.02k]
  ------------------
  258|  9.02k|      !db_options.allow_concurrent_memtable_write) {
  ------------------
  |  Branch (258:7): [True: 0, False: 0]
  ------------------
  259|      0|    return Status::InvalidArgument(
  260|      0|        "unordered_write is incompatible with "
  261|      0|        "!allow_concurrent_memtable_write");
  262|      0|  }
  263|       |
  264|  9.02k|  if (db_options.unordered_write && db_options.enable_pipelined_write) {
  ------------------
  |  Branch (264:7): [True: 0, False: 9.02k]
  |  Branch (264:37): [True: 0, False: 0]
  ------------------
  265|      0|    return Status::InvalidArgument(
  266|      0|        "unordered_write is incompatible with enable_pipelined_write");
  267|      0|  }
  268|       |
  269|  9.02k|  if (db_options.atomic_flush && db_options.enable_pipelined_write) {
  ------------------
  |  Branch (269:7): [True: 0, False: 9.02k]
  |  Branch (269:34): [True: 0, False: 0]
  ------------------
  270|      0|    return Status::InvalidArgument(
  271|      0|        "atomic_flush is incompatible with enable_pipelined_write");
  272|      0|  }
  273|       |
  274|  9.02k|  if (db_options.use_direct_io_for_flush_and_compaction &&
  ------------------
  |  Branch (274:7): [True: 0, False: 9.02k]
  ------------------
  275|  9.02k|      0 == db_options.writable_file_max_buffer_size) {
  ------------------
  |  Branch (275:7): [True: 0, False: 0]
  ------------------
  276|      0|    return Status::InvalidArgument(
  277|      0|        "writes in direct IO require writable_file_max_buffer_size > 0");
  278|      0|  }
  279|       |
  280|  9.02k|  if (db_options.daily_offpeak_time_utc != "") {
  ------------------
  |  Branch (280:7): [True: 0, False: 9.02k]
  ------------------
  281|      0|    int start_time, end_time;
  282|      0|    if (!TryParseTimeRangeString(db_options.daily_offpeak_time_utc, start_time,
  ------------------
  |  Branch (282:9): [True: 0, False: 0]
  ------------------
  283|      0|                                 end_time)) {
  284|      0|      return Status::InvalidArgument(
  285|      0|          "daily_offpeak_time_utc should be set in the format HH:mm-HH:mm "
  286|      0|          "(e.g. 04:30-07:30)");
  287|      0|    } else if (start_time == end_time) {
  ------------------
  |  Branch (287:16): [True: 0, False: 0]
  ------------------
  288|      0|      return Status::InvalidArgument(
  289|      0|          "start_time and end_time cannot be the same");
  290|      0|    }
  291|      0|  }
  292|  9.02k|  return Status::OK();
  293|  9.02k|}
_ZN7rocksdb6DBImpl5NewDBEPNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEE:
  295|  4.51k|Status DBImpl::NewDB(std::vector<std::string>* new_filenames) {
  296|  4.51k|  VersionEdit new_db;
  297|  4.51k|  const WriteOptions write_options(Env::IOActivity::kDBOpen);
  298|  4.51k|  Status s = SetIdentityFile(write_options, env_, dbname_);
  299|  4.51k|  if (!s.ok()) {
  ------------------
  |  Branch (299:7): [True: 0, False: 4.51k]
  ------------------
  300|      0|    return s;
  301|      0|  }
  302|  4.51k|  if (immutable_db_options_.write_dbid_to_manifest) {
  ------------------
  |  Branch (302:7): [True: 0, False: 4.51k]
  ------------------
  303|      0|    std::string temp_db_id;
  304|      0|    s = GetDbIdentityFromIdentityFile(&temp_db_id);
  305|      0|    if (!s.ok()) {
  ------------------
  |  Branch (305:9): [True: 0, False: 0]
  ------------------
  306|      0|      return s;
  307|      0|    }
  308|      0|    new_db.SetDBId(temp_db_id);
  309|      0|  }
  310|  4.51k|  new_db.SetLogNumber(0);
  311|  4.51k|  new_db.SetNextFile(2);
  312|  4.51k|  new_db.SetLastSequence(0);
  313|       |
  314|  4.51k|  ROCKS_LOG_INFO(immutable_db_options_.info_log, "Creating manifest 1 \n");
  ------------------
  |  |   39|  4.51k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  4.51k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  4.51k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  4.51k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  4.51k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  315|  4.51k|  const std::string manifest = DescriptorFileName(dbname_, 1);
  316|  4.51k|  {
  317|  4.51k|    if (fs_->FileExists(manifest, IOOptions(), nullptr).ok()) {
  ------------------
  |  Branch (317:9): [True: 0, False: 4.51k]
  ------------------
  318|      0|      fs_->DeleteFile(manifest, IOOptions(), nullptr).PermitUncheckedError();
  319|      0|    }
  320|  4.51k|    std::unique_ptr<FSWritableFile> file;
  321|  4.51k|    FileOptions file_options = fs_->OptimizeForManifestWrite(file_options_);
  322|  4.51k|    s = NewWritableFile(fs_.get(), manifest, &file, file_options);
  323|  4.51k|    if (!s.ok()) {
  ------------------
  |  Branch (323:9): [True: 0, False: 4.51k]
  ------------------
  324|      0|      return s;
  325|      0|    }
  326|  4.51k|    FileTypeSet tmp_set = immutable_db_options_.checksum_handoff_file_types;
  327|  4.51k|    file->SetPreallocationBlockSize(
  328|  4.51k|        immutable_db_options_.manifest_preallocation_size);
  329|  4.51k|    std::unique_ptr<WritableFileWriter> file_writer(new WritableFileWriter(
  330|  4.51k|        std::move(file), manifest, file_options, immutable_db_options_.clock,
  331|  4.51k|        io_tracer_, nullptr /* stats */,
  332|  4.51k|        Histograms::HISTOGRAM_ENUM_MAX /* hist_type */,
  333|  4.51k|        immutable_db_options_.listeners, nullptr,
  334|  4.51k|        tmp_set.Contains(FileType::kDescriptorFile),
  335|  4.51k|        tmp_set.Contains(FileType::kDescriptorFile)));
  336|  4.51k|    log::Writer log(std::move(file_writer), 0, false);
  337|  4.51k|    std::string record;
  338|  4.51k|    new_db.EncodeTo(&record);
  339|  4.51k|    s = log.AddRecord(write_options, record);
  340|  4.51k|    if (s.ok()) {
  ------------------
  |  Branch (340:9): [True: 4.51k, False: 0]
  ------------------
  341|  4.51k|      s = SyncManifest(&immutable_db_options_, write_options, log.file());
  342|  4.51k|    }
  343|  4.51k|  }
  344|  4.51k|  if (s.ok()) {
  ------------------
  |  Branch (344:7): [True: 4.51k, False: 0]
  ------------------
  345|       |    // Make "CURRENT" file that points to the new manifest file.
  346|  4.51k|    s = SetCurrentFile(write_options, fs_.get(), dbname_, 1,
  347|  4.51k|                       directories_.GetDbDir());
  348|  4.51k|    if (new_filenames) {
  ------------------
  |  Branch (348:9): [True: 4.51k, False: 0]
  ------------------
  349|  4.51k|      new_filenames->emplace_back(
  350|  4.51k|          manifest.substr(manifest.find_last_of("/\\") + 1));
  351|  4.51k|    }
  352|  4.51k|  } else {
  353|      0|    fs_->DeleteFile(manifest, IOOptions(), nullptr).PermitUncheckedError();
  354|      0|  }
  355|  4.51k|  return s;
  356|  4.51k|}
_ZN7rocksdb6DBImpl21CreateAndNewDirectoryEPNS_10FileSystemERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrINS_11FSDirectoryENS3_14default_deleteISD_EEEE:
  360|  18.0k|    std::unique_ptr<FSDirectory>* directory) {
  361|       |  // We call CreateDirIfMissing() as the directory may already exist (if we
  362|       |  // are reopening a DB), when this happens we don't want creating the
  363|       |  // directory to cause an error. However, we need to check if creating the
  364|       |  // directory fails or else we may get an obscure message about the lock
  365|       |  // file not existing. One real-world example of this occurring is if
  366|       |  // env->CreateDirIfMissing() doesn't create intermediate directories, e.g.
  367|       |  // when dbname_ is "dir/db" but when "dir" doesn't exist.
  368|  18.0k|  IOStatus io_s = fs->CreateDirIfMissing(dirname, IOOptions(), nullptr);
  369|  18.0k|  if (!io_s.ok()) {
  ------------------
  |  Branch (369:7): [True: 0, False: 18.0k]
  ------------------
  370|      0|    return io_s;
  371|      0|  }
  372|  18.0k|  return fs->NewDirectory(dirname, IOOptions(), directory, nullptr);
  373|  18.0k|}
_ZN7rocksdb11Directories14SetDirectoriesEPNS_10FileSystemERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_RKNS3_6vectorINS_6DbPathENS7_ISD_EEEE:
  377|  9.02k|                                     const std::vector<DbPath>& data_paths) {
  378|  9.02k|  IOStatus io_s = DBImpl::CreateAndNewDirectory(fs, dbname, &db_dir_);
  379|  9.02k|  if (!io_s.ok()) {
  ------------------
  |  Branch (379:7): [True: 0, False: 9.02k]
  ------------------
  380|      0|    return io_s;
  381|      0|  }
  382|  9.02k|  if (!wal_dir.empty() && dbname != wal_dir) {
  ------------------
  |  Branch (382:7): [True: 0, False: 9.02k]
  |  Branch (382:27): [True: 0, False: 0]
  ------------------
  383|      0|    io_s = DBImpl::CreateAndNewDirectory(fs, wal_dir, &wal_dir_);
  384|      0|    if (!io_s.ok()) {
  ------------------
  |  Branch (384:9): [True: 0, False: 0]
  ------------------
  385|      0|      return io_s;
  386|      0|    }
  387|      0|  }
  388|       |
  389|  9.02k|  data_dirs_.clear();
  390|  9.02k|  for (auto& p : data_paths) {
  ------------------
  |  Branch (390:16): [True: 9.02k, False: 9.02k]
  ------------------
  391|  9.02k|    const std::string db_path = p.path;
  392|  9.02k|    if (db_path == dbname) {
  ------------------
  |  Branch (392:9): [True: 9.02k, False: 0]
  ------------------
  393|  9.02k|      data_dirs_.emplace_back(nullptr);
  394|  9.02k|    } else {
  395|      0|      std::unique_ptr<FSDirectory> path_directory;
  396|      0|      io_s = DBImpl::CreateAndNewDirectory(fs, db_path, &path_directory);
  397|      0|      if (!io_s.ok()) {
  ------------------
  |  Branch (397:11): [True: 0, False: 0]
  ------------------
  398|      0|        return io_s;
  399|      0|      }
  400|      0|      data_dirs_.emplace_back(path_directory.release());
  401|      0|    }
  402|  9.02k|  }
  403|  9.02k|  assert(data_dirs_.size() == data_paths.size());
  404|  9.02k|  return IOStatus::OK();
  405|  9.02k|}
_ZN7rocksdb6DBImpl7RecoverERKNSt3__16vectorINS_22ColumnFamilyDescriptorENS1_9allocatorIS3_EEEEbbbbPmPNS0_15RecoveryContextEPb:
  411|  9.02k|    bool* can_retry) {
  412|  9.02k|  mutex_.AssertHeld();
  413|       |
  414|  9.02k|  const WriteOptions write_options(Env::IOActivity::kDBOpen);
  415|  9.02k|  bool tmp_is_new_db = false;
  416|  9.02k|  bool& is_new_db = recovery_ctx ? recovery_ctx->is_new_db_ : tmp_is_new_db;
  ------------------
  |  Branch (416:21): [True: 9.02k, False: 0]
  ------------------
  417|  9.02k|  assert(db_lock_ == nullptr);
  418|  9.02k|  std::vector<std::string> files_in_dbname;
  419|  9.02k|  if (!read_only) {
  ------------------
  |  Branch (419:7): [True: 9.02k, False: 0]
  ------------------
  420|  9.02k|    Status s = directories_.SetDirectories(fs_.get(), dbname_,
  421|  9.02k|                                           immutable_db_options_.wal_dir,
  422|  9.02k|                                           immutable_db_options_.db_paths);
  423|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (423:9): [True: 0, False: 9.02k]
  ------------------
  424|      0|      return s;
  425|      0|    }
  426|       |
  427|  9.02k|    s = env_->LockFile(LockFileName(dbname_), &db_lock_);
  428|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (428:9): [True: 0, False: 9.02k]
  ------------------
  429|      0|      return s;
  430|      0|    }
  431|       |
  432|  9.02k|    std::string current_fname = CurrentFileName(dbname_);
  433|       |    // Path to any MANIFEST file in the db dir. It does not matter which one.
  434|       |    // Since best-efforts recovery ignores CURRENT file, existence of a
  435|       |    // MANIFEST indicates the recovery to recover existing db. If no MANIFEST
  436|       |    // can be found, a new db will be created.
  437|  9.02k|    std::string manifest_path;
  438|  9.02k|    if (!immutable_db_options_.best_efforts_recovery) {
  ------------------
  |  Branch (438:9): [True: 9.02k, False: 0]
  ------------------
  439|  9.02k|      s = env_->FileExists(current_fname);
  440|  9.02k|    } else {
  441|      0|      s = Status::NotFound();
  442|      0|      IOOptions io_opts;
  443|      0|      io_opts.do_not_recurse = true;
  444|      0|      Status io_s = immutable_db_options_.fs->GetChildren(
  445|      0|          dbname_, io_opts, &files_in_dbname, /*IODebugContext*=*/nullptr);
  446|      0|      if (!io_s.ok()) {
  ------------------
  |  Branch (446:11): [True: 0, False: 0]
  ------------------
  447|      0|        s = io_s;
  448|      0|        files_in_dbname.clear();
  449|      0|      }
  450|      0|      for (const std::string& file : files_in_dbname) {
  ------------------
  |  Branch (450:36): [True: 0, False: 0]
  ------------------
  451|      0|        uint64_t number = 0;
  452|      0|        FileType type = kWalFile;  // initialize
  453|      0|        if (ParseFileName(file, &number, &type) && type == kDescriptorFile) {
  ------------------
  |  Branch (453:13): [True: 0, False: 0]
  |  Branch (453:52): [True: 0, False: 0]
  ------------------
  454|      0|          uint64_t bytes;
  455|      0|          s = env_->GetFileSize(DescriptorFileName(dbname_, number), &bytes);
  456|      0|          if (s.ok() && bytes != 0) {
  ------------------
  |  Branch (456:15): [True: 0, False: 0]
  |  Branch (456:25): [True: 0, False: 0]
  ------------------
  457|       |            // Found non-empty MANIFEST (descriptor log), thus best-efforts
  458|       |            // recovery does not have to treat the db as empty.
  459|      0|            manifest_path = dbname_ + "/" + file;
  460|      0|            break;
  461|      0|          }
  462|      0|        }
  463|      0|      }
  464|      0|    }
  465|  9.02k|    if (s.IsNotFound()) {
  ------------------
  |  Branch (465:9): [True: 4.51k, False: 4.51k]
  ------------------
  466|  4.51k|      if (immutable_db_options_.create_if_missing) {
  ------------------
  |  Branch (466:11): [True: 4.51k, False: 0]
  ------------------
  467|  4.51k|        s = NewDB(&files_in_dbname);
  468|  4.51k|        is_new_db = true;
  469|  4.51k|        if (!s.ok()) {
  ------------------
  |  Branch (469:13): [True: 0, False: 4.51k]
  ------------------
  470|      0|          return s;
  471|      0|        }
  472|  4.51k|      } else {
  473|      0|        return Status::InvalidArgument(
  474|      0|            current_fname, "does not exist (create_if_missing is false)");
  475|      0|      }
  476|  4.51k|    } else if (s.ok()) {
  ------------------
  |  Branch (476:16): [True: 4.51k, False: 0]
  ------------------
  477|  4.51k|      if (immutable_db_options_.error_if_exists) {
  ------------------
  |  Branch (477:11): [True: 0, False: 4.51k]
  ------------------
  478|      0|        return Status::InvalidArgument(dbname_,
  479|      0|                                       "exists (error_if_exists is true)");
  480|      0|      }
  481|  4.51k|    } else {
  482|       |      // Unexpected error reading file
  483|      0|      assert(s.IsIOError());
  484|      0|      return s;
  485|      0|    }
  486|       |    // Verify compatibility of file_options_ and filesystem
  487|  9.02k|    {
  488|  9.02k|      std::unique_ptr<FSRandomAccessFile> idfile;
  489|  9.02k|      FileOptions customized_fs(file_options_);
  490|  9.02k|      customized_fs.use_direct_reads |=
  491|  9.02k|          immutable_db_options_.use_direct_io_for_flush_and_compaction;
  492|  9.02k|      const std::string& fname =
  493|  9.02k|          manifest_path.empty() ? current_fname : manifest_path;
  ------------------
  |  Branch (493:11): [True: 9.02k, False: 0]
  ------------------
  494|  9.02k|      s = fs_->NewRandomAccessFile(fname, customized_fs, &idfile, nullptr);
  495|  9.02k|      if (!s.ok()) {
  ------------------
  |  Branch (495:11): [True: 0, False: 9.02k]
  ------------------
  496|      0|        std::string error_str = s.ToString();
  497|       |        // Check if unsupported Direct I/O is the root cause
  498|      0|        customized_fs.use_direct_reads = false;
  499|      0|        s = fs_->NewRandomAccessFile(fname, customized_fs, &idfile, nullptr);
  500|      0|        if (s.ok()) {
  ------------------
  |  Branch (500:13): [True: 0, False: 0]
  ------------------
  501|      0|          return Status::InvalidArgument(
  502|      0|              "Direct I/O is not supported by the specified DB.");
  503|      0|        } else {
  504|      0|          return Status::InvalidArgument(
  505|      0|              "Found options incompatible with filesystem", error_str.c_str());
  506|      0|        }
  507|      0|      }
  508|  9.02k|    }
  509|  9.02k|  } else if (immutable_db_options_.best_efforts_recovery) {
  ------------------
  |  Branch (509:14): [True: 0, False: 0]
  ------------------
  510|      0|    assert(files_in_dbname.empty());
  511|      0|    IOOptions io_opts;
  512|      0|    io_opts.do_not_recurse = true;
  513|      0|    Status s = immutable_db_options_.fs->GetChildren(
  514|      0|        dbname_, io_opts, &files_in_dbname, /*IODebugContext*=*/nullptr);
  515|      0|    if (s.IsNotFound()) {
  ------------------
  |  Branch (515:9): [True: 0, False: 0]
  ------------------
  516|      0|      return Status::InvalidArgument(dbname_,
  517|      0|                                     "does not exist (open for read only)");
  518|      0|    } else if (s.IsIOError()) {
  ------------------
  |  Branch (518:16): [True: 0, False: 0]
  ------------------
  519|      0|      return s;
  520|      0|    }
  521|      0|    assert(s.ok());
  522|      0|  }
  523|  9.02k|  assert(db_id_.empty());
  524|  9.02k|  Status s;
  525|  9.02k|  bool missing_table_file = false;
  526|  9.02k|  if (!immutable_db_options_.best_efforts_recovery) {
  ------------------
  |  Branch (526:7): [True: 9.02k, False: 0]
  ------------------
  527|       |    // Status of reading the descriptor file
  528|  9.02k|    Status desc_status;
  529|  9.02k|    s = versions_->Recover(column_families, read_only, &db_id_,
  530|  9.02k|                           /*no_error_if_files_missing=*/false, is_retry,
  531|  9.02k|                           &desc_status);
  532|  9.02k|    desc_status.PermitUncheckedError();
  533|  9.02k|    if (can_retry) {
  ------------------
  |  Branch (533:9): [True: 9.02k, False: 0]
  ------------------
  534|       |      // If we're opening for the first time and the failure is likely due to
  535|       |      // a corrupt MANIFEST file (could result in either the log::Reader
  536|       |      // detecting a corrupt record, or SST files not found error due to
  537|       |      // discarding badly formed tail records)
  538|  9.02k|      if (!is_retry &&
  ------------------
  |  Branch (538:11): [True: 9.02k, False: 0]
  ------------------
  539|  9.02k|          (desc_status.IsCorruption() || s.IsNotFound() || s.IsCorruption()) &&
  ------------------
  |  Branch (539:12): [True: 0, False: 9.02k]
  |  Branch (539:42): [True: 0, False: 9.02k]
  |  Branch (539:60): [True: 0, False: 9.02k]
  ------------------
  540|  9.02k|          CheckFSFeatureSupport(fs_.get(),
  ------------------
  |  Branch (540:11): [True: 0, False: 0]
  ------------------
  541|      0|                                FSSupportedOps::kVerifyAndReconstructRead)) {
  542|      0|        *can_retry = true;
  543|      0|        ROCKS_LOG_ERROR(
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  544|      0|            immutable_db_options_.info_log,
  545|      0|            "Possible corruption detected while replaying MANIFEST %s, %s. "
  546|      0|            "Will be retried.",
  547|      0|            desc_status.ToString().c_str(), s.ToString().c_str());
  548|  9.02k|      } else {
  549|  9.02k|        *can_retry = false;
  550|  9.02k|      }
  551|  9.02k|    }
  552|  9.02k|  } else {
  553|      0|    assert(!files_in_dbname.empty());
  554|      0|    s = versions_->TryRecover(column_families, read_only, files_in_dbname,
  555|      0|                              &db_id_, &missing_table_file);
  556|      0|    if (s.ok()) {
  ------------------
  |  Branch (556:9): [True: 0, False: 0]
  ------------------
  557|       |      // TryRecover may delete previous column_family_set_.
  558|      0|      column_family_memtables_.reset(
  559|      0|          new ColumnFamilyMemTablesImpl(versions_->GetColumnFamilySet()));
  560|      0|    }
  561|      0|  }
  562|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (562:7): [True: 0, False: 9.02k]
  ------------------
  563|      0|    return s;
  564|      0|  }
  565|  9.02k|  if (s.ok() && !read_only) {
  ------------------
  |  Branch (565:7): [True: 9.02k, False: 0]
  |  Branch (565:17): [True: 9.02k, False: 0]
  ------------------
  566|  9.02k|    for (auto cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (566:19): [True: 9.02k, False: 9.02k]
  ------------------
  567|       |      // Try to trivially move files down the LSM tree to start from bottommost
  568|       |      // level when level_compaction_dynamic_level_bytes is enabled. This should
  569|       |      // only be useful when user is migrating to turning on this option.
  570|       |      // If a user is migrating from Level Compaction with a smaller level
  571|       |      // multiplier or from Universal Compaction, there may be too many
  572|       |      // non-empty levels and the trivial moves here are not sufficed for
  573|       |      // migration. Additional compactions are needed to drain unnecessary
  574|       |      // levels.
  575|       |      //
  576|       |      // Note that this step moves files down LSM without consulting
  577|       |      // SSTPartitioner. Further compactions are still needed if
  578|       |      // the user wants to partition SST files.
  579|       |      // Note that files moved in this step may not respect the compression
  580|       |      // option in target level.
  581|  9.02k|      if (cfd->ioptions()->compaction_style ==
  ------------------
  |  Branch (581:11): [True: 9.02k, False: 0]
  ------------------
  582|  9.02k|              CompactionStyle::kCompactionStyleLevel &&
  583|  9.02k|          cfd->ioptions()->level_compaction_dynamic_level_bytes &&
  ------------------
  |  Branch (583:11): [True: 9.02k, False: 0]
  ------------------
  584|  9.02k|          !cfd->GetLatestMutableCFOptions()->disable_auto_compactions) {
  ------------------
  |  Branch (584:11): [True: 9.02k, False: 0]
  ------------------
  585|  9.02k|        int to_level = cfd->ioptions()->num_levels - 1;
  586|       |        // last level is reserved
  587|       |        // allow_ingest_behind does not support Level Compaction,
  588|       |        // and per_key_placement can have infinite compaction loop for Level
  589|       |        // Compaction. Adjust to_level here just to be safe.
  590|  9.02k|        if (cfd->ioptions()->allow_ingest_behind ||
  ------------------
  |  Branch (590:13): [True: 0, False: 9.02k]
  ------------------
  591|  9.02k|            cfd->ioptions()->preclude_last_level_data_seconds > 0) {
  ------------------
  |  Branch (591:13): [True: 0, False: 9.02k]
  ------------------
  592|      0|          to_level -= 1;
  593|      0|        }
  594|       |        // Whether this column family has a level trivially moved
  595|  9.02k|        bool moved = false;
  596|       |        // Fill the LSM starting from to_level and going up one level at a time.
  597|       |        // Some loop invariants (when last level is not reserved):
  598|       |        // - levels in (from_level, to_level] are empty, and
  599|       |        // - levels in (to_level, last_level] are non-empty.
  600|  72.2k|        for (int from_level = to_level; from_level >= 0; --from_level) {
  ------------------
  |  Branch (600:41): [True: 63.1k, False: 9.02k]
  ------------------
  601|  63.1k|          const std::vector<FileMetaData*>& level_files =
  602|  63.1k|              cfd->current()->storage_info()->LevelFiles(from_level);
  603|  63.1k|          if (level_files.empty() || from_level == 0) {
  ------------------
  |  Branch (603:15): [True: 63.1k, False: 0]
  |  Branch (603:38): [True: 0, False: 0]
  ------------------
  604|  63.1k|            continue;
  605|  63.1k|          }
  606|      0|          assert(from_level <= to_level);
  607|       |          // Trivial move files from `from_level` to `to_level`
  608|      0|          if (from_level < to_level) {
  ------------------
  |  Branch (608:15): [True: 0, False: 0]
  ------------------
  609|      0|            if (!moved) {
  ------------------
  |  Branch (609:17): [True: 0, False: 0]
  ------------------
  610|       |              // lsm_state will look like "[1,2,3,4,5,6,0]" for an LSM with
  611|       |              // 7 levels
  612|      0|              std::string lsm_state = "[";
  613|      0|              for (int i = 0; i < cfd->ioptions()->num_levels; ++i) {
  ------------------
  |  Branch (613:31): [True: 0, False: 0]
  ------------------
  614|      0|                lsm_state += std::to_string(
  615|      0|                    cfd->current()->storage_info()->NumLevelFiles(i));
  616|      0|                if (i < cfd->ioptions()->num_levels - 1) {
  ------------------
  |  Branch (616:21): [True: 0, False: 0]
  ------------------
  617|      0|                  lsm_state += ",";
  618|      0|                }
  619|      0|              }
  620|      0|              lsm_state += "]";
  621|      0|              ROCKS_LOG_WARN(immutable_db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  622|      0|                             "[%s] Trivially move files down the LSM when open "
  623|      0|                             "with level_compaction_dynamic_level_bytes=true,"
  624|      0|                             " lsm_state: %s (Files are moved only if DB "
  625|      0|                             "Recovery is successful).",
  626|      0|                             cfd->GetName().c_str(), lsm_state.c_str());
  627|      0|              moved = true;
  628|      0|            }
  629|      0|            ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  630|      0|                immutable_db_options_.info_log,
  631|      0|                "[%s] Moving %zu files from from_level-%d to from_level-%d",
  632|      0|                cfd->GetName().c_str(), level_files.size(), from_level,
  633|      0|                to_level);
  634|      0|            VersionEdit edit;
  635|      0|            edit.SetColumnFamily(cfd->GetID());
  636|      0|            for (const FileMetaData* f : level_files) {
  ------------------
  |  Branch (636:40): [True: 0, False: 0]
  ------------------
  637|      0|              edit.DeleteFile(from_level, f->fd.GetNumber());
  638|      0|              edit.AddFile(to_level, f->fd.GetNumber(), f->fd.GetPathId(),
  639|      0|                           f->fd.GetFileSize(), f->smallest, f->largest,
  640|      0|                           f->fd.smallest_seqno, f->fd.largest_seqno,
  641|      0|                           f->marked_for_compaction,
  642|      0|                           f->temperature,  // this can be different from
  643|       |                           // `last_level_temperature`
  644|      0|                           f->oldest_blob_file_number, f->oldest_ancester_time,
  645|      0|                           f->file_creation_time, f->epoch_number,
  646|      0|                           f->file_checksum, f->file_checksum_func_name,
  647|      0|                           f->unique_id, f->compensated_range_deletion_size,
  648|      0|                           f->tail_size, f->user_defined_timestamps_persisted);
  649|      0|              ROCKS_LOG_WARN(immutable_db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  650|      0|                             "[%s] Moving #%" PRIu64
  651|      0|                             " from from_level-%d to from_level-%d %" PRIu64
  652|      0|                             " bytes\n",
  653|      0|                             cfd->GetName().c_str(), f->fd.GetNumber(),
  654|      0|                             from_level, to_level, f->fd.GetFileSize());
  655|      0|            }
  656|      0|            recovery_ctx->UpdateVersionEdits(cfd, edit);
  657|      0|          }
  658|      0|          --to_level;
  659|      0|        }
  660|  9.02k|      }
  661|  9.02k|    }
  662|  9.02k|  }
  663|  9.02k|  s = SetupDBId(write_options, read_only, recovery_ctx);
  664|  9.02k|  ROCKS_LOG_INFO(immutable_db_options_.info_log, "DB ID: %s\n", db_id_.c_str());
  ------------------
  |  |   39|  9.02k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  9.02k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  9.02k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  9.02k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  665|  9.02k|  if (s.ok() && !read_only) {
  ------------------
  |  Branch (665:7): [True: 9.02k, False: 0]
  |  Branch (665:17): [True: 9.02k, False: 0]
  ------------------
  666|  9.02k|    s = MaybeUpdateNextFileNumber(recovery_ctx);
  667|  9.02k|  }
  668|       |
  669|  9.02k|  if (immutable_db_options_.paranoid_checks && s.ok()) {
  ------------------
  |  Branch (669:7): [True: 9.02k, False: 0]
  |  Branch (669:48): [True: 9.02k, False: 0]
  ------------------
  670|  9.02k|    s = CheckConsistency();
  671|  9.02k|  }
  672|  9.02k|  if (s.ok() && !read_only) {
  ------------------
  |  Branch (672:7): [True: 9.02k, False: 0]
  |  Branch (672:17): [True: 9.02k, False: 0]
  ------------------
  673|       |    // TODO: share file descriptors (FSDirectory) with SetDirectories above
  674|  9.02k|    std::map<std::string, std::shared_ptr<FSDirectory>> created_dirs;
  675|  9.02k|    for (auto cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (675:19): [True: 9.02k, False: 9.02k]
  ------------------
  676|  9.02k|      s = cfd->AddDirectories(&created_dirs);
  677|  9.02k|      if (!s.ok()) {
  ------------------
  |  Branch (677:11): [True: 0, False: 9.02k]
  ------------------
  678|      0|        return s;
  679|      0|      }
  680|  9.02k|    }
  681|  9.02k|  }
  682|       |
  683|  9.02k|  std::vector<std::string> files_in_wal_dir;
  684|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (684:7): [True: 9.02k, False: 0]
  ------------------
  685|       |    // Initial max_total_in_memory_state_ before recovery wals. Log recovery
  686|       |    // may check this value to decide whether to flush.
  687|  9.02k|    max_total_in_memory_state_ = 0;
  688|  9.02k|    for (auto cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (688:19): [True: 9.02k, False: 9.02k]
  ------------------
  689|  9.02k|      auto* mutable_cf_options = cfd->GetLatestMutableCFOptions();
  690|  9.02k|      max_total_in_memory_state_ += mutable_cf_options->write_buffer_size *
  691|  9.02k|                                    mutable_cf_options->max_write_buffer_number;
  692|  9.02k|    }
  693|       |
  694|  9.02k|    SequenceNumber next_sequence(kMaxSequenceNumber);
  695|  9.02k|    default_cf_handle_ = new ColumnFamilyHandleImpl(
  696|  9.02k|        versions_->GetColumnFamilySet()->GetDefault(), this, &mutex_);
  697|  9.02k|    default_cf_internal_stats_ = default_cf_handle_->cfd()->internal_stats();
  698|       |
  699|       |    // Recover from all newer log files than the ones named in the
  700|       |    // descriptor (new log files may have been added by the previous
  701|       |    // incarnation without registering them in the descriptor).
  702|       |    //
  703|       |    // Note that prev_log_number() is no longer used, but we pay
  704|       |    // attention to it in case we are recovering a database
  705|       |    // produced by an older version of rocksdb.
  706|  9.02k|    auto wal_dir = immutable_db_options_.GetWalDir();
  707|  9.02k|    if (!immutable_db_options_.best_efforts_recovery) {
  ------------------
  |  Branch (707:9): [True: 9.02k, False: 0]
  ------------------
  708|  9.02k|      IOOptions io_opts;
  709|  9.02k|      io_opts.do_not_recurse = true;
  710|  9.02k|      s = immutable_db_options_.fs->GetChildren(
  711|  9.02k|          wal_dir, io_opts, &files_in_wal_dir, /*IODebugContext*=*/nullptr);
  712|  9.02k|    }
  713|  9.02k|    if (s.IsNotFound()) {
  ------------------
  |  Branch (713:9): [True: 0, False: 9.02k]
  ------------------
  714|      0|      return Status::InvalidArgument("wal_dir not found", wal_dir);
  715|  9.02k|    } else if (!s.ok()) {
  ------------------
  |  Branch (715:16): [True: 0, False: 9.02k]
  ------------------
  716|      0|      return s;
  717|      0|    }
  718|       |
  719|  9.02k|    std::unordered_map<uint64_t, std::string> wal_files;
  720|  58.6k|    for (const auto& file : files_in_wal_dir) {
  ------------------
  |  Branch (720:27): [True: 58.6k, False: 9.02k]
  ------------------
  721|  58.6k|      uint64_t number;
  722|  58.6k|      FileType type;
  723|  58.6k|      if (ParseFileName(file, &number, &type) && type == kWalFile) {
  ------------------
  |  Branch (723:11): [True: 45.1k, False: 13.5k]
  |  Branch (723:50): [True: 4.51k, False: 40.6k]
  ------------------
  724|  4.51k|        if (is_new_db) {
  ------------------
  |  Branch (724:13): [True: 0, False: 4.51k]
  ------------------
  725|      0|          return Status::Corruption(
  726|      0|              "While creating a new Db, wal_dir contains "
  727|      0|              "existing log file: ",
  728|      0|              file);
  729|  4.51k|        } else {
  730|  4.51k|          wal_files[number] = LogFileName(wal_dir, number);
  731|  4.51k|        }
  732|  4.51k|      }
  733|  58.6k|    }
  734|       |
  735|  9.02k|    if (immutable_db_options_.track_and_verify_wals_in_manifest) {
  ------------------
  |  Branch (735:9): [True: 0, False: 9.02k]
  ------------------
  736|      0|      if (!immutable_db_options_.best_efforts_recovery) {
  ------------------
  |  Branch (736:11): [True: 0, False: 0]
  ------------------
  737|       |        // Verify WALs in MANIFEST.
  738|      0|        s = versions_->GetWalSet().CheckWals(env_, wal_files);
  739|      0|      }  // else since best effort recovery does not recover from WALs, no need
  740|       |         // to check WALs.
  741|  9.02k|    } else if (!versions_->GetWalSet().GetWals().empty()) {
  ------------------
  |  Branch (741:16): [True: 0, False: 9.02k]
  ------------------
  742|       |      // Tracking is disabled, clear previously tracked WALs from MANIFEST,
  743|       |      // otherwise, in the future, if WAL tracking is enabled again,
  744|       |      // since the WALs deleted when WAL tracking is disabled are not persisted
  745|       |      // into MANIFEST, WAL check may fail.
  746|      0|      VersionEdit edit;
  747|      0|      WalNumber max_wal_number =
  748|      0|          versions_->GetWalSet().GetWals().rbegin()->first;
  749|      0|      edit.DeleteWalsBefore(max_wal_number + 1);
  750|      0|      assert(recovery_ctx != nullptr);
  751|      0|      assert(versions_->GetColumnFamilySet() != nullptr);
  752|      0|      recovery_ctx->UpdateVersionEdits(
  753|      0|          versions_->GetColumnFamilySet()->GetDefault(), edit);
  754|      0|    }
  755|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (755:9): [True: 0, False: 9.02k]
  ------------------
  756|      0|      return s;
  757|      0|    }
  758|       |
  759|  9.02k|    if (!wal_files.empty()) {
  ------------------
  |  Branch (759:9): [True: 4.51k, False: 4.51k]
  ------------------
  760|  4.51k|      if (error_if_wal_file_exists) {
  ------------------
  |  Branch (760:11): [True: 0, False: 4.51k]
  ------------------
  761|      0|        return Status::Corruption(
  762|      0|            "The db was opened in readonly mode with error_if_wal_file_exists"
  763|      0|            "flag but a WAL file already exists");
  764|  4.51k|      } else if (error_if_data_exists_in_wals) {
  ------------------
  |  Branch (764:18): [True: 0, False: 4.51k]
  ------------------
  765|      0|        for (auto& wal_file : wal_files) {
  ------------------
  |  Branch (765:29): [True: 0, False: 0]
  ------------------
  766|      0|          uint64_t bytes;
  767|      0|          s = env_->GetFileSize(wal_file.second, &bytes);
  768|      0|          if (s.ok()) {
  ------------------
  |  Branch (768:15): [True: 0, False: 0]
  ------------------
  769|      0|            if (bytes > 0) {
  ------------------
  |  Branch (769:17): [True: 0, False: 0]
  ------------------
  770|      0|              return Status::Corruption(
  771|      0|                  "error_if_data_exists_in_wals is set but there are data "
  772|      0|                  " in WAL files.");
  773|      0|            }
  774|      0|          }
  775|      0|        }
  776|      0|      }
  777|  4.51k|    }
  778|       |
  779|  9.02k|    if (!wal_files.empty()) {
  ------------------
  |  Branch (779:9): [True: 4.51k, False: 4.51k]
  ------------------
  780|       |      // Recover in the order in which the wals were generated
  781|  4.51k|      std::vector<uint64_t> wals;
  782|  4.51k|      wals.reserve(wal_files.size());
  783|  4.51k|      for (const auto& wal_file : wal_files) {
  ------------------
  |  Branch (783:33): [True: 4.51k, False: 4.51k]
  ------------------
  784|  4.51k|        wals.push_back(wal_file.first);
  785|  4.51k|      }
  786|  4.51k|      std::sort(wals.begin(), wals.end());
  787|       |
  788|  4.51k|      bool corrupted_wal_found = false;
  789|  4.51k|      s = RecoverLogFiles(wals, &next_sequence, read_only, is_retry,
  790|  4.51k|                          &corrupted_wal_found, recovery_ctx);
  791|  4.51k|      if (corrupted_wal_found && recovered_seq != nullptr) {
  ------------------
  |  Branch (791:11): [True: 0, False: 4.51k]
  |  Branch (791:34): [True: 0, False: 0]
  ------------------
  792|      0|        *recovered_seq = next_sequence;
  793|      0|      }
  794|  4.51k|      if (!s.ok()) {
  ------------------
  |  Branch (794:11): [True: 0, False: 4.51k]
  ------------------
  795|       |        // Clear memtables if recovery failed
  796|      0|        for (auto cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (796:23): [True: 0, False: 0]
  ------------------
  797|      0|          cfd->CreateNewMemtable(*cfd->GetLatestMutableCFOptions(),
  798|      0|                                 kMaxSequenceNumber);
  799|      0|        }
  800|      0|      }
  801|  4.51k|    }
  802|  9.02k|  }
  803|       |
  804|  9.02k|  if (read_only) {
  ------------------
  |  Branch (804:7): [True: 0, False: 9.02k]
  ------------------
  805|       |    // If we are opening as read-only, we need to update options_file_number_
  806|       |    // to reflect the most recent OPTIONS file. It does not matter for regular
  807|       |    // read-write db instance because options_file_number_ will later be
  808|       |    // updated to versions_->NewFileNumber() in RenameTempFileToOptionsFile.
  809|      0|    std::vector<std::string> filenames;
  810|      0|    if (s.ok()) {
  ------------------
  |  Branch (810:9): [True: 0, False: 0]
  ------------------
  811|      0|      const std::string normalized_dbname = NormalizePath(dbname_);
  812|      0|      const std::string normalized_wal_dir =
  813|      0|          NormalizePath(immutable_db_options_.GetWalDir());
  814|      0|      if (immutable_db_options_.best_efforts_recovery) {
  ------------------
  |  Branch (814:11): [True: 0, False: 0]
  ------------------
  815|      0|        filenames = std::move(files_in_dbname);
  816|      0|      } else if (normalized_dbname == normalized_wal_dir) {
  ------------------
  |  Branch (816:18): [True: 0, False: 0]
  ------------------
  817|      0|        filenames = std::move(files_in_wal_dir);
  818|      0|      } else {
  819|      0|        IOOptions io_opts;
  820|      0|        io_opts.do_not_recurse = true;
  821|      0|        s = immutable_db_options_.fs->GetChildren(
  822|      0|            GetName(), io_opts, &filenames, /*IODebugContext*=*/nullptr);
  823|      0|      }
  824|      0|    }
  825|      0|    if (s.ok()) {
  ------------------
  |  Branch (825:9): [True: 0, False: 0]
  ------------------
  826|      0|      uint64_t number = 0;
  827|      0|      uint64_t options_file_number = 0;
  828|      0|      FileType type;
  829|      0|      for (const auto& fname : filenames) {
  ------------------
  |  Branch (829:30): [True: 0, False: 0]
  ------------------
  830|      0|        if (ParseFileName(fname, &number, &type) && type == kOptionsFile) {
  ------------------
  |  Branch (830:13): [True: 0, False: 0]
  |  Branch (830:53): [True: 0, False: 0]
  ------------------
  831|      0|          options_file_number = std::max(number, options_file_number);
  832|      0|        }
  833|      0|      }
  834|      0|      versions_->options_file_number_ = options_file_number;
  835|      0|      uint64_t options_file_size = 0;
  836|      0|      if (options_file_number > 0) {
  ------------------
  |  Branch (836:11): [True: 0, False: 0]
  ------------------
  837|      0|        s = env_->GetFileSize(OptionsFileName(GetName(), options_file_number),
  838|      0|                              &options_file_size);
  839|      0|      }
  840|      0|      versions_->options_file_size_ = options_file_size;
  841|      0|    }
  842|      0|  }
  843|  9.02k|  return s;
  844|  9.02k|}
_ZN7rocksdb6DBImpl22LogAndApplyForRecoveryERKNS0_15RecoveryContextE:
  958|  9.02k|Status DBImpl::LogAndApplyForRecovery(const RecoveryContext& recovery_ctx) {
  959|  9.02k|  mutex_.AssertHeld();
  960|  9.02k|  assert(versions_->descriptor_log_ == nullptr);
  961|  9.02k|  const ReadOptions read_options(Env::IOActivity::kDBOpen);
  962|  9.02k|  const WriteOptions write_options(Env::IOActivity::kDBOpen);
  963|       |
  964|  9.02k|  Status s = versions_->LogAndApply(recovery_ctx.cfds_,
  965|  9.02k|                                    recovery_ctx.mutable_cf_opts_, read_options,
  966|  9.02k|                                    write_options, recovery_ctx.edit_lists_,
  967|  9.02k|                                    &mutex_, directories_.GetDbDir());
  968|  9.02k|  return s;
  969|  9.02k|}
_ZN7rocksdb6DBImpl51InvokeWalFilterIfNeededOnColumnFamilyToWalNumberMapEv:
  971|  4.51k|void DBImpl::InvokeWalFilterIfNeededOnColumnFamilyToWalNumberMap() {
  972|  4.51k|  if (immutable_db_options_.wal_filter == nullptr) {
  ------------------
  |  Branch (972:7): [True: 4.51k, False: 0]
  ------------------
  973|  4.51k|    return;
  974|  4.51k|  }
  975|      0|  assert(immutable_db_options_.wal_filter != nullptr);
  976|      0|  WalFilter& wal_filter = *(immutable_db_options_.wal_filter);
  977|       |
  978|      0|  std::map<std::string, uint32_t> cf_name_id_map;
  979|      0|  std::map<uint32_t, uint64_t> cf_lognumber_map;
  980|      0|  assert(versions_);
  981|      0|  assert(versions_->GetColumnFamilySet());
  982|      0|  for (auto cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (982:17): [True: 0, False: 0]
  ------------------
  983|      0|    assert(cfd);
  984|      0|    cf_name_id_map.insert(std::make_pair(cfd->GetName(), cfd->GetID()));
  985|      0|    cf_lognumber_map.insert(std::make_pair(cfd->GetID(), cfd->GetLogNumber()));
  986|      0|  }
  987|       |
  988|      0|  wal_filter.ColumnFamilyLogNumberMap(cf_lognumber_map, cf_name_id_map);
  989|      0|}
_ZN7rocksdb6DBImpl34InvokeWalFilterIfNeededOnWalRecordEmRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS_3log6Reader8ReporterERNS_6StatusERbRNS_10WriteBatchE:
  996|  1.36M|                                                WriteBatch& batch) {
  997|  1.36M|  if (immutable_db_options_.wal_filter == nullptr) {
  ------------------
  |  Branch (997:7): [True: 1.36M, False: 0]
  ------------------
  998|  1.36M|    return true;
  999|  1.36M|  }
 1000|      0|  assert(immutable_db_options_.wal_filter != nullptr);
 1001|      0|  WalFilter& wal_filter = *(immutable_db_options_.wal_filter);
 1002|       |
 1003|      0|  WriteBatch new_batch;
 1004|      0|  bool batch_changed = false;
 1005|       |
 1006|      0|  bool process_current_record = true;
 1007|       |
 1008|      0|  WalFilter::WalProcessingOption wal_processing_option =
 1009|      0|      wal_filter.LogRecordFound(wal_number, wal_fname, batch, &new_batch,
 1010|      0|                                &batch_changed);
 1011|       |
 1012|      0|  switch (wal_processing_option) {
 1013|      0|    case WalFilter::WalProcessingOption::kContinueProcessing:
  ------------------
  |  Branch (1013:5): [True: 0, False: 0]
  ------------------
 1014|       |      // do nothing, proceeed normally
 1015|      0|      break;
 1016|      0|    case WalFilter::WalProcessingOption::kIgnoreCurrentRecord:
  ------------------
  |  Branch (1016:5): [True: 0, False: 0]
  ------------------
 1017|       |      // skip current record
 1018|      0|      process_current_record = false;
 1019|      0|      break;
 1020|      0|    case WalFilter::WalProcessingOption::kStopReplay:
  ------------------
  |  Branch (1020:5): [True: 0, False: 0]
  ------------------
 1021|       |      // skip current record and stop replay
 1022|      0|      process_current_record = false;
 1023|      0|      stop_replay = true;
 1024|      0|      break;
 1025|      0|    case WalFilter::WalProcessingOption::kCorruptedRecord: {
  ------------------
  |  Branch (1025:5): [True: 0, False: 0]
  ------------------
 1026|      0|      status = Status::Corruption("Corruption reported by Wal Filter ",
 1027|      0|                                  wal_filter.Name());
 1028|      0|      MaybeIgnoreError(&status);
 1029|      0|      if (!status.ok()) {
  ------------------
  |  Branch (1029:11): [True: 0, False: 0]
  ------------------
 1030|      0|        process_current_record = false;
 1031|      0|        reporter.Corruption(batch.GetDataSize(), status);
 1032|      0|      }
 1033|      0|      break;
 1034|      0|    }
 1035|      0|    default: {
  ------------------
  |  Branch (1035:5): [True: 0, False: 0]
  ------------------
 1036|       |      // logical error which should not happen. If RocksDB throws, we would
 1037|       |      // just do `throw std::logic_error`.
 1038|      0|      assert(false);
 1039|      0|      status = Status::NotSupported(
 1040|      0|          "Unknown WalProcessingOption returned by Wal Filter ",
 1041|      0|          wal_filter.Name());
 1042|      0|      MaybeIgnoreError(&status);
 1043|      0|      if (!status.ok()) {
  ------------------
  |  Branch (1043:11): [True: 0, False: 0]
  ------------------
 1044|       |        // Ignore the error with current record processing.
 1045|      0|        stop_replay = true;
 1046|      0|      }
 1047|      0|      break;
 1048|      0|    }
 1049|      0|  }
 1050|       |
 1051|      0|  if (!process_current_record) {
  ------------------
  |  Branch (1051:7): [True: 0, False: 0]
  ------------------
 1052|      0|    return false;
 1053|      0|  }
 1054|       |
 1055|      0|  if (batch_changed) {
  ------------------
  |  Branch (1055:7): [True: 0, False: 0]
  ------------------
 1056|       |    // Make sure that the count in the new batch is
 1057|       |    // within the orignal count.
 1058|      0|    int new_count = WriteBatchInternal::Count(&new_batch);
 1059|      0|    int original_count = WriteBatchInternal::Count(&batch);
 1060|      0|    if (new_count > original_count) {
  ------------------
  |  Branch (1060:9): [True: 0, False: 0]
  ------------------
 1061|      0|      ROCKS_LOG_FATAL(
  ------------------
  |  |   48|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::FATAL_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1062|      0|          immutable_db_options_.info_log,
 1063|      0|          "Recovering log #%" PRIu64
 1064|      0|          " mode %d log filter %s returned "
 1065|      0|          "more records (%d) than original (%d) which is not allowed. "
 1066|      0|          "Aborting recovery.",
 1067|      0|          wal_number, static_cast<int>(immutable_db_options_.wal_recovery_mode),
 1068|      0|          wal_filter.Name(), new_count, original_count);
 1069|      0|      status = Status::NotSupported(
 1070|      0|          "More than original # of records "
 1071|      0|          "returned by Wal Filter ",
 1072|      0|          wal_filter.Name());
 1073|      0|      return false;
 1074|      0|    }
 1075|       |    // Set the same sequence number in the new_batch
 1076|       |    // as the original batch.
 1077|      0|    WriteBatchInternal::SetSequence(&new_batch,
 1078|      0|                                    WriteBatchInternal::Sequence(&batch));
 1079|      0|    batch = new_batch;
 1080|      0|  }
 1081|      0|  return true;
 1082|      0|}
_ZN7rocksdb6DBImpl15RecoverLogFilesERKNSt3__16vectorImNS1_9allocatorImEEEEPmbbPbPNS0_15RecoveryContextE:
 1088|  4.51k|                               RecoveryContext* recovery_ctx) {
 1089|  4.51k|  struct LogReporter : public log::Reader::Reporter {
 1090|  4.51k|    Env* env;
 1091|  4.51k|    Logger* info_log;
 1092|  4.51k|    const char* fname;
 1093|  4.51k|    Status* status;  // nullptr if immutable_db_options_.paranoid_checks==false
 1094|  4.51k|    bool* old_log_record;
 1095|  4.51k|    void Corruption(size_t bytes, const Status& s) override {
 1096|  4.51k|      ROCKS_LOG_WARN(info_log, "%s%s: dropping %d bytes; %s",
 1097|  4.51k|                     (status == nullptr ? "(ignoring error) " : ""), fname,
 1098|  4.51k|                     static_cast<int>(bytes), s.ToString().c_str());
 1099|  4.51k|      if (status != nullptr && status->ok()) {
 1100|  4.51k|        *status = s;
 1101|  4.51k|      }
 1102|  4.51k|    }
 1103|       |
 1104|  4.51k|    void OldLogRecord(size_t bytes) override {
 1105|  4.51k|      if (old_log_record != nullptr) {
 1106|  4.51k|        *old_log_record = true;
 1107|  4.51k|      }
 1108|  4.51k|      ROCKS_LOG_WARN(info_log, "%s: dropping %d bytes; possibly recycled",
 1109|  4.51k|                     fname, static_cast<int>(bytes));
 1110|  4.51k|    }
 1111|  4.51k|  };
 1112|       |
 1113|  4.51k|  mutex_.AssertHeld();
 1114|  4.51k|  Status status;
 1115|  4.51k|  bool old_log_record = false;
 1116|  4.51k|  std::unordered_map<int, VersionEdit> version_edits;
 1117|       |  // no need to refcount because iteration is under mutex
 1118|  4.51k|  for (auto cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (1118:17): [True: 4.51k, False: 4.51k]
  ------------------
 1119|  4.51k|    VersionEdit edit;
 1120|  4.51k|    edit.SetColumnFamily(cfd->GetID());
 1121|  4.51k|    version_edits.insert({cfd->GetID(), edit});
 1122|  4.51k|  }
 1123|  4.51k|  int job_id = next_job_id_.fetch_add(1);
 1124|  4.51k|  {
 1125|  4.51k|    auto stream = event_logger_.Log();
 1126|  4.51k|    stream << "job" << job_id << "event"
 1127|  4.51k|           << "recovery_started";
 1128|  4.51k|    stream << "wal_files";
 1129|  4.51k|    stream.StartArray();
 1130|  4.51k|    for (auto wal_number : wal_numbers) {
  ------------------
  |  Branch (1130:26): [True: 4.51k, False: 4.51k]
  ------------------
 1131|  4.51k|      stream << wal_number;
 1132|  4.51k|    }
 1133|  4.51k|    stream.EndArray();
 1134|  4.51k|  }
 1135|       |
 1136|       |  // No-op for immutable_db_options_.wal_filter == nullptr.
 1137|  4.51k|  InvokeWalFilterIfNeededOnColumnFamilyToWalNumberMap();
 1138|       |
 1139|  4.51k|  bool stop_replay_by_wal_filter = false;
 1140|  4.51k|  bool stop_replay_for_corruption = false;
 1141|  4.51k|  bool flushed = false;
 1142|  4.51k|  uint64_t corrupted_wal_number = kMaxSequenceNumber;
 1143|  4.51k|  uint64_t min_wal_number = MinLogNumberToKeep();
 1144|  4.51k|  if (!allow_2pc()) {
  ------------------
  |  Branch (1144:7): [True: 4.51k, False: 0]
  ------------------
 1145|       |    // In non-2pc mode, we skip WALs that do not back unflushed data.
 1146|  4.51k|    min_wal_number =
 1147|  4.51k|        std::max(min_wal_number, versions_->MinLogNumberWithUnflushedData());
 1148|  4.51k|  }
 1149|  4.51k|  for (auto wal_number : wal_numbers) {
  ------------------
  |  Branch (1149:24): [True: 4.51k, False: 4.51k]
  ------------------
 1150|  4.51k|    if (wal_number < min_wal_number) {
  ------------------
  |  Branch (1150:9): [True: 0, False: 4.51k]
  ------------------
 1151|      0|      ROCKS_LOG_INFO(immutable_db_options_.info_log,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1152|      0|                     "Skipping log #%" PRIu64
 1153|      0|                     " since it is older than min log to keep #%" PRIu64,
 1154|      0|                     wal_number, min_wal_number);
 1155|      0|      continue;
 1156|      0|    }
 1157|       |    // The previous incarnation may not have written any MANIFEST
 1158|       |    // records after allocating this log number.  So we manually
 1159|       |    // update the file number allocation counter in VersionSet.
 1160|  4.51k|    versions_->MarkFileNumberUsed(wal_number);
 1161|       |    // Open the log file
 1162|  4.51k|    std::string fname =
 1163|  4.51k|        LogFileName(immutable_db_options_.GetWalDir(), wal_number);
 1164|       |
 1165|  4.51k|    ROCKS_LOG_INFO(immutable_db_options_.info_log,
  ------------------
  |  |   39|  4.51k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  4.51k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  4.51k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  4.51k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  4.51k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1166|  4.51k|                   "Recovering log #%" PRIu64 " mode %d", wal_number,
 1167|  4.51k|                   static_cast<int>(immutable_db_options_.wal_recovery_mode));
 1168|  4.51k|    auto logFileDropped = [this, &fname]() {
 1169|  4.51k|      uint64_t bytes;
 1170|  4.51k|      if (env_->GetFileSize(fname, &bytes).ok()) {
 1171|  4.51k|        auto info_log = immutable_db_options_.info_log.get();
 1172|  4.51k|        ROCKS_LOG_WARN(info_log, "%s: dropping %d bytes", fname.c_str(),
 1173|  4.51k|                       static_cast<int>(bytes));
 1174|  4.51k|      }
 1175|  4.51k|    };
 1176|  4.51k|    if (stop_replay_by_wal_filter) {
  ------------------
  |  Branch (1176:9): [True: 0, False: 4.51k]
  ------------------
 1177|      0|      logFileDropped();
 1178|      0|      continue;
 1179|      0|    }
 1180|       |
 1181|  4.51k|    std::unique_ptr<SequentialFileReader> file_reader;
 1182|  4.51k|    {
 1183|  4.51k|      std::unique_ptr<FSSequentialFile> file;
 1184|  4.51k|      status = fs_->NewSequentialFile(
 1185|  4.51k|          fname, fs_->OptimizeForLogRead(file_options_), &file, nullptr);
 1186|  4.51k|      if (!status.ok()) {
  ------------------
  |  Branch (1186:11): [True: 0, False: 4.51k]
  ------------------
 1187|      0|        MaybeIgnoreError(&status);
 1188|      0|        if (!status.ok()) {
  ------------------
  |  Branch (1188:13): [True: 0, False: 0]
  ------------------
 1189|      0|          return status;
 1190|      0|        } else {
 1191|       |          // Fail with one log file, but that's ok.
 1192|       |          // Try next one.
 1193|      0|          continue;
 1194|      0|        }
 1195|      0|      }
 1196|  4.51k|      file_reader.reset(new SequentialFileReader(
 1197|  4.51k|          std::move(file), fname, immutable_db_options_.log_readahead_size,
 1198|  4.51k|          io_tracer_, /*listeners=*/{}, /*rate_limiter=*/nullptr, is_retry));
 1199|  4.51k|    }
 1200|       |
 1201|       |    // Create the log reader.
 1202|      0|    LogReporter reporter;
 1203|  4.51k|    reporter.env = env_;
 1204|  4.51k|    reporter.info_log = immutable_db_options_.info_log.get();
 1205|  4.51k|    reporter.fname = fname.c_str();
 1206|  4.51k|    reporter.old_log_record = &old_log_record;
 1207|  4.51k|    if (!immutable_db_options_.paranoid_checks ||
  ------------------
  |  Branch (1207:9): [True: 0, False: 4.51k]
  ------------------
 1208|  4.51k|        immutable_db_options_.wal_recovery_mode ==
  ------------------
  |  Branch (1208:9): [True: 0, False: 4.51k]
  ------------------
 1209|  4.51k|            WALRecoveryMode::kSkipAnyCorruptedRecords) {
 1210|      0|      reporter.status = nullptr;
 1211|  4.51k|    } else {
 1212|  4.51k|      reporter.status = &status;
 1213|  4.51k|    }
 1214|       |    // We intentially make log::Reader do checksumming even if
 1215|       |    // paranoid_checks==false so that corruptions cause entire commits
 1216|       |    // to be skipped instead of propagating bad information (like overly
 1217|       |    // large sequence numbers).
 1218|  4.51k|    log::Reader reader(immutable_db_options_.info_log, std::move(file_reader),
 1219|  4.51k|                       &reporter, true /*checksum*/, wal_number);
 1220|       |
 1221|       |    // Determine if we should tolerate incomplete records at the tail end of the
 1222|       |    // Read all the records and add to a memtable
 1223|  4.51k|    std::string scratch;
 1224|  4.51k|    Slice record;
 1225|       |
 1226|  4.51k|    const UnorderedMap<uint32_t, size_t>& running_ts_sz =
 1227|  4.51k|        versions_->GetRunningColumnFamiliesTimestampSize();
 1228|       |
 1229|  4.51k|    TEST_SYNC_POINT_CALLBACK("DBImpl::RecoverLogFiles:BeforeReadWal",
 1230|  4.51k|                             /*arg=*/nullptr);
 1231|  4.51k|    uint64_t record_checksum;
 1232|  1.36M|    while (!stop_replay_by_wal_filter &&
  ------------------
  |  Branch (1232:12): [True: 1.36M, False: 0]
  ------------------
 1233|  1.36M|           reader.ReadRecord(&record, &scratch,
  ------------------
  |  Branch (1233:12): [True: 1.36M, False: 4.51k]
  ------------------
 1234|  1.36M|                             immutable_db_options_.wal_recovery_mode,
 1235|  1.36M|                             &record_checksum) &&
 1236|  1.36M|           status.ok()) {
  ------------------
  |  Branch (1236:12): [True: 1.36M, False: 0]
  ------------------
 1237|  1.36M|      if (record.size() < WriteBatchInternal::kHeader) {
  ------------------
  |  Branch (1237:11): [True: 0, False: 1.36M]
  ------------------
 1238|      0|        reporter.Corruption(record.size(),
 1239|      0|                            Status::Corruption("log record too small"));
 1240|      0|        continue;
 1241|      0|      }
 1242|       |      // We create a new batch and initialize with a valid prot_info_ to store
 1243|       |      // the data checksums
 1244|  1.36M|      WriteBatch batch;
 1245|  1.36M|      std::unique_ptr<WriteBatch> new_batch;
 1246|       |
 1247|  1.36M|      status = WriteBatchInternal::SetContents(&batch, record);
 1248|  1.36M|      if (!status.ok()) {
  ------------------
  |  Branch (1248:11): [True: 0, False: 1.36M]
  ------------------
 1249|      0|        return status;
 1250|      0|      }
 1251|       |
 1252|  1.36M|      const UnorderedMap<uint32_t, size_t>& record_ts_sz =
 1253|  1.36M|          reader.GetRecordedTimestampSize();
 1254|  1.36M|      status = HandleWriteBatchTimestampSizeDifference(
 1255|  1.36M|          &batch, running_ts_sz, record_ts_sz,
 1256|  1.36M|          TimestampSizeConsistencyMode::kReconcileInconsistency, &new_batch);
 1257|  1.36M|      if (!status.ok()) {
  ------------------
  |  Branch (1257:11): [True: 0, False: 1.36M]
  ------------------
 1258|      0|        return status;
 1259|      0|      }
 1260|       |
 1261|  1.36M|      bool batch_updated = new_batch != nullptr;
 1262|  1.36M|      WriteBatch* batch_to_use = batch_updated ? new_batch.get() : &batch;
  ------------------
  |  Branch (1262:34): [True: 0, False: 1.36M]
  ------------------
 1263|  1.36M|      TEST_SYNC_POINT_CALLBACK(
 1264|  1.36M|          "DBImpl::RecoverLogFiles:BeforeUpdateProtectionInfo:batch",
 1265|  1.36M|          batch_to_use);
 1266|  1.36M|      TEST_SYNC_POINT_CALLBACK(
 1267|  1.36M|          "DBImpl::RecoverLogFiles:BeforeUpdateProtectionInfo:checksum",
 1268|  1.36M|          &record_checksum);
 1269|  1.36M|      status = WriteBatchInternal::UpdateProtectionInfo(
 1270|  1.36M|          batch_to_use, 8 /* bytes_per_key */,
 1271|  1.36M|          batch_updated ? nullptr : &record_checksum);
  ------------------
  |  Branch (1271:11): [True: 0, False: 1.36M]
  ------------------
 1272|  1.36M|      if (!status.ok()) {
  ------------------
  |  Branch (1272:11): [True: 0, False: 1.36M]
  ------------------
 1273|      0|        return status;
 1274|      0|      }
 1275|       |
 1276|  1.36M|      SequenceNumber sequence = WriteBatchInternal::Sequence(batch_to_use);
 1277|  1.36M|      if (sequence > kMaxSequenceNumber) {
  ------------------
  |  Branch (1277:11): [True: 0, False: 1.36M]
  ------------------
 1278|      0|        reporter.Corruption(
 1279|      0|            record.size(),
 1280|      0|            Status::Corruption("sequence " + std::to_string(sequence) +
 1281|      0|                               " is too large"));
 1282|      0|        continue;
 1283|      0|      }
 1284|       |
 1285|  1.36M|      if (immutable_db_options_.wal_recovery_mode ==
  ------------------
  |  Branch (1285:11): [True: 1.36M, False: 0]
  ------------------
 1286|  1.36M|          WALRecoveryMode::kPointInTimeRecovery) {
 1287|       |        // In point-in-time recovery mode, if sequence id of log files are
 1288|       |        // consecutive, we continue recovery despite corruption. This could
 1289|       |        // happen when we open and write to a corrupted DB, where sequence id
 1290|       |        // will start from the last sequence id we recovered.
 1291|  1.36M|        if (sequence == *next_sequence) {
  ------------------
  |  Branch (1291:13): [True: 1.26M, False: 98.9k]
  ------------------
 1292|  1.26M|          stop_replay_for_corruption = false;
 1293|  1.26M|        }
 1294|  1.36M|        if (stop_replay_for_corruption) {
  ------------------
  |  Branch (1294:13): [True: 0, False: 1.36M]
  ------------------
 1295|      0|          logFileDropped();
 1296|      0|          break;
 1297|      0|        }
 1298|  1.36M|      }
 1299|       |
 1300|       |      // For the default case of wal_filter == nullptr, always performs no-op
 1301|       |      // and returns true.
 1302|  1.36M|      if (!InvokeWalFilterIfNeededOnWalRecord(wal_number, fname, reporter,
  ------------------
  |  Branch (1302:11): [True: 0, False: 1.36M]
  ------------------
 1303|  1.36M|                                              status, stop_replay_by_wal_filter,
 1304|  1.36M|                                              *batch_to_use)) {
 1305|      0|        continue;
 1306|      0|      }
 1307|       |
 1308|       |      // If column family was not found, it might mean that the WAL write
 1309|       |      // batch references to the column family that was dropped after the
 1310|       |      // insert. We don't want to fail the whole write batch in that case --
 1311|       |      // we just ignore the update.
 1312|       |      // That's why we set ignore missing column families to true
 1313|  1.36M|      bool has_valid_writes = false;
 1314|  1.36M|      status = WriteBatchInternal::InsertInto(
 1315|  1.36M|          batch_to_use, column_family_memtables_.get(), &flush_scheduler_,
 1316|  1.36M|          &trim_history_scheduler_, true, wal_number, this,
 1317|  1.36M|          false /* concurrent_memtable_writes */, next_sequence,
 1318|  1.36M|          &has_valid_writes, seq_per_batch_, batch_per_txn_);
 1319|  1.36M|      MaybeIgnoreError(&status);
 1320|  1.36M|      if (!status.ok()) {
  ------------------
  |  Branch (1320:11): [True: 0, False: 1.36M]
  ------------------
 1321|       |        // We are treating this as a failure while reading since we read valid
 1322|       |        // blocks that do not form coherent data
 1323|      0|        reporter.Corruption(record.size(), status);
 1324|      0|        continue;
 1325|      0|      }
 1326|       |
 1327|  1.36M|      if (has_valid_writes && !read_only) {
  ------------------
  |  Branch (1327:11): [True: 1.36M, False: 0]
  |  Branch (1327:31): [True: 1.36M, False: 0]
  ------------------
 1328|       |        // we can do this because this is called before client has access to the
 1329|       |        // DB and there is only a single thread operating on DB
 1330|  1.36M|        ColumnFamilyData* cfd;
 1331|       |
 1332|  1.36M|        while ((cfd = flush_scheduler_.TakeNextColumnFamily()) != nullptr) {
  ------------------
  |  Branch (1332:16): [True: 0, False: 1.36M]
  ------------------
 1333|      0|          cfd->UnrefAndTryDelete();
 1334|       |          // If this asserts, it means that InsertInto failed in
 1335|       |          // filtering updates to already-flushed column families
 1336|      0|          assert(cfd->GetLogNumber() <= wal_number);
 1337|      0|          auto iter = version_edits.find(cfd->GetID());
 1338|      0|          assert(iter != version_edits.end());
 1339|      0|          VersionEdit* edit = &iter->second;
 1340|      0|          status = WriteLevel0TableForRecovery(job_id, cfd, cfd->mem(), edit);
 1341|      0|          if (!status.ok()) {
  ------------------
  |  Branch (1341:15): [True: 0, False: 0]
  ------------------
 1342|       |            // Reflect errors immediately so that conditions like full
 1343|       |            // file-systems cause the DB::Open() to fail.
 1344|      0|            return status;
 1345|      0|          }
 1346|      0|          flushed = true;
 1347|       |
 1348|      0|          cfd->CreateNewMemtable(*cfd->GetLatestMutableCFOptions(),
 1349|      0|                                 *next_sequence - 1);
 1350|      0|        }
 1351|  1.36M|      }
 1352|  1.36M|    }
 1353|       |
 1354|  4.51k|    if (!status.ok() || old_log_record) {
  ------------------
  |  Branch (1354:9): [True: 0, False: 4.51k]
  |  Branch (1354:25): [True: 0, False: 4.51k]
  ------------------
 1355|      0|      if (status.IsNotSupported()) {
  ------------------
  |  Branch (1355:11): [True: 0, False: 0]
  ------------------
 1356|       |        // We should not treat NotSupported as corruption. It is rather a clear
 1357|       |        // sign that we are processing a WAL that is produced by an incompatible
 1358|       |        // version of the code.
 1359|      0|        return status;
 1360|      0|      }
 1361|      0|      if (immutable_db_options_.wal_recovery_mode ==
  ------------------
  |  Branch (1361:11): [True: 0, False: 0]
  ------------------
 1362|      0|          WALRecoveryMode::kSkipAnyCorruptedRecords) {
 1363|       |        // We should ignore all errors unconditionally
 1364|      0|        status = Status::OK();
 1365|      0|      } else if (immutable_db_options_.wal_recovery_mode ==
  ------------------
  |  Branch (1365:18): [True: 0, False: 0]
  ------------------
 1366|      0|                 WALRecoveryMode::kPointInTimeRecovery) {
 1367|      0|        if (status.IsIOError()) {
  ------------------
  |  Branch (1367:13): [True: 0, False: 0]
  ------------------
 1368|      0|          ROCKS_LOG_ERROR(immutable_db_options_.info_log,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1369|      0|                          "IOError during point-in-time reading log #%" PRIu64
 1370|      0|                          " seq #%" PRIu64
 1371|      0|                          ". %s. This likely mean loss of synced WAL, "
 1372|      0|                          "thus recovery fails.",
 1373|      0|                          wal_number, *next_sequence,
 1374|      0|                          status.ToString().c_str());
 1375|      0|          return status;
 1376|      0|        }
 1377|       |        // We should ignore the error but not continue replaying
 1378|      0|        status = Status::OK();
 1379|      0|        old_log_record = false;
 1380|      0|        stop_replay_for_corruption = true;
 1381|      0|        corrupted_wal_number = wal_number;
 1382|      0|        if (corrupted_wal_found != nullptr) {
  ------------------
  |  Branch (1382:13): [True: 0, False: 0]
  ------------------
 1383|      0|          *corrupted_wal_found = true;
 1384|      0|        }
 1385|      0|        ROCKS_LOG_INFO(immutable_db_options_.info_log,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1386|      0|                       "Point in time recovered to log #%" PRIu64
 1387|      0|                       " seq #%" PRIu64,
 1388|      0|                       wal_number, *next_sequence);
 1389|      0|      } else {
 1390|      0|        assert(immutable_db_options_.wal_recovery_mode ==
 1391|      0|                   WALRecoveryMode::kTolerateCorruptedTailRecords ||
 1392|      0|               immutable_db_options_.wal_recovery_mode ==
 1393|      0|                   WALRecoveryMode::kAbsoluteConsistency);
 1394|      0|        return status;
 1395|      0|      }
 1396|      0|    }
 1397|       |
 1398|  4.51k|    flush_scheduler_.Clear();
 1399|  4.51k|    trim_history_scheduler_.Clear();
 1400|  4.51k|    auto last_sequence = *next_sequence - 1;
 1401|  4.51k|    if ((*next_sequence != kMaxSequenceNumber) &&
  ------------------
  |  Branch (1401:9): [True: 4.50k, False: 6]
  ------------------
 1402|  4.51k|        (versions_->LastSequence() <= last_sequence)) {
  ------------------
  |  Branch (1402:9): [True: 4.50k, False: 0]
  ------------------
 1403|  4.50k|      versions_->SetLastAllocatedSequence(last_sequence);
 1404|  4.50k|      versions_->SetLastPublishedSequence(last_sequence);
 1405|  4.50k|      versions_->SetLastSequence(last_sequence);
 1406|  4.50k|    }
 1407|  4.51k|  }
 1408|       |  // Compare the corrupted log number to all columnfamily's current log number.
 1409|       |  // Abort Open() if any column family's log number is greater than
 1410|       |  // the corrupted log number, which means CF contains data beyond the point of
 1411|       |  // corruption. This could during PIT recovery when the WAL is corrupted and
 1412|       |  // some (but not all) CFs are flushed
 1413|       |  // Exclude the PIT case where no log is dropped after the corruption point.
 1414|       |  // This is to cover the case for empty wals after corrupted log, in which we
 1415|       |  // don't reset stop_replay_for_corruption.
 1416|  4.51k|  if (stop_replay_for_corruption == true &&
  ------------------
  |  Branch (1416:7): [True: 0, False: 4.51k]
  ------------------
 1417|  4.51k|      (immutable_db_options_.wal_recovery_mode ==
  ------------------
  |  Branch (1417:8): [True: 0, False: 0]
  ------------------
 1418|      0|           WALRecoveryMode::kPointInTimeRecovery ||
 1419|      0|       immutable_db_options_.wal_recovery_mode ==
  ------------------
  |  Branch (1419:8): [True: 0, False: 0]
  ------------------
 1420|      0|           WALRecoveryMode::kTolerateCorruptedTailRecords)) {
 1421|      0|    for (auto cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (1421:19): [True: 0, False: 0]
  ------------------
 1422|       |      // One special case cause cfd->GetLogNumber() > corrupted_wal_number but
 1423|       |      // the CF is still consistent: If a new column family is created during
 1424|       |      // the flush and the WAL sync fails at the same time, the new CF points to
 1425|       |      // the new WAL but the old WAL is curropted. Since the new CF is empty, it
 1426|       |      // is still consistent. We add the check of CF sst file size to avoid the
 1427|       |      // false positive alert.
 1428|       |
 1429|       |      // Note that, the check of (cfd->GetLiveSstFilesSize() > 0) may leads to
 1430|       |      // the ignorance of a very rare inconsistency case caused in data
 1431|       |      // canclation. One CF is empty due to KV deletion. But those operations
 1432|       |      // are in the WAL. If the WAL is corrupted, the status of this CF might
 1433|       |      // not be consistent with others. However, the consistency check will be
 1434|       |      // bypassed due to empty CF.
 1435|       |      // TODO: a better and complete implementation is needed to ensure strict
 1436|       |      // consistency check in WAL recovery including hanlding the tailing
 1437|       |      // issues.
 1438|      0|      if (cfd->GetLogNumber() > corrupted_wal_number &&
  ------------------
  |  Branch (1438:11): [True: 0, False: 0]
  ------------------
 1439|      0|          cfd->GetLiveSstFilesSize() > 0) {
  ------------------
  |  Branch (1439:11): [True: 0, False: 0]
  ------------------
 1440|      0|        ROCKS_LOG_ERROR(immutable_db_options_.info_log,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1441|      0|                        "Column family inconsistency: SST file contains data"
 1442|      0|                        " beyond the point of corruption.");
 1443|      0|        return Status::Corruption("SST file is ahead of WALs in CF " +
 1444|      0|                                  cfd->GetName());
 1445|      0|      }
 1446|      0|    }
 1447|      0|  }
 1448|       |
 1449|       |  // True if there's any data in the WALs; if not, we can skip re-processing
 1450|       |  // them later
 1451|  4.51k|  bool data_seen = false;
 1452|  4.51k|  if (!read_only) {
  ------------------
  |  Branch (1452:7): [True: 4.51k, False: 0]
  ------------------
 1453|       |    // no need to refcount since client still doesn't have access
 1454|       |    // to the DB and can not drop column families while we iterate
 1455|  4.51k|    const WalNumber max_wal_number = wal_numbers.back();
 1456|  4.51k|    for (auto cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (1456:19): [True: 4.51k, False: 4.51k]
  ------------------
 1457|  4.51k|      auto iter = version_edits.find(cfd->GetID());
 1458|  4.51k|      assert(iter != version_edits.end());
 1459|  4.51k|      VersionEdit* edit = &iter->second;
 1460|       |
 1461|  4.51k|      if (cfd->GetLogNumber() > max_wal_number) {
  ------------------
  |  Branch (1461:11): [True: 0, False: 4.51k]
  ------------------
 1462|       |        // Column family cfd has already flushed the data
 1463|       |        // from all wals. Memtable has to be empty because
 1464|       |        // we filter the updates based on wal_number
 1465|       |        // (in WriteBatch::InsertInto)
 1466|      0|        assert(cfd->mem()->GetFirstSequenceNumber() == 0);
 1467|      0|        assert(edit->NumEntries() == 0);
 1468|      0|        continue;
 1469|      0|      }
 1470|       |
 1471|  4.51k|      TEST_SYNC_POINT_CALLBACK(
 1472|  4.51k|          "DBImpl::RecoverLogFiles:BeforeFlushFinalMemtable", /*arg=*/nullptr);
 1473|       |
 1474|       |      // flush the final memtable (if non-empty)
 1475|  4.51k|      if (cfd->mem()->GetFirstSequenceNumber() != 0) {
  ------------------
  |  Branch (1475:11): [True: 4.48k, False: 30]
  ------------------
 1476|       |        // If flush happened in the middle of recovery (e.g. due to memtable
 1477|       |        // being full), we flush at the end. Otherwise we'll need to record
 1478|       |        // where we were on last flush, which make the logic complicated.
 1479|  4.48k|        if (flushed || !immutable_db_options_.avoid_flush_during_recovery) {
  ------------------
  |  Branch (1479:13): [True: 0, False: 4.48k]
  |  Branch (1479:24): [True: 4.48k, False: 0]
  ------------------
 1480|  4.48k|          status = WriteLevel0TableForRecovery(job_id, cfd, cfd->mem(), edit);
 1481|  4.48k|          if (!status.ok()) {
  ------------------
  |  Branch (1481:15): [True: 0, False: 4.48k]
  ------------------
 1482|       |            // Recovery failed
 1483|      0|            break;
 1484|      0|          }
 1485|  4.48k|          flushed = true;
 1486|       |
 1487|  4.48k|          cfd->CreateNewMemtable(*cfd->GetLatestMutableCFOptions(),
 1488|  4.48k|                                 versions_->LastSequence());
 1489|  4.48k|        }
 1490|  4.48k|        data_seen = true;
 1491|  4.48k|      }
 1492|       |
 1493|       |      // Update the log number info in the version edit corresponding to this
 1494|       |      // column family. Note that the version edits will be written to MANIFEST
 1495|       |      // together later.
 1496|       |      // writing wal_number in the manifest means that any log file
 1497|       |      // with number strongly less than (wal_number + 1) is already
 1498|       |      // recovered and should be ignored on next reincarnation.
 1499|       |      // Since we already recovered max_wal_number, we want all wals
 1500|       |      // with numbers `<= max_wal_number` (includes this one) to be ignored
 1501|  4.51k|      if (flushed || cfd->mem()->GetFirstSequenceNumber() == 0) {
  ------------------
  |  Branch (1501:11): [True: 4.48k, False: 30]
  |  Branch (1501:22): [True: 30, False: 0]
  ------------------
 1502|  4.51k|        edit->SetLogNumber(max_wal_number + 1);
 1503|  4.51k|      }
 1504|  4.51k|    }
 1505|  4.51k|    if (status.ok()) {
  ------------------
  |  Branch (1505:9): [True: 4.51k, False: 0]
  ------------------
 1506|       |      // we must mark the next log number as used, even though it's
 1507|       |      // not actually used. that is because VersionSet assumes
 1508|       |      // VersionSet::next_file_number_ always to be strictly greater than any
 1509|       |      // log number
 1510|  4.51k|      versions_->MarkFileNumberUsed(max_wal_number + 1);
 1511|  4.51k|      assert(recovery_ctx != nullptr);
 1512|       |
 1513|  4.51k|      for (auto* cfd : *versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (1513:22): [True: 4.51k, False: 4.51k]
  ------------------
 1514|  4.51k|        auto iter = version_edits.find(cfd->GetID());
 1515|  4.51k|        assert(iter != version_edits.end());
 1516|  4.51k|        recovery_ctx->UpdateVersionEdits(cfd, iter->second);
 1517|  4.51k|      }
 1518|       |
 1519|  4.51k|      if (flushed || !data_seen) {
  ------------------
  |  Branch (1519:11): [True: 4.48k, False: 30]
  |  Branch (1519:22): [True: 30, False: 0]
  ------------------
 1520|  4.51k|        VersionEdit wal_deletion;
 1521|  4.51k|        if (immutable_db_options_.track_and_verify_wals_in_manifest) {
  ------------------
  |  Branch (1521:13): [True: 0, False: 4.51k]
  ------------------
 1522|      0|          wal_deletion.DeleteWalsBefore(max_wal_number + 1);
 1523|      0|        }
 1524|  4.51k|        if (!allow_2pc()) {
  ------------------
  |  Branch (1524:13): [True: 4.51k, False: 0]
  ------------------
 1525|       |          // In non-2pc mode, flushing the memtables of the column families
 1526|       |          // means we can advance min_log_number_to_keep.
 1527|  4.51k|          wal_deletion.SetMinLogNumberToKeep(max_wal_number + 1);
 1528|  4.51k|        }
 1529|  4.51k|        assert(versions_->GetColumnFamilySet() != nullptr);
 1530|  4.51k|        recovery_ctx->UpdateVersionEdits(
 1531|  4.51k|            versions_->GetColumnFamilySet()->GetDefault(), wal_deletion);
 1532|  4.51k|      }
 1533|  4.51k|    }
 1534|  4.51k|  }
 1535|       |
 1536|  4.51k|  if (status.ok()) {
  ------------------
  |  Branch (1536:7): [True: 4.51k, False: 0]
  ------------------
 1537|  4.51k|    if (data_seen && !flushed) {
  ------------------
  |  Branch (1537:9): [True: 4.48k, False: 30]
  |  Branch (1537:22): [True: 0, False: 4.48k]
  ------------------
 1538|      0|      status = RestoreAliveLogFiles(wal_numbers);
 1539|  4.51k|    } else if (!wal_numbers.empty()) {  // If there's no data in the WAL, or we
  ------------------
  |  Branch (1539:16): [True: 4.51k, False: 0]
  ------------------
 1540|       |                                        // flushed all the data, still
 1541|       |      // truncate the log file. If the process goes into a crash loop before
 1542|       |      // the file is deleted, the preallocated space will never get freed.
 1543|  4.51k|      const bool truncate = !read_only;
 1544|  4.51k|      GetLogSizeAndMaybeTruncate(wal_numbers.back(), truncate, nullptr)
 1545|  4.51k|          .PermitUncheckedError();
 1546|  4.51k|    }
 1547|  4.51k|  }
 1548|       |
 1549|  4.51k|  event_logger_.Log() << "job" << job_id << "event"
 1550|  4.51k|                      << "recovery_finished";
 1551|       |
 1552|  4.51k|  return status;
 1553|  4.51k|}
_ZN7rocksdb6DBImpl26GetLogSizeAndMaybeTruncateEmbPNS0_17LogFileNumberSizeE:
 1556|  4.51k|                                          LogFileNumberSize* log_ptr) {
 1557|  4.51k|  LogFileNumberSize log(wal_number);
 1558|  4.51k|  std::string fname =
 1559|  4.51k|      LogFileName(immutable_db_options_.GetWalDir(), wal_number);
 1560|  4.51k|  Status s;
 1561|       |  // This gets the appear size of the wals, not including preallocated space.
 1562|  4.51k|  s = env_->GetFileSize(fname, &log.size);
 1563|  4.51k|  TEST_SYNC_POINT_CALLBACK("DBImpl::GetLogSizeAndMaybeTruncate:0", /*arg=*/&s);
 1564|  4.51k|  if (s.ok() && truncate) {
  ------------------
  |  Branch (1564:7): [True: 4.51k, False: 0]
  |  Branch (1564:17): [True: 4.51k, False: 0]
  ------------------
 1565|  4.51k|    std::unique_ptr<FSWritableFile> last_log;
 1566|  4.51k|    Status truncate_status = fs_->ReopenWritableFile(
 1567|  4.51k|        fname,
 1568|  4.51k|        fs_->OptimizeForLogWrite(
 1569|  4.51k|            file_options_,
 1570|  4.51k|            BuildDBOptions(immutable_db_options_, mutable_db_options_)),
 1571|  4.51k|        &last_log, nullptr);
 1572|  4.51k|    if (truncate_status.ok()) {
  ------------------
  |  Branch (1572:9): [True: 4.51k, False: 0]
  ------------------
 1573|  4.51k|      truncate_status = last_log->Truncate(log.size, IOOptions(), nullptr);
 1574|  4.51k|    }
 1575|  4.51k|    if (truncate_status.ok()) {
  ------------------
  |  Branch (1575:9): [True: 4.51k, False: 0]
  ------------------
 1576|  4.51k|      truncate_status = last_log->Close(IOOptions(), nullptr);
 1577|  4.51k|    }
 1578|       |    // Not a critical error if fail to truncate.
 1579|  4.51k|    if (!truncate_status.ok() && !truncate_status.IsNotSupported()) {
  ------------------
  |  Branch (1579:9): [True: 0, False: 4.51k]
  |  Branch (1579:34): [True: 0, False: 0]
  ------------------
 1580|      0|      ROCKS_LOG_WARN(immutable_db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1581|      0|                     "Failed to truncate log #%" PRIu64 ": %s", wal_number,
 1582|      0|                     truncate_status.ToString().c_str());
 1583|      0|    }
 1584|  4.51k|  }
 1585|  4.51k|  if (log_ptr) {
  ------------------
  |  Branch (1585:7): [True: 0, False: 4.51k]
  ------------------
 1586|      0|    *log_ptr = log;
 1587|      0|  }
 1588|  4.51k|  return s;
 1589|  4.51k|}
_ZN7rocksdb6DBImpl27WriteLevel0TableForRecoveryEiPNS_16ColumnFamilyDataEPNS_8MemTableEPNS_11VersionEditE:
 1626|  4.48k|                                           MemTable* mem, VersionEdit* edit) {
 1627|  4.48k|  mutex_.AssertHeld();
 1628|  4.48k|  assert(cfd);
 1629|  4.48k|  assert(cfd->imm());
 1630|       |  // The immutable memtable list must be empty.
 1631|  4.48k|  assert(std::numeric_limits<uint64_t>::max() ==
 1632|  4.48k|         cfd->imm()->GetEarliestMemTableID());
 1633|       |
 1634|  4.48k|  const uint64_t start_micros = immutable_db_options_.clock->NowMicros();
 1635|       |
 1636|  4.48k|  FileMetaData meta;
 1637|  4.48k|  std::vector<BlobFileAddition> blob_file_additions;
 1638|       |
 1639|  4.48k|  std::unique_ptr<std::list<uint64_t>::iterator> pending_outputs_inserted_elem(
 1640|  4.48k|      new std::list<uint64_t>::iterator(
 1641|  4.48k|          CaptureCurrentFileNumberInPendingOutputs()));
 1642|  4.48k|  meta.fd = FileDescriptor(versions_->NewFileNumber(), 0, 0);
 1643|  4.48k|  ReadOptions ro;
 1644|  4.48k|  ro.total_order_seek = true;
 1645|  4.48k|  ro.io_activity = Env::IOActivity::kDBOpen;
 1646|  4.48k|  Arena arena;
 1647|  4.48k|  Status s;
 1648|  4.48k|  TableProperties table_properties;
 1649|  4.48k|  {
 1650|  4.48k|    ScopedArenaPtr<InternalIterator> iter(
 1651|  4.48k|        mem->NewIterator(ro, /*seqno_to_time_mapping=*/nullptr, &arena));
 1652|  4.48k|    ROCKS_LOG_DEBUG(immutable_db_options_.info_log,
  ------------------
  |  |   36|  4.48k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::DEBUG_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  4.48k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  4.48k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  4.48k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  4.48k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1653|  4.48k|                    "[%s] [WriteLevel0TableForRecovery]"
 1654|  4.48k|                    " Level-0 table #%" PRIu64 ": started",
 1655|  4.48k|                    cfd->GetName().c_str(), meta.fd.GetNumber());
 1656|       |
 1657|       |    // Get the latest mutable cf options while the mutex is still locked
 1658|  4.48k|    const MutableCFOptions mutable_cf_options =
 1659|  4.48k|        *cfd->GetLatestMutableCFOptions();
 1660|  4.48k|    bool paranoid_file_checks =
 1661|  4.48k|        cfd->GetLatestMutableCFOptions()->paranoid_file_checks;
 1662|       |
 1663|  4.48k|    int64_t _current_time = 0;
 1664|  4.48k|    immutable_db_options_.clock->GetCurrentTime(&_current_time)
 1665|  4.48k|        .PermitUncheckedError();  // ignore error
 1666|  4.48k|    const uint64_t current_time = static_cast<uint64_t>(_current_time);
 1667|  4.48k|    meta.oldest_ancester_time = current_time;
 1668|  4.48k|    meta.epoch_number = cfd->NewEpochNumber();
 1669|  4.48k|    {
 1670|  4.48k|      auto write_hint = cfd->CalculateSSTWriteHint(0);
 1671|  4.48k|      mutex_.Unlock();
 1672|       |
 1673|  4.48k|      SequenceNumber earliest_write_conflict_snapshot;
 1674|  4.48k|      std::vector<SequenceNumber> snapshot_seqs =
 1675|  4.48k|          snapshots_.GetAll(&earliest_write_conflict_snapshot);
 1676|  4.48k|      SequenceNumber earliest_snapshot =
 1677|  4.48k|          (snapshot_seqs.empty() ? kMaxSequenceNumber : snapshot_seqs.at(0));
  ------------------
  |  Branch (1677:12): [True: 4.48k, False: 0]
  ------------------
 1678|  4.48k|      auto snapshot_checker = snapshot_checker_.get();
 1679|  4.48k|      if (use_custom_gc_ && snapshot_checker == nullptr) {
  ------------------
  |  Branch (1679:11): [True: 0, False: 4.48k]
  |  Branch (1679:29): [True: 0, False: 0]
  ------------------
 1680|      0|        snapshot_checker = DisableGCSnapshotChecker::Instance();
 1681|      0|      }
 1682|  4.48k|      std::vector<std::unique_ptr<FragmentedRangeTombstoneIterator>>
 1683|  4.48k|          range_del_iters;
 1684|  4.48k|      auto range_del_iter =
 1685|       |          // This is called during recovery, where a live memtable is flushed
 1686|       |          // directly. In this case, no fragmented tombstone list is cached in
 1687|       |          // this memtable yet.
 1688|  4.48k|          mem->NewRangeTombstoneIterator(ro, kMaxSequenceNumber,
 1689|  4.48k|                                         false /* immutable_memtable */);
 1690|  4.48k|      if (range_del_iter != nullptr) {
  ------------------
  |  Branch (1690:11): [True: 2.90k, False: 1.57k]
  ------------------
 1691|  2.90k|        range_del_iters.emplace_back(range_del_iter);
 1692|  2.90k|      }
 1693|       |
 1694|  4.48k|      IOStatus io_s;
 1695|  4.48k|      const ReadOptions read_option(Env::IOActivity::kDBOpen);
 1696|  4.48k|      const WriteOptions write_option(Env::IO_HIGH, Env::IOActivity::kDBOpen);
 1697|       |
 1698|  4.48k|      TableBuilderOptions tboptions(
 1699|  4.48k|          *cfd->ioptions(), mutable_cf_options, read_option, write_option,
 1700|  4.48k|          cfd->internal_comparator(), cfd->internal_tbl_prop_coll_factories(),
 1701|  4.48k|          GetCompressionFlush(*cfd->ioptions(), mutable_cf_options),
 1702|  4.48k|          mutable_cf_options.compression_opts, cfd->GetID(), cfd->GetName(),
 1703|  4.48k|          0 /* level */, false /* is_bottommost */,
 1704|  4.48k|          TableFileCreationReason::kRecovery, 0 /* oldest_key_time */,
 1705|  4.48k|          0 /* file_creation_time */, db_id_, db_session_id_,
 1706|  4.48k|          0 /* target_file_size */, meta.fd.GetNumber(), kMaxSequenceNumber);
 1707|  4.48k|      Version* version = cfd->current();
 1708|  4.48k|      version->Ref();
 1709|  4.48k|      uint64_t num_input_entries = 0;
 1710|  4.48k|      s = BuildTable(dbname_, versions_.get(), immutable_db_options_, tboptions,
 1711|  4.48k|                     file_options_for_compaction_, cfd->table_cache(),
 1712|  4.48k|                     iter.get(), std::move(range_del_iters), &meta,
 1713|  4.48k|                     &blob_file_additions, snapshot_seqs, earliest_snapshot,
 1714|  4.48k|                     earliest_write_conflict_snapshot, kMaxSequenceNumber,
 1715|  4.48k|                     snapshot_checker, paranoid_file_checks,
 1716|  4.48k|                     cfd->internal_stats(), &io_s, io_tracer_,
 1717|  4.48k|                     BlobFileCreationReason::kRecovery,
 1718|  4.48k|                     nullptr /* seqno_to_time_mapping */, &event_logger_,
 1719|  4.48k|                     job_id, nullptr /* table_properties */, write_hint,
 1720|  4.48k|                     nullptr /*full_history_ts_low*/, &blob_callback_, version,
 1721|  4.48k|                     &num_input_entries);
 1722|  4.48k|      version->Unref();
 1723|  4.48k|      LogFlush(immutable_db_options_.info_log);
 1724|  4.48k|      ROCKS_LOG_DEBUG(immutable_db_options_.info_log,
  ------------------
  |  |   36|  4.48k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::DEBUG_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  4.48k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  4.48k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  4.48k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  4.48k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1725|  4.48k|                      "[%s] [WriteLevel0TableForRecovery]"
 1726|  4.48k|                      " Level-0 table #%" PRIu64 ": %" PRIu64 " bytes %s",
 1727|  4.48k|                      cfd->GetName().c_str(), meta.fd.GetNumber(),
 1728|  4.48k|                      meta.fd.GetFileSize(), s.ToString().c_str());
 1729|  4.48k|      mutex_.Lock();
 1730|       |
 1731|       |      // TODO(AR) is this ok?
 1732|  4.48k|      if (!io_s.ok() && s.ok()) {
  ------------------
  |  Branch (1732:11): [True: 0, False: 4.48k]
  |  Branch (1732:25): [True: 0, False: 0]
  ------------------
 1733|      0|        s = io_s;
 1734|      0|      }
 1735|       |
 1736|  4.48k|      uint64_t total_num_entries = mem->num_entries();
 1737|  4.48k|      if (s.ok() && total_num_entries != num_input_entries) {
  ------------------
  |  Branch (1737:11): [True: 4.48k, False: 0]
  |  Branch (1737:21): [True: 0, False: 4.48k]
  ------------------
 1738|      0|        std::string msg = "Expected " + std::to_string(total_num_entries) +
 1739|      0|                          " entries in memtable, but read " +
 1740|      0|                          std::to_string(num_input_entries);
 1741|      0|        ROCKS_LOG_WARN(immutable_db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1742|      0|                       "[%s] [JOB %d] Level-0 flush during recover: %s",
 1743|      0|                       cfd->GetName().c_str(), job_id, msg.c_str());
 1744|      0|        if (immutable_db_options_.flush_verify_memtable_count) {
  ------------------
  |  Branch (1744:13): [True: 0, False: 0]
  ------------------
 1745|      0|          s = Status::Corruption(msg);
 1746|      0|        }
 1747|      0|      }
 1748|  4.48k|    }
 1749|  4.48k|  }
 1750|  4.48k|  ReleaseFileNumberFromPendingOutputs(pending_outputs_inserted_elem);
 1751|       |
 1752|       |  // Note that if file_size is zero, the file has been deleted and
 1753|       |  // should not be added to the manifest.
 1754|  4.48k|  const bool has_output = meta.fd.GetFileSize() > 0;
 1755|       |
 1756|  4.48k|  constexpr int level = 0;
 1757|       |
 1758|  4.48k|  if (s.ok() && has_output) {
  ------------------
  |  Branch (1758:7): [True: 4.48k, False: 0]
  |  Branch (1758:17): [True: 4.48k, False: 0]
  ------------------
 1759|  4.48k|    edit->AddFile(level, meta.fd.GetNumber(), meta.fd.GetPathId(),
 1760|  4.48k|                  meta.fd.GetFileSize(), meta.smallest, meta.largest,
 1761|  4.48k|                  meta.fd.smallest_seqno, meta.fd.largest_seqno,
 1762|  4.48k|                  meta.marked_for_compaction, meta.temperature,
 1763|  4.48k|                  meta.oldest_blob_file_number, meta.oldest_ancester_time,
 1764|  4.48k|                  meta.file_creation_time, meta.epoch_number,
 1765|  4.48k|                  meta.file_checksum, meta.file_checksum_func_name,
 1766|  4.48k|                  meta.unique_id, meta.compensated_range_deletion_size,
 1767|  4.48k|                  meta.tail_size, meta.user_defined_timestamps_persisted);
 1768|       |
 1769|  4.48k|    for (const auto& blob : blob_file_additions) {
  ------------------
  |  Branch (1769:27): [True: 0, False: 4.48k]
  ------------------
 1770|      0|      edit->AddBlobFile(blob);
 1771|      0|    }
 1772|       |
 1773|       |    // For UDT in memtable only feature, move up the cutoff timestamp whenever
 1774|       |    // a flush happens.
 1775|  4.48k|    const Comparator* ucmp = cfd->user_comparator();
 1776|  4.48k|    size_t ts_sz = ucmp->timestamp_size();
 1777|  4.48k|    if (ts_sz > 0 && !cfd->ioptions()->persist_user_defined_timestamps) {
  ------------------
  |  Branch (1777:9): [True: 0, False: 4.48k]
  |  Branch (1777:22): [True: 0, False: 0]
  ------------------
 1778|      0|      Slice mem_newest_udt = mem->GetNewestUDT();
 1779|      0|      std::string full_history_ts_low = cfd->GetFullHistoryTsLow();
 1780|      0|      if (full_history_ts_low.empty() ||
  ------------------
  |  Branch (1780:11): [True: 0, False: 0]
  |  Branch (1780:11): [True: 0, False: 0]
  ------------------
 1781|      0|          ucmp->CompareTimestamp(mem_newest_udt, full_history_ts_low) >= 0) {
  ------------------
  |  Branch (1781:11): [True: 0, False: 0]
  ------------------
 1782|      0|        std::string new_full_history_ts_low;
 1783|      0|        GetFullHistoryTsLowFromU64CutoffTs(&mem_newest_udt,
 1784|      0|                                           &new_full_history_ts_low);
 1785|      0|        edit->SetFullHistoryTsLow(new_full_history_ts_low);
 1786|      0|      }
 1787|      0|    }
 1788|  4.48k|  }
 1789|       |
 1790|  4.48k|  InternalStats::CompactionStats stats(CompactionReason::kFlush, 1);
 1791|  4.48k|  stats.micros = immutable_db_options_.clock->NowMicros() - start_micros;
 1792|       |
 1793|  4.48k|  if (has_output) {
  ------------------
  |  Branch (1793:7): [True: 4.48k, False: 0]
  ------------------
 1794|  4.48k|    stats.bytes_written = meta.fd.GetFileSize();
 1795|  4.48k|    stats.num_output_files = 1;
 1796|  4.48k|  }
 1797|       |
 1798|  4.48k|  const auto& blobs = edit->GetBlobFileAdditions();
 1799|  4.48k|  for (const auto& blob : blobs) {
  ------------------
  |  Branch (1799:25): [True: 0, False: 4.48k]
  ------------------
 1800|      0|    stats.bytes_written_blob += blob.GetTotalBlobBytes();
 1801|      0|  }
 1802|       |
 1803|  4.48k|  stats.num_output_files_blob = static_cast<int>(blobs.size());
 1804|       |
 1805|  4.48k|  cfd->internal_stats()->AddCompactionStats(level, Env::Priority::USER, stats);
 1806|  4.48k|  cfd->internal_stats()->AddCFStats(
 1807|  4.48k|      InternalStats::BYTES_FLUSHED,
 1808|  4.48k|      stats.bytes_written + stats.bytes_written_blob);
 1809|  4.48k|  RecordTick(stats_, COMPACT_WRITE_BYTES, meta.fd.GetFileSize());
 1810|  4.48k|  return s;
 1811|  4.48k|}
_ZN7rocksdb2DB4OpenERKNS_7OptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPPS0_:
 1813|  9.02k|Status DB::Open(const Options& options, const std::string& dbname, DB** dbptr) {
 1814|  9.02k|  DBOptions db_options(options);
 1815|  9.02k|  ColumnFamilyOptions cf_options(options);
 1816|  9.02k|  std::vector<ColumnFamilyDescriptor> column_families;
 1817|  9.02k|  column_families.emplace_back(kDefaultColumnFamilyName, cf_options);
 1818|  9.02k|  if (db_options.persist_stats_to_disk) {
  ------------------
  |  Branch (1818:7): [True: 0, False: 9.02k]
  ------------------
 1819|      0|    column_families.emplace_back(kPersistentStatsColumnFamilyName, cf_options);
 1820|      0|  }
 1821|  9.02k|  std::vector<ColumnFamilyHandle*> handles;
 1822|  9.02k|  Status s = DB::Open(db_options, dbname, column_families, &handles, dbptr);
 1823|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (1823:7): [True: 9.02k, False: 0]
  ------------------
 1824|  9.02k|    if (db_options.persist_stats_to_disk) {
  ------------------
  |  Branch (1824:9): [True: 0, False: 9.02k]
  ------------------
 1825|      0|      assert(handles.size() == 2);
 1826|  9.02k|    } else {
 1827|  9.02k|      assert(handles.size() == 1);
 1828|  9.02k|    }
 1829|       |    // i can delete the handle since DBImpl is always holding a reference to
 1830|       |    // default column family
 1831|  9.02k|    if (db_options.persist_stats_to_disk && handles[1] != nullptr) {
  ------------------
  |  Branch (1831:9): [True: 0, False: 9.02k]
  |  Branch (1831:45): [True: 0, False: 0]
  ------------------
 1832|      0|      delete handles[1];
 1833|      0|    }
 1834|  9.02k|    delete handles[0];
 1835|  9.02k|  }
 1836|  9.02k|  return s;
 1837|  9.02k|}
_ZN7rocksdb2DB4OpenERKNS_9DBOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKNS4_6vectorINS_22ColumnFamilyDescriptorENS8_ISE_EEEEPNSD_IPNS_18ColumnFamilyHandleENS8_ISK_EEEEPPS0_:
 1841|  9.02k|                std::vector<ColumnFamilyHandle*>* handles, DB** dbptr) {
 1842|  9.02k|  const bool kSeqPerBatch = true;
 1843|  9.02k|  const bool kBatchPerTxn = true;
 1844|  9.02k|  ThreadStatusUtil::SetEnableTracking(db_options.enable_thread_tracking);
 1845|  9.02k|  ThreadStatusUtil::SetThreadOperation(ThreadStatus::OperationType::OP_DBOPEN);
 1846|  9.02k|  bool can_retry = false;
 1847|  9.02k|  Status s;
 1848|  9.02k|  do {
 1849|  9.02k|    s = DBImpl::Open(db_options, dbname, column_families, handles, dbptr,
 1850|  9.02k|                     !kSeqPerBatch, kBatchPerTxn, can_retry, &can_retry);
 1851|  9.02k|  } while (!s.ok() && can_retry);
  ------------------
  |  Branch (1851:12): [True: 0, False: 9.02k]
  |  Branch (1851:23): [True: 0, False: 0]
  ------------------
 1852|  9.02k|  ThreadStatusUtil::ResetThreadStatus();
 1853|  9.02k|  return s;
 1854|  9.02k|}
_ZN7rocksdb6DBImpl9CreateWALERKNS_12WriteOptionsEmmmPPNS_3log6WriterE:
 1925|  9.02k|                           log::Writer** new_log) {
 1926|  9.02k|  IOStatus io_s;
 1927|  9.02k|  std::unique_ptr<FSWritableFile> lfile;
 1928|       |
 1929|  9.02k|  DBOptions db_options =
 1930|  9.02k|      BuildDBOptions(immutable_db_options_, mutable_db_options_);
 1931|  9.02k|  FileOptions opt_file_options =
 1932|  9.02k|      fs_->OptimizeForLogWrite(file_options_, db_options);
 1933|  9.02k|  std::string wal_dir = immutable_db_options_.GetWalDir();
 1934|  9.02k|  std::string log_fname = LogFileName(wal_dir, log_file_num);
 1935|       |
 1936|  9.02k|  if (recycle_log_number) {
  ------------------
  |  Branch (1936:7): [True: 0, False: 9.02k]
  ------------------
 1937|      0|    ROCKS_LOG_INFO(immutable_db_options_.info_log,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1938|      0|                   "reusing log %" PRIu64 " from recycle list\n",
 1939|      0|                   recycle_log_number);
 1940|      0|    std::string old_log_fname = LogFileName(wal_dir, recycle_log_number);
 1941|      0|    TEST_SYNC_POINT("DBImpl::CreateWAL:BeforeReuseWritableFile1");
 1942|      0|    TEST_SYNC_POINT("DBImpl::CreateWAL:BeforeReuseWritableFile2");
 1943|      0|    io_s = fs_->ReuseWritableFile(log_fname, old_log_fname, opt_file_options,
 1944|      0|                                  &lfile, /*dbg=*/nullptr);
 1945|  9.02k|  } else {
 1946|  9.02k|    io_s = NewWritableFile(fs_.get(), log_fname, &lfile, opt_file_options);
 1947|  9.02k|  }
 1948|       |
 1949|  9.02k|  if (io_s.ok()) {
  ------------------
  |  Branch (1949:7): [True: 9.02k, False: 0]
  ------------------
 1950|  9.02k|    lfile->SetWriteLifeTimeHint(CalculateWALWriteHint());
 1951|  9.02k|    lfile->SetPreallocationBlockSize(preallocate_block_size);
 1952|       |
 1953|  9.02k|    const auto& listeners = immutable_db_options_.listeners;
 1954|  9.02k|    FileTypeSet tmp_set = immutable_db_options_.checksum_handoff_file_types;
 1955|  9.02k|    std::unique_ptr<WritableFileWriter> file_writer(new WritableFileWriter(
 1956|  9.02k|        std::move(lfile), log_fname, opt_file_options,
 1957|  9.02k|        immutable_db_options_.clock, io_tracer_, nullptr /* stats */,
 1958|  9.02k|        Histograms::HISTOGRAM_ENUM_MAX /* hist_type */, listeners, nullptr,
 1959|  9.02k|        tmp_set.Contains(FileType::kWalFile),
 1960|  9.02k|        tmp_set.Contains(FileType::kWalFile)));
 1961|  9.02k|    *new_log = new log::Writer(std::move(file_writer), log_file_num,
 1962|  9.02k|                               immutable_db_options_.recycle_log_file_num > 0,
 1963|  9.02k|                               immutable_db_options_.manual_wal_flush,
 1964|  9.02k|                               immutable_db_options_.wal_compression);
 1965|  9.02k|    io_s = (*new_log)->AddCompressionTypeRecord(write_options);
 1966|  9.02k|  }
 1967|  9.02k|  return io_s;
 1968|  9.02k|}
_ZN7rocksdb6DBImpl22TrackExistingDataFilesERKNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEE:
 1971|  9.02k|    const std::vector<std::string>& existing_data_files) {
 1972|  9.02k|  auto sfm = static_cast<SstFileManagerImpl*>(
 1973|  9.02k|      immutable_db_options_.sst_file_manager.get());
 1974|  9.02k|  assert(sfm);
 1975|  9.02k|  std::vector<ColumnFamilyMetaData> metadata;
 1976|  9.02k|  GetAllColumnFamilyMetaData(&metadata);
 1977|       |
 1978|  9.02k|  std::unordered_set<std::string> referenced_files;
 1979|  9.02k|  for (const auto& md : metadata) {
  ------------------
  |  Branch (1979:23): [True: 9.02k, False: 9.02k]
  ------------------
 1980|  63.1k|    for (const auto& lmd : md.levels) {
  ------------------
  |  Branch (1980:26): [True: 63.1k, False: 9.02k]
  ------------------
 1981|  63.1k|      for (const auto& fmd : lmd.files) {
  ------------------
  |  Branch (1981:28): [True: 4.48k, False: 63.1k]
  ------------------
 1982|       |        // We're assuming that each sst file name exists in at most one of
 1983|       |        // the paths.
 1984|  4.48k|        std::string file_path =
 1985|  4.48k|            fmd.directory + kFilePathSeparator + fmd.relative_filename;
 1986|  4.48k|        sfm->OnAddFile(file_path, fmd.size).PermitUncheckedError();
 1987|  4.48k|        referenced_files.insert(file_path);
 1988|  4.48k|      }
 1989|  63.1k|    }
 1990|  9.02k|    for (const auto& bmd : md.blob_files) {
  ------------------
  |  Branch (1990:26): [True: 0, False: 9.02k]
  ------------------
 1991|      0|      std::string name = bmd.blob_file_name;
 1992|       |      // The BlobMetaData.blob_file_name may start with "/".
 1993|      0|      if (!name.empty() && name[0] == kFilePathSeparator) {
  ------------------
  |  Branch (1993:11): [True: 0, False: 0]
  |  Branch (1993:28): [True: 0, False: 0]
  ------------------
 1994|      0|        name = name.substr(1);
 1995|      0|      }
 1996|       |      // We're assuming that each blob file name exists in at most one of
 1997|       |      // the paths.
 1998|      0|      std::string file_path = bmd.blob_file_path + kFilePathSeparator + name;
 1999|      0|      sfm->OnAddFile(file_path, bmd.blob_file_size).PermitUncheckedError();
 2000|      0|      referenced_files.insert(file_path);
 2001|      0|    }
 2002|  9.02k|  }
 2003|       |
 2004|  9.02k|  for (const auto& file_path : existing_data_files) {
  ------------------
  |  Branch (2004:30): [True: 0, False: 9.02k]
  ------------------
 2005|      0|    if (referenced_files.find(file_path) != referenced_files.end()) {
  ------------------
  |  Branch (2005:9): [True: 0, False: 0]
  ------------------
 2006|      0|      continue;
 2007|      0|    }
 2008|       |    // There shouldn't be any duplicated files. In case there is, SstFileManager
 2009|       |    // will take care of deduping it.
 2010|      0|    sfm->OnAddFile(file_path).PermitUncheckedError();
 2011|      0|  }
 2012|  9.02k|}
_ZN7rocksdb6DBImpl4OpenERKNS_9DBOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKNS4_6vectorINS_22ColumnFamilyDescriptorENS8_ISE_EEEEPNSD_IPNS_18ColumnFamilyHandleENS8_ISK_EEEEPPNS_2DBEbbbPb:
 2018|  9.02k|                    const bool is_retry, bool* can_retry) {
 2019|  9.02k|  const WriteOptions write_options(Env::IOActivity::kDBOpen);
 2020|  9.02k|  const ReadOptions read_options(Env::IOActivity::kDBOpen);
 2021|       |
 2022|  9.02k|  Status s = ValidateOptionsByTable(db_options, column_families);
 2023|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (2023:7): [True: 0, False: 9.02k]
  ------------------
 2024|      0|    return s;
 2025|      0|  }
 2026|       |
 2027|  9.02k|  s = ValidateOptions(db_options, column_families);
 2028|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (2028:7): [True: 0, False: 9.02k]
  ------------------
 2029|      0|    return s;
 2030|      0|  }
 2031|       |
 2032|  9.02k|  *dbptr = nullptr;
 2033|  9.02k|  assert(handles);
 2034|  9.02k|  handles->clear();
 2035|       |
 2036|  9.02k|  size_t max_write_buffer_size = 0;
 2037|  9.02k|  for (const auto& cf : column_families) {
  ------------------
  |  Branch (2037:23): [True: 9.02k, False: 9.02k]
  ------------------
 2038|  9.02k|    max_write_buffer_size =
 2039|  9.02k|        std::max(max_write_buffer_size, cf.options.write_buffer_size);
 2040|  9.02k|  }
 2041|       |
 2042|  9.02k|  DBImpl* impl = new DBImpl(db_options, dbname, seq_per_batch, batch_per_txn);
 2043|  9.02k|  if (!impl->immutable_db_options_.info_log) {
  ------------------
  |  Branch (2043:7): [True: 0, False: 9.02k]
  ------------------
 2044|      0|    s = impl->init_logger_creation_s_;
 2045|      0|    delete impl;
 2046|      0|    return s;
 2047|  9.02k|  } else {
 2048|  9.02k|    assert(impl->init_logger_creation_s_.ok());
 2049|  9.02k|  }
 2050|  9.02k|  s = impl->env_->CreateDirIfMissing(impl->immutable_db_options_.GetWalDir());
 2051|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2051:7): [True: 9.02k, False: 0]
  ------------------
 2052|  9.02k|    std::vector<std::string> paths;
 2053|  9.02k|    for (auto& db_path : impl->immutable_db_options_.db_paths) {
  ------------------
  |  Branch (2053:24): [True: 9.02k, False: 9.02k]
  ------------------
 2054|  9.02k|      paths.emplace_back(db_path.path);
 2055|  9.02k|    }
 2056|  9.02k|    for (auto& cf : column_families) {
  ------------------
  |  Branch (2056:19): [True: 9.02k, False: 9.02k]
  ------------------
 2057|  9.02k|      for (auto& cf_path : cf.options.cf_paths) {
  ------------------
  |  Branch (2057:26): [True: 0, False: 9.02k]
  ------------------
 2058|      0|        paths.emplace_back(cf_path.path);
 2059|      0|      }
 2060|  9.02k|    }
 2061|  9.02k|    for (const auto& path : paths) {
  ------------------
  |  Branch (2061:27): [True: 9.02k, False: 9.02k]
  ------------------
 2062|  9.02k|      s = impl->env_->CreateDirIfMissing(path);
 2063|  9.02k|      if (!s.ok()) {
  ------------------
  |  Branch (2063:11): [True: 0, False: 9.02k]
  ------------------
 2064|      0|        break;
 2065|      0|      }
 2066|  9.02k|    }
 2067|       |
 2068|       |    // For recovery from NoSpace() error, we can only handle
 2069|       |    // the case where the database is stored in a single path
 2070|  9.02k|    if (paths.size() <= 1) {
  ------------------
  |  Branch (2070:9): [True: 9.02k, False: 0]
  ------------------
 2071|  9.02k|      impl->error_handler_.EnableAutoRecovery();
 2072|  9.02k|    }
 2073|  9.02k|  }
 2074|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2074:7): [True: 9.02k, False: 0]
  ------------------
 2075|  9.02k|    s = impl->CreateArchivalDirectory();
 2076|  9.02k|  }
 2077|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (2077:7): [True: 0, False: 9.02k]
  ------------------
 2078|      0|    delete impl;
 2079|      0|    return s;
 2080|      0|  }
 2081|       |
 2082|  9.02k|  impl->wal_in_db_path_ = impl->immutable_db_options_.IsWalDirSameAsDBPath();
 2083|  9.02k|  RecoveryContext recovery_ctx;
 2084|  9.02k|  impl->options_mutex_.Lock();
 2085|  9.02k|  impl->mutex_.Lock();
 2086|       |
 2087|       |  // Handles create_if_missing, error_if_exists
 2088|  9.02k|  uint64_t recovered_seq(kMaxSequenceNumber);
 2089|  9.02k|  s = impl->Recover(column_families, false /* read_only */,
 2090|  9.02k|                    false /* error_if_wal_file_exists */,
 2091|  9.02k|                    false /* error_if_data_exists_in_wals */, is_retry,
 2092|  9.02k|                    &recovered_seq, &recovery_ctx, can_retry);
 2093|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2093:7): [True: 9.02k, False: 0]
  ------------------
 2094|  9.02k|    uint64_t new_log_number = impl->versions_->NewFileNumber();
 2095|  9.02k|    log::Writer* new_log = nullptr;
 2096|  9.02k|    const size_t preallocate_block_size =
 2097|  9.02k|        impl->GetWalPreallocateBlockSize(max_write_buffer_size);
 2098|  9.02k|    s = impl->CreateWAL(write_options, new_log_number, 0 /*recycle_log_number*/,
 2099|  9.02k|                        preallocate_block_size, &new_log);
 2100|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (2100:9): [True: 9.02k, False: 0]
  ------------------
 2101|       |      // Prevent log files created by previous instance from being recycled.
 2102|       |      // They might be in alive_log_file_, and might get recycled otherwise.
 2103|  9.02k|      impl->min_log_number_to_recycle_ = new_log_number;
 2104|  9.02k|    }
 2105|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (2105:9): [True: 9.02k, False: 0]
  ------------------
 2106|  9.02k|      InstrumentedMutexLock wl(&impl->log_write_mutex_);
 2107|  9.02k|      impl->logfile_number_ = new_log_number;
 2108|  9.02k|      assert(new_log != nullptr);
 2109|  9.02k|      assert(impl->logs_.empty());
 2110|  9.02k|      impl->logs_.emplace_back(new_log_number, new_log);
 2111|  9.02k|    }
 2112|       |
 2113|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (2113:9): [True: 9.02k, False: 0]
  ------------------
 2114|  9.02k|      impl->alive_log_files_.emplace_back(impl->logfile_number_);
 2115|       |      // In WritePrepared there could be gap in sequence numbers. This breaks
 2116|       |      // the trick we use in kPointInTimeRecovery which assumes the first seq in
 2117|       |      // the log right after the corrupted log is one larger than the last seq
 2118|       |      // we read from the wals. To let this trick keep working, we add a dummy
 2119|       |      // entry with the expected sequence to the first log right after recovery.
 2120|       |      // In non-WritePrepared case also the new log after recovery could be
 2121|       |      // empty, and thus missing the consecutive seq hint to distinguish
 2122|       |      // middle-log corruption to corrupted-log-remained-after-recovery. This
 2123|       |      // case also will be addressed by a dummy write.
 2124|  9.02k|      if (recovered_seq != kMaxSequenceNumber) {
  ------------------
  |  Branch (2124:11): [True: 0, False: 9.02k]
  ------------------
 2125|      0|        WriteBatch empty_batch;
 2126|      0|        WriteBatchInternal::SetSequence(&empty_batch, recovered_seq);
 2127|      0|        uint64_t log_used, log_size;
 2128|      0|        log::Writer* log_writer = impl->logs_.back().writer;
 2129|      0|        LogFileNumberSize& log_file_number_size = impl->alive_log_files_.back();
 2130|       |
 2131|      0|        assert(log_writer->get_log_number() == log_file_number_size.number);
 2132|      0|        impl->mutex_.AssertHeld();
 2133|      0|        s = impl->WriteToWAL(empty_batch, write_options, log_writer, &log_used,
 2134|      0|                             &log_size, log_file_number_size);
 2135|      0|        if (s.ok()) {
  ------------------
  |  Branch (2135:13): [True: 0, False: 0]
  ------------------
 2136|       |          // Need to fsync, otherwise it might get lost after a power reset.
 2137|      0|          s = impl->FlushWAL(write_options, false);
 2138|      0|          TEST_SYNC_POINT_CALLBACK("DBImpl::Open::BeforeSyncWAL", /*arg=*/&s);
 2139|      0|          IOOptions opts;
 2140|      0|          if (s.ok()) {
  ------------------
  |  Branch (2140:15): [True: 0, False: 0]
  ------------------
 2141|      0|            s = WritableFileWriter::PrepareIOOptions(write_options, opts);
 2142|      0|          }
 2143|      0|          if (s.ok()) {
  ------------------
  |  Branch (2143:15): [True: 0, False: 0]
  ------------------
 2144|      0|            s = log_writer->file()->Sync(opts,
 2145|      0|                                         impl->immutable_db_options_.use_fsync);
 2146|      0|          }
 2147|      0|        }
 2148|      0|      }
 2149|  9.02k|    }
 2150|  9.02k|  }
 2151|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2151:7): [True: 9.02k, False: 0]
  ------------------
 2152|  9.02k|    s = impl->LogAndApplyForRecovery(recovery_ctx);
 2153|  9.02k|  }
 2154|       |
 2155|  9.02k|  if (s.ok() && impl->immutable_db_options_.persist_stats_to_disk) {
  ------------------
  |  Branch (2155:7): [True: 9.02k, False: 0]
  |  Branch (2155:17): [True: 0, False: 9.02k]
  ------------------
 2156|      0|    impl->mutex_.AssertHeld();
 2157|      0|    s = impl->InitPersistStatsColumnFamily();
 2158|      0|  }
 2159|       |
 2160|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2160:7): [True: 9.02k, False: 0]
  ------------------
 2161|       |    // set column family handles
 2162|  9.02k|    for (const auto& cf : column_families) {
  ------------------
  |  Branch (2162:25): [True: 9.02k, False: 9.02k]
  ------------------
 2163|  9.02k|      auto cfd =
 2164|  9.02k|          impl->versions_->GetColumnFamilySet()->GetColumnFamily(cf.name);
 2165|  9.02k|      if (cfd != nullptr) {
  ------------------
  |  Branch (2165:11): [True: 9.02k, False: 0]
  ------------------
 2166|  9.02k|        handles->push_back(
 2167|  9.02k|            new ColumnFamilyHandleImpl(cfd, impl, &impl->mutex_));
 2168|  9.02k|        impl->NewThreadStatusCfInfo(cfd);
 2169|  9.02k|      } else {
 2170|      0|        if (db_options.create_missing_column_families) {
  ------------------
  |  Branch (2170:13): [True: 0, False: 0]
  ------------------
 2171|       |          // missing column family, create it
 2172|      0|          ColumnFamilyHandle* handle = nullptr;
 2173|      0|          impl->mutex_.Unlock();
 2174|       |          // NOTE: the work normally done in WrapUpCreateColumnFamilies will
 2175|       |          // be done separately below.
 2176|      0|          s = impl->CreateColumnFamilyImpl(read_options, write_options,
 2177|      0|                                           cf.options, cf.name, &handle);
 2178|      0|          impl->mutex_.Lock();
 2179|      0|          if (s.ok()) {
  ------------------
  |  Branch (2179:15): [True: 0, False: 0]
  ------------------
 2180|      0|            handles->push_back(handle);
 2181|      0|          } else {
 2182|      0|            break;
 2183|      0|          }
 2184|      0|        } else {
 2185|      0|          s = Status::InvalidArgument("Column family not found", cf.name);
 2186|      0|          break;
 2187|      0|        }
 2188|      0|      }
 2189|  9.02k|    }
 2190|  9.02k|  }
 2191|       |
 2192|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2192:7): [True: 9.02k, False: 0]
  ------------------
 2193|  9.02k|    SuperVersionContext sv_context(/* create_superversion */ true);
 2194|  9.02k|    for (auto cfd : *impl->versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (2194:19): [True: 9.02k, False: 9.02k]
  ------------------
 2195|  9.02k|      impl->InstallSuperVersionAndScheduleWork(
 2196|  9.02k|          cfd, &sv_context, *cfd->GetLatestMutableCFOptions());
 2197|  9.02k|    }
 2198|  9.02k|    sv_context.Clean();
 2199|  9.02k|  }
 2200|       |
 2201|  9.02k|  if (s.ok() && impl->immutable_db_options_.persist_stats_to_disk) {
  ------------------
  |  Branch (2201:7): [True: 9.02k, False: 0]
  |  Branch (2201:17): [True: 0, False: 9.02k]
  ------------------
 2202|       |    // try to read format version
 2203|      0|    s = impl->PersistentStatsProcessFormatVersion();
 2204|      0|  }
 2205|       |
 2206|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2206:7): [True: 9.02k, False: 0]
  ------------------
 2207|  9.02k|    for (auto cfd : *impl->versions_->GetColumnFamilySet()) {
  ------------------
  |  Branch (2207:19): [True: 9.02k, False: 9.02k]
  ------------------
 2208|  9.02k|      if (!cfd->mem()->IsSnapshotSupported()) {
  ------------------
  |  Branch (2208:11): [True: 0, False: 9.02k]
  ------------------
 2209|      0|        impl->is_snapshot_supported_ = false;
 2210|      0|      }
 2211|  9.02k|      if (cfd->ioptions()->merge_operator != nullptr &&
  ------------------
  |  Branch (2211:11): [True: 0, False: 9.02k]
  ------------------
 2212|  9.02k|          !cfd->mem()->IsMergeOperatorSupported()) {
  ------------------
  |  Branch (2212:11): [True: 0, False: 0]
  ------------------
 2213|      0|        s = Status::InvalidArgument(
 2214|      0|            "The memtable of column family %s does not support merge operator "
 2215|      0|            "its options.merge_operator is non-null",
 2216|      0|            cfd->GetName().c_str());
 2217|      0|      }
 2218|  9.02k|      if (!s.ok()) {
  ------------------
  |  Branch (2218:11): [True: 0, False: 9.02k]
  ------------------
 2219|      0|        break;
 2220|      0|      }
 2221|  9.02k|    }
 2222|  9.02k|  }
 2223|  9.02k|  TEST_SYNC_POINT("DBImpl::Open:Opened");
 2224|  9.02k|  Status persist_options_status;
 2225|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2225:7): [True: 9.02k, False: 0]
  ------------------
 2226|       |    // Persist RocksDB Options before scheduling the compaction.
 2227|       |    // The WriteOptionsFile() will release and lock the mutex internally.
 2228|  9.02k|    persist_options_status =
 2229|  9.02k|        impl->WriteOptionsFile(write_options, true /*db_mutex_already_held*/);
 2230|  9.02k|    *dbptr = impl;
 2231|  9.02k|    impl->opened_successfully_ = true;
 2232|  9.02k|  } else {
 2233|      0|    persist_options_status.PermitUncheckedError();
 2234|      0|  }
 2235|  9.02k|  impl->mutex_.Unlock();
 2236|       |
 2237|  9.02k|  auto sfm = static_cast<SstFileManagerImpl*>(
 2238|  9.02k|      impl->immutable_db_options_.sst_file_manager.get());
 2239|  9.02k|  if (s.ok() && sfm) {
  ------------------
  |  Branch (2239:7): [True: 9.02k, False: 0]
  |  Branch (2239:17): [True: 9.02k, False: 0]
  ------------------
 2240|       |    // Set Statistics ptr for SstFileManager to dump the stats of
 2241|       |    // DeleteScheduler.
 2242|  9.02k|    sfm->SetStatisticsPtr(impl->immutable_db_options_.statistics);
 2243|  9.02k|    ROCKS_LOG_INFO(impl->immutable_db_options_.info_log,
  ------------------
  |  |   39|  9.02k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  9.02k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  9.02k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  9.02k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 2244|  9.02k|                   "SstFileManager instance %p", sfm);
 2245|       |
 2246|  9.02k|    impl->TrackExistingDataFiles(recovery_ctx.existing_data_files_);
 2247|       |
 2248|       |    // Reserve some disk buffer space. This is a heuristic - when we run out
 2249|       |    // of disk space, this ensures that there is at least write_buffer_size
 2250|       |    // amount of free space before we resume DB writes. In low disk space
 2251|       |    // conditions, we want to avoid a lot of small L0 files due to frequent
 2252|       |    // WAL write failures and resultant forced flushes
 2253|  9.02k|    sfm->ReserveDiskBuffer(max_write_buffer_size,
 2254|  9.02k|                           impl->immutable_db_options_.db_paths[0].path);
 2255|  9.02k|  }
 2256|       |
 2257|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2257:7): [True: 9.02k, False: 0]
  ------------------
 2258|       |    // When the DB is stopped, it's possible that there are some .trash files
 2259|       |    // that were not deleted yet, when we open the DB we will find these .trash
 2260|       |    // files and schedule them to be deleted (or delete immediately if
 2261|       |    // SstFileManager was not used).
 2262|       |    // Note that we only start doing this and below delete obsolete file after
 2263|       |    // `TrackExistingDataFiles` are called, the `max_trash_db_ratio` is
 2264|       |    // ineffective otherwise and these files' deletion won't be rate limited
 2265|       |    // which can cause discard stall.
 2266|  9.02k|    for (const auto& path : impl->CollectAllDBPaths()) {
  ------------------
  |  Branch (2266:27): [True: 9.02k, False: 9.02k]
  ------------------
 2267|  9.02k|      DeleteScheduler::CleanupDirectory(impl->immutable_db_options_.env, sfm,
 2268|  9.02k|                                        path)
 2269|  9.02k|          .PermitUncheckedError();
 2270|  9.02k|    }
 2271|  9.02k|    impl->mutex_.Lock();
 2272|       |    // This will do a full scan.
 2273|  9.02k|    impl->DeleteObsoleteFiles();
 2274|  9.02k|    TEST_SYNC_POINT("DBImpl::Open:AfterDeleteFiles");
 2275|  9.02k|    impl->MaybeScheduleFlushOrCompaction();
 2276|  9.02k|    impl->mutex_.Unlock();
 2277|  9.02k|  }
 2278|       |
 2279|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2279:7): [True: 9.02k, False: 0]
  ------------------
 2280|  9.02k|    ROCKS_LOG_HEADER(impl->immutable_db_options_.info_log, "DB pointer %p",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 2281|  9.02k|                     impl);
 2282|  9.02k|    LogFlush(impl->immutable_db_options_.info_log);
 2283|  9.02k|    if (!impl->WALBufferIsEmpty()) {
  ------------------
  |  Branch (2283:9): [True: 0, False: 9.02k]
  ------------------
 2284|      0|      s = impl->FlushWAL(write_options, false);
 2285|      0|      if (s.ok()) {
  ------------------
  |  Branch (2285:11): [True: 0, False: 0]
  ------------------
 2286|       |        // Sync is needed otherwise WAL buffered data might get lost after a
 2287|       |        // power reset.
 2288|      0|        log::Writer* log_writer = impl->logs_.back().writer;
 2289|      0|        IOOptions opts;
 2290|      0|        s = WritableFileWriter::PrepareIOOptions(write_options, opts);
 2291|      0|        if (s.ok()) {
  ------------------
  |  Branch (2291:13): [True: 0, False: 0]
  ------------------
 2292|      0|          s = log_writer->file()->Sync(opts,
 2293|      0|                                       impl->immutable_db_options_.use_fsync);
 2294|      0|        }
 2295|      0|      }
 2296|      0|    }
 2297|  9.02k|    if (s.ok() && !persist_options_status.ok()) {
  ------------------
  |  Branch (2297:9): [True: 9.02k, False: 0]
  |  Branch (2297:19): [True: 0, False: 9.02k]
  ------------------
 2298|      0|      s = Status::IOError(
 2299|      0|          "DB::Open() failed --- Unable to persist Options file",
 2300|      0|          persist_options_status.ToString());
 2301|      0|    }
 2302|  9.02k|  }
 2303|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (2303:7): [True: 0, False: 9.02k]
  ------------------
 2304|      0|    ROCKS_LOG_WARN(impl->immutable_db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 2305|      0|                   "DB::Open() failed: %s", s.ToString().c_str());
 2306|      0|  }
 2307|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2307:7): [True: 9.02k, False: 0]
  ------------------
 2308|  9.02k|    s = impl->StartPeriodicTaskScheduler();
 2309|  9.02k|  }
 2310|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (2310:7): [True: 9.02k, False: 0]
  ------------------
 2311|  9.02k|    s = impl->RegisterRecordSeqnoTimeWorker(read_options, write_options,
 2312|  9.02k|                                            recovery_ctx.is_new_db_);
 2313|  9.02k|  }
 2314|  9.02k|  impl->options_mutex_.Unlock();
 2315|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (2315:7): [True: 0, False: 9.02k]
  ------------------
 2316|      0|    for (auto* h : *handles) {
  ------------------
  |  Branch (2316:18): [True: 0, False: 0]
  ------------------
 2317|      0|      delete h;
 2318|      0|    }
 2319|      0|    handles->clear();
 2320|      0|    delete impl;
 2321|      0|    *dbptr = nullptr;
 2322|      0|  }
 2323|  9.02k|  return s;
 2324|  9.02k|}
db_impl_open.cc:_ZN7rocksdb12_GLOBAL__N_122ValidateOptionsByTableERKNS_9DBOptionsERKNSt3__16vectorINS_22ColumnFamilyDescriptorENS4_9allocatorIS6_EEEE:
  206|  9.02k|    const std::vector<ColumnFamilyDescriptor>& column_families) {
  207|  9.02k|  Status s;
  208|  9.02k|  for (auto& cf : column_families) {
  ------------------
  |  Branch (208:17): [True: 9.02k, False: 9.02k]
  ------------------
  209|  9.02k|    s = ValidateOptions(db_opts, cf.options);
  210|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (210:9): [True: 0, False: 9.02k]
  ------------------
  211|      0|      return s;
  212|      0|    }
  213|  9.02k|  }
  214|  9.02k|  return Status::OK();
  215|  9.02k|}

_ZN7rocksdb6DBImpl3PutERKNS_12WriteOptionsEPNS_18ColumnFamilyHandleERKNS_5SliceES8_:
   23|   660k|                   const Slice& key, const Slice& val) {
   24|   660k|  const Status s = FailIfCfHasTs(column_family);
   25|   660k|  if (!s.ok()) {
  ------------------
  |  Branch (25:7): [True: 0, False: 660k]
  ------------------
   26|      0|    return s;
   27|      0|  }
   28|   660k|  return DB::Put(o, column_family, key, val);
   29|   660k|}
_ZN7rocksdb6DBImpl6DeleteERKNS_12WriteOptionsEPNS_18ColumnFamilyHandleERKNS_5SliceE:
   86|   186k|                      ColumnFamilyHandle* column_family, const Slice& key) {
   87|   186k|  const Status s = FailIfCfHasTs(column_family);
   88|   186k|  if (!s.ok()) {
  ------------------
  |  Branch (88:7): [True: 0, False: 186k]
  ------------------
   89|      0|    return s;
   90|      0|  }
   91|   186k|  return DB::Delete(write_options, column_family, key);
   92|   186k|}
_ZN7rocksdb6DBImpl11DeleteRangeERKNS_12WriteOptionsEPNS_18ColumnFamilyHandleERKNS_5SliceES8_:
  126|   515k|                           const Slice& begin_key, const Slice& end_key) {
  127|   515k|  const Status s = FailIfCfHasTs(column_family);
  128|   515k|  if (!s.ok()) {
  ------------------
  |  Branch (128:7): [True: 0, False: 515k]
  ------------------
  129|      0|    return s;
  130|      0|  }
  131|   515k|  return DB::DeleteRange(write_options, column_family, begin_key, end_key);
  132|   515k|}
_ZN7rocksdb6DBImpl5WriteERKNS_12WriteOptionsEPNS_10WriteBatchE:
  150|  1.36M|Status DBImpl::Write(const WriteOptions& write_options, WriteBatch* my_batch) {
  151|  1.36M|  Status s;
  152|  1.36M|  if (write_options.protection_bytes_per_key > 0) {
  ------------------
  |  Branch (152:7): [True: 0, False: 1.36M]
  ------------------
  153|      0|    s = WriteBatchInternal::UpdateProtectionInfo(
  154|      0|        my_batch, write_options.protection_bytes_per_key);
  155|      0|  }
  156|  1.36M|  if (s.ok()) {
  ------------------
  |  Branch (156:7): [True: 1.36M, False: 0]
  ------------------
  157|  1.36M|    s = WriteImpl(write_options, my_batch, /*callback=*/nullptr,
  158|  1.36M|                  /*user_write_cb=*/nullptr,
  159|  1.36M|                  /*log_used=*/nullptr);
  160|  1.36M|  }
  161|  1.36M|  return s;
  162|  1.36M|}
_ZN7rocksdb6DBImpl9WriteImplERKNS_12WriteOptionsEPNS_10WriteBatchEPNS_13WriteCallbackEPNS_17UserWriteCallbackEPmmbSA_mPNS_18PreReleaseCallbackEPNS_20PostMemTableCallbackE:
  201|  1.36M|                         PostMemTableCallback* post_memtable_callback) {
  202|  1.36M|  assert(!seq_per_batch_ || batch_cnt != 0);
  203|  1.36M|  assert(my_batch == nullptr || my_batch->Count() == 0 ||
  204|  1.36M|         write_options.protection_bytes_per_key == 0 ||
  205|  1.36M|         write_options.protection_bytes_per_key ==
  206|  1.36M|             my_batch->GetProtectionBytesPerKey());
  207|  1.36M|  if (my_batch == nullptr) {
  ------------------
  |  Branch (207:7): [True: 0, False: 1.36M]
  ------------------
  208|      0|    return Status::InvalidArgument("Batch is nullptr!");
  209|  1.36M|  } else if (!disable_memtable &&
  ------------------
  |  Branch (209:14): [True: 1.36M, False: 0]
  ------------------
  210|  1.36M|             WriteBatchInternal::TimestampsUpdateNeeded(*my_batch)) {
  ------------------
  |  Branch (210:14): [True: 0, False: 1.36M]
  ------------------
  211|       |    // If writing to memtable, then we require the caller to set/update the
  212|       |    // timestamps for the keys in the write batch.
  213|       |    // Otherwise, it means we are just writing to the WAL, and we allow
  214|       |    // timestamps unset for the keys in the write batch. This can happen if we
  215|       |    // use TransactionDB with write-committed policy, and we currently do not
  216|       |    // support user-defined timestamp with other policies.
  217|       |    // In the prepare phase, a transaction can write the batch to the WAL
  218|       |    // without inserting to memtable. The keys in the batch do not have to be
  219|       |    // assigned timestamps because they will be used only during recovery if
  220|       |    // there is a commit marker which includes their commit timestamp.
  221|      0|    return Status::InvalidArgument("write batch must have timestamp(s) set");
  222|  1.36M|  } else if (write_options.rate_limiter_priority != Env::IO_TOTAL &&
  ------------------
  |  Branch (222:14): [True: 0, False: 1.36M]
  ------------------
  223|  1.36M|             write_options.rate_limiter_priority != Env::IO_USER) {
  ------------------
  |  Branch (223:14): [True: 0, False: 0]
  ------------------
  224|      0|    return Status::InvalidArgument(
  225|      0|        "WriteOptions::rate_limiter_priority only allows "
  226|      0|        "Env::IO_TOTAL and Env::IO_USER due to implementation constraints");
  227|  1.36M|  } else if (write_options.rate_limiter_priority != Env::IO_TOTAL &&
  ------------------
  |  Branch (227:14): [True: 0, False: 1.36M]
  ------------------
  228|  1.36M|             (write_options.disableWAL || manual_wal_flush_)) {
  ------------------
  |  Branch (228:15): [True: 0, False: 0]
  |  Branch (228:43): [True: 0, False: 0]
  ------------------
  229|      0|    return Status::InvalidArgument(
  230|      0|        "WriteOptions::rate_limiter_priority currently only supports "
  231|      0|        "rate-limiting automatic WAL flush, which requires "
  232|      0|        "`WriteOptions::disableWAL` and "
  233|      0|        "`DBOptions::manual_wal_flush` both set to false");
  234|  1.36M|  } else if (write_options.protection_bytes_per_key != 0 &&
  ------------------
  |  Branch (234:14): [True: 0, False: 1.36M]
  ------------------
  235|  1.36M|             write_options.protection_bytes_per_key != 8) {
  ------------------
  |  Branch (235:14): [True: 0, False: 0]
  ------------------
  236|      0|    return Status::InvalidArgument(
  237|      0|        "`WriteOptions::protection_bytes_per_key` must be zero or eight");
  238|  1.36M|  } else if (write_options.disableWAL &&
  ------------------
  |  Branch (238:14): [True: 0, False: 1.36M]
  ------------------
  239|  1.36M|             immutable_db_options_.recycle_log_file_num > 0 &&
  ------------------
  |  Branch (239:14): [True: 0, False: 0]
  ------------------
  240|  1.36M|             !(two_write_queues_ && disable_memtable)) {
  ------------------
  |  Branch (240:16): [True: 0, False: 0]
  |  Branch (240:37): [True: 0, False: 0]
  ------------------
  241|       |    // Corruption detection in recycled WALs relies on sequential sequence
  242|       |    // numbers, but WritePreparedTxnDB uses disableWAL internally for split
  243|       |    // writes
  244|      0|    return Status::InvalidArgument(
  245|      0|        "WriteOptions::disableWAL option is not supported if "
  246|      0|        "DBOptions::recycle_log_file_num > 0");
  247|      0|  }
  248|       |  // TODO: this use of operator bool on `tracer_` can avoid unnecessary lock
  249|       |  // grabs but does not seem thread-safe.
  250|  1.36M|  if (tracer_) {
  ------------------
  |  Branch (250:7): [True: 0, False: 1.36M]
  ------------------
  251|      0|    InstrumentedMutexLock lock(&trace_mutex_);
  252|      0|    if (tracer_ && !tracer_->IsWriteOrderPreserved()) {
  ------------------
  |  Branch (252:9): [True: 0, False: 0]
  |  Branch (252:20): [True: 0, False: 0]
  ------------------
  253|       |      // We don't have to preserve write order so can trace anywhere. It's more
  254|       |      // efficient to trace here than to add latency to a phase of the log/apply
  255|       |      // pipeline.
  256|       |      // TODO: maybe handle the tracing status?
  257|      0|      tracer_->Write(my_batch).PermitUncheckedError();
  258|      0|    }
  259|      0|  }
  260|  1.36M|  if (write_options.sync && write_options.disableWAL) {
  ------------------
  |  Branch (260:7): [True: 0, False: 1.36M]
  |  Branch (260:29): [True: 0, False: 0]
  ------------------
  261|      0|    return Status::InvalidArgument("Sync writes has to enable WAL.");
  262|      0|  }
  263|  1.36M|  if (two_write_queues_ && immutable_db_options_.enable_pipelined_write) {
  ------------------
  |  Branch (263:7): [True: 0, False: 1.36M]
  |  Branch (263:28): [True: 0, False: 0]
  ------------------
  264|      0|    return Status::NotSupported(
  265|      0|        "pipelined_writes is not compatible with concurrent prepares");
  266|      0|  }
  267|  1.36M|  if (seq_per_batch_ && immutable_db_options_.enable_pipelined_write) {
  ------------------
  |  Branch (267:7): [True: 0, False: 1.36M]
  |  Branch (267:25): [True: 0, False: 0]
  ------------------
  268|       |    // TODO(yiwu): update pipeline write with seq_per_batch and batch_cnt
  269|      0|    return Status::NotSupported(
  270|      0|        "pipelined_writes is not compatible with seq_per_batch");
  271|      0|  }
  272|  1.36M|  if (immutable_db_options_.unordered_write &&
  ------------------
  |  Branch (272:7): [True: 0, False: 1.36M]
  ------------------
  273|  1.36M|      immutable_db_options_.enable_pipelined_write) {
  ------------------
  |  Branch (273:7): [True: 0, False: 0]
  ------------------
  274|      0|    return Status::NotSupported(
  275|      0|        "pipelined_writes is not compatible with unordered_write");
  276|      0|  }
  277|  1.36M|  if (immutable_db_options_.enable_pipelined_write &&
  ------------------
  |  Branch (277:7): [True: 0, False: 1.36M]
  ------------------
  278|  1.36M|      post_memtable_callback != nullptr) {
  ------------------
  |  Branch (278:7): [True: 0, False: 0]
  ------------------
  279|      0|    return Status::NotSupported(
  280|      0|        "pipelined write currently does not honor post_memtable_callback");
  281|      0|  }
  282|  1.36M|  if (seq_per_batch_ && post_memtable_callback != nullptr) {
  ------------------
  |  Branch (282:7): [True: 0, False: 1.36M]
  |  Branch (282:25): [True: 0, False: 0]
  ------------------
  283|      0|    return Status::NotSupported(
  284|      0|        "seq_per_batch currently does not honor post_memtable_callback");
  285|      0|  }
  286|  1.36M|  if (my_batch->HasDeleteRange() && immutable_db_options_.row_cache) {
  ------------------
  |  Branch (286:7): [True: 515k, False: 846k]
  |  Branch (286:37): [True: 0, False: 515k]
  ------------------
  287|      0|    return Status::NotSupported(
  288|      0|        "DeleteRange is not compatible with row cache.");
  289|      0|  }
  290|       |  // Otherwise IsLatestPersistentState optimization does not make sense
  291|  1.36M|  assert(!WriteBatchInternal::IsLatestPersistentState(my_batch) ||
  292|  1.36M|         disable_memtable);
  293|       |
  294|  1.36M|  if (write_options.low_pri) {
  ------------------
  |  Branch (294:7): [True: 0, False: 1.36M]
  ------------------
  295|      0|    Status s = ThrottleLowPriWritesIfNeeded(write_options, my_batch);
  296|      0|    if (!s.ok()) {
  ------------------
  |  Branch (296:9): [True: 0, False: 0]
  ------------------
  297|      0|      return s;
  298|      0|    }
  299|      0|  }
  300|       |
  301|  1.36M|  if (two_write_queues_ && disable_memtable) {
  ------------------
  |  Branch (301:7): [True: 0, False: 1.36M]
  |  Branch (301:28): [True: 0, False: 0]
  ------------------
  302|      0|    AssignOrder assign_order =
  303|      0|        seq_per_batch_ ? kDoAssignOrder : kDontAssignOrder;
  ------------------
  |  Branch (303:9): [True: 0, False: 0]
  ------------------
  304|       |    // Otherwise it is WAL-only Prepare batches in WriteCommitted policy and
  305|       |    // they don't consume sequence.
  306|      0|    return WriteImplWALOnly(
  307|      0|        &nonmem_write_thread_, write_options, my_batch, callback, user_write_cb,
  308|      0|        log_used, log_ref, seq_used, batch_cnt, pre_release_callback,
  309|      0|        assign_order, kDontPublishLastSeq, disable_memtable);
  310|      0|  }
  311|       |
  312|  1.36M|  if (immutable_db_options_.unordered_write) {
  ------------------
  |  Branch (312:7): [True: 0, False: 1.36M]
  ------------------
  313|      0|    const size_t sub_batch_cnt = batch_cnt != 0
  ------------------
  |  Branch (313:34): [True: 0, False: 0]
  ------------------
  314|      0|                                     ? batch_cnt
  315|       |                                     // every key is a sub-batch consuming a seq
  316|      0|                                     : WriteBatchInternal::Count(my_batch);
  317|      0|    uint64_t seq = 0;
  318|       |    // Use a write thread to i) optimize for WAL write, ii) publish last
  319|       |    // sequence in in increasing order, iii) call pre_release_callback serially
  320|      0|    Status status = WriteImplWALOnly(
  321|      0|        &write_thread_, write_options, my_batch, callback, user_write_cb,
  322|      0|        log_used, log_ref, &seq, sub_batch_cnt, pre_release_callback,
  323|      0|        kDoAssignOrder, kDoPublishLastSeq, disable_memtable);
  324|      0|    TEST_SYNC_POINT("DBImpl::WriteImpl:UnorderedWriteAfterWriteWAL");
  325|      0|    if (!status.ok()) {
  ------------------
  |  Branch (325:9): [True: 0, False: 0]
  ------------------
  326|      0|      return status;
  327|      0|    }
  328|      0|    if (seq_used) {
  ------------------
  |  Branch (328:9): [True: 0, False: 0]
  ------------------
  329|      0|      *seq_used = seq;
  330|      0|    }
  331|      0|    if (!disable_memtable) {
  ------------------
  |  Branch (331:9): [True: 0, False: 0]
  ------------------
  332|      0|      TEST_SYNC_POINT("DBImpl::WriteImpl:BeforeUnorderedWriteMemtable");
  333|      0|      status = UnorderedWriteMemtable(write_options, my_batch, callback,
  334|      0|                                      log_ref, seq, sub_batch_cnt);
  335|      0|    }
  336|      0|    return status;
  337|      0|  }
  338|       |
  339|  1.36M|  if (immutable_db_options_.enable_pipelined_write) {
  ------------------
  |  Branch (339:7): [True: 0, False: 1.36M]
  ------------------
  340|      0|    return PipelinedWriteImpl(write_options, my_batch, callback, user_write_cb,
  341|      0|                              log_used, log_ref, disable_memtable, seq_used);
  342|      0|  }
  343|       |
  344|  1.36M|  PERF_TIMER_GUARD(write_pre_and_post_process_time);
  ------------------
  |  |   46|  1.36M|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  1.36M|  perf_step_timer_##metric.Start();
  ------------------
  345|  1.36M|  WriteThread::Writer w(write_options, my_batch, callback, user_write_cb,
  346|  1.36M|                        log_ref, disable_memtable, batch_cnt,
  347|  1.36M|                        pre_release_callback, post_memtable_callback);
  348|  1.36M|  StopWatch write_sw(immutable_db_options_.clock, stats_, DB_WRITE);
  349|       |
  350|  1.36M|  write_thread_.JoinBatchGroup(&w);
  351|  1.36M|  if (w.state == WriteThread::STATE_PARALLEL_MEMTABLE_CALLER) {
  ------------------
  |  Branch (351:7): [True: 0, False: 1.36M]
  ------------------
  352|      0|    write_thread_.SetMemWritersEachStride(&w);
  353|      0|  }
  354|  1.36M|  if (w.state == WriteThread::STATE_PARALLEL_MEMTABLE_WRITER) {
  ------------------
  |  Branch (354:7): [True: 0, False: 1.36M]
  ------------------
  355|       |    // we are a non-leader in a parallel group
  356|       |
  357|      0|    if (w.ShouldWriteToMemtable()) {
  ------------------
  |  Branch (357:9): [True: 0, False: 0]
  ------------------
  358|      0|      PERF_TIMER_STOP(write_pre_and_post_process_time);
  ------------------
  |  |   40|      0|#define PERF_TIMER_STOP(metric) perf_step_timer_##metric.Stop();
  ------------------
  359|      0|      PERF_TIMER_FOR_WAIT_GUARD(write_memtable_time);
  ------------------
  |  |   71|      0|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric), nullptr, \
  |  |   72|      0|                                         false, PerfLevel::kEnableWait);  \
  |  |   73|      0|  perf_step_timer_##metric.Start();
  ------------------
  360|       |
  361|      0|      ColumnFamilyMemTablesImpl column_family_memtables(
  362|      0|          versions_->GetColumnFamilySet());
  363|      0|      w.status = WriteBatchInternal::InsertInto(
  364|      0|          &w, w.sequence, &column_family_memtables, &flush_scheduler_,
  365|      0|          &trim_history_scheduler_,
  366|      0|          write_options.ignore_missing_column_families, 0 /*log_number*/, this,
  367|      0|          true /*concurrent_memtable_writes*/, seq_per_batch_, w.batch_cnt,
  368|      0|          batch_per_txn_, write_options.memtable_insert_hint_per_batch);
  369|       |
  370|      0|      PERF_TIMER_START(write_pre_and_post_process_time);
  ------------------
  |  |   42|      0|#define PERF_TIMER_START(metric) perf_step_timer_##metric.Start();
  ------------------
  371|      0|    }
  372|       |
  373|      0|    if (write_thread_.CompleteParallelMemTableWriter(&w)) {
  ------------------
  |  Branch (373:9): [True: 0, False: 0]
  ------------------
  374|       |      // we're responsible for exit batch group
  375|       |      // TODO(myabandeh): propagate status to write_group
  376|      0|      auto last_sequence = w.write_group->last_sequence;
  377|      0|      for (auto* tmp_w : *(w.write_group)) {
  ------------------
  |  Branch (377:24): [True: 0, False: 0]
  ------------------
  378|      0|        assert(tmp_w);
  379|      0|        if (tmp_w->post_memtable_callback) {
  ------------------
  |  Branch (379:13): [True: 0, False: 0]
  ------------------
  380|      0|          Status tmp_s =
  381|      0|              (*tmp_w->post_memtable_callback)(last_sequence, disable_memtable);
  382|       |          // TODO: propagate the execution status of post_memtable_callback to
  383|       |          // caller.
  384|      0|          assert(tmp_s.ok());
  385|      0|        }
  386|      0|      }
  387|      0|      versions_->SetLastSequence(last_sequence);
  388|      0|      MemTableInsertStatusCheck(w.status);
  389|      0|      write_thread_.ExitAsBatchGroupFollower(&w);
  390|      0|    }
  391|      0|    assert(w.state == WriteThread::STATE_COMPLETED);
  392|       |    // STATE_COMPLETED conditional below handles exit
  393|      0|  }
  394|  1.36M|  if (w.state == WriteThread::STATE_COMPLETED) {
  ------------------
  |  Branch (394:7): [True: 0, False: 1.36M]
  ------------------
  395|      0|    if (log_used != nullptr) {
  ------------------
  |  Branch (395:9): [True: 0, False: 0]
  ------------------
  396|      0|      *log_used = w.log_used;
  397|      0|    }
  398|      0|    if (seq_used != nullptr) {
  ------------------
  |  Branch (398:9): [True: 0, False: 0]
  ------------------
  399|      0|      *seq_used = w.sequence;
  400|      0|    }
  401|       |    // write is complete and leader has updated sequence
  402|      0|    return w.FinalStatus();
  403|      0|  }
  404|       |  // else we are the leader of the write batch group
  405|  1.36M|  assert(w.state == WriteThread::STATE_GROUP_LEADER);
  406|  1.36M|  Status status;
  407|       |  // Once reaches this point, the current writer "w" will try to do its write
  408|       |  // job.  It may also pick up some of the remaining writers in the "writers_"
  409|       |  // when it finds suitable, and finish them in the same write batch.
  410|       |  // This is how a write job could be done by the other writer.
  411|  1.36M|  WriteContext write_context;
  412|  1.36M|  LogContext log_context(write_options.sync);
  413|  1.36M|  WriteThread::WriteGroup write_group;
  414|  1.36M|  bool in_parallel_group = false;
  415|  1.36M|  uint64_t last_sequence = kMaxSequenceNumber;
  416|       |
  417|  1.36M|  assert(!two_write_queues_ || !disable_memtable);
  418|  1.36M|  {
  419|       |    // With concurrent writes we do preprocess only in the write thread that
  420|       |    // also does write to memtable to avoid sync issue on shared data structure
  421|       |    // with the other thread
  422|       |
  423|       |    // PreprocessWrite does its own perf timing.
  424|  1.36M|    PERF_TIMER_STOP(write_pre_and_post_process_time);
  ------------------
  |  |   40|  1.36M|#define PERF_TIMER_STOP(metric) perf_step_timer_##metric.Stop();
  ------------------
  425|       |
  426|  1.36M|    status = PreprocessWrite(write_options, &log_context, &write_context);
  427|  1.36M|    if (!two_write_queues_) {
  ------------------
  |  Branch (427:9): [True: 1.36M, False: 0]
  ------------------
  428|       |      // Assign it after ::PreprocessWrite since the sequence might advance
  429|       |      // inside it by WriteRecoverableState
  430|  1.36M|      last_sequence = versions_->LastSequence();
  431|  1.36M|    }
  432|       |
  433|  1.36M|    PERF_TIMER_START(write_pre_and_post_process_time);
  ------------------
  |  |   42|  1.36M|#define PERF_TIMER_START(metric) perf_step_timer_##metric.Start();
  ------------------
  434|  1.36M|  }
  435|       |
  436|       |  // Add to log and apply to memtable.  We can release the lock
  437|       |  // during this phase since &w is currently responsible for logging
  438|       |  // and protects against concurrent loggers and concurrent writes
  439|       |  // into memtables
  440|       |
  441|  1.36M|  TEST_SYNC_POINT("DBImpl::WriteImpl:BeforeLeaderEnters");
  442|  1.36M|  last_batch_group_size_ =
  443|  1.36M|      write_thread_.EnterAsBatchGroupLeader(&w, &write_group);
  444|       |
  445|  1.36M|  IOStatus io_s;
  446|  1.36M|  Status pre_release_cb_status;
  447|  1.36M|  if (status.ok()) {
  ------------------
  |  Branch (447:7): [True: 1.36M, False: 0]
  ------------------
  448|       |    // Rules for when we can update the memtable concurrently
  449|       |    // 1. supported by memtable
  450|       |    // 2. Puts are not okay if inplace_update_support
  451|       |    // 3. Merges are not okay
  452|       |    //
  453|       |    // Rules 1..2 are enforced by checking the options
  454|       |    // during startup (CheckConcurrentWritesSupported), so if
  455|       |    // options.allow_concurrent_memtable_write is true then they can be
  456|       |    // assumed to be true.  Rule 3 is checked for each batch.  We could
  457|       |    // relax rules 2 if we could prevent write batches from referring
  458|       |    // more than once to a particular key.
  459|  1.36M|    bool parallel = immutable_db_options_.allow_concurrent_memtable_write &&
  ------------------
  |  Branch (459:21): [True: 1.36M, False: 0]
  ------------------
  460|  1.36M|                    write_group.size > 1;
  ------------------
  |  Branch (460:21): [True: 0, False: 1.36M]
  ------------------
  461|  1.36M|    size_t total_count = 0;
  462|  1.36M|    size_t valid_batches = 0;
  463|  1.36M|    size_t total_byte_size = 0;
  464|  1.36M|    size_t pre_release_callback_cnt = 0;
  465|  1.36M|    for (auto* writer : write_group) {
  ------------------
  |  Branch (465:23): [True: 1.36M, False: 1.36M]
  ------------------
  466|  1.36M|      assert(writer);
  467|  1.36M|      if (writer->CheckCallback(this)) {
  ------------------
  |  Branch (467:11): [True: 1.36M, False: 0]
  ------------------
  468|  1.36M|        valid_batches += writer->batch_cnt;
  469|  1.36M|        if (writer->ShouldWriteToMemtable()) {
  ------------------
  |  Branch (469:13): [True: 1.36M, False: 0]
  ------------------
  470|  1.36M|          total_count += WriteBatchInternal::Count(writer->batch);
  471|  1.36M|          total_byte_size = WriteBatchInternal::AppendedByteSize(
  472|  1.36M|              total_byte_size, WriteBatchInternal::ByteSize(writer->batch));
  473|  1.36M|          parallel = parallel && !writer->batch->HasMerge();
  ------------------
  |  Branch (473:22): [True: 0, False: 1.36M]
  |  Branch (473:34): [True: 0, False: 0]
  ------------------
  474|  1.36M|        }
  475|  1.36M|        if (writer->pre_release_callback) {
  ------------------
  |  Branch (475:13): [True: 0, False: 1.36M]
  ------------------
  476|      0|          pre_release_callback_cnt++;
  477|      0|        }
  478|  1.36M|      }
  479|  1.36M|    }
  480|       |    // TODO: this use of operator bool on `tracer_` can avoid unnecessary lock
  481|       |    // grabs but does not seem thread-safe.
  482|  1.36M|    if (tracer_) {
  ------------------
  |  Branch (482:9): [True: 0, False: 1.36M]
  ------------------
  483|      0|      InstrumentedMutexLock lock(&trace_mutex_);
  484|      0|      if (tracer_ && tracer_->IsWriteOrderPreserved()) {
  ------------------
  |  Branch (484:11): [True: 0, False: 0]
  |  Branch (484:22): [True: 0, False: 0]
  ------------------
  485|      0|        for (auto* writer : write_group) {
  ------------------
  |  Branch (485:27): [True: 0, False: 0]
  ------------------
  486|      0|          if (writer->CallbackFailed()) {
  ------------------
  |  Branch (486:15): [True: 0, False: 0]
  ------------------
  487|      0|            continue;
  488|      0|          }
  489|       |          // TODO: maybe handle the tracing status?
  490|      0|          tracer_->Write(writer->batch).PermitUncheckedError();
  491|      0|        }
  492|      0|      }
  493|      0|    }
  494|       |    // Note about seq_per_batch_: either disableWAL is set for the entire write
  495|       |    // group or not. In either case we inc seq for each write batch with no
  496|       |    // failed callback. This means that there could be a batch with
  497|       |    // disalbe_memtable in between; although we do not write this batch to
  498|       |    // memtable it still consumes a seq. Otherwise, if !seq_per_batch_, we inc
  499|       |    // the seq per valid written key to mem.
  500|  1.36M|    size_t seq_inc = seq_per_batch_ ? valid_batches : total_count;
  ------------------
  |  Branch (500:22): [True: 0, False: 1.36M]
  ------------------
  501|       |
  502|  1.36M|    const bool concurrent_update = two_write_queues_;
  503|       |    // Update stats while we are an exclusive group leader, so we know
  504|       |    // that nobody else can be writing to these particular stats.
  505|       |    // We're optimistic, updating the stats before we successfully
  506|       |    // commit.  That lets us release our leader status early.
  507|  1.36M|    auto stats = default_cf_internal_stats_;
  508|  1.36M|    stats->AddDBStats(InternalStats::kIntStatsNumKeysWritten, total_count,
  509|  1.36M|                      concurrent_update);
  510|  1.36M|    RecordTick(stats_, NUMBER_KEYS_WRITTEN, total_count);
  511|  1.36M|    stats->AddDBStats(InternalStats::kIntStatsBytesWritten, total_byte_size,
  512|  1.36M|                      concurrent_update);
  513|  1.36M|    RecordTick(stats_, BYTES_WRITTEN, total_byte_size);
  514|  1.36M|    stats->AddDBStats(InternalStats::kIntStatsWriteDoneBySelf, 1,
  515|  1.36M|                      concurrent_update);
  516|  1.36M|    RecordTick(stats_, WRITE_DONE_BY_SELF);
  517|  1.36M|    auto write_done_by_other = write_group.size - 1;
  518|  1.36M|    if (write_done_by_other > 0) {
  ------------------
  |  Branch (518:9): [True: 0, False: 1.36M]
  ------------------
  519|      0|      stats->AddDBStats(InternalStats::kIntStatsWriteDoneByOther,
  520|      0|                        write_done_by_other, concurrent_update);
  521|      0|      RecordTick(stats_, WRITE_DONE_BY_OTHER, write_done_by_other);
  522|      0|    }
  523|  1.36M|    RecordInHistogram(stats_, BYTES_PER_WRITE, total_byte_size);
  524|       |
  525|  1.36M|    if (write_options.disableWAL) {
  ------------------
  |  Branch (525:9): [True: 0, False: 1.36M]
  ------------------
  526|      0|      has_unpersisted_data_.store(true, std::memory_order_relaxed);
  527|      0|    }
  528|       |
  529|  1.36M|    PERF_TIMER_STOP(write_pre_and_post_process_time);
  ------------------
  |  |   40|  1.36M|#define PERF_TIMER_STOP(metric) perf_step_timer_##metric.Stop();
  ------------------
  530|       |
  531|  1.36M|    if (!two_write_queues_) {
  ------------------
  |  Branch (531:9): [True: 1.36M, False: 0]
  ------------------
  532|  1.36M|      if (status.ok() && !write_options.disableWAL) {
  ------------------
  |  Branch (532:11): [True: 1.36M, False: 0]
  |  Branch (532:26): [True: 1.36M, False: 0]
  ------------------
  533|  1.36M|        assert(log_context.log_file_number_size);
  534|  1.36M|        LogFileNumberSize& log_file_number_size =
  535|  1.36M|            *(log_context.log_file_number_size);
  536|  1.36M|        PERF_TIMER_GUARD(write_wal_time);
  ------------------
  |  |   46|  1.36M|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  1.36M|  perf_step_timer_##metric.Start();
  ------------------
  537|  1.36M|        io_s =
  538|  1.36M|            WriteToWAL(write_group, log_context.writer, log_used,
  539|  1.36M|                       log_context.need_log_sync, log_context.need_log_dir_sync,
  540|  1.36M|                       last_sequence + 1, log_file_number_size);
  541|  1.36M|      }
  542|  1.36M|    } else {
  543|      0|      if (status.ok() && !write_options.disableWAL) {
  ------------------
  |  Branch (543:11): [True: 0, False: 0]
  |  Branch (543:26): [True: 0, False: 0]
  ------------------
  544|      0|        PERF_TIMER_GUARD(write_wal_time);
  ------------------
  |  |   46|      0|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|      0|  perf_step_timer_##metric.Start();
  ------------------
  545|       |        // LastAllocatedSequence is increased inside WriteToWAL under
  546|       |        // wal_write_mutex_ to ensure ordered events in WAL
  547|      0|        io_s = ConcurrentWriteToWAL(write_group, log_used, &last_sequence,
  548|      0|                                    seq_inc);
  549|      0|      } else {
  550|       |        // Otherwise we inc seq number for memtable writes
  551|      0|        last_sequence = versions_->FetchAddLastAllocatedSequence(seq_inc);
  552|      0|      }
  553|      0|    }
  554|  1.36M|    status = io_s;
  555|  1.36M|    assert(last_sequence != kMaxSequenceNumber);
  556|  1.36M|    const SequenceNumber current_sequence = last_sequence + 1;
  557|  1.36M|    last_sequence += seq_inc;
  558|       |
  559|  1.36M|    if (log_context.need_log_sync) {
  ------------------
  |  Branch (559:9): [True: 0, False: 1.36M]
  ------------------
  560|      0|      VersionEdit synced_wals;
  561|      0|      log_write_mutex_.Lock();
  562|      0|      if (status.ok()) {
  ------------------
  |  Branch (562:11): [True: 0, False: 0]
  ------------------
  563|      0|        MarkLogsSynced(logfile_number_, log_context.need_log_dir_sync,
  564|      0|                       &synced_wals);
  565|      0|      } else {
  566|      0|        MarkLogsNotSynced(logfile_number_);
  567|      0|      }
  568|      0|      log_write_mutex_.Unlock();
  569|      0|      if (status.ok() && synced_wals.IsWalAddition()) {
  ------------------
  |  Branch (569:11): [True: 0, False: 0]
  |  Branch (569:26): [True: 0, False: 0]
  ------------------
  570|      0|        InstrumentedMutexLock l(&mutex_);
  571|       |        // TODO: plumb Env::IOActivity, Env::IOPriority
  572|      0|        const ReadOptions read_options;
  573|      0|        status = ApplyWALToManifest(read_options, write_options, &synced_wals);
  574|      0|      }
  575|       |
  576|       |      // Requesting sync with two_write_queues_ is expected to be very rare. We
  577|       |      // hence provide a simple implementation that is not necessarily
  578|       |      // efficient.
  579|      0|      if (status.ok() && two_write_queues_) {
  ------------------
  |  Branch (579:11): [True: 0, False: 0]
  |  Branch (579:26): [True: 0, False: 0]
  ------------------
  580|      0|        if (manual_wal_flush_) {
  ------------------
  |  Branch (580:13): [True: 0, False: 0]
  ------------------
  581|      0|          status = FlushWAL(true);
  582|      0|        } else {
  583|      0|          status = SyncWAL();
  584|      0|        }
  585|      0|      }
  586|      0|    }
  587|       |
  588|       |    // PreReleaseCallback is called after WAL write and before memtable write
  589|  1.36M|    if (status.ok()) {
  ------------------
  |  Branch (589:9): [True: 1.36M, False: 0]
  ------------------
  590|  1.36M|      SequenceNumber next_sequence = current_sequence;
  591|  1.36M|      size_t index = 0;
  592|       |      // Note: the logic for advancing seq here must be consistent with the
  593|       |      // logic in WriteBatchInternal::InsertInto(write_group...) as well as
  594|       |      // with WriteBatchInternal::InsertInto(write_batch...) that is called on
  595|       |      // the merged batch during recovery from the WAL.
  596|  1.36M|      for (auto* writer : write_group) {
  ------------------
  |  Branch (596:25): [True: 1.36M, False: 1.36M]
  ------------------
  597|  1.36M|        if (writer->CallbackFailed()) {
  ------------------
  |  Branch (597:13): [True: 0, False: 1.36M]
  ------------------
  598|      0|          continue;
  599|      0|        }
  600|  1.36M|        writer->sequence = next_sequence;
  601|  1.36M|        if (writer->pre_release_callback) {
  ------------------
  |  Branch (601:13): [True: 0, False: 1.36M]
  ------------------
  602|      0|          Status ws = writer->pre_release_callback->Callback(
  603|      0|              writer->sequence, disable_memtable, writer->log_used, index++,
  604|      0|              pre_release_callback_cnt);
  605|      0|          if (!ws.ok()) {
  ------------------
  |  Branch (605:15): [True: 0, False: 0]
  ------------------
  606|      0|            status = pre_release_cb_status = ws;
  607|      0|            break;
  608|      0|          }
  609|      0|        }
  610|  1.36M|        if (seq_per_batch_) {
  ------------------
  |  Branch (610:13): [True: 0, False: 1.36M]
  ------------------
  611|      0|          assert(writer->batch_cnt);
  612|      0|          next_sequence += writer->batch_cnt;
  613|  1.36M|        } else if (writer->ShouldWriteToMemtable()) {
  ------------------
  |  Branch (613:20): [True: 1.36M, False: 0]
  ------------------
  614|  1.36M|          next_sequence += WriteBatchInternal::Count(writer->batch);
  615|  1.36M|        }
  616|  1.36M|      }
  617|  1.36M|    }
  618|       |
  619|  1.36M|    if (status.ok()) {
  ------------------
  |  Branch (619:9): [True: 1.36M, False: 0]
  ------------------
  620|  1.36M|      PERF_TIMER_FOR_WAIT_GUARD(write_memtable_time);
  ------------------
  |  |   71|  1.36M|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric), nullptr, \
  |  |   72|  1.36M|                                         false, PerfLevel::kEnableWait);  \
  |  |   73|  1.36M|  perf_step_timer_##metric.Start();
  ------------------
  621|       |
  622|  1.36M|      if (!parallel) {
  ------------------
  |  Branch (622:11): [True: 1.36M, False: 0]
  ------------------
  623|       |        // w.sequence will be set inside InsertInto
  624|  1.36M|        w.status = WriteBatchInternal::InsertInto(
  625|  1.36M|            write_group, current_sequence, column_family_memtables_.get(),
  626|  1.36M|            &flush_scheduler_, &trim_history_scheduler_,
  627|  1.36M|            write_options.ignore_missing_column_families,
  628|  1.36M|            0 /*recovery_log_number*/, this, parallel, seq_per_batch_,
  629|  1.36M|            batch_per_txn_);
  630|  1.36M|      } else {
  631|      0|        write_group.last_sequence = last_sequence;
  632|      0|        write_thread_.LaunchParallelMemTableWriters(&write_group);
  633|      0|        in_parallel_group = true;
  634|       |
  635|       |        // Each parallel follower is doing each own writes. The leader should
  636|       |        // also do its own.
  637|      0|        if (w.ShouldWriteToMemtable()) {
  ------------------
  |  Branch (637:13): [True: 0, False: 0]
  ------------------
  638|      0|          ColumnFamilyMemTablesImpl column_family_memtables(
  639|      0|              versions_->GetColumnFamilySet());
  640|      0|          assert(w.sequence == current_sequence);
  641|      0|          w.status = WriteBatchInternal::InsertInto(
  642|      0|              &w, w.sequence, &column_family_memtables, &flush_scheduler_,
  643|      0|              &trim_history_scheduler_,
  644|      0|              write_options.ignore_missing_column_families, 0 /*log_number*/,
  645|      0|              this, true /*concurrent_memtable_writes*/, seq_per_batch_,
  646|      0|              w.batch_cnt, batch_per_txn_,
  647|      0|              write_options.memtable_insert_hint_per_batch);
  648|      0|        }
  649|      0|      }
  650|  1.36M|      if (seq_used != nullptr) {
  ------------------
  |  Branch (650:11): [True: 0, False: 1.36M]
  ------------------
  651|      0|        *seq_used = w.sequence;
  652|      0|      }
  653|  1.36M|    }
  654|  1.36M|  }
  655|  1.36M|  PERF_TIMER_START(write_pre_and_post_process_time);
  ------------------
  |  |   42|  1.36M|#define PERF_TIMER_START(metric) perf_step_timer_##metric.Start();
  ------------------
  656|       |
  657|  1.36M|  if (!io_s.ok()) {
  ------------------
  |  Branch (657:7): [True: 0, False: 1.36M]
  ------------------
  658|       |    // Check WriteToWAL status
  659|      0|    IOStatusCheck(io_s);
  660|      0|  }
  661|  1.36M|  if (!w.CallbackFailed()) {
  ------------------
  |  Branch (661:7): [True: 1.36M, False: 0]
  ------------------
  662|  1.36M|    if (!io_s.ok()) {
  ------------------
  |  Branch (662:9): [True: 0, False: 1.36M]
  ------------------
  663|      0|      assert(pre_release_cb_status.ok());
  664|  1.36M|    } else {
  665|  1.36M|      WriteStatusCheck(pre_release_cb_status);
  666|  1.36M|    }
  667|  1.36M|  } else {
  668|      0|    assert(pre_release_cb_status.ok());
  669|      0|  }
  670|       |
  671|  1.36M|  bool should_exit_batch_group = true;
  672|  1.36M|  if (in_parallel_group) {
  ------------------
  |  Branch (672:7): [True: 0, False: 1.36M]
  ------------------
  673|       |    // CompleteParallelWorker returns true if this thread should
  674|       |    // handle exit, false means somebody else did
  675|      0|    should_exit_batch_group = write_thread_.CompleteParallelMemTableWriter(&w);
  676|      0|  }
  677|  1.36M|  if (should_exit_batch_group) {
  ------------------
  |  Branch (677:7): [True: 1.36M, False: 0]
  ------------------
  678|  1.36M|    if (status.ok()) {
  ------------------
  |  Branch (678:9): [True: 1.36M, False: 0]
  ------------------
  679|  1.36M|      for (auto* tmp_w : write_group) {
  ------------------
  |  Branch (679:24): [True: 1.36M, False: 1.36M]
  ------------------
  680|  1.36M|        assert(tmp_w);
  681|  1.36M|        if (tmp_w->post_memtable_callback) {
  ------------------
  |  Branch (681:13): [True: 0, False: 1.36M]
  ------------------
  682|      0|          Status tmp_s =
  683|      0|              (*tmp_w->post_memtable_callback)(last_sequence, disable_memtable);
  684|       |          // TODO: propagate the execution status of post_memtable_callback to
  685|       |          // caller.
  686|      0|          assert(tmp_s.ok());
  687|      0|        }
  688|  1.36M|      }
  689|       |      // Note: if we are to resume after non-OK statuses we need to revisit how
  690|       |      // we reacts to non-OK statuses here.
  691|  1.36M|      versions_->SetLastSequence(last_sequence);
  692|  1.36M|    }
  693|  1.36M|    MemTableInsertStatusCheck(w.status);
  694|  1.36M|    write_thread_.ExitAsBatchGroupLeader(write_group, status);
  695|  1.36M|  }
  696|       |
  697|  1.36M|  if (status.ok()) {
  ------------------
  |  Branch (697:7): [True: 1.36M, False: 0]
  ------------------
  698|  1.36M|    status = w.FinalStatus();
  699|  1.36M|  }
  700|  1.36M|  return status;
  701|  1.36M|}
_ZN7rocksdb6DBImpl16WriteStatusCheckERKNS_6StatusE:
 1169|  1.36M|void DBImpl::WriteStatusCheck(const Status& status) {
 1170|       |  // Is setting bg_error_ enough here?  This will at least stop
 1171|       |  // compaction and fail any further writes.
 1172|  1.36M|  assert(!status.IsIOFenced() || !error_handler_.GetBGError().ok());
 1173|  1.36M|  if (immutable_db_options_.paranoid_checks && !status.ok() &&
  ------------------
  |  Branch (1173:7): [True: 1.36M, False: 0]
  |  Branch (1173:48): [True: 0, False: 1.36M]
  ------------------
 1174|  1.36M|      !status.IsBusy() && !status.IsIncomplete()) {
  ------------------
  |  Branch (1174:7): [True: 0, False: 0]
  |  Branch (1174:27): [True: 0, False: 0]
  ------------------
 1175|      0|    mutex_.Lock();
 1176|       |    // Maybe change the return status to void?
 1177|      0|    error_handler_.SetBGError(status, BackgroundErrorReason::kWriteCallback);
 1178|      0|    mutex_.Unlock();
 1179|      0|  }
 1180|  1.36M|}
_ZN7rocksdb6DBImpl25MemTableInsertStatusCheckERKNS_6StatusE:
 1198|  1.36M|void DBImpl::MemTableInsertStatusCheck(const Status& status) {
 1199|       |  // A non-OK status here indicates that the state implied by the
 1200|       |  // WAL has diverged from the in-memory state.  This could be
 1201|       |  // because of a corrupt write_batch (very bad), or because the
 1202|       |  // client specified an invalid column family and didn't specify
 1203|       |  // ignore_missing_column_families.
 1204|  1.36M|  if (!status.ok()) {
  ------------------
  |  Branch (1204:7): [True: 0, False: 1.36M]
  ------------------
 1205|      0|    mutex_.Lock();
 1206|      0|    assert(!error_handler_.IsBGWorkStopped());
 1207|       |    // Maybe change the return status to void?
 1208|      0|    error_handler_.SetBGError(status, BackgroundErrorReason::kMemTable);
 1209|      0|    mutex_.Unlock();
 1210|      0|  }
 1211|  1.36M|}
_ZN7rocksdb6DBImpl15PreprocessWriteERKNS_12WriteOptionsEPNS0_10LogContextEPNS0_12WriteContextE:
 1215|  1.36M|                               WriteContext* write_context) {
 1216|  1.36M|  assert(write_context != nullptr && log_context != nullptr);
 1217|  1.36M|  Status status;
 1218|       |
 1219|  1.36M|  if (error_handler_.IsDBStopped()) {
  ------------------
  |  Branch (1219:7): [True: 0, False: 1.36M]
  ------------------
 1220|      0|    InstrumentedMutexLock l(&mutex_);
 1221|      0|    status = error_handler_.GetBGError();
 1222|      0|  }
 1223|       |
 1224|  1.36M|  PERF_TIMER_GUARD(write_scheduling_flushes_compactions_time);
  ------------------
  |  |   46|  1.36M|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  1.36M|  perf_step_timer_##metric.Start();
  ------------------
 1225|       |
 1226|  1.36M|  if (UNLIKELY(status.ok() && total_log_size_ > GetMaxTotalWalSize())) {
  ------------------
  |  |   14|  2.72M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.36M]
  |  |  |  Branch (14:40): [True: 1.36M, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 1.36M]
  |  |  ------------------
  ------------------
 1227|      0|    assert(versions_);
 1228|      0|    InstrumentedMutexLock l(&mutex_);
 1229|      0|    const ColumnFamilySet* const column_families =
 1230|      0|        versions_->GetColumnFamilySet();
 1231|      0|    assert(column_families);
 1232|      0|    size_t num_cfs = column_families->NumberOfColumnFamilies();
 1233|      0|    assert(num_cfs >= 1);
 1234|      0|    if (num_cfs > 1) {
  ------------------
  |  Branch (1234:9): [True: 0, False: 0]
  ------------------
 1235|      0|      WaitForPendingWrites();
 1236|      0|      status = SwitchWAL(write_context);
 1237|      0|    }
 1238|      0|  }
 1239|       |
 1240|  1.36M|  if (UNLIKELY(status.ok() && write_buffer_manager_->ShouldFlush())) {
  ------------------
  |  |   14|  2.72M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.36M]
  |  |  |  Branch (14:40): [True: 1.36M, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 1.36M]
  |  |  ------------------
  ------------------
 1241|       |    // Before a new memtable is added in SwitchMemtable(),
 1242|       |    // write_buffer_manager_->ShouldFlush() will keep returning true. If another
 1243|       |    // thread is writing to another DB with the same write buffer, they may also
 1244|       |    // be flushed. We may end up with flushing much more DBs than needed. It's
 1245|       |    // suboptimal but still correct.
 1246|      0|    InstrumentedMutexLock l(&mutex_);
 1247|      0|    WaitForPendingWrites();
 1248|      0|    status = HandleWriteBufferManagerFlush(write_context);
 1249|      0|  }
 1250|       |
 1251|  1.36M|  if (UNLIKELY(status.ok() && !trim_history_scheduler_.Empty())) {
  ------------------
  |  |   14|  2.72M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.36M]
  |  |  |  Branch (14:40): [True: 1.36M, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 1.36M]
  |  |  ------------------
  ------------------
 1252|      0|    InstrumentedMutexLock l(&mutex_);
 1253|      0|    status = TrimMemtableHistory(write_context);
 1254|      0|  }
 1255|       |
 1256|  1.36M|  if (UNLIKELY(status.ok() && !flush_scheduler_.Empty())) {
  ------------------
  |  |   14|  2.72M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.36M]
  |  |  |  Branch (14:40): [True: 1.36M, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 1.36M]
  |  |  ------------------
  ------------------
 1257|      0|    InstrumentedMutexLock l(&mutex_);
 1258|      0|    WaitForPendingWrites();
 1259|      0|    status = ScheduleFlushes(write_context);
 1260|      0|  }
 1261|       |
 1262|  1.36M|  PERF_TIMER_STOP(write_scheduling_flushes_compactions_time);
  ------------------
  |  |   40|  1.36M|#define PERF_TIMER_STOP(metric) perf_step_timer_##metric.Stop();
  ------------------
 1263|  1.36M|  PERF_TIMER_GUARD(write_pre_and_post_process_time);
  ------------------
  |  |   46|  1.36M|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  1.36M|  perf_step_timer_##metric.Start();
  ------------------
 1264|       |
 1265|  1.36M|  if (UNLIKELY(status.ok() && (write_controller_.IsStopped() ||
  ------------------
  |  |   14|  5.44M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.36M]
  |  |  |  Branch (14:40): [True: 0, False: 1.36M]
  |  |  |  Branch (14:40): [True: 0, False: 1.36M]
  |  |  |  Branch (14:40): [True: 1.36M, False: 0]
  |  |  ------------------
  ------------------
 1266|  1.36M|                               write_controller_.NeedsDelay()))) {
 1267|      0|    PERF_TIMER_STOP(write_pre_and_post_process_time);
  ------------------
  |  |   40|      0|#define PERF_TIMER_STOP(metric) perf_step_timer_##metric.Stop();
  ------------------
 1268|      0|    PERF_TIMER_FOR_WAIT_GUARD(write_delay_time);
  ------------------
  |  |   71|      0|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric), nullptr, \
  |  |   72|      0|                                         false, PerfLevel::kEnableWait);  \
  |  |   73|      0|  perf_step_timer_##metric.Start();
  ------------------
 1269|       |    // We don't know size of curent batch so that we always use the size
 1270|       |    // for previous one. It might create a fairness issue that expiration
 1271|       |    // might happen for smaller writes but larger writes can go through.
 1272|       |    // Can optimize it if it is an issue.
 1273|      0|    InstrumentedMutexLock l(&mutex_);
 1274|      0|    status = DelayWrite(last_batch_group_size_, write_thread_, write_options);
 1275|      0|    PERF_TIMER_START(write_pre_and_post_process_time);
  ------------------
  |  |   42|      0|#define PERF_TIMER_START(metric) perf_step_timer_##metric.Start();
  ------------------
 1276|      0|  }
 1277|       |
 1278|       |  // If memory usage exceeded beyond a certain threshold,
 1279|       |  // write_buffer_manager_->ShouldStall() returns true to all threads writing to
 1280|       |  // all DBs and writers will be stalled.
 1281|       |  // It does soft checking because WriteBufferManager::buffer_limit_ has already
 1282|       |  // exceeded at this point so no new write (including current one) will go
 1283|       |  // through until memory usage is decreased.
 1284|  1.36M|  if (UNLIKELY(status.ok() && write_buffer_manager_->ShouldStall())) {
  ------------------
  |  |   14|  2.72M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.36M]
  |  |  |  Branch (14:40): [True: 1.36M, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 1.36M]
  |  |  ------------------
  ------------------
 1285|      0|    default_cf_internal_stats_->AddDBStats(
 1286|      0|        InternalStats::kIntStatsWriteBufferManagerLimitStopsCounts, 1,
 1287|      0|        true /* concurrent */);
 1288|      0|    if (write_options.no_slowdown) {
  ------------------
  |  Branch (1288:9): [True: 0, False: 0]
  ------------------
 1289|      0|      status = Status::Incomplete("Write stall");
 1290|      0|    } else {
 1291|      0|      InstrumentedMutexLock l(&mutex_);
 1292|      0|      WriteBufferManagerStallWrites();
 1293|      0|    }
 1294|      0|  }
 1295|  1.36M|  InstrumentedMutexLock l(&log_write_mutex_);
 1296|  1.36M|  if (status.ok() && log_context->need_log_sync) {
  ------------------
  |  Branch (1296:7): [True: 1.36M, False: 0]
  |  Branch (1296:22): [True: 0, False: 1.36M]
  ------------------
 1297|       |    // Wait until the parallel syncs are finished. Any sync process has to sync
 1298|       |    // the front log too so it is enough to check the status of front()
 1299|       |    // We do a while loop since log_sync_cv_ is signalled when any sync is
 1300|       |    // finished
 1301|       |    // Note: there does not seem to be a reason to wait for parallel sync at
 1302|       |    // this early step but it is not important since parallel sync (SyncWAL) and
 1303|       |    // need_log_sync are usually not used together.
 1304|      0|    while (logs_.front().IsSyncing()) {
  ------------------
  |  Branch (1304:12): [True: 0, False: 0]
  ------------------
 1305|      0|      log_sync_cv_.Wait();
 1306|      0|    }
 1307|      0|    for (auto& log : logs_) {
  ------------------
  |  Branch (1307:20): [True: 0, False: 0]
  ------------------
 1308|       |      // This is just to prevent the logs to be synced by a parallel SyncWAL
 1309|       |      // call. We will do the actual syncing later after we will write to the
 1310|       |      // WAL.
 1311|       |      // Note: there does not seem to be a reason to set this early before we
 1312|       |      // actually write to the WAL
 1313|      0|      log.PrepareForSync();
 1314|      0|    }
 1315|  1.36M|  } else {
 1316|  1.36M|    log_context->need_log_sync = false;
 1317|  1.36M|  }
 1318|  1.36M|  log_context->writer = logs_.back().writer;
 1319|  1.36M|  log_context->need_log_dir_sync =
 1320|  1.36M|      log_context->need_log_dir_sync && !log_dir_synced_;
  ------------------
  |  Branch (1320:7): [True: 0, False: 1.36M]
  |  Branch (1320:41): [True: 0, False: 0]
  ------------------
 1321|  1.36M|  log_context->log_file_number_size = std::addressof(alive_log_files_.back());
 1322|       |
 1323|  1.36M|  return status;
 1324|  1.36M|}
_ZN7rocksdb6DBImpl10MergeBatchERKNS_11WriteThread10WriteGroupEPNS_10WriteBatchEPS6_PmS7_:
 1329|  1.36M|                          WriteBatch** to_be_cached_state) {
 1330|  1.36M|  assert(write_with_wal != nullptr);
 1331|  1.36M|  assert(tmp_batch != nullptr);
 1332|  1.36M|  assert(*to_be_cached_state == nullptr);
 1333|  1.36M|  *write_with_wal = 0;
 1334|  1.36M|  auto* leader = write_group.leader;
 1335|  1.36M|  assert(!leader->disable_wal);  // Same holds for all in the batch group
 1336|  1.36M|  if (write_group.size == 1 && !leader->CallbackFailed() &&
  ------------------
  |  Branch (1336:7): [True: 1.36M, False: 0]
  |  Branch (1336:32): [True: 1.36M, False: 0]
  ------------------
 1337|  1.36M|      leader->batch->GetWalTerminationPoint().is_cleared()) {
  ------------------
  |  Branch (1337:7): [True: 1.36M, False: 0]
  ------------------
 1338|       |    // we simply write the first WriteBatch to WAL if the group only
 1339|       |    // contains one batch, that batch should be written to the WAL,
 1340|       |    // and the batch is not wanting to be truncated
 1341|  1.36M|    *merged_batch = leader->batch;
 1342|  1.36M|    if (WriteBatchInternal::IsLatestPersistentState(*merged_batch)) {
  ------------------
  |  Branch (1342:9): [True: 0, False: 1.36M]
  ------------------
 1343|      0|      *to_be_cached_state = *merged_batch;
 1344|      0|    }
 1345|  1.36M|    *write_with_wal = 1;
 1346|  1.36M|  } else {
 1347|       |    // WAL needs all of the batches flattened into a single batch.
 1348|       |    // We could avoid copying here with an iov-like AddRecord
 1349|       |    // interface
 1350|      0|    *merged_batch = tmp_batch;
 1351|      0|    for (auto writer : write_group) {
  ------------------
  |  Branch (1351:22): [True: 0, False: 0]
  ------------------
 1352|      0|      if (!writer->CallbackFailed()) {
  ------------------
  |  Branch (1352:11): [True: 0, False: 0]
  ------------------
 1353|      0|        Status s = WriteBatchInternal::Append(*merged_batch, writer->batch,
 1354|      0|                                              /*WAL_only*/ true);
 1355|      0|        if (!s.ok()) {
  ------------------
  |  Branch (1355:13): [True: 0, False: 0]
  ------------------
 1356|      0|          tmp_batch->Clear();
 1357|      0|          return s;
 1358|      0|        }
 1359|      0|        if (WriteBatchInternal::IsLatestPersistentState(writer->batch)) {
  ------------------
  |  Branch (1359:13): [True: 0, False: 0]
  ------------------
 1360|       |          // We only need to cache the last of such write batch
 1361|      0|          *to_be_cached_state = writer->batch;
 1362|      0|        }
 1363|      0|        (*write_with_wal)++;
 1364|      0|      }
 1365|      0|    }
 1366|      0|  }
 1367|       |  // return merged_batch;
 1368|  1.36M|  return Status::OK();
 1369|  1.36M|}
_ZN7rocksdb6DBImpl10WriteToWALERKNS_10WriteBatchERKNS_12WriteOptionsEPNS_3log6WriterEPmSA_RNS0_17LogFileNumberSizeE:
 1377|  1.36M|                            LogFileNumberSize& log_file_number_size) {
 1378|  1.36M|  assert(log_size != nullptr);
 1379|       |
 1380|  1.36M|  Slice log_entry = WriteBatchInternal::Contents(&merged_batch);
 1381|  1.36M|  TEST_SYNC_POINT_CALLBACK("DBImpl::WriteToWAL:log_entry", &log_entry);
 1382|  1.36M|  auto s = merged_batch.VerifyChecksum();
 1383|  1.36M|  if (!s.ok()) {
  ------------------
  |  Branch (1383:7): [True: 0, False: 1.36M]
  ------------------
 1384|      0|    return status_to_io_status(std::move(s));
 1385|      0|  }
 1386|  1.36M|  *log_size = log_entry.size();
 1387|       |  // When two_write_queues_ WriteToWAL has to be protected from concurretn calls
 1388|       |  // from the two queues anyway and log_write_mutex_ is already held. Otherwise
 1389|       |  // if manual_wal_flush_ is enabled we need to protect log_writer->AddRecord
 1390|       |  // from possible concurrent calls via the FlushWAL by the application.
 1391|  1.36M|  const bool needs_locking = manual_wal_flush_ && !two_write_queues_;
  ------------------
  |  Branch (1391:30): [True: 0, False: 1.36M]
  |  Branch (1391:51): [True: 0, False: 0]
  ------------------
 1392|       |  // Due to performance cocerns of missed branch prediction penalize the new
 1393|       |  // manual_wal_flush_ feature (by UNLIKELY) instead of the more common case
 1394|       |  // when we do not need any locking.
 1395|  1.36M|  if (UNLIKELY(needs_locking)) {
  ------------------
  |  |   14|  1.36M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.36M]
  |  |  ------------------
  ------------------
 1396|      0|    log_write_mutex_.Lock();
 1397|      0|  }
 1398|  1.36M|  IOStatus io_s = log_writer->MaybeAddUserDefinedTimestampSizeRecord(
 1399|  1.36M|      write_options, versions_->GetColumnFamiliesTimestampSizeForRecord());
 1400|  1.36M|  if (!io_s.ok()) {
  ------------------
  |  Branch (1400:7): [True: 0, False: 1.36M]
  ------------------
 1401|      0|    return io_s;
 1402|      0|  }
 1403|  1.36M|  io_s = log_writer->AddRecord(write_options, log_entry);
 1404|       |
 1405|  1.36M|  if (UNLIKELY(needs_locking)) {
  ------------------
  |  |   14|  1.36M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.36M]
  |  |  ------------------
  ------------------
 1406|      0|    log_write_mutex_.Unlock();
 1407|      0|  }
 1408|  1.36M|  if (log_used != nullptr) {
  ------------------
  |  Branch (1408:7): [True: 0, False: 1.36M]
  ------------------
 1409|      0|    *log_used = logfile_number_;
 1410|      0|  }
 1411|  1.36M|  total_log_size_ += log_entry.size();
 1412|  1.36M|  log_file_number_size.AddSize(*log_size);
 1413|  1.36M|  log_empty_ = false;
 1414|  1.36M|  return io_s;
 1415|  1.36M|}
_ZN7rocksdb6DBImpl10WriteToWALERKNS_11WriteThread10WriteGroupEPNS_3log6WriterEPmbbmRNS0_17LogFileNumberSizeE:
 1421|  1.36M|                            LogFileNumberSize& log_file_number_size) {
 1422|  1.36M|  IOStatus io_s;
 1423|  1.36M|  assert(!two_write_queues_);
 1424|  1.36M|  assert(!write_group.leader->disable_wal);
 1425|       |  // Same holds for all in the batch group
 1426|  1.36M|  size_t write_with_wal = 0;
 1427|  1.36M|  WriteBatch* to_be_cached_state = nullptr;
 1428|  1.36M|  WriteBatch* merged_batch;
 1429|  1.36M|  io_s = status_to_io_status(MergeBatch(write_group, &tmp_batch_, &merged_batch,
 1430|  1.36M|                                        &write_with_wal, &to_be_cached_state));
 1431|  1.36M|  if (UNLIKELY(!io_s.ok())) {
  ------------------
  |  |   14|  1.36M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.36M]
  |  |  ------------------
  ------------------
 1432|      0|    return io_s;
 1433|      0|  }
 1434|       |
 1435|  1.36M|  if (merged_batch == write_group.leader->batch) {
  ------------------
  |  Branch (1435:7): [True: 1.36M, False: 0]
  ------------------
 1436|  1.36M|    write_group.leader->log_used = logfile_number_;
 1437|  1.36M|  } else if (write_with_wal > 1) {
  ------------------
  |  Branch (1437:14): [True: 0, False: 0]
  ------------------
 1438|      0|    for (auto writer : write_group) {
  ------------------
  |  Branch (1438:22): [True: 0, False: 0]
  ------------------
 1439|      0|      writer->log_used = logfile_number_;
 1440|      0|    }
 1441|      0|  }
 1442|       |
 1443|  1.36M|  WriteBatchInternal::SetSequence(merged_batch, sequence);
 1444|       |
 1445|  1.36M|  uint64_t log_size;
 1446|       |
 1447|       |  // TODO: plumb Env::IOActivity, Env::IOPriority
 1448|  1.36M|  WriteOptions write_options;
 1449|  1.36M|  write_options.rate_limiter_priority =
 1450|  1.36M|      write_group.leader->rate_limiter_priority;
 1451|  1.36M|  io_s = WriteToWAL(*merged_batch, write_options, log_writer, log_used,
 1452|  1.36M|                    &log_size, log_file_number_size);
 1453|  1.36M|  if (to_be_cached_state) {
  ------------------
  |  Branch (1453:7): [True: 0, False: 1.36M]
  ------------------
 1454|      0|    cached_recoverable_state_ = *to_be_cached_state;
 1455|      0|    cached_recoverable_state_empty_ = false;
 1456|      0|  }
 1457|       |
 1458|  1.36M|  if (io_s.ok() && need_log_sync) {
  ------------------
  |  Branch (1458:7): [True: 1.36M, False: 0]
  |  Branch (1458:20): [True: 0, False: 1.36M]
  ------------------
 1459|      0|    StopWatch sw(immutable_db_options_.clock, stats_, WAL_FILE_SYNC_MICROS);
 1460|       |    // It's safe to access logs_ with unlocked mutex_ here because:
 1461|       |    //  - we've set getting_synced=true for all logs,
 1462|       |    //    so other threads won't pop from logs_ while we're here,
 1463|       |    //  - only writer thread can push to logs_, and we're in
 1464|       |    //    writer thread, so no one will push to logs_,
 1465|       |    //  - as long as other threads don't modify it, it's safe to read
 1466|       |    //    from std::deque from multiple threads concurrently.
 1467|       |    //
 1468|       |    // Sync operation should work with locked log_write_mutex_, because:
 1469|       |    //   when DBOptions.manual_wal_flush_ is set,
 1470|       |    //   FlushWAL function will be invoked by another thread.
 1471|       |    //   if without locked log_write_mutex_, the log file may get data
 1472|       |    //   corruption
 1473|       |
 1474|      0|    const bool needs_locking = manual_wal_flush_ && !two_write_queues_;
  ------------------
  |  Branch (1474:32): [True: 0, False: 0]
  |  Branch (1474:53): [True: 0, False: 0]
  ------------------
 1475|      0|    if (UNLIKELY(needs_locking)) {
  ------------------
  |  |   14|      0|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1476|      0|      log_write_mutex_.Lock();
 1477|      0|    }
 1478|       |
 1479|      0|    if (io_s.ok()) {
  ------------------
  |  Branch (1479:9): [True: 0, False: 0]
  ------------------
 1480|      0|      for (auto& log : logs_) {
  ------------------
  |  Branch (1480:22): [True: 0, False: 0]
  ------------------
 1481|      0|        IOOptions opts;
 1482|      0|        io_s = WritableFileWriter::PrepareIOOptions(write_options, opts);
 1483|      0|        if (!io_s.ok()) {
  ------------------
  |  Branch (1483:13): [True: 0, False: 0]
  ------------------
 1484|      0|          break;
 1485|      0|        }
 1486|      0|        io_s = log.writer->file()->Sync(opts, immutable_db_options_.use_fsync);
 1487|      0|        if (!io_s.ok()) {
  ------------------
  |  Branch (1487:13): [True: 0, False: 0]
  ------------------
 1488|      0|          break;
 1489|      0|        }
 1490|      0|      }
 1491|      0|    }
 1492|       |
 1493|      0|    if (UNLIKELY(needs_locking)) {
  ------------------
  |  |   14|      0|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1494|      0|      log_write_mutex_.Unlock();
 1495|      0|    }
 1496|       |
 1497|      0|    if (io_s.ok() && need_log_dir_sync) {
  ------------------
  |  Branch (1497:9): [True: 0, False: 0]
  |  Branch (1497:22): [True: 0, False: 0]
  ------------------
 1498|       |      // We only sync WAL directory the first time WAL syncing is
 1499|       |      // requested, so that in case users never turn on WAL sync,
 1500|       |      // we can avoid the disk I/O in the write code path.
 1501|      0|      io_s = directories_.GetWalDir()->FsyncWithDirOptions(
 1502|      0|          IOOptions(), nullptr,
 1503|      0|          DirFsyncOptions(DirFsyncOptions::FsyncReason::kNewFileSynced));
 1504|      0|    }
 1505|      0|  }
 1506|       |
 1507|  1.36M|  if (merged_batch == &tmp_batch_) {
  ------------------
  |  Branch (1507:7): [True: 0, False: 1.36M]
  ------------------
 1508|      0|    tmp_batch_.Clear();
 1509|      0|  }
 1510|  1.36M|  if (io_s.ok()) {
  ------------------
  |  Branch (1510:7): [True: 1.36M, False: 0]
  ------------------
 1511|  1.36M|    auto stats = default_cf_internal_stats_;
 1512|  1.36M|    if (need_log_sync) {
  ------------------
  |  Branch (1512:9): [True: 0, False: 1.36M]
  ------------------
 1513|      0|      stats->AddDBStats(InternalStats::kIntStatsWalFileSynced, 1);
 1514|      0|      RecordTick(stats_, WAL_FILE_SYNCED);
 1515|      0|    }
 1516|  1.36M|    stats->AddDBStats(InternalStats::kIntStatsWalFileBytes, log_size);
 1517|  1.36M|    RecordTick(stats_, WAL_FILE_BYTES, log_size);
 1518|  1.36M|    stats->AddDBStats(InternalStats::kIntStatsWriteWithWal, write_with_wal);
 1519|  1.36M|    RecordTick(stats_, WRITE_WITH_WAL, write_with_wal);
 1520|  1.36M|    for (auto* writer : write_group) {
  ------------------
  |  Branch (1520:23): [True: 1.36M, False: 1.36M]
  ------------------
 1521|  1.36M|      if (!writer->CallbackFailed()) {
  ------------------
  |  Branch (1521:11): [True: 1.36M, False: 0]
  ------------------
 1522|  1.36M|        writer->CheckPostWalWriteCallback();
 1523|  1.36M|      }
 1524|  1.36M|    }
 1525|  1.36M|  }
 1526|  1.36M|  return io_s;
 1527|  1.36M|}
_ZNK7rocksdb6DBImpl18GetMaxTotalWalSizeEv:
 1895|  1.36M|uint64_t DBImpl::GetMaxTotalWalSize() const {
 1896|  1.36M|  uint64_t max_total_wal_size =
 1897|  1.36M|      max_total_wal_size_.load(std::memory_order_acquire);
 1898|  1.36M|  if (max_total_wal_size > 0) {
  ------------------
  |  Branch (1898:7): [True: 0, False: 1.36M]
  ------------------
 1899|      0|    return max_total_wal_size;
 1900|      0|  }
 1901|  1.36M|  return 4 * max_total_in_memory_state_.load(std::memory_order_acquire);
 1902|  1.36M|}
_ZNK7rocksdb6DBImpl26GetWalPreallocateBlockSizeEm:
 2419|  9.02k|size_t DBImpl::GetWalPreallocateBlockSize(uint64_t write_buffer_size) const {
 2420|  9.02k|  mutex_.AssertHeld();
 2421|  9.02k|  size_t bsize =
 2422|  9.02k|      static_cast<size_t>(write_buffer_size / 10 + write_buffer_size);
 2423|       |  // Some users might set very high write_buffer_size and rely on
 2424|       |  // max_total_wal_size or other parameters to control the WAL size.
 2425|  9.02k|  if (mutable_db_options_.max_total_wal_size > 0) {
  ------------------
  |  Branch (2425:7): [True: 0, False: 9.02k]
  ------------------
 2426|      0|    bsize = std::min<size_t>(
 2427|      0|        bsize, static_cast<size_t>(mutable_db_options_.max_total_wal_size));
 2428|      0|  }
 2429|  9.02k|  if (immutable_db_options_.db_write_buffer_size > 0) {
  ------------------
  |  Branch (2429:7): [True: 0, False: 9.02k]
  ------------------
 2430|      0|    bsize = std::min<size_t>(bsize, immutable_db_options_.db_write_buffer_size);
 2431|      0|  }
 2432|  9.02k|  if (immutable_db_options_.write_buffer_manager &&
  ------------------
  |  Branch (2432:7): [True: 9.02k, False: 0]
  ------------------
 2433|  9.02k|      immutable_db_options_.write_buffer_manager->enabled()) {
  ------------------
  |  Branch (2433:7): [True: 0, False: 9.02k]
  ------------------
 2434|      0|    bsize = std::min<size_t>(
 2435|      0|        bsize, immutable_db_options_.write_buffer_manager->buffer_size());
 2436|      0|  }
 2437|       |
 2438|  9.02k|  return bsize;
 2439|  9.02k|}
_ZN7rocksdb2DB3PutERKNS_12WriteOptionsEPNS_18ColumnFamilyHandleERKNS_5SliceES8_:
 2444|   660k|               const Slice& key, const Slice& value) {
 2445|       |  // Pre-allocate size of write batch conservatively.
 2446|       |  // 8 bytes are taken by header, 4 bytes for count, 1 byte for type,
 2447|       |  // and we allocate 11 extra bytes for key length, as well as value length.
 2448|   660k|  WriteBatch batch(key.size() + value.size() + 24, 0 /* max_bytes */,
 2449|   660k|                   opt.protection_bytes_per_key, 0 /* default_cf_ts_sz */);
 2450|   660k|  Status s = batch.Put(column_family, key, value);
 2451|   660k|  if (!s.ok()) {
  ------------------
  |  Branch (2451:7): [True: 0, False: 660k]
  ------------------
 2452|      0|    return s;
 2453|      0|  }
 2454|   660k|  return Write(opt, &batch);
 2455|   660k|}
_ZN7rocksdb2DB6DeleteERKNS_12WriteOptionsEPNS_18ColumnFamilyHandleERKNS_5SliceE:
 2511|   186k|                  const Slice& key) {
 2512|   186k|  WriteBatch batch(0 /* reserved_bytes */, 0 /* max_bytes */,
 2513|   186k|                   opt.protection_bytes_per_key, 0 /* default_cf_ts_sz */);
 2514|   186k|  Status s = batch.Delete(column_family, key);
 2515|   186k|  if (!s.ok()) {
  ------------------
  |  Branch (2515:7): [True: 0, False: 186k]
  ------------------
 2516|      0|    return s;
 2517|      0|  }
 2518|   186k|  return Write(opt, &batch);
 2519|   186k|}
_ZN7rocksdb2DB11DeleteRangeERKNS_12WriteOptionsEPNS_18ColumnFamilyHandleERKNS_5SliceES8_:
 2567|   515k|                       const Slice& begin_key, const Slice& end_key) {
 2568|   515k|  WriteBatch batch(0 /* reserved_bytes */, 0 /* max_bytes */,
 2569|   515k|                   opt.protection_bytes_per_key, 0 /* default_cf_ts_sz */);
 2570|   515k|  Status s = batch.DeleteRange(column_family, begin_key, end_key);
 2571|   515k|  if (!s.ok()) {
  ------------------
  |  Branch (2571:7): [True: 0, False: 515k]
  ------------------
 2572|      0|    return s;
 2573|      0|  }
 2574|   515k|  return Write(opt, &batch);
 2575|   515k|}

_ZN7rocksdb17DumpDBFileSummaryERKNS_18ImmutableDBOptionsERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_:
   21|  9.02k|                       const std::string& session_id) {
   22|  9.02k|  if (options.info_log == nullptr) {
  ------------------
  |  Branch (22:7): [True: 0, False: 9.02k]
  ------------------
   23|      0|    return;
   24|      0|  }
   25|       |
   26|  9.02k|  auto* env = options.env;
   27|  9.02k|  uint64_t number = 0;
   28|  9.02k|  FileType type = kInfoLogFile;
   29|       |
   30|  9.02k|  std::vector<std::string> files;
   31|  9.02k|  uint64_t file_num = 0;
   32|  9.02k|  uint64_t file_size;
   33|  9.02k|  std::string file_info, wal_info;
   34|       |
   35|  9.02k|  Header(options.info_log, "DB SUMMARY\n");
   36|  9.02k|  {
   37|  9.02k|    std::string hostname;
   38|  9.02k|    if (env->GetHostNameString(&hostname).ok()) {
  ------------------
  |  Branch (38:9): [True: 9.02k, False: 0]
  ------------------
   39|  9.02k|      Header(options.info_log, "Host name (Env):  %s\n", hostname.c_str());
   40|  9.02k|    }
   41|  9.02k|  }
   42|  9.02k|  Header(options.info_log, "DB Session ID:  %s\n", session_id.c_str());
   43|       |
   44|  9.02k|  Status s;
   45|       |  // Get files in dbname dir
   46|  9.02k|  s = env->GetChildren(dbname, &files);
   47|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (47:7): [True: 0, False: 9.02k]
  ------------------
   48|      0|    Error(options.info_log, "Error when reading %s dir %s\n", dbname.c_str(),
   49|      0|          s.ToString().c_str());
   50|      0|  }
   51|  9.02k|  std::sort(files.begin(), files.end());
   52|  40.6k|  for (const std::string& file : files) {
  ------------------
  |  Branch (52:32): [True: 40.6k, False: 9.02k]
  ------------------
   53|  40.6k|    if (!ParseFileName(file, &number, &type)) {
  ------------------
  |  Branch (53:9): [True: 13.5k, False: 27.0k]
  ------------------
   54|  13.5k|      continue;
   55|  13.5k|    }
   56|  27.0k|    switch (type) {
   57|  4.51k|      case kCurrentFile:
  ------------------
  |  Branch (57:7): [True: 4.51k, False: 22.5k]
  ------------------
   58|  4.51k|        Header(options.info_log, "CURRENT file:  %s\n", file.c_str());
   59|  4.51k|        break;
   60|  4.51k|      case kIdentityFile:
  ------------------
  |  Branch (60:7): [True: 4.51k, False: 22.5k]
  ------------------
   61|  4.51k|        Header(options.info_log, "IDENTITY file:  %s\n", file.c_str());
   62|  4.51k|        break;
   63|  4.51k|      case kDescriptorFile:
  ------------------
  |  Branch (63:7): [True: 4.51k, False: 22.5k]
  ------------------
   64|  4.51k|        s = env->GetFileSize(dbname + "/" + file, &file_size);
   65|  4.51k|        if (s.ok()) {
  ------------------
  |  Branch (65:13): [True: 4.51k, False: 0]
  ------------------
   66|  4.51k|          Header(options.info_log,
   67|  4.51k|                 "MANIFEST file:  %s size: %" PRIu64 " Bytes\n", file.c_str(),
   68|  4.51k|                 file_size);
   69|  4.51k|        } else {
   70|      0|          Error(options.info_log,
   71|      0|                "Error when reading MANIFEST file: %s/%s %s\n", dbname.c_str(),
   72|      0|                file.c_str(), s.ToString().c_str());
   73|      0|        }
   74|  4.51k|        break;
   75|  4.51k|      case kWalFile:
  ------------------
  |  Branch (75:7): [True: 4.51k, False: 22.5k]
  ------------------
   76|  4.51k|        s = env->GetFileSize(dbname + "/" + file, &file_size);
   77|  4.51k|        if (s.ok()) {
  ------------------
  |  Branch (77:13): [True: 4.51k, False: 0]
  ------------------
   78|  4.51k|          wal_info.append(file)
   79|  4.51k|              .append(" size: ")
   80|  4.51k|              .append(std::to_string(file_size))
   81|  4.51k|              .append(" ; ");
   82|  4.51k|        } else {
   83|      0|          Error(options.info_log, "Error when reading LOG file: %s/%s %s\n",
   84|      0|                dbname.c_str(), file.c_str(), s.ToString().c_str());
   85|      0|        }
   86|  4.51k|        break;
   87|      0|      case kTableFile:
  ------------------
  |  Branch (87:7): [True: 0, False: 27.0k]
  ------------------
   88|      0|        if (++file_num < 10) {
  ------------------
  |  Branch (88:13): [True: 0, False: 0]
  ------------------
   89|      0|          file_info.append(file).append(" ");
   90|      0|        }
   91|      0|        break;
   92|  9.02k|      default:
  ------------------
  |  Branch (92:7): [True: 9.02k, False: 18.0k]
  ------------------
   93|  9.02k|        break;
   94|  27.0k|    }
   95|  27.0k|  }
   96|       |
   97|       |  // Get sst files in db_path dir
   98|  9.02k|  for (auto& db_path : options.db_paths) {
  ------------------
  |  Branch (98:22): [True: 9.02k, False: 9.02k]
  ------------------
   99|  9.02k|    if (dbname.compare(db_path.path) != 0) {
  ------------------
  |  Branch (99:9): [True: 0, False: 9.02k]
  ------------------
  100|      0|      s = env->GetChildren(db_path.path, &files);
  101|      0|      if (s.IsNotFound() || s.IsPathNotFound()) {
  ------------------
  |  Branch (101:11): [True: 0, False: 0]
  |  Branch (101:29): [True: 0, False: 0]
  ------------------
  102|      0|        Header(options.info_log,
  103|      0|               "Directory from db_paths/cf_paths does not yet exist: %s\n",
  104|      0|               db_path.path.c_str());
  105|      0|        continue;
  106|      0|      } else if (!s.ok()) {
  ------------------
  |  Branch (106:18): [True: 0, False: 0]
  ------------------
  107|      0|        Error(options.info_log, "Error when reading %s dir %s\n",
  108|      0|              db_path.path.c_str(), s.ToString().c_str());
  109|      0|        continue;
  110|      0|      }
  111|      0|      std::sort(files.begin(), files.end());
  112|      0|      for (const std::string& file : files) {
  ------------------
  |  Branch (112:36): [True: 0, False: 0]
  ------------------
  113|      0|        if (ParseFileName(file, &number, &type)) {
  ------------------
  |  Branch (113:13): [True: 0, False: 0]
  ------------------
  114|      0|          if (type == kTableFile && ++file_num < 10) {
  ------------------
  |  Branch (114:15): [True: 0, False: 0]
  |  Branch (114:37): [True: 0, False: 0]
  ------------------
  115|      0|            file_info.append(file).append(" ");
  116|      0|          }
  117|      0|        }
  118|      0|      }
  119|      0|    }
  120|  9.02k|    Header(options.info_log,
  121|  9.02k|           "SST files in %s dir, Total Num: %" PRIu64 ", files: %s\n",
  122|  9.02k|           db_path.path.c_str(), file_num, file_info.c_str());
  123|  9.02k|    file_num = 0;
  124|  9.02k|    file_info.clear();
  125|  9.02k|  }
  126|       |
  127|       |  // Get wal file in wal_dir
  128|  9.02k|  const auto& wal_dir = options.GetWalDir(dbname);
  129|  9.02k|  bool log_wal_info = true;
  130|  9.02k|  if (!options.IsWalDirSameAsDBPath(dbname)) {
  ------------------
  |  Branch (130:7): [True: 0, False: 9.02k]
  ------------------
  131|      0|    s = env->GetChildren(wal_dir, &files);
  132|      0|    if (s.IsNotFound() || s.IsPathNotFound()) {
  ------------------
  |  Branch (132:9): [True: 0, False: 0]
  |  Branch (132:27): [True: 0, False: 0]
  ------------------
  133|      0|      Header(options.info_log,
  134|      0|             "Write Ahead Log directory does not yet exist: %s\n",
  135|      0|             wal_dir.c_str());
  136|      0|      log_wal_info = false;
  137|      0|    } else if (!s.ok()) {
  ------------------
  |  Branch (137:16): [True: 0, False: 0]
  ------------------
  138|      0|      Error(options.info_log, "Error when reading wal dir %s: %s\n",
  139|      0|            wal_dir.c_str(), s.ToString().c_str());
  140|      0|      log_wal_info = false;
  141|      0|    }
  142|      0|    wal_info.clear();
  143|      0|    for (const std::string& file : files) {
  ------------------
  |  Branch (143:34): [True: 0, False: 0]
  ------------------
  144|      0|      if (ParseFileName(file, &number, &type)) {
  ------------------
  |  Branch (144:11): [True: 0, False: 0]
  ------------------
  145|      0|        if (type == kWalFile) {
  ------------------
  |  Branch (145:13): [True: 0, False: 0]
  ------------------
  146|      0|          s = env->GetFileSize(wal_dir + "/" + file, &file_size);
  147|      0|          if (s.ok()) {
  ------------------
  |  Branch (147:15): [True: 0, False: 0]
  ------------------
  148|      0|            wal_info.append(file)
  149|      0|                .append(" size: ")
  150|      0|                .append(std::to_string(file_size))
  151|      0|                .append(" ; ");
  152|      0|          } else {
  153|      0|            Error(options.info_log, "Error when reading LOG file %s/%s %s\n",
  154|      0|                  wal_dir.c_str(), file.c_str(), s.ToString().c_str());
  155|      0|          }
  156|      0|        }
  157|      0|      }
  158|      0|    }
  159|      0|  }
  160|  9.02k|  if (log_wal_info) {
  ------------------
  |  Branch (160:7): [True: 9.02k, False: 0]
  ------------------
  161|  9.02k|    Header(options.info_log, "Write Ahead Log file in %s: %s\n",
  162|  9.02k|           wal_dir.c_str(), wal_info.c_str());
  163|  9.02k|  }
  164|  9.02k|}

_ZN7rocksdb6DBIterC2EPNS_3EnvERKNS_11ReadOptionsERKNS_16ImmutableOptionsERKNS_16MutableCFOptionsEPKNS_10ComparatorEPNS_20InternalIteratorBaseINS_5SliceEEEPKNS_7VersionEmbmPNS_12ReadCallbackEPNS_22ColumnFamilyHandleImplEb:
   85|  4.51k|      timestamp_size_(timestamp_ub_ ? timestamp_ub_->size() : 0) {
   86|  4.51k|  RecordTick(statistics_, NO_ITERATOR_CREATED);
   87|  4.51k|  if (pin_thru_lifetime_) {
  ------------------
  |  Branch (87:7): [True: 0, False: 4.51k]
  ------------------
   88|      0|    pinned_iters_mgr_.StartPinning();
   89|      0|  }
   90|  4.51k|  if (iter_.iter()) {
  ------------------
  |  Branch (90:7): [True: 0, False: 4.51k]
  ------------------
   91|      0|    iter_.iter()->SetPinnedItersMgr(&pinned_iters_mgr_);
   92|      0|  }
   93|  4.51k|  status_.PermitUncheckedError();
   94|  4.51k|  assert(timestamp_size_ ==
   95|  4.51k|         user_comparator_.user_comparator()->timestamp_size());
   96|  4.51k|}
_ZN7rocksdb6DBIter8ParseKeyEPNS_17ParsedInternalKeyE:
  132|  64.2k|bool DBIter::ParseKey(ParsedInternalKey* ikey) {
  133|  64.2k|  Status s = ParseInternalKey(iter_.key(), ikey, false /* log_err_key */);
  134|  64.2k|  if (!s.ok()) {
  ------------------
  |  Branch (134:7): [True: 0, False: 64.2k]
  ------------------
  135|      0|    status_ = Status::Corruption("In DBIter: ", s.getState());
  136|      0|    valid_ = false;
  137|      0|    ROCKS_LOG_ERROR(logger_, "In DBIter: %s", status_.getState());
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  138|      0|    return false;
  139|  64.2k|  } else {
  140|  64.2k|    return true;
  141|  64.2k|  }
  142|  64.2k|}
_ZN7rocksdb6DBIter4NextEv:
  144|  29.5k|void DBIter::Next() {
  145|  29.5k|  assert(valid_);
  146|  29.5k|  assert(status_.ok());
  147|       |
  148|  29.5k|  PERF_COUNTER_ADD(iter_next_count, 1);
  ------------------
  |  |   81|  29.5k|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 29.5k, False: 0]
  |  |  ------------------
  |  |   82|  29.5k|    perf_context.metric += value;              \
  |  |   83|  29.5k|  }                                            \
  |  |   84|  29.5k|  static_assert(true, "semicolon required")
  ------------------
  149|  29.5k|  PERF_CPU_TIMER_GUARD(iter_next_cpu_nanos, clock_);
  ------------------
  |  |   56|  29.5k|  PerfStepTimer perf_step_timer_##metric(              \
  |  |   57|  29.5k|      &(perf_context.metric), clock, true,             \
  |  |   58|  29.5k|      PerfLevel::kEnableTimeAndCPUTimeExceptForMutex); \
  |  |   59|  29.5k|  perf_step_timer_##metric.Start();
  ------------------
  150|       |  // Release temporarily pinned blocks from last operation
  151|  29.5k|  ReleaseTempPinnedData();
  152|  29.5k|  ResetBlobValue();
  153|  29.5k|  ResetValueAndColumns();
  154|  29.5k|  local_stats_.skip_count_ += num_internal_keys_skipped_;
  155|  29.5k|  local_stats_.skip_count_--;
  156|  29.5k|  num_internal_keys_skipped_ = 0;
  157|  29.5k|  bool ok = true;
  158|  29.5k|  if (direction_ == kReverse) {
  ------------------
  |  Branch (158:7): [True: 0, False: 29.5k]
  ------------------
  159|      0|    is_key_seqnum_zero_ = false;
  160|      0|    if (!ReverseToForward()) {
  ------------------
  |  Branch (160:9): [True: 0, False: 0]
  ------------------
  161|      0|      ok = false;
  162|      0|    }
  163|  29.5k|  } else if (!current_entry_is_merged_) {
  ------------------
  |  Branch (163:14): [True: 29.5k, False: 0]
  ------------------
  164|       |    // If the current value is not a merge, the iter position is the
  165|       |    // current key, which is already returned. We can safely issue a
  166|       |    // Next() without checking the current key.
  167|       |    // If the current key is a merge, very likely iter already points
  168|       |    // to the next internal position.
  169|  29.5k|    assert(iter_.Valid());
  170|  29.5k|    iter_.Next();
  171|  29.5k|    PERF_COUNTER_ADD(internal_key_skipped_count, 1);
  ------------------
  |  |   81|  29.5k|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 29.5k, False: 0]
  |  |  ------------------
  |  |   82|  29.5k|    perf_context.metric += value;              \
  |  |   83|  29.5k|  }                                            \
  |  |   84|  29.5k|  static_assert(true, "semicolon required")
  ------------------
  172|  29.5k|  }
  173|       |
  174|  29.5k|  local_stats_.next_count_++;
  175|  29.5k|  if (ok && iter_.Valid()) {
  ------------------
  |  Branch (175:7): [True: 29.5k, False: 0]
  |  Branch (175:13): [True: 26.3k, False: 3.20k]
  ------------------
  176|  26.3k|    ClearSavedValue();
  177|       |
  178|  26.3k|    if (prefix_same_as_start_) {
  ------------------
  |  Branch (178:9): [True: 0, False: 26.3k]
  ------------------
  179|      0|      assert(prefix_extractor_ != nullptr);
  180|      0|      const Slice prefix = prefix_.GetUserKey();
  181|      0|      FindNextUserEntry(true /* skipping the current user key */, &prefix);
  182|  26.3k|    } else {
  183|  26.3k|      FindNextUserEntry(true /* skipping the current user key */, nullptr);
  184|  26.3k|    }
  185|  26.3k|  } else {
  186|  3.20k|    is_key_seqnum_zero_ = false;
  187|  3.20k|    valid_ = false;
  188|  3.20k|  }
  189|  29.5k|  if (statistics_ != nullptr && valid_) {
  ------------------
  |  Branch (189:7): [True: 0, False: 29.5k]
  |  Branch (189:33): [True: 0, False: 0]
  ------------------
  190|      0|    local_stats_.next_found_count_++;
  191|      0|    local_stats_.bytes_read_ += (key().size() + value().size());
  192|      0|  }
  193|  29.5k|}
_ZN7rocksdb6DBIter17FindNextUserEntryEbPKNS_5SliceE:
  293|  30.2k|bool DBIter::FindNextUserEntry(bool skipping_saved_key, const Slice* prefix) {
  294|  30.2k|  PERF_TIMER_GUARD(find_next_user_entry_time);
  ------------------
  |  |   46|  30.2k|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  30.2k|  perf_step_timer_##metric.Start();
  ------------------
  295|  30.2k|  return FindNextUserEntryInternal(skipping_saved_key, prefix);
  296|  30.2k|}
_ZN7rocksdb6DBIter25FindNextUserEntryInternalEbPKNS_5SliceE:
  300|  30.2k|                                       const Slice* prefix) {
  301|       |  // Loop until we hit an acceptable entry to yield
  302|  30.2k|  assert(iter_.Valid());
  303|  30.2k|  assert(status_.ok());
  304|  30.2k|  assert(direction_ == kForward);
  305|  30.2k|  current_entry_is_merged_ = false;
  306|       |
  307|       |  // How many times in a row we have skipped an entry with user key less than
  308|       |  // or equal to saved_key_. We could skip these entries either because
  309|       |  // sequence numbers were too high or because skipping_saved_key = true.
  310|       |  // What saved_key_ contains throughout this method:
  311|       |  //  - if skipping_saved_key : saved_key_ contains the key that we need
  312|       |  //                            to skip, and we haven't seen any keys greater
  313|       |  //                            than that,
  314|       |  //  - if num_skipped > 0    : saved_key_ contains the key that we have skipped
  315|       |  //                            num_skipped times, and we haven't seen any keys
  316|       |  //                            greater than that,
  317|       |  //  - none of the above     : saved_key_ can contain anything, it doesn't
  318|       |  //                            matter.
  319|  30.2k|  uint64_t num_skipped = 0;
  320|       |  // For write unprepared, the target sequence number in reseek could be larger
  321|       |  // than the snapshot, and thus needs to be skipped again. This could result in
  322|       |  // an infinite loop of reseeks. To avoid that, we limit the number of reseeks
  323|       |  // to one.
  324|  30.2k|  bool reseek_done = false;
  325|       |
  326|  34.6k|  do {
  327|       |    // Will update is_key_seqnum_zero_ as soon as we parsed the current key
  328|       |    // but we need to save the previous value to be used in the loop.
  329|  34.6k|    bool is_prev_key_seqnum_zero = is_key_seqnum_zero_;
  330|  34.6k|    if (!ParseKey(&ikey_)) {
  ------------------
  |  Branch (330:9): [True: 0, False: 34.6k]
  ------------------
  331|      0|      is_key_seqnum_zero_ = false;
  332|      0|      return false;
  333|      0|    }
  334|  34.6k|    Slice user_key_without_ts =
  335|  34.6k|        StripTimestampFromUserKey(ikey_.user_key, timestamp_size_);
  336|       |
  337|  34.6k|    is_key_seqnum_zero_ = (ikey_.sequence == 0);
  338|       |
  339|  34.6k|    assert(iterate_upper_bound_ == nullptr ||
  340|  34.6k|           iter_.UpperBoundCheckResult() != IterBoundCheck::kInbound ||
  341|  34.6k|           user_comparator_.CompareWithoutTimestamp(
  342|  34.6k|               user_key_without_ts, /*a_has_ts=*/false, *iterate_upper_bound_,
  343|  34.6k|               /*b_has_ts=*/false) < 0);
  344|  34.6k|    if (iterate_upper_bound_ != nullptr &&
  ------------------
  |  Branch (344:9): [True: 0, False: 34.6k]
  ------------------
  345|  34.6k|        iter_.UpperBoundCheckResult() != IterBoundCheck::kInbound &&
  ------------------
  |  Branch (345:9): [True: 0, False: 0]
  ------------------
  346|  34.6k|        user_comparator_.CompareWithoutTimestamp(
  ------------------
  |  Branch (346:9): [True: 0, False: 0]
  ------------------
  347|      0|            user_key_without_ts, /*a_has_ts=*/false, *iterate_upper_bound_,
  348|      0|            /*b_has_ts=*/false) >= 0) {
  349|      0|      break;
  350|      0|    }
  351|       |
  352|  34.6k|    assert(prefix == nullptr || prefix_extractor_ != nullptr);
  353|  34.6k|    if (prefix != nullptr &&
  ------------------
  |  Branch (353:9): [True: 0, False: 34.6k]
  |  Branch (353:9): [True: 0, False: 34.6k]
  ------------------
  354|  34.6k|        prefix_extractor_->Transform(user_key_without_ts).compare(*prefix) !=
  ------------------
  |  Branch (354:9): [True: 0, False: 0]
  ------------------
  355|      0|            0) {
  356|      0|      assert(prefix_same_as_start_);
  357|      0|      break;
  358|      0|    }
  359|       |
  360|  34.6k|    if (TooManyInternalKeysSkipped()) {
  ------------------
  |  Branch (360:9): [True: 0, False: 34.6k]
  ------------------
  361|      0|      return false;
  362|      0|    }
  363|       |
  364|  34.6k|    assert(ikey_.user_key.size() >= timestamp_size_);
  365|  34.6k|    Slice ts = timestamp_size_ > 0 ? ExtractTimestampFromUserKey(
  ------------------
  |  Branch (365:16): [True: 0, False: 34.6k]
  ------------------
  366|      0|                                         ikey_.user_key, timestamp_size_)
  367|  34.6k|                                   : Slice();
  368|  34.6k|    bool more_recent = false;
  369|  34.6k|    if (IsVisible(ikey_.sequence, ts, &more_recent)) {
  ------------------
  |  Branch (369:9): [True: 34.6k, False: 0]
  ------------------
  370|       |      // If the previous entry is of seqnum 0, the current entry will not
  371|       |      // possibly be skipped. This condition can potentially be relaxed to
  372|       |      // prev_key.seq <= ikey_.sequence. We are cautious because it will be more
  373|       |      // prone to bugs causing the same user key with the same sequence number.
  374|       |      // Note that with current timestamp implementation, the same user key can
  375|       |      // have different timestamps and zero sequence number on the bottommost
  376|       |      // level. This may change in the future.
  377|  34.6k|      if ((!is_prev_key_seqnum_zero || timestamp_size_ > 0) &&
  ------------------
  |  Branch (377:11): [True: 0, False: 34.6k]
  |  Branch (377:12): [True: 34.6k, False: 0]
  |  Branch (377:40): [True: 0, False: 0]
  ------------------
  378|  34.6k|          skipping_saved_key &&
  ------------------
  |  Branch (378:11): [True: 30.8k, False: 3.81k]
  ------------------
  379|  34.6k|          CompareKeyForSkip(ikey_.user_key, saved_key_.GetUserKey()) <= 0) {
  ------------------
  |  Branch (379:11): [True: 0, False: 30.8k]
  ------------------
  380|      0|        num_skipped++;  // skip this entry
  381|      0|        PERF_COUNTER_ADD(internal_key_skipped_count, 1);
  ------------------
  |  |   81|      0|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    perf_context.metric += value;              \
  |  |   83|      0|  }                                            \
  |  |   84|      0|  static_assert(true, "semicolon required")
  ------------------
  382|  34.6k|      } else {
  383|  34.6k|        assert(!skipping_saved_key ||
  384|  34.6k|               CompareKeyForSkip(ikey_.user_key, saved_key_.GetUserKey()) > 0);
  385|  34.6k|        num_skipped = 0;
  386|  34.6k|        reseek_done = false;
  387|  34.6k|        switch (ikey_.type) {
  388|  5.06k|          case kTypeDeletion:
  ------------------
  |  Branch (388:11): [True: 5.06k, False: 29.5k]
  ------------------
  389|  5.06k|          case kTypeDeletionWithTimestamp:
  ------------------
  |  Branch (389:11): [True: 0, False: 34.6k]
  ------------------
  390|  5.06k|          case kTypeSingleDeletion:
  ------------------
  |  Branch (390:11): [True: 0, False: 34.6k]
  ------------------
  391|       |            // Arrange to skip all upcoming entries for this key since
  392|       |            // they are hidden by this deletion.
  393|  5.06k|            if (timestamp_lb_) {
  ------------------
  |  Branch (393:17): [True: 0, False: 5.06k]
  ------------------
  394|      0|              saved_key_.SetInternalKey(ikey_);
  395|      0|              valid_ = true;
  396|      0|              return true;
  397|  5.06k|            } else {
  398|  5.06k|              saved_key_.SetUserKey(
  399|  5.06k|                  ikey_.user_key, !pin_thru_lifetime_ ||
  ------------------
  |  Branch (399:35): [True: 5.06k, False: 0]
  ------------------
  400|  5.06k|                                      !iter_.iter()->IsKeyPinned() /* copy */);
  ------------------
  |  Branch (400:39): [True: 0, False: 0]
  ------------------
  401|  5.06k|              skipping_saved_key = true;
  402|  5.06k|              PERF_COUNTER_ADD(internal_delete_skipped_count, 1);
  ------------------
  |  |   81|  5.06k|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 5.06k, False: 0]
  |  |  ------------------
  |  |   82|  5.06k|    perf_context.metric += value;              \
  |  |   83|  5.06k|  }                                            \
  |  |   84|  5.06k|  static_assert(true, "semicolon required")
  ------------------
  403|  5.06k|            }
  404|  5.06k|            break;
  405|  29.5k|          case kTypeValue:
  ------------------
  |  Branch (405:11): [True: 29.5k, False: 5.06k]
  ------------------
  406|  29.5k|          case kTypeValuePreferredSeqno:
  ------------------
  |  Branch (406:11): [True: 0, False: 34.6k]
  ------------------
  407|  29.5k|          case kTypeBlobIndex:
  ------------------
  |  Branch (407:11): [True: 0, False: 34.6k]
  ------------------
  408|  29.5k|          case kTypeWideColumnEntity:
  ------------------
  |  Branch (408:11): [True: 0, False: 34.6k]
  ------------------
  409|  29.5k|            if (!PrepareValue()) {
  ------------------
  |  Branch (409:17): [True: 0, False: 29.5k]
  ------------------
  410|      0|              return false;
  411|      0|            }
  412|  29.5k|            if (timestamp_lb_) {
  ------------------
  |  Branch (412:17): [True: 0, False: 29.5k]
  ------------------
  413|      0|              saved_key_.SetInternalKey(ikey_);
  414|  29.5k|            } else {
  415|  29.5k|              saved_key_.SetUserKey(
  416|  29.5k|                  ikey_.user_key, !pin_thru_lifetime_ ||
  ------------------
  |  Branch (416:35): [True: 29.5k, False: 0]
  ------------------
  417|  29.5k|                                      !iter_.iter()->IsKeyPinned() /* copy */);
  ------------------
  |  Branch (417:39): [True: 0, False: 0]
  ------------------
  418|  29.5k|            }
  419|       |
  420|  29.5k|            if (ikey_.type == kTypeBlobIndex) {
  ------------------
  |  Branch (420:17): [True: 0, False: 29.5k]
  ------------------
  421|      0|              if (!SetBlobValueIfNeeded(ikey_.user_key, iter_.value())) {
  ------------------
  |  Branch (421:19): [True: 0, False: 0]
  ------------------
  422|      0|                return false;
  423|      0|              }
  424|       |
  425|      0|              SetValueAndColumnsFromPlain(expose_blob_index_ ? iter_.value()
  ------------------
  |  Branch (425:43): [True: 0, False: 0]
  ------------------
  426|      0|                                                             : blob_value_);
  427|  29.5k|            } else if (ikey_.type == kTypeWideColumnEntity) {
  ------------------
  |  Branch (427:24): [True: 0, False: 29.5k]
  ------------------
  428|      0|              if (!SetValueAndColumnsFromEntity(iter_.value())) {
  ------------------
  |  Branch (428:19): [True: 0, False: 0]
  ------------------
  429|      0|                return false;
  430|      0|              }
  431|  29.5k|            } else {
  432|  29.5k|              assert(ikey_.type == kTypeValue ||
  433|  29.5k|                     ikey_.type == kTypeValuePreferredSeqno);
  434|  29.5k|              Slice value = iter_.value();
  435|  29.5k|              saved_write_unix_time_ = iter_.write_unix_time();
  436|  29.5k|              if (ikey_.type == kTypeValuePreferredSeqno) {
  ------------------
  |  Branch (436:19): [True: 0, False: 29.5k]
  ------------------
  437|      0|                value = ParsePackedValueForValue(value);
  438|      0|              }
  439|  29.5k|              SetValueAndColumnsFromPlain(value);
  440|  29.5k|            }
  441|       |
  442|  29.5k|            valid_ = true;
  443|  29.5k|            return true;
  444|      0|            break;
  445|      0|          case kTypeMerge:
  ------------------
  |  Branch (445:11): [True: 0, False: 34.6k]
  ------------------
  446|      0|            if (!PrepareValue()) {
  ------------------
  |  Branch (446:17): [True: 0, False: 0]
  ------------------
  447|      0|              return false;
  448|      0|            }
  449|      0|            saved_key_.SetUserKey(
  450|      0|                ikey_.user_key,
  451|      0|                !pin_thru_lifetime_ || !iter_.iter()->IsKeyPinned() /* copy */);
  ------------------
  |  Branch (451:17): [True: 0, False: 0]
  |  Branch (451:40): [True: 0, False: 0]
  ------------------
  452|       |            // By now, we are sure the current ikey is going to yield a value
  453|      0|            current_entry_is_merged_ = true;
  454|      0|            valid_ = true;
  455|      0|            return MergeValuesNewToOld();  // Go to a different state machine
  456|      0|            break;
  457|      0|          default:
  ------------------
  |  Branch (457:11): [True: 0, False: 34.6k]
  ------------------
  458|      0|            valid_ = false;
  459|      0|            status_ = Status::Corruption(
  460|      0|                "Unknown value type: " +
  461|      0|                std::to_string(static_cast<unsigned int>(ikey_.type)));
  462|      0|            return false;
  463|  34.6k|        }
  464|  34.6k|      }
  465|  34.6k|    } else {
  466|      0|      if (more_recent) {
  ------------------
  |  Branch (466:11): [True: 0, False: 0]
  ------------------
  467|      0|        PERF_COUNTER_ADD(internal_recent_skipped_count, 1);
  ------------------
  |  |   81|      0|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    perf_context.metric += value;              \
  |  |   83|      0|  }                                            \
  |  |   84|      0|  static_assert(true, "semicolon required")
  ------------------
  468|      0|      }
  469|       |
  470|       |      // This key was inserted after our snapshot was taken or skipped by
  471|       |      // timestamp range. If this happens too many times in a row for the same
  472|       |      // user key, we want to seek to the target sequence number.
  473|      0|      int cmp = user_comparator_.CompareWithoutTimestamp(
  474|      0|          ikey_.user_key, saved_key_.GetUserKey());
  475|      0|      if (cmp == 0 || (skipping_saved_key && cmp < 0)) {
  ------------------
  |  Branch (475:11): [True: 0, False: 0]
  |  Branch (475:24): [True: 0, False: 0]
  |  Branch (475:46): [True: 0, False: 0]
  ------------------
  476|      0|        num_skipped++;
  477|      0|      } else {
  478|      0|        saved_key_.SetUserKey(
  479|      0|            ikey_.user_key,
  480|      0|            !iter_.iter()->IsKeyPinned() || !pin_thru_lifetime_ /* copy */);
  ------------------
  |  Branch (480:13): [True: 0, False: 0]
  |  Branch (480:45): [True: 0, False: 0]
  ------------------
  481|      0|        skipping_saved_key = false;
  482|      0|        num_skipped = 0;
  483|      0|        reseek_done = false;
  484|      0|      }
  485|      0|    }
  486|       |
  487|       |    // If we have sequentially iterated via numerous equal keys, then it's
  488|       |    // better to seek so that we can avoid too many key comparisons.
  489|       |    //
  490|       |    // To avoid infinite loops, do not reseek if we have already attempted to
  491|       |    // reseek previously.
  492|       |    //
  493|       |    // TODO(lth): If we reseek to sequence number greater than ikey_.sequence,
  494|       |    // then it does not make sense to reseek as we would actually land further
  495|       |    // away from the desired key. There is opportunity for optimization here.
  496|  5.06k|    if (num_skipped > max_skip_ && !reseek_done) {
  ------------------
  |  Branch (496:9): [True: 0, False: 5.06k]
  |  Branch (496:36): [True: 0, False: 0]
  ------------------
  497|      0|      is_key_seqnum_zero_ = false;
  498|      0|      num_skipped = 0;
  499|      0|      reseek_done = true;
  500|      0|      std::string last_key;
  501|      0|      if (skipping_saved_key) {
  ------------------
  |  Branch (501:11): [True: 0, False: 0]
  ------------------
  502|       |        // We're looking for the next user-key but all we see are the same
  503|       |        // user-key with decreasing sequence numbers. Fast forward to
  504|       |        // sequence number 0 and type deletion (the smallest type).
  505|      0|        if (timestamp_size_ == 0) {
  ------------------
  |  Branch (505:13): [True: 0, False: 0]
  ------------------
  506|      0|          AppendInternalKey(
  507|      0|              &last_key,
  508|      0|              ParsedInternalKey(saved_key_.GetUserKey(), 0, kTypeDeletion));
  509|      0|        } else {
  510|      0|          const std::string kTsMin(timestamp_size_, '\0');
  511|      0|          AppendInternalKeyWithDifferentTimestamp(
  512|      0|              &last_key,
  513|      0|              ParsedInternalKey(saved_key_.GetUserKey(), 0, kTypeDeletion),
  514|      0|              kTsMin);
  515|      0|        }
  516|       |        // Don't set skipping_saved_key = false because we may still see more
  517|       |        // user-keys equal to saved_key_.
  518|      0|      } else {
  519|       |        // We saw multiple entries with this user key and sequence numbers
  520|       |        // higher than sequence_. Fast forward to sequence_.
  521|       |        // Note that this only covers a case when a higher key was overwritten
  522|       |        // many times since our snapshot was taken, not the case when a lot of
  523|       |        // different keys were inserted after our snapshot was taken.
  524|      0|        if (timestamp_size_ == 0) {
  ------------------
  |  Branch (524:13): [True: 0, False: 0]
  ------------------
  525|      0|          AppendInternalKey(
  526|      0|              &last_key, ParsedInternalKey(saved_key_.GetUserKey(), sequence_,
  527|      0|                                           kValueTypeForSeek));
  528|      0|        } else {
  529|      0|          AppendInternalKeyWithDifferentTimestamp(
  530|      0|              &last_key,
  531|      0|              ParsedInternalKey(saved_key_.GetUserKey(), sequence_,
  532|      0|                                kValueTypeForSeek),
  533|      0|              *timestamp_ub_);
  534|      0|        }
  535|      0|      }
  536|      0|      iter_.Seek(last_key);
  537|      0|      RecordTick(statistics_, NUMBER_OF_RESEEKS_IN_ITERATION);
  538|  5.06k|    } else {
  539|  5.06k|      iter_.Next();
  540|  5.06k|    }
  541|  5.06k|  } while (iter_.Valid());
  ------------------
  |  Branch (541:12): [True: 4.45k, False: 608]
  ------------------
  542|       |
  543|    608|  valid_ = false;
  544|    608|  return iter_.status().ok();
  545|  30.2k|}
_ZN7rocksdb6DBIter26TooManyInternalKeysSkippedEb:
 1426|  34.6k|bool DBIter::TooManyInternalKeysSkipped(bool increment) {
 1427|  34.6k|  if ((max_skippable_internal_keys_ > 0) &&
  ------------------
  |  Branch (1427:7): [True: 0, False: 34.6k]
  ------------------
 1428|  34.6k|      (num_internal_keys_skipped_ > max_skippable_internal_keys_)) {
  ------------------
  |  Branch (1428:7): [True: 0, False: 0]
  ------------------
 1429|      0|    valid_ = false;
 1430|      0|    status_ = Status::Incomplete("Too many internal keys skipped.");
 1431|      0|    return true;
 1432|  34.6k|  } else if (increment) {
  ------------------
  |  Branch (1432:14): [True: 34.6k, False: 0]
  ------------------
 1433|  34.6k|    num_internal_keys_skipped_++;
 1434|  34.6k|  }
 1435|  34.6k|  return false;
 1436|  34.6k|}
_ZN7rocksdb6DBIter9IsVisibleEmRKNS_5SliceEPb:
 1439|  34.6k|                       bool* more_recent) {
 1440|       |  // Remember that comparator orders preceding timestamp as larger.
 1441|       |  // TODO(yanqin): support timestamp in read_callback_.
 1442|  34.6k|  bool visible_by_seq = (read_callback_ == nullptr)
  ------------------
  |  Branch (1442:25): [True: 34.6k, False: 0]
  ------------------
 1443|  34.6k|                            ? sequence <= sequence_
 1444|  34.6k|                            : read_callback_->IsVisible(sequence);
 1445|       |
 1446|  34.6k|  bool visible_by_ts =
 1447|  34.6k|      (timestamp_ub_ == nullptr ||
  ------------------
  |  Branch (1447:8): [True: 34.6k, False: 0]
  ------------------
 1448|  34.6k|       user_comparator_.CompareTimestamp(ts, *timestamp_ub_) <= 0) &&
  ------------------
  |  Branch (1448:8): [True: 0, False: 0]
  ------------------
 1449|  34.6k|      (timestamp_lb_ == nullptr ||
  ------------------
  |  Branch (1449:8): [True: 34.6k, False: 0]
  ------------------
 1450|  34.6k|       user_comparator_.CompareTimestamp(ts, *timestamp_lb_) >= 0);
  ------------------
  |  Branch (1450:8): [True: 0, False: 0]
  ------------------
 1451|       |
 1452|  34.6k|  if (more_recent) {
  ------------------
  |  Branch (1452:7): [True: 34.6k, False: 0]
  ------------------
 1453|  34.6k|    *more_recent = !visible_by_seq;
 1454|  34.6k|  }
 1455|  34.6k|  return visible_by_seq && visible_by_ts;
  ------------------
  |  Branch (1455:10): [True: 34.6k, False: 0]
  |  Branch (1455:28): [True: 34.6k, False: 0]
  ------------------
 1456|  34.6k|}
_ZN7rocksdb6DBIter11SeekToFirstEv:
 1652|  4.51k|void DBIter::SeekToFirst() {
 1653|  4.51k|  if (iterate_lower_bound_ != nullptr) {
  ------------------
  |  Branch (1653:7): [True: 0, False: 4.51k]
  ------------------
 1654|      0|    Seek(*iterate_lower_bound_);
 1655|      0|    return;
 1656|      0|  }
 1657|  4.51k|  PERF_COUNTER_ADD(iter_seek_count, 1);
  ------------------
  |  |   81|  4.51k|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 4.51k, False: 0]
  |  |  ------------------
  |  |   82|  4.51k|    perf_context.metric += value;              \
  |  |   83|  4.51k|  }                                            \
  |  |   84|  4.51k|  static_assert(true, "semicolon required")
  ------------------
 1658|  4.51k|  PERF_CPU_TIMER_GUARD(iter_seek_cpu_nanos, clock_);
  ------------------
  |  |   56|  4.51k|  PerfStepTimer perf_step_timer_##metric(              \
  |  |   57|  4.51k|      &(perf_context.metric), clock, true,             \
  |  |   58|  4.51k|      PerfLevel::kEnableTimeAndCPUTimeExceptForMutex); \
  |  |   59|  4.51k|  perf_step_timer_##metric.Start();
  ------------------
 1659|       |  // Don't use iter_::Seek() if we set a prefix extractor
 1660|       |  // because prefix seek will be used.
 1661|  4.51k|  if (!expect_total_order_inner_iter()) {
  ------------------
  |  Branch (1661:7): [True: 0, False: 4.51k]
  ------------------
 1662|      0|    max_skip_ = std::numeric_limits<uint64_t>::max();
 1663|      0|  }
 1664|  4.51k|  status_ = Status::OK();
 1665|       |  // if iterator is empty, this status_ could be unchecked.
 1666|  4.51k|  status_.PermitUncheckedError();
 1667|  4.51k|  direction_ = kForward;
 1668|  4.51k|  ReleaseTempPinnedData();
 1669|  4.51k|  ResetBlobValue();
 1670|  4.51k|  ResetValueAndColumns();
 1671|  4.51k|  ResetInternalKeysSkippedCounter();
 1672|  4.51k|  ClearSavedValue();
 1673|  4.51k|  is_key_seqnum_zero_ = false;
 1674|       |
 1675|  4.51k|  {
 1676|  4.51k|    PERF_TIMER_GUARD(seek_internal_seek_time);
  ------------------
  |  |   46|  4.51k|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  4.51k|  perf_step_timer_##metric.Start();
  ------------------
 1677|  4.51k|    iter_.SeekToFirst();
 1678|  4.51k|  }
 1679|       |
 1680|  4.51k|  RecordTick(statistics_, NUMBER_DB_SEEK);
 1681|  4.51k|  if (iter_.Valid()) {
  ------------------
  |  Branch (1681:7): [True: 3.81k, False: 701]
  ------------------
 1682|  3.81k|    saved_key_.SetUserKey(
 1683|  3.81k|        ExtractUserKey(iter_.key()),
 1684|  3.81k|        !iter_.iter()->IsKeyPinned() || !pin_thru_lifetime_ /* copy */);
  ------------------
  |  Branch (1684:9): [True: 3.81k, False: 0]
  |  Branch (1684:41): [True: 0, False: 0]
  ------------------
 1685|  3.81k|    FindNextUserEntry(false /* not skipping saved_key */,
 1686|  3.81k|                      nullptr /* no prefix check */);
 1687|  3.81k|    if (statistics_ != nullptr) {
  ------------------
  |  Branch (1687:9): [True: 0, False: 3.81k]
  ------------------
 1688|      0|      if (valid_) {
  ------------------
  |  Branch (1688:11): [True: 0, False: 0]
  ------------------
 1689|      0|        RecordTick(statistics_, NUMBER_DB_SEEK_FOUND);
 1690|      0|        RecordTick(statistics_, ITER_BYTES_READ, key().size() + value().size());
 1691|      0|        PERF_COUNTER_ADD(iter_read_bytes, key().size() + value().size());
  ------------------
  |  |   81|      0|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    perf_context.metric += value;              \
  |  |   83|      0|  }                                            \
  |  |   84|      0|  static_assert(true, "semicolon required")
  ------------------
 1692|      0|      }
 1693|      0|    }
 1694|  3.81k|  } else {
 1695|    701|    valid_ = false;
 1696|    701|  }
 1697|  4.51k|  if (valid_ && prefix_same_as_start_) {
  ------------------
  |  Branch (1697:7): [True: 3.47k, False: 1.03k]
  |  Branch (1697:17): [True: 0, False: 3.47k]
  ------------------
 1698|      0|    assert(prefix_extractor_ != nullptr);
 1699|      0|    prefix_.SetUserKey(prefix_extractor_->Transform(
 1700|      0|        StripTimestampFromUserKey(saved_key_.GetUserKey(), timestamp_size_)));
 1701|      0|  }
 1702|  4.51k|}

_ZN7rocksdb6DBIter15LocalStatisticsC2Ev:
   80|  4.51k|    explicit LocalStatistics() { ResetCounters(); }
_ZN7rocksdb6DBIter15LocalStatistics13ResetCountersEv:
   82|  9.02k|    void ResetCounters() {
   83|  9.02k|      next_count_ = 0;
   84|  9.02k|      next_found_count_ = 0;
   85|  9.02k|      prev_count_ = 0;
   86|  9.02k|      prev_found_count_ = 0;
   87|  9.02k|      bytes_read_ = 0;
   88|  9.02k|      skip_count_ = 0;
   89|  9.02k|    }
_ZN7rocksdb6DBIter15LocalStatistics20BumpGlobalStatisticsEPNS_10StatisticsE:
   91|  4.51k|    void BumpGlobalStatistics(Statistics* global_statistics) {
   92|  4.51k|      RecordTick(global_statistics, NUMBER_DB_NEXT, next_count_);
   93|  4.51k|      RecordTick(global_statistics, NUMBER_DB_NEXT_FOUND, next_found_count_);
   94|  4.51k|      RecordTick(global_statistics, NUMBER_DB_PREV, prev_count_);
   95|  4.51k|      RecordTick(global_statistics, NUMBER_DB_PREV_FOUND, prev_found_count_);
   96|  4.51k|      RecordTick(global_statistics, ITER_BYTES_READ, bytes_read_);
   97|  4.51k|      RecordTick(global_statistics, NUMBER_ITER_SKIP, skip_count_);
   98|  4.51k|      PERF_COUNTER_ADD(iter_read_bytes, bytes_read_);
  ------------------
  |  |   81|  4.51k|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 4.51k, False: 0]
  |  |  ------------------
  |  |   82|  4.51k|    perf_context.metric += value;              \
  |  |   83|  4.51k|  }                                            \
  |  |   84|  4.51k|  static_assert(true, "semicolon required")
  ------------------
   99|  4.51k|      ResetCounters();
  100|  4.51k|    }
_ZN7rocksdb6DBIterD2Ev:
  128|  4.51k|  ~DBIter() override {
  129|  4.51k|    ThreadStatus::OperationType cur_op_type =
  130|  4.51k|        ThreadStatusUtil::GetThreadOperation();
  131|  4.51k|    ThreadStatusUtil::SetThreadOperation(
  132|  4.51k|        ThreadStatus::OperationType::OP_UNKNOWN);
  133|       |    // Release pinned data if any
  134|  4.51k|    if (pinned_iters_mgr_.PinningEnabled()) {
  ------------------
  |  Branch (134:9): [True: 0, False: 4.51k]
  ------------------
  135|      0|      pinned_iters_mgr_.ReleasePinnedData();
  136|      0|    }
  137|  4.51k|    RecordTick(statistics_, NO_ITERATOR_DELETED);
  138|  4.51k|    ResetInternalKeysSkippedCounter();
  139|  4.51k|    local_stats_.BumpGlobalStatistics(statistics_);
  140|  4.51k|    iter_.DeleteIter(arena_mode_);
  141|  4.51k|    ThreadStatusUtil::SetThreadOperation(cur_op_type);
  142|  4.51k|  }
_ZN7rocksdb6DBIter7SetIterEPNS_20InternalIteratorBaseINS_5SliceEEE:
  143|  4.51k|  void SetIter(InternalIterator* iter) {
  144|  4.51k|    assert(iter_.iter() == nullptr);
  145|  4.51k|    iter_.Set(iter);
  146|  4.51k|    iter_.iter()->SetPinnedItersMgr(&pinned_iters_mgr_);
  147|  4.51k|  }
_ZNK7rocksdb6DBIter5ValidEv:
  149|  34.1k|  bool Valid() const override {
  150|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
  151|       |    if (valid_) {
  152|       |      status_.PermitUncheckedError();
  153|       |    }
  154|       |#endif  // ROCKSDB_ASSERT_STATUS_CHECKED
  155|  34.1k|    return valid_;
  156|  34.1k|  }
_ZNK7rocksdb6DBIter3keyEv:
  157|  29.5k|  Slice key() const override {
  158|  29.5k|    assert(valid_);
  159|  29.5k|    if (timestamp_lb_) {
  ------------------
  |  Branch (159:9): [True: 0, False: 29.5k]
  ------------------
  160|      0|      return saved_key_.GetInternalKey();
  161|  29.5k|    } else {
  162|  29.5k|      const Slice ukey_and_ts = saved_key_.GetUserKey();
  163|  29.5k|      return Slice(ukey_and_ts.data(), ukey_and_ts.size() - timestamp_size_);
  164|  29.5k|    }
  165|  29.5k|  }
_ZNK7rocksdb6DBIter5valueEv:
  166|  29.5k|  Slice value() const override {
  167|  29.5k|    assert(valid_);
  168|       |
  169|  29.5k|    return value_;
  170|  29.5k|  }
_ZN7rocksdb6DBIter21ReleaseTempPinnedDataEv:
  265|  34.1k|  void ReleaseTempPinnedData() {
  266|  34.1k|    if (!pin_thru_lifetime_ && pinned_iters_mgr_.PinningEnabled()) {
  ------------------
  |  Branch (266:9): [True: 34.1k, False: 0]
  |  Branch (266:32): [True: 0, False: 34.1k]
  ------------------
  267|      0|      pinned_iters_mgr_.ReleasePinnedData();
  268|      0|    }
  269|  34.1k|  }
_ZN7rocksdb6DBIter15ClearSavedValueEv:
  271|  30.9k|  inline void ClearSavedValue() {
  272|  30.9k|    if (saved_value_.capacity() > 1048576) {
  ------------------
  |  Branch (272:9): [True: 0, False: 30.9k]
  ------------------
  273|      0|      std::string empty;
  274|      0|      swap(empty, saved_value_);
  275|  30.9k|    } else {
  276|  30.9k|      saved_value_.clear();
  277|  30.9k|    }
  278|  30.9k|  }
_ZN7rocksdb6DBIter31ResetInternalKeysSkippedCounterEv:
  280|  9.02k|  inline void ResetInternalKeysSkippedCounter() {
  281|  9.02k|    local_stats_.skip_count_ += num_internal_keys_skipped_;
  282|  9.02k|    if (valid_) {
  ------------------
  |  Branch (282:9): [True: 0, False: 9.02k]
  ------------------
  283|      0|      local_stats_.skip_count_--;
  284|      0|    }
  285|  9.02k|    num_internal_keys_skipped_ = 0;
  286|  9.02k|  }
_ZN7rocksdb6DBIter29expect_total_order_inner_iterEv:
  288|  4.51k|  bool expect_total_order_inner_iter() {
  289|  4.51k|    assert(expect_total_order_inner_iter_ || prefix_extractor_ != nullptr);
  290|  4.51k|    return expect_total_order_inner_iter_;
  291|  4.51k|  }
_ZN7rocksdb6DBIter17CompareKeyForSkipERKNS_5SliceES3_:
  296|  30.8k|  inline int CompareKeyForSkip(const Slice& a, const Slice& b) {
  297|  30.8k|    return timestamp_lb_ != nullptr
  ------------------
  |  Branch (297:12): [True: 0, False: 30.8k]
  ------------------
  298|  30.8k|               ? user_comparator_.Compare(a, b)
  299|  30.8k|               : user_comparator_.CompareWithoutTimestamp(a, b);
  300|  30.8k|  }
_ZN7rocksdb6DBIter14ResetBlobValueEv:
  306|  34.1k|  void ResetBlobValue() {
  307|  34.1k|    is_blob_ = false;
  308|  34.1k|    blob_value_.Reset();
  309|  34.1k|  }
_ZN7rocksdb6DBIter27SetValueAndColumnsFromPlainERKNS_5SliceE:
  311|  29.5k|  void SetValueAndColumnsFromPlain(const Slice& slice) {
  312|  29.5k|    assert(value_.empty());
  313|  29.5k|    assert(wide_columns_.empty());
  314|       |
  315|  29.5k|    value_ = slice;
  316|  29.5k|    wide_columns_.emplace_back(kDefaultWideColumnName, slice);
  317|  29.5k|  }
_ZN7rocksdb6DBIter20ResetValueAndColumnsEv:
  324|  34.1k|  void ResetValueAndColumns() {
  325|  34.1k|    value_.clear();
  326|  34.1k|    wide_columns_.clear();
  327|  34.1k|  }
_ZN7rocksdb6DBIter12PrepareValueEv:
  336|  29.5k|  bool PrepareValue() {
  337|  29.5k|    if (!iter_.PrepareValue()) {
  ------------------
  |  Branch (337:9): [True: 0, False: 29.5k]
  ------------------
  338|      0|      assert(!iter_.status().ok());
  339|      0|      valid_ = false;
  340|      0|      return false;
  341|      0|    }
  342|       |    // ikey_ could change as BlockBasedTableIterator does Block cache
  343|       |    // lookup and index_iter_ could point to different block resulting
  344|       |    // in ikey_ pointing to wrong key. So ikey_ needs to be updated in
  345|       |    // case of Seek/Next calls to point to right key again.
  346|  29.5k|    if (!ParseKey(&ikey_)) {
  ------------------
  |  Branch (346:9): [True: 0, False: 29.5k]
  ------------------
  347|      0|      return false;
  348|      0|    }
  349|  29.5k|    return true;
  350|  29.5k|  }

_ZN7rocksdb17AppendInternalKeyEPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_17ParsedInternalKeyE:
   57|   149M|void AppendInternalKey(std::string* result, const ParsedInternalKey& key) {
   58|   149M|  result->append(key.user_key.data(), key.user_key.size());
   59|   149M|  PutFixed64(result, PackSequenceAndType(key.sequence, key.type));
   60|   149M|}
_ZNK7rocksdb21InternalKeyComparator7CompareERKNS_17ParsedInternalKeyES3_:
  202|  1.21G|                                   const ParsedInternalKey& b) const {
  203|       |  // Order by:
  204|       |  //    increasing user key (according to user-supplied comparator)
  205|       |  //    decreasing sequence number
  206|       |  //    decreasing type (though sequence# should be enough to disambiguate)
  207|  1.21G|  int r = user_comparator_.Compare(a.user_key, b.user_key);
  208|  1.21G|  if (r == 0) {
  ------------------
  |  Branch (208:7): [True: 971M, False: 245M]
  ------------------
  209|   971M|    if (a.sequence > b.sequence) {
  ------------------
  |  Branch (209:9): [True: 485M, False: 485M]
  ------------------
  210|   485M|      r = -1;
  211|   485M|    } else if (a.sequence < b.sequence) {
  ------------------
  |  Branch (211:16): [True: 485M, False: 3.18k]
  ------------------
  212|   485M|      r = +1;
  213|   485M|    } else if (a.type > b.type) {
  ------------------
  |  Branch (213:16): [True: 1.30k, False: 1.87k]
  ------------------
  214|  1.30k|      r = -1;
  215|  1.87k|    } else if (a.type < b.type) {
  ------------------
  |  Branch (215:16): [True: 0, False: 1.87k]
  ------------------
  216|      0|      r = +1;
  217|      0|    }
  218|   971M|  }
  219|  1.21G|  return r;
  220|  1.21G|}
_ZNK7rocksdb21InternalKeyComparator7CompareERKNS_5SliceERKNS_17ParsedInternalKeyE:
  223|   177k|                                   const ParsedInternalKey& b) const {
  224|       |  // Order by:
  225|       |  //    increasing user key (according to user-supplied comparator)
  226|       |  //    decreasing sequence number
  227|       |  //    decreasing type (though sequence# should be enough to disambiguate)
  228|   177k|  int r = user_comparator_.Compare(ExtractUserKey(a), b.user_key);
  229|   177k|  if (r == 0) {
  ------------------
  |  Branch (229:7): [True: 5.41k, False: 172k]
  ------------------
  230|  5.41k|    const uint64_t anum =
  231|  5.41k|        DecodeFixed64(a.data() + a.size() - kNumInternalBytes);
  232|  5.41k|    const uint64_t bnum = (b.sequence << 8) | b.type;
  233|  5.41k|    if (anum > bnum) {
  ------------------
  |  Branch (233:9): [True: 3.21k, False: 2.19k]
  ------------------
  234|  3.21k|      r = -1;
  235|  3.21k|    } else if (anum < bnum) {
  ------------------
  |  Branch (235:16): [True: 2.19k, False: 0]
  ------------------
  236|  2.19k|      r = +1;
  237|  2.19k|    }
  238|  5.41k|  }
  239|   177k|  return r;
  240|   177k|}
_ZNK7rocksdb21InternalKeyComparator7CompareERKNS_17ParsedInternalKeyERKNS_5SliceE:
  243|   150k|                                   const Slice& b) const {
  244|   150k|  return -Compare(b, a);
  245|   150k|}
_ZN7rocksdb7IterKey13EnlargeBufferEm:
  273|  16.5k|void IterKey::EnlargeBuffer(size_t key_size) {
  274|       |  // If size is smaller than buffer size, continue using current buffer,
  275|       |  // or the static allocated one, as default
  276|  16.5k|  assert(key_size > buf_size_);
  277|       |  // Need to enlarge the buffer.
  278|  16.5k|  ResetBuffer();
  279|  16.5k|  buf_ = new char[key_size];
  280|  16.5k|  buf_size_ = key_size;
  281|  16.5k|}

_ZNK7rocksdb21InternalKeyComparator7CompareERKNS_5SliceES3_:
 1001|  38.2M|                                          const Slice& bkey) const {
 1002|       |  // Order by:
 1003|       |  //    increasing user key (according to user-supplied comparator)
 1004|       |  //    decreasing sequence number
 1005|       |  //    decreasing type (though sequence# should be enough to disambiguate)
 1006|  38.2M|  int r = user_comparator_.Compare(ExtractUserKey(akey), ExtractUserKey(bkey));
 1007|  38.2M|  if (r == 0) {
  ------------------
  |  Branch (1007:7): [True: 37.6M, False: 585k]
  ------------------
 1008|  37.6M|    const uint64_t anum =
 1009|  37.6M|        DecodeFixed64(akey.data() + akey.size() - kNumInternalBytes);
 1010|  37.6M|    const uint64_t bnum =
 1011|  37.6M|        DecodeFixed64(bkey.data() + bkey.size() - kNumInternalBytes);
 1012|  37.6M|    if (anum > bnum) {
  ------------------
  |  Branch (1012:9): [True: 37.6M, False: 1.60k]
  ------------------
 1013|  37.6M|      r = -1;
 1014|  37.6M|    } else if (anum < bnum) {
  ------------------
  |  Branch (1014:16): [True: 1.60k, False: 0]
  ------------------
 1015|  1.60k|      r = +1;
 1016|  1.60k|    }
 1017|  37.6M|  }
 1018|  38.2M|  return r;
 1019|  38.2M|}
_ZN7rocksdb19PackSequenceAndTypeEmNS_9ValueTypeE:
  179|   152M|inline uint64_t PackSequenceAndType(uint64_t seq, ValueType t) {
  180|   152M|  assert(seq <= kMaxSequenceNumber);
  181|       |  // kTypeMaxValid is used in TruncatedRangeDelIterator, see its constructor.
  182|   152M|  assert(IsExtendedValueType(t) || t == kTypeMaxValid);
  183|   152M|  return (seq << 8) | t;
  184|   152M|}
_ZN7rocksdb14ExtractUserKeyERKNS_5SliceE:
  324|   167M|inline Slice ExtractUserKey(const Slice& internal_key) {
  325|   167M|  assert(internal_key.size() >= kNumInternalBytes);
  326|   167M|  return Slice(internal_key.data(), internal_key.size() - kNumInternalBytes);
  327|   167M|}
_ZNK7rocksdb21InternalKeyComparator15user_comparatorEv:
  413|  81.4M|  const Comparator* user_comparator() const {
  414|  81.4M|    return user_comparator_.user_comparator();
  415|  81.4M|  }
_ZN7rocksdb25StripTimestampFromUserKeyERKNS_5SliceEm:
  340|  2.56M|inline Slice StripTimestampFromUserKey(const Slice& user_key, size_t ts_sz) {
  341|  2.56M|  Slice ret = user_key;
  342|  2.56M|  ret.remove_suffix(ts_sz);
  343|  2.56M|  return ret;
  344|  2.56M|}
_ZN7rocksdb11InternalKeyC2ERKNS_5SliceEmNS_9ValueTypeE:
  436|   262k|  InternalKey(const Slice& _user_key, SequenceNumber s, ValueType t) {
  437|   262k|    AppendInternalKey(&rep_, ParsedInternalKey(_user_key, s, t));
  438|   262k|  }
_ZN7rocksdb17ParsedInternalKeyC2ERKNS_5SliceERKmNS_9ValueTypeE:
  150|   413M|      : user_key(u), sequence(seq), type(t) {}
_ZNK7rocksdb11InternalKey6EncodeEv:
  465|   187M|  Slice Encode() const {
  466|   187M|    assert(!rep_.empty());
  467|   187M|    return rep_;
  468|   187M|  }
_ZN7rocksdb11InternalKeyC2Ev:
  435|   303k|  InternalKey() {}  // Leave rep_ as empty to indicate it is invalid
_ZNK7rocksdb11InternalKey8user_keyEv:
  470|  8.96k|  Slice user_key() const { return ExtractUserKey(rep_); }
_ZN7rocksdb17ParsedInternalKeyC2Ev:
  147|   271k|  {}                         // Intentionally left uninitialized (for speed)
_ZN7rocksdb21InternalKeyComparatorC2EPKNS_10ComparatorE:
  398|   115k|  explicit InternalKeyComparator(const Comparator* c) : user_comparator_(c) {}
_ZNK7rocksdb11InternalKey5ValidEv:
  458|  72.1k|  bool Valid() const {
  459|  72.1k|    ParsedInternalKey parsed;
  460|  72.1k|    return (ParseInternalKey(Slice(rep_), &parsed, false /* log_err_key */)
  461|  72.1k|                .ok());  // TODO
  462|  72.1k|  }
_ZN7rocksdb11InternalKey10DecodeFromERKNS_5SliceE:
  464|  37.4M|  void DecodeFrom(const Slice& s) { rep_.assign(s.data(), s.size()); }
_ZNK7rocksdb11InternalKey4sizeEv:
  471|   296k|  size_t size() const { return rep_.size(); }
_ZN7rocksdb11InternalKey3SetERKNS_5SliceEmNS_9ValueTypeE:
  473|   149M|  void Set(const Slice& _user_key, SequenceNumber s, ValueType t) {
  474|   149M|    SetFrom(ParsedInternalKey(_user_key, s, t));
  475|   149M|  }
_ZN7rocksdb11InternalKey7SetFromERKNS_17ParsedInternalKeyE:
  485|   149M|  void SetFrom(const ParsedInternalKey& p) {
  486|   149M|    rep_.clear();
  487|   149M|    AppendInternalKey(&rep_, p);
  488|   149M|  }
_ZN7rocksdb7IterKeyC2Ev:
  572|  73.1k|        is_user_key_(true) {}
_ZN7rocksdb7IterKeyD2Ev:
  577|  73.1k|  ~IterKey() { ResetBuffer(); }
_ZN7rocksdb7IterKey12SetIsUserKeyEb:
  580|  38.6k|  void SetIsUserKey(bool is_user_key) { is_user_key_ = is_user_key; }
_ZNK7rocksdb7IterKey14GetInternalKeyEv:
  587|  1.01M|  Slice GetInternalKey() const {
  588|  1.01M|    assert(!IsUserKey());
  589|  1.01M|    return Slice(key_, key_size_);
  590|  1.01M|  }
_ZNK7rocksdb7IterKey10GetUserKeyEv:
  594|   986k|  Slice GetUserKey() const {
  595|   986k|    if (IsUserKey()) {
  ------------------
  |  Branch (595:9): [True: 263k, False: 722k]
  ------------------
  596|   263k|      return Slice(key_, key_size_);
  597|   722k|    } else {
  598|   722k|      assert(key_size_ >= kNumInternalBytes);
  599|   722k|      return Slice(key_, key_size_ - kNumInternalBytes);
  600|   722k|    }
  601|   986k|  }
_ZNK7rocksdb7IterKey4SizeEv:
  603|   471k|  size_t Size() const { return key_size_; }
_ZN7rocksdb7IterKey5ClearEv:
  605|   536k|  void Clear() { key_size_ = 0; }
_ZN7rocksdb7IterKey10TrimAppendEmPKcm:
  612|   153k|                  const size_t non_shared_len) {
  613|   153k|    assert(shared_len <= key_size_);
  614|   153k|    size_t total_size = shared_len + non_shared_len;
  615|       |
  616|   153k|    if (IsKeyPinned() /* key is not in buf_ */) {
  ------------------
  |  Branch (616:9): [True: 10.4k, False: 143k]
  ------------------
  617|       |      // Copy the key from external memory to buf_ (copy shared_len bytes)
  618|  10.4k|      EnlargeBufferIfNeeded(total_size);
  619|  10.4k|      memcpy(buf_, key_, shared_len);
  620|   143k|    } else if (total_size > buf_size_) {
  ------------------
  |  Branch (620:16): [True: 5.06k, False: 138k]
  ------------------
  621|       |      // Need to allocate space, delete previous space
  622|  5.06k|      char* p = new char[total_size];
  623|  5.06k|      memcpy(p, key_, shared_len);
  624|       |
  625|  5.06k|      if (buf_ != space_) {
  ------------------
  |  Branch (625:11): [True: 4.96k, False: 101]
  ------------------
  626|  4.96k|        delete[] buf_;
  627|  4.96k|      }
  628|       |
  629|  5.06k|      buf_ = p;
  630|  5.06k|      buf_size_ = total_size;
  631|  5.06k|    }
  632|       |
  633|   153k|    memcpy(buf_ + shared_len, non_shared_data, non_shared_len);
  634|   153k|    key_ = buf_;
  635|   153k|    key_size_ = total_size;
  636|   153k|  }
_ZN7rocksdb7IterKey6SetKeyERKNS_5SliceEb:
  694|   347k|  Slice SetKey(const Slice& key, bool copy = true) {
  695|       |    // is_user_key_ expected to be set already via SetIsUserKey
  696|   347k|    return SetKeyImpl(key, copy);
  697|   347k|  }
_ZN7rocksdb7IterKey10SetUserKeyERKNS_5SliceEb:
  702|  38.4k|  Slice SetUserKey(const Slice& key, bool copy = true) {
  703|  38.4k|    is_user_key_ = true;
  704|  38.4k|    return SetKeyImpl(key, copy);
  705|  38.4k|  }
_ZN7rocksdb7IterKey14SetInternalKeyERKNS_5SliceEb:
  707|   123k|  Slice SetInternalKey(const Slice& key, bool copy = true) {
  708|   123k|    is_user_key_ = false;
  709|   123k|    return SetKeyImpl(key, copy);
  710|   123k|  }
_ZN7rocksdb7IterKey14SetInternalKeyERKNS_5SliceEPNS_17ParsedInternalKeyE:
  714|   123k|  Slice SetInternalKey(const Slice& key, ParsedInternalKey* ikey) {
  715|   123k|    size_t key_n = key.size();
  716|   123k|    assert(key_n >= kNumInternalBytes);
  717|   123k|    SetInternalKey(key);
  718|   123k|    ikey->user_key = Slice(key_, key_n - kNumInternalBytes);
  719|   123k|    return Slice(key_, key_n);
  720|   123k|  }
_ZN7rocksdb7IterKey17UpdateInternalKeyEmNS_9ValueTypeEPKNS_5SliceE:
  733|   722k|  void UpdateInternalKey(uint64_t seq, ValueType t, const Slice* ts = nullptr) {
  734|   722k|    assert(!IsKeyPinned());
  735|   722k|    assert(key_size_ >= kNumInternalBytes);
  736|   722k|    if (ts) {
  ------------------
  |  Branch (736:9): [True: 0, False: 722k]
  ------------------
  737|      0|      assert(key_size_ >= kNumInternalBytes + ts->size());
  738|      0|      memcpy(&buf_[key_size_ - kNumInternalBytes - ts->size()], ts->data(),
  739|      0|             ts->size());
  740|      0|    }
  741|   722k|    uint64_t newval = (seq << 8) | t;
  742|   722k|    EncodeFixed64(&buf_[key_size_ - kNumInternalBytes], newval);
  743|   722k|  }
_ZNK7rocksdb7IterKey11IsKeyPinnedEv:
  745|   623k|  bool IsKeyPinned() const { return (key_ != buf_); }
_ZNK7rocksdb7IterKey9IsUserKeyEv:
  803|  1.48M|  bool IsUserKey() const { return is_user_key_; }
_ZN7rocksdb7IterKey10SetKeyImplERKNS_5SliceEb:
  813|   509k|  Slice SetKeyImpl(const Slice& key, bool copy) {
  814|   509k|    size_t size = key.size();
  815|   509k|    if (copy) {
  ------------------
  |  Branch (815:9): [True: 162k, False: 347k]
  ------------------
  816|       |      // Copy key to buf_
  817|   162k|      EnlargeBufferIfNeeded(size);
  818|   162k|      memcpy(buf_, key.data(), size);
  819|   162k|      key_ = buf_;
  820|   347k|    } else {
  821|       |      // Update key_ to point to external memory
  822|   347k|      key_ = key.data();
  823|   347k|    }
  824|   509k|    key_size_ = size;
  825|   509k|    return Slice(key_, key_size_);
  826|   509k|  }
_ZN7rocksdb7IterKey11ResetBufferEv:
  828|  89.6k|  void ResetBuffer() {
  829|  89.6k|    if (buf_ != space_) {
  ------------------
  |  Branch (829:9): [True: 16.6k, False: 73.0k]
  ------------------
  830|  16.6k|      delete[] buf_;
  831|  16.6k|      buf_ = space_;
  832|  16.6k|    }
  833|  89.6k|    buf_size_ = sizeof(space_);
  834|  89.6k|    key_size_ = 0;
  835|  89.6k|  }
_ZN7rocksdb7IterKey21EnlargeBufferIfNeededEm:
  842|   172k|  void EnlargeBufferIfNeeded(size_t key_size) {
  843|       |    // If size is smaller than buffer size, continue using current buffer,
  844|       |    // or the static allocated one, as default
  845|   172k|    if (key_size > buf_size_) {
  ------------------
  |  Branch (845:9): [True: 16.5k, False: 156k]
  ------------------
  846|  16.5k|      EnlargeBuffer(key_size);
  847|  16.5k|    }
  848|   172k|  }
_ZN7rocksdb25InternalKeySliceTransformC2EPKNS_14SliceTransformE:
  875|  4.48k|      : transform_(transform) {}
_ZN7rocksdb14RangeTombstoneC2ENS_5SliceES1_m:
  935|   131k|      : start_key_(sk), end_key_(ek), seq_(sn) {}
_ZNK7rocksdb14RangeTombstone9SerializeEv:
  968|   131k|  std::pair<InternalKey, Slice> Serialize() const {
  969|   131k|    auto key = InternalKey(start_key_, seq_, kTypeRangeDeletion);
  970|   131k|    return std::make_pair(std::move(key), end_key_);
  971|   131k|  }
_ZNK7rocksdb14RangeTombstone15SerializeEndKeyEv:
  985|   131k|  InternalKey SerializeEndKey() const {
  986|   131k|    if (!ts_.empty()) {
  ------------------
  |  Branch (986:9): [True: 0, False: 131k]
  ------------------
  987|      0|      static constexpr char kTsMax[] = "\xff\xff\xff\xff\xff\xff\xff\xff\xff";
  988|      0|      if (ts_.size() <= strlen(kTsMax)) {
  ------------------
  |  Branch (988:11): [True: 0, False: 0]
  ------------------
  989|      0|        return InternalKey(end_key_, kMaxSequenceNumber, kTypeRangeDeletion,
  990|      0|                           Slice(kTsMax, ts_.size()));
  991|      0|      } else {
  992|      0|        return InternalKey(end_key_, kMaxSequenceNumber, kTypeRangeDeletion,
  993|      0|                           std::string(ts_.size(), '\xff'));
  994|      0|      }
  995|      0|    }
  996|   131k|    return InternalKey(end_key_, kMaxSequenceNumber, kTypeRangeDeletion);
  997|   131k|  }
_ZN7rocksdb27ParsedInternalKeyComparatorC2EPKNS_21InternalKeyComparatorE:
 1091|  10.3k|      : cmp(c) {}
_ZNK7rocksdb27ParsedInternalKeyComparatorclERKNS_17ParsedInternalKeyES3_:
 1094|  1.21G|                  const ParsedInternalKey& b) const {
 1095|  1.21G|    return cmp->Compare(a, b) < 0;
 1096|  1.21G|  }
_ZN7rocksdb11IsValueTypeENS_9ValueTypeE:
  111|  1.26M|inline bool IsValueType(ValueType t) {
  112|  1.26M|  return t <= kTypeMerge || kTypeSingleDeletion == t || kTypeBlobIndex == t ||
  ------------------
  |  Branch (112:10): [True: 1.12M, False: 137k]
  |  Branch (112:29): [True: 0, False: 137k]
  |  Branch (112:57): [True: 0, False: 137k]
  ------------------
  113|  1.26M|         kTypeDeletionWithTimestamp == t || kTypeWideColumnEntity == t ||
  ------------------
  |  Branch (113:10): [True: 0, False: 137k]
  |  Branch (113:45): [True: 0, False: 137k]
  ------------------
  114|  1.26M|         kTypeValuePreferredSeqno == t;
  ------------------
  |  Branch (114:10): [True: 0, False: 137k]
  ------------------
  115|  1.26M|}
_ZN7rocksdb19IsExtendedValueTypeENS_9ValueTypeE:
  121|  1.09M|inline bool IsExtendedValueType(ValueType t) {
  122|  1.09M|  return IsValueType(t) || t == kTypeRangeDeletion || t == kTypeMaxValid;
  ------------------
  |  Branch (122:10): [True: 1.08M, False: 6.36k]
  |  Branch (122:28): [True: 6.36k, False: 0]
  |  Branch (122:55): [True: 0, False: 0]
  ------------------
  123|  1.09M|}
_ZN7rocksdb21UnPackSequenceAndTypeEmPmPNS_9ValueTypeE:
  189|  1.26M|                                  ValueType* t) {
  190|  1.26M|  *seq = packed >> 8;
  191|  1.26M|  *t = static_cast<ValueType>(packed & 0xff);
  192|       |
  193|       |  // Commented the following two assertions in order to test key-value checksum
  194|       |  // on corrupted keys without crashing ("DbKvChecksumTest").
  195|       |  // assert(*seq <= kMaxSequenceNumber);
  196|       |  // assert(IsExtendedValueType(*t));
  197|  1.26M|}
_ZN7rocksdb24ExtractInternalKeyFooterERKNS_5SliceE:
  364|   165k|inline uint64_t ExtractInternalKeyFooter(const Slice& internal_key) {
  365|   165k|  assert(internal_key.size() >= kNumInternalBytes);
  366|   165k|  const size_t n = internal_key.size();
  367|   165k|  return DecodeFixed64(internal_key.data() + n - kNumInternalBytes);
  368|   165k|}
_ZN7rocksdb16ExtractValueTypeERKNS_5SliceE:
  372|   165k|inline ValueType ExtractValueType(const Slice& internal_key) {
  373|   165k|  uint64_t num = ExtractInternalKeyFooter(internal_key);
  374|   165k|  unsigned char c = num & 0xff;
  375|   165k|  return static_cast<ValueType>(c);
  376|   165k|}
_ZNK7rocksdb21InternalKeyComparator7CompareERKNS_11InternalKeyES3_:
  511|   260k|                                          const InternalKey& b) const {
  512|   260k|  return Compare(a.Encode(), b.Encode());
  513|   260k|}
_ZN7rocksdb16ParseInternalKeyERKNS_5SliceEPNS_17ParsedInternalKeyEb:
  516|  1.15M|                               ParsedInternalKey* result, bool log_err_key) {
  517|  1.15M|  const size_t n = internal_key.size();
  518|       |
  519|  1.15M|  if (n < kNumInternalBytes) {
  ------------------
  |  Branch (519:7): [True: 63.1k, False: 1.09M]
  ------------------
  520|  63.1k|    return Status::Corruption("Corrupted Key: Internal Key too small. Size=" +
  521|  63.1k|                              std::to_string(n) + ". ");
  522|  63.1k|  }
  523|       |
  524|  1.09M|  uint64_t num = DecodeFixed64(internal_key.data() + n - kNumInternalBytes);
  525|  1.09M|  unsigned char c = num & 0xff;
  526|  1.09M|  result->sequence = num >> 8;
  527|  1.09M|  result->type = static_cast<ValueType>(c);
  528|  1.09M|  assert(result->type <= ValueType::kMaxValue);
  529|  1.09M|  result->user_key = Slice(internal_key.data(), n - kNumInternalBytes);
  530|       |
  531|  1.09M|  if (IsExtendedValueType(result->type)) {
  ------------------
  |  Branch (531:7): [True: 1.09M, False: 0]
  ------------------
  532|  1.09M|    return Status::OK();
  533|  1.09M|  } else {
  534|      0|    return Status::Corruption("Corrupted Key",
  535|      0|                              result->DebugString(log_err_key, true));
  536|      0|  }
  537|  1.09M|}
_ZN7rocksdb19GetInternalKeySeqnoERKNS_5SliceE:
  552|  37.9M|inline uint64_t GetInternalKeySeqno(const Slice& internal_key) {
  553|  37.9M|  const size_t n = internal_key.size();
  554|  37.9M|  assert(n >= kNumInternalBytes);
  555|  37.9M|  uint64_t num = DecodeFixed64(internal_key.data() + n - kNumInternalBytes);
  556|  37.9M|  return num >> 8;
  557|  37.9M|}
_ZNK7rocksdb21InternalKeyComparator13CompareKeySeqERKNS_5SliceES3_:
 1022|  26.6M|                                                const Slice& bkey) const {
 1023|       |  // Order by:
 1024|       |  //    increasing user key (according to user-supplied comparator)
 1025|       |  //    decreasing sequence number
 1026|  26.6M|  int r = user_comparator_.Compare(ExtractUserKey(akey), ExtractUserKey(bkey));
 1027|  26.6M|  if (r == 0) {
  ------------------
  |  Branch (1027:7): [True: 10.2M, False: 16.3M]
  ------------------
 1028|       |    // Shift the number to exclude the last byte which contains the value type
 1029|  10.2M|    const uint64_t anum =
 1030|  10.2M|        DecodeFixed64(akey.data() + akey.size() - kNumInternalBytes) >> 8;
 1031|  10.2M|    const uint64_t bnum =
 1032|  10.2M|        DecodeFixed64(bkey.data() + bkey.size() - kNumInternalBytes) >> 8;
 1033|  10.2M|    if (anum > bnum) {
  ------------------
  |  Branch (1033:9): [True: 2.20M, False: 8.09M]
  ------------------
 1034|  2.20M|      r = -1;
 1035|  8.09M|    } else if (anum < bnum) {
  ------------------
  |  Branch (1035:16): [True: 8.09M, False: 0]
  ------------------
 1036|  8.09M|      r = +1;
 1037|  8.09M|    }
 1038|  10.2M|  }
 1039|  26.6M|  return r;
 1040|  26.6M|}

_ZN7rocksdb12ErrorHandler19CancelErrorRecoveryEv:
  230|  9.02k|void ErrorHandler::CancelErrorRecovery() {
  231|  9.02k|  db_mutex_->AssertHeld();
  232|       |
  233|       |  // We'll release the lock before calling sfm, so make sure no new
  234|       |  // recovery gets scheduled at that point
  235|  9.02k|  auto_recovery_ = false;
  236|  9.02k|  SstFileManagerImpl* sfm =
  237|  9.02k|      static_cast<SstFileManagerImpl*>(db_options_.sst_file_manager.get());
  238|  9.02k|  if (sfm) {
  ------------------
  |  Branch (238:7): [True: 9.02k, False: 0]
  ------------------
  239|       |    // This may or may not cancel a pending recovery
  240|  9.02k|    db_mutex_->Unlock();
  241|  9.02k|    bool cancelled = sfm->CancelErrorRecovery(this);
  242|  9.02k|    db_mutex_->Lock();
  243|  9.02k|    if (cancelled) {
  ------------------
  |  Branch (243:9): [True: 0, False: 9.02k]
  ------------------
  244|      0|      recovery_in_prog_ = false;
  245|      0|    }
  246|  9.02k|  }
  247|       |
  248|       |  // If auto recovery is also runing to resume from the retryable error,
  249|       |  // we should wait and end the auto recovery.
  250|  9.02k|  EndAutoRecovery();
  251|  9.02k|}
_ZN7rocksdb12ErrorHandler15EndAutoRecoveryEv:
  773|  9.02k|void ErrorHandler::EndAutoRecovery() {
  774|  9.02k|  db_mutex_->AssertHeld();
  775|  9.02k|  if (!end_recovery_) {
  ------------------
  |  Branch (775:7): [True: 9.02k, False: 0]
  ------------------
  776|  9.02k|    end_recovery_ = true;
  777|  9.02k|  }
  778|  9.02k|  if (recovery_thread_) {
  ------------------
  |  Branch (778:7): [True: 0, False: 9.02k]
  ------------------
  779|       |    // Ensure only one thread can execute the join().
  780|      0|    std::unique_ptr<port::Thread> old_recovery_thread(
  781|      0|        std::move(recovery_thread_));
  782|      0|    db_mutex_->Unlock();
  783|      0|    cv_.SignalAll();
  784|      0|    old_recovery_thread->join();
  785|      0|    db_mutex_->Lock();
  786|      0|  }
  787|  9.02k|  TEST_SYNC_POINT("PostEndAutoRecovery");
  788|  9.02k|}

_ZN7rocksdb12ErrorHandlerC2EPNS_6DBImplERKNS_18ImmutableDBOptionsEPNS_17InstrumentedMutexE:
   48|  9.02k|        bg_error_stats_(db_options.statistics) {
   49|       |    // Clear the checked flag for uninitialized errors
   50|  9.02k|    bg_error_.PermitUncheckedError();
   51|  9.02k|    recovery_error_.PermitUncheckedError();
   52|  9.02k|  }
_ZN7rocksdb16DBRecoverContextC2Ev:
   29|  9.02k|        flush_after_recovery(false) {}
_ZN7rocksdb12ErrorHandler11IsDBStoppedEv:
   67|  1.36M|  bool IsDBStopped() { return is_db_stopped_.load(std::memory_order_acquire); }
_ZN7rocksdb12ErrorHandler15IsBGWorkStoppedEv:
   69|  18.0k|  bool IsBGWorkStopped() {
   70|  18.0k|    assert(db_mutex_);
   71|  18.0k|    db_mutex_->AssertHeld();
   72|  18.0k|    return !bg_error_.ok() &&
  ------------------
  |  Branch (72:12): [True: 0, False: 18.0k]
  ------------------
   73|  18.0k|           (bg_error_.severity() >= Status::Severity::kHardError ||
  ------------------
  |  Branch (73:13): [True: 0, False: 0]
  ------------------
   74|      0|            !auto_recovery_ || soft_error_no_bg_work_);
  ------------------
  |  Branch (74:13): [True: 0, False: 0]
  |  Branch (74:32): [True: 0, False: 0]
  ------------------
   75|  18.0k|  }
_ZN7rocksdb12ErrorHandler20IsRecoveryInProgressEv:
   79|  18.0k|  bool IsRecoveryInProgress() { return recovery_in_prog_; }
_ZNK7rocksdb12ErrorHandler16GetRecoveryErrorEv:
   63|  9.02k|  Status GetRecoveryError() const { return recovery_error_; }
_ZN7rocksdb12ErrorHandler18EnableAutoRecoveryEv:
   54|  9.02k|  void EnableAutoRecovery() { auto_recovery_ = true; }
_ZNK7rocksdb12ErrorHandler20GetFilesToQuarantineEv:
   89|  18.0k|  const autovector<uint64_t>& GetFilesToQuarantine() const {
   90|  18.0k|    db_mutex_->AssertHeld();
   91|  18.0k|    return files_to_quarantine_;
   92|  18.0k|  }

_ZN7rocksdb12EventHelpers17AppendCurrentTimeEPNS_10JSONWriterE:
   26|  4.48k|void EventHelpers::AppendCurrentTime(JSONWriter* jwriter) {
   27|  4.48k|  *jwriter << "time_micros"
   28|  4.48k|           << std::chrono::duration_cast<std::chrono::microseconds>(
   29|  4.48k|                  std::chrono::system_clock::now().time_since_epoch())
   30|  4.48k|                  .count();
   31|  4.48k|}
_ZN7rocksdb12EventHelpers30NotifyTableFileCreationStartedERKNSt3__16vectorINS1_10shared_ptrINS_13EventListenerEEENS1_9allocatorIS5_EEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS6_IcEEEESH_SH_iNS_23TableFileCreationReasonE:
   36|  4.48k|    const std::string& file_path, int job_id, TableFileCreationReason reason) {
   37|  4.48k|  if (listeners.empty()) {
  ------------------
  |  Branch (37:7): [True: 4.48k, False: 0]
  ------------------
   38|  4.48k|    return;
   39|  4.48k|  }
   40|      0|  TableFileCreationBriefInfo info;
   41|      0|  info.db_name = db_name;
   42|      0|  info.cf_name = cf_name;
   43|      0|  info.file_path = file_path;
   44|      0|  info.job_id = job_id;
   45|      0|  info.reason = reason;
   46|      0|  for (auto& listener : listeners) {
  ------------------
  |  Branch (46:23): [True: 0, False: 0]
  ------------------
   47|      0|    listener->OnTableFileCreationStarted(info);
   48|      0|  }
   49|      0|}
_ZN7rocksdb12EventHelpers37LogAndNotifyTableFileCreationFinishedEPNS_11EventLoggerERKNSt3__16vectorINS3_10shared_ptrINS_13EventListenerEEENS3_9allocatorIS7_EEEERKNS3_12basic_stringIcNS3_11char_traitsIcEENS8_IcEEEESJ_SJ_iRKNS_14FileDescriptorEmRKNS_15TablePropertiesENS_23TableFileCreationReasonERKNS_6StatusESJ_SJ_:
   79|  4.48k|    const std::string& file_checksum_func_name) {
   80|  4.48k|  if (s.ok() && event_logger) {
  ------------------
  |  Branch (80:7): [True: 4.48k, False: 0]
  |  Branch (80:17): [True: 4.48k, False: 0]
  ------------------
   81|  4.48k|    JSONWriter jwriter;
   82|  4.48k|    AppendCurrentTime(&jwriter);
   83|  4.48k|    jwriter << "cf_name" << cf_name << "job" << job_id << "event"
   84|  4.48k|            << "table_file_creation"
   85|  4.48k|            << "file_number" << fd.GetNumber() << "file_size"
   86|  4.48k|            << fd.GetFileSize() << "file_checksum"
   87|  4.48k|            << Slice(file_checksum).ToString(true) << "file_checksum_func_name"
   88|  4.48k|            << file_checksum_func_name << "smallest_seqno" << fd.smallest_seqno
   89|  4.48k|            << "largest_seqno" << fd.largest_seqno;
   90|       |
   91|       |    // table_properties
   92|  4.48k|    {
   93|  4.48k|      jwriter << "table_properties";
   94|  4.48k|      jwriter.StartObject();
   95|       |
   96|       |      // basic properties:
   97|  4.48k|      jwriter << "data_size" << table_properties.data_size << "index_size"
   98|  4.48k|              << table_properties.index_size << "index_partitions"
   99|  4.48k|              << table_properties.index_partitions << "top_level_index_size"
  100|  4.48k|              << table_properties.top_level_index_size
  101|  4.48k|              << "index_key_is_user_key"
  102|  4.48k|              << table_properties.index_key_is_user_key
  103|  4.48k|              << "index_value_is_delta_encoded"
  104|  4.48k|              << table_properties.index_value_is_delta_encoded << "filter_size"
  105|  4.48k|              << table_properties.filter_size << "raw_key_size"
  106|  4.48k|              << table_properties.raw_key_size << "raw_average_key_size"
  107|  4.48k|              << SafeDivide(table_properties.raw_key_size,
  108|  4.48k|                            table_properties.num_entries)
  109|  4.48k|              << "raw_value_size" << table_properties.raw_value_size
  110|  4.48k|              << "raw_average_value_size"
  111|  4.48k|              << SafeDivide(table_properties.raw_value_size,
  112|  4.48k|                            table_properties.num_entries)
  113|  4.48k|              << "num_data_blocks" << table_properties.num_data_blocks
  114|  4.48k|              << "num_entries" << table_properties.num_entries
  115|  4.48k|              << "num_filter_entries" << table_properties.num_filter_entries
  116|  4.48k|              << "num_deletions" << table_properties.num_deletions
  117|  4.48k|              << "num_merge_operands" << table_properties.num_merge_operands
  118|  4.48k|              << "num_range_deletions" << table_properties.num_range_deletions
  119|  4.48k|              << "format_version" << table_properties.format_version
  120|  4.48k|              << "fixed_key_len" << table_properties.fixed_key_len
  121|  4.48k|              << "filter_policy" << table_properties.filter_policy_name
  122|  4.48k|              << "column_family_name" << table_properties.column_family_name
  123|  4.48k|              << "column_family_id" << table_properties.column_family_id
  124|  4.48k|              << "comparator" << table_properties.comparator_name
  125|  4.48k|              << "user_defined_timestamps_persisted"
  126|  4.48k|              << table_properties.user_defined_timestamps_persisted
  127|  4.48k|              << "merge_operator" << table_properties.merge_operator_name
  128|  4.48k|              << "prefix_extractor_name"
  129|  4.48k|              << table_properties.prefix_extractor_name << "property_collectors"
  130|  4.48k|              << table_properties.property_collectors_names << "compression"
  131|  4.48k|              << table_properties.compression_name << "compression_options"
  132|  4.48k|              << table_properties.compression_options << "creation_time"
  133|  4.48k|              << table_properties.creation_time << "oldest_key_time"
  134|  4.48k|              << table_properties.oldest_key_time << "file_creation_time"
  135|  4.48k|              << table_properties.file_creation_time
  136|  4.48k|              << "slow_compression_estimated_data_size"
  137|  4.48k|              << table_properties.slow_compression_estimated_data_size
  138|  4.48k|              << "fast_compression_estimated_data_size"
  139|  4.48k|              << table_properties.fast_compression_estimated_data_size
  140|  4.48k|              << "db_id" << table_properties.db_id << "db_session_id"
  141|  4.48k|              << table_properties.db_session_id << "orig_file_number"
  142|  4.48k|              << table_properties.orig_file_number << "seqno_to_time_mapping";
  143|       |
  144|  4.48k|      if (table_properties.seqno_to_time_mapping.empty()) {
  ------------------
  |  Branch (144:11): [True: 4.48k, False: 0]
  ------------------
  145|  4.48k|        jwriter << "N/A";
  146|  4.48k|      } else {
  147|      0|        SeqnoToTimeMapping tmp;
  148|      0|        Status status = tmp.DecodeFrom(table_properties.seqno_to_time_mapping);
  149|      0|        if (status.ok()) {
  ------------------
  |  Branch (149:13): [True: 0, False: 0]
  ------------------
  150|      0|          jwriter << tmp.ToHumanString();
  151|      0|        } else {
  152|      0|          jwriter << "Invalid";
  153|      0|        }
  154|      0|      }
  155|       |
  156|       |      // user collected properties
  157|  4.48k|      for (const auto& prop : table_properties.readable_properties) {
  ------------------
  |  Branch (157:29): [True: 0, False: 4.48k]
  ------------------
  158|      0|        jwriter << prop.first << prop.second;
  159|      0|      }
  160|  4.48k|      jwriter.EndObject();
  161|  4.48k|    }
  162|       |
  163|  4.48k|    if (oldest_blob_file_number != kInvalidBlobFileNumber) {
  ------------------
  |  Branch (163:9): [True: 0, False: 4.48k]
  ------------------
  164|      0|      jwriter << "oldest_blob_file_number" << oldest_blob_file_number;
  165|      0|    }
  166|       |
  167|  4.48k|    jwriter.EndObject();
  168|       |
  169|  4.48k|    event_logger->Log(jwriter);
  170|  4.48k|  }
  171|       |
  172|  4.48k|  if (listeners.empty()) {
  ------------------
  |  Branch (172:7): [True: 4.48k, False: 0]
  ------------------
  173|  4.48k|    return;
  174|  4.48k|  }
  175|      0|  TableFileCreationInfo info;
  176|      0|  info.db_name = db_name;
  177|      0|  info.cf_name = cf_name;
  178|      0|  info.file_path = file_path;
  179|      0|  info.file_size = fd.file_size;
  180|      0|  info.job_id = job_id;
  181|      0|  info.table_properties = table_properties;
  182|      0|  info.reason = reason;
  183|      0|  info.status = s;
  184|      0|  info.file_checksum = file_checksum;
  185|      0|  info.file_checksum_func_name = file_checksum_func_name;
  186|      0|  for (auto& listener : listeners) {
  ------------------
  |  Branch (186:23): [True: 0, False: 0]
  ------------------
  187|      0|    listener->OnTableFileCreated(info);
  188|      0|  }
  189|      0|  info.status.PermitUncheckedError();
  190|      0|}
event_helpers.cc:_ZN7rocksdb12_GLOBAL__N_110SafeDivideImEET_S2_S2_:
   21|  8.96k|inline T SafeDivide(T a, T b) {
   22|  8.96k|  return b == 0 ? 0 : a / b;
  ------------------
  |  Branch (22:10): [True: 0, False: 8.96k]
  ------------------
   23|  8.96k|}

_ZN7rocksdb11FileIndexerC2EPKNS_10ComparatorE:
   21|  36.1k|    : num_levels_(0), ucmp_(ucmp), level_rb_(nullptr) {}
_ZN7rocksdb11FileIndexer11UpdateIndexEPNS_5ArenaEmPNSt3__16vectorIPNS_12FileMetaDataENS3_9allocatorIS6_EEEE:
   76|  27.0k|                              std::vector<FileMetaData*>* const files) {
   77|  27.0k|  if (files == nullptr) {
  ------------------
  |  Branch (77:7): [True: 0, False: 27.0k]
  ------------------
   78|      0|    return;
   79|      0|  }
   80|  27.0k|  if (num_levels == 0) {  // uint_32 0-1 would cause bad behavior
  ------------------
  |  Branch (80:7): [True: 22.6k, False: 4.48k]
  ------------------
   81|  22.6k|    num_levels_ = num_levels;
   82|  22.6k|    return;
   83|  22.6k|  }
   84|  4.48k|  assert(level_rb_ == nullptr);  // level_rb_ should be init here
   85|       |
   86|  4.48k|  num_levels_ = num_levels;
   87|  4.48k|  next_level_index_.resize(num_levels);
   88|       |
   89|  4.48k|  char* mem = arena->AllocateAligned(num_levels_ * sizeof(int32_t));
   90|  4.48k|  level_rb_ = new (mem) int32_t[num_levels_];
   91|  8.96k|  for (size_t i = 0; i < num_levels_; i++) {
  ------------------
  |  Branch (91:22): [True: 4.48k, False: 4.48k]
  ------------------
   92|  4.48k|    level_rb_[i] = -1;
   93|  4.48k|  }
   94|       |
   95|       |  // L1 - Ln-1
   96|  4.48k|  for (size_t level = 1; level < num_levels_ - 1; ++level) {
  ------------------
  |  Branch (96:26): [True: 0, False: 4.48k]
  ------------------
   97|      0|    const auto& upper_files = files[level];
   98|      0|    const int32_t upper_size = static_cast<int32_t>(upper_files.size());
   99|      0|    const auto& lower_files = files[level + 1];
  100|      0|    level_rb_[level] = static_cast<int32_t>(upper_files.size()) - 1;
  101|      0|    if (upper_size == 0) {
  ------------------
  |  Branch (101:9): [True: 0, False: 0]
  ------------------
  102|      0|      continue;
  103|      0|    }
  104|      0|    IndexLevel& index_level = next_level_index_[level];
  105|      0|    index_level.num_index = upper_size;
  106|      0|    mem = arena->AllocateAligned(upper_size * sizeof(IndexUnit));
  107|      0|    index_level.index_units = new (mem) IndexUnit[upper_size];
  108|       |
  109|      0|    CalculateLB(
  110|      0|        upper_files, lower_files, &index_level,
  111|      0|        [this](const FileMetaData* a, const FileMetaData* b) -> int {
  112|      0|          return ucmp_->CompareWithoutTimestamp(a->smallest.user_key(),
  113|      0|                                                b->largest.user_key());
  114|      0|        },
  115|      0|        [](IndexUnit* index, int32_t f_idx) { index->smallest_lb = f_idx; });
  116|      0|    CalculateLB(
  117|      0|        upper_files, lower_files, &index_level,
  118|      0|        [this](const FileMetaData* a, const FileMetaData* b) -> int {
  119|      0|          return ucmp_->CompareWithoutTimestamp(a->largest.user_key(),
  120|      0|                                                b->largest.user_key());
  121|      0|        },
  122|      0|        [](IndexUnit* index, int32_t f_idx) { index->largest_lb = f_idx; });
  123|      0|    CalculateRB(
  124|      0|        upper_files, lower_files, &index_level,
  125|      0|        [this](const FileMetaData* a, const FileMetaData* b) -> int {
  126|      0|          return ucmp_->CompareWithoutTimestamp(a->smallest.user_key(),
  127|      0|                                                b->smallest.user_key());
  128|      0|        },
  129|      0|        [](IndexUnit* index, int32_t f_idx) { index->smallest_rb = f_idx; });
  130|      0|    CalculateRB(
  131|      0|        upper_files, lower_files, &index_level,
  132|      0|        [this](const FileMetaData* a, const FileMetaData* b) -> int {
  133|      0|          return ucmp_->CompareWithoutTimestamp(a->largest.user_key(),
  134|      0|                                                b->smallest.user_key());
  135|      0|        },
  136|      0|        [](IndexUnit* index, int32_t f_idx) { index->largest_rb = f_idx; });
  137|      0|  }
  138|       |
  139|  4.48k|  level_rb_[num_levels_ - 1] =
  140|  4.48k|      static_cast<int32_t>(files[num_levels_ - 1].size()) - 1;
  141|  4.48k|}

_ZN7rocksdb11FileIndexer10IndexLevelC2Ev:
  121|  4.48k|    IndexLevel() : num_index(0), index_units(nullptr) {}

_ZN7rocksdb14FlushScheduler20TakeNextColumnFamilyEv:
   36|  1.37M|ColumnFamilyData* FlushScheduler::TakeNextColumnFamily() {
   37|  1.37M|  while (true) {
  ------------------
  |  Branch (37:10): [Folded - Ignored]
  ------------------
   38|  1.37M|    if (head_.load(std::memory_order_relaxed) == nullptr) {
  ------------------
  |  Branch (38:9): [True: 1.37M, False: 0]
  ------------------
   39|  1.37M|      return nullptr;
   40|  1.37M|    }
   41|       |
   42|       |    // dequeue the head
   43|      0|    Node* node = head_.load(std::memory_order_relaxed);
   44|      0|    head_.store(node->next, std::memory_order_relaxed);
   45|      0|    ColumnFamilyData* cfd = node->column_family;
   46|      0|    delete node;
   47|       |
   48|       |#ifndef NDEBUG
   49|       |    {
   50|       |      std::lock_guard<std::mutex> lock(checking_mutex_);
   51|       |      auto iter = checking_set_.find(cfd);
   52|       |      assert(iter != checking_set_.end());
   53|       |      checking_set_.erase(iter);
   54|       |    }
   55|       |#endif  // NDEBUG
   56|       |
   57|      0|    if (!cfd->IsDropped()) {
  ------------------
  |  Branch (57:9): [True: 0, False: 0]
  ------------------
   58|       |      // success
   59|      0|      return cfd;
   60|      0|    }
   61|       |
   62|       |    // no longer relevant, retry
   63|      0|    cfd->UnrefAndTryDelete();
   64|      0|  }
   65|  1.37M|}
_ZN7rocksdb14FlushScheduler5EmptyEv:
   67|  1.36M|bool FlushScheduler::Empty() {
   68|  1.36M|  auto rv = head_.load(std::memory_order_relaxed) == nullptr;
   69|       |#ifndef NDEBUG
   70|       |  std::lock_guard<std::mutex> lock(checking_mutex_);
   71|       |  // Empty is allowed to be called concurrnetly with ScheduleFlush. It would
   72|       |  // only miss the recent schedules.
   73|       |  assert((rv == checking_set_.empty()) || rv);
   74|       |#endif  // NDEBUG
   75|  1.36M|  return rv;
   76|  1.36M|}
_ZN7rocksdb14FlushScheduler5ClearEv:
   78|  13.5k|void FlushScheduler::Clear() {
   79|  13.5k|  ColumnFamilyData* cfd;
   80|  13.5k|  while ((cfd = TakeNextColumnFamily()) != nullptr) {
  ------------------
  |  Branch (80:10): [True: 0, False: 13.5k]
  ------------------
   81|      0|    cfd->UnrefAndTryDelete();
   82|      0|  }
   83|  13.5k|  assert(head_.load(std::memory_order_relaxed) == nullptr);
   84|  13.5k|}

_ZN7rocksdb14FlushSchedulerC2Ev:
   25|  9.02k|  FlushScheduler() : head_(nullptr) {}

_ZN7rocksdb13InternalStatsC2EiPNS_11SystemClockEPNS_16ColumnFamilyDataE:
  642|  9.02k|      started_at_(clock->NowMicros()) {
  643|  9.02k|  Cache* block_cache = GetBlockCacheForStats();
  644|  9.02k|  if (block_cache) {
  ------------------
  |  Branch (644:7): [True: 9.02k, False: 0]
  ------------------
  645|       |    // Extract or create stats collector. Could fail in rare cases.
  646|  9.02k|    Status s = CacheEntryStatsCollector<CacheEntryRoleStats>::GetShared(
  647|  9.02k|        block_cache, clock_, &cache_entry_stats_collector_);
  648|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (648:9): [True: 9.02k, False: 0]
  ------------------
  649|  9.02k|      assert(cache_entry_stats_collector_);
  650|  9.02k|    } else {
  651|      0|      assert(!cache_entry_stats_collector_);
  652|      0|    }
  653|  9.02k|  }
  654|  9.02k|}
_ZN7rocksdb13InternalStats22CollectCacheEntryStatsEb:
  664|     46|void InternalStats::CollectCacheEntryStats(bool foreground) {
  665|       |  // This function is safe to call from any thread because
  666|       |  // cache_entry_stats_collector_ field is const after constructor
  667|       |  // and ->GetStats does its own synchronization, which also suffices for
  668|       |  // cache_entry_stats_.
  669|       |
  670|     46|  if (!cache_entry_stats_collector_) {
  ------------------
  |  Branch (670:7): [True: 0, False: 46]
  ------------------
  671|      0|    return;  // nothing to do (e.g. no block cache)
  672|      0|  }
  673|       |
  674|       |  // For "background" collections, strictly cap the collection time by
  675|       |  // expanding effective cache TTL. For foreground, be more aggressive about
  676|       |  // getting latest data.
  677|     46|  int min_interval_seconds = foreground ? 10 : 180;
  ------------------
  |  Branch (677:30): [True: 0, False: 46]
  ------------------
  678|       |  // 1/500 = max of 0.2% of one CPU thread
  679|     46|  int min_interval_factor = foreground ? 10 : 500;
  ------------------
  |  Branch (679:29): [True: 0, False: 46]
  ------------------
  680|     46|  cache_entry_stats_collector_->CollectStats(min_interval_seconds,
  681|     46|                                             min_interval_factor);
  682|     46|}
_ZN7rocksdb13InternalStats19CacheEntryRoleStats16GetEntryCallbackEv:
  686|     46|InternalStats::CacheEntryRoleStats::GetEntryCallback() {
  687|     46|  return [&](const Slice& /*key*/, Cache::ObjectPtr /*value*/, size_t charge,
  688|     46|             const Cache::CacheItemHelper* helper) -> void {
  689|     46|    size_t role_idx =
  690|     46|        static_cast<size_t>(helper ? helper->role : CacheEntryRole::kMisc);
  691|     46|    entry_counts[role_idx]++;
  692|     46|    total_charges[role_idx] += charge;
  693|     46|  };
  694|     46|}
_ZN7rocksdb13InternalStats19CacheEntryRoleStats15BeginCollectionEPNS_5CacheEPNS_11SystemClockEm:
  697|     46|    Cache* cache, SystemClock*, uint64_t start_time_micros) {
  698|     46|  Clear();
  699|     46|  last_start_time_micros_ = start_time_micros;
  700|     46|  ++collection_count;
  701|     46|  std::ostringstream str;
  702|     46|  str << cache->Name() << "@" << static_cast<void*>(cache) << "#"
  703|     46|      << port::GetProcessID();
  704|     46|  cache_id = str.str();
  705|     46|  cache_capacity = cache->GetCapacity();
  706|     46|  cache_usage = cache->GetUsage();
  707|     46|  table_size = cache->GetTableAddressCount();
  708|     46|  occupancy = cache->GetOccupancyCount();
  709|     46|  hash_seed = cache->GetHashSeed();
  710|     46|}
_ZN7rocksdb13InternalStats19CacheEntryRoleStats13EndCollectionEPNS_5CacheEPNS_11SystemClockEm:
  713|     46|    Cache*, SystemClock*, uint64_t end_time_micros) {
  714|     46|  last_end_time_micros_ = end_time_micros;
  715|     46|}
_ZNK7rocksdb13InternalStats19CacheEntryRoleStats21GetLastDurationMicrosEv:
  721|     46|uint64_t InternalStats::CacheEntryRoleStats::GetLastDurationMicros() const {
  722|     46|  if (last_end_time_micros_ > last_start_time_micros_) {
  ------------------
  |  Branch (722:7): [True: 46, False: 0]
  ------------------
  723|     46|    return last_end_time_micros_ - last_start_time_micros_;
  724|     46|  } else {
  725|      0|    return 0U;
  726|      0|  }
  727|     46|}
_ZNK7rocksdb13InternalStats19CacheEntryRoleStats8ToStringEPNS_11SystemClockE:
  730|     46|    SystemClock* clock) const {
  731|     46|  std::ostringstream str;
  732|     46|  str << "Block cache " << cache_id
  733|     46|      << " capacity: " << BytesToHumanString(cache_capacity)
  734|     46|      << " seed: " << hash_seed << " usage: " << BytesToHumanString(cache_usage)
  735|     46|      << " table_size: " << table_size << " occupancy: " << occupancy
  736|     46|      << " collections: " << collection_count
  737|     46|      << " last_copies: " << copies_of_last_collection
  738|     46|      << " last_secs: " << (GetLastDurationMicros() / 1000000.0)
  739|     46|      << " secs_since: "
  740|     46|      << ((clock->NowMicros() - last_end_time_micros_) / 1000000U) << "\n";
  741|     46|  str << "Block cache entry stats(count,size,portion):";
  742|    690|  for (size_t i = 0; i < kNumCacheEntryRoles; ++i) {
  ------------------
  |  Branch (742:22): [True: 644, False: 46]
  ------------------
  743|    644|    if (entry_counts[i] > 0) {
  ------------------
  |  Branch (743:9): [True: 46, False: 598]
  ------------------
  744|     46|      str << " " << kCacheEntryRoleToCamelString[i] << "(" << entry_counts[i]
  745|     46|          << "," << BytesToHumanString(total_charges[i]) << ","
  746|     46|          << (100.0 * total_charges[i] / cache_capacity) << "%)";
  747|     46|    }
  748|    644|  }
  749|     46|  str << "\n";
  750|     46|  return str.str();
  751|     46|}
_ZN7rocksdb15GetPropertyInfoERKNS_5SliceE:
  960|     92|const DBPropertyInfo* GetPropertyInfo(const Slice& property) {
  961|     92|  std::string ppt_name = GetPropertyNameAndArg(property).first.ToString();
  962|     92|  auto ppt_info_iter = InternalStats::ppt_name_to_info.find(ppt_name);
  963|     92|  if (ppt_info_iter == InternalStats::ppt_name_to_info.end()) {
  ------------------
  |  Branch (963:7): [True: 0, False: 92]
  ------------------
  964|      0|    return nullptr;
  965|      0|  }
  966|     92|  return &ppt_info_iter->second;
  967|     92|}
_ZN7rocksdb13InternalStats17GetStringPropertyERKNS_14DBPropertyInfoERKNS_5SliceEPNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE:
  971|     92|                                      std::string* value) {
  972|     92|  assert(value != nullptr);
  973|     92|  assert(property_info.handle_string != nullptr);
  974|     92|  Slice arg = GetPropertyNameAndArg(property).second;
  975|     92|  return (this->*(property_info.handle_string))(value, arg);
  976|     92|}
_ZN7rocksdb13InternalStats21HandleCFStatsPeriodicEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_5SliceE:
 1071|     46|                                          Slice /*suffix*/) {
 1072|     46|  bool has_change = has_cf_change_since_dump_;
 1073|     46|  if (!has_change) {
  ------------------
  |  Branch (1073:7): [True: 0, False: 46]
  ------------------
 1074|       |    // If file histogram changes, there is activity in this period too.
 1075|      0|    uint64_t new_histogram_num = 0;
 1076|      0|    for (int level = 0; level < number_levels_; level++) {
  ------------------
  |  Branch (1076:25): [True: 0, False: 0]
  ------------------
 1077|      0|      new_histogram_num += file_read_latency_[level].num();
 1078|      0|    }
 1079|      0|    new_histogram_num += blob_file_read_latency_.num();
 1080|      0|    if (new_histogram_num != last_histogram_num) {
  ------------------
  |  Branch (1080:9): [True: 0, False: 0]
  ------------------
 1081|      0|      has_change = true;
 1082|      0|      last_histogram_num = new_histogram_num;
 1083|      0|    }
 1084|      0|  }
 1085|     46|  if (has_change) {
  ------------------
  |  Branch (1085:7): [True: 46, False: 0]
  ------------------
 1086|     46|    no_cf_change_period_since_dump_ = 0;
 1087|     46|    has_cf_change_since_dump_ = false;
 1088|     46|  } else if (no_cf_change_period_since_dump_++ > 0) {
  ------------------
  |  Branch (1088:14): [True: 0, False: 0]
  ------------------
 1089|       |    // Not ready to sync
 1090|      0|    if (no_cf_change_period_since_dump_ == kMaxNoChangePeriodSinceDump) {
  ------------------
  |  Branch (1090:9): [True: 0, False: 0]
  ------------------
 1091|       |      // Next periodic, we need to dump stats even if there is no change.
 1092|      0|      no_cf_change_period_since_dump_ = 0;
 1093|      0|    }
 1094|      0|    return true;
 1095|      0|  }
 1096|       |
 1097|     46|  DumpCFStatsNoFileHistogram(/*is_periodic=*/true, value);
 1098|     46|  DumpCFFileHistogram(value);
 1099|     46|  return true;
 1100|     46|}
_ZN7rocksdb13InternalStats13HandleDBStatsEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_5SliceE:
 1132|     46|bool InternalStats::HandleDBStats(std::string* value, Slice /*suffix*/) {
 1133|     46|  DumpDBStats(value);
 1134|     46|  return true;
 1135|     46|}
_ZN7rocksdb13InternalStats21GetBlockCacheForStatsEv:
 1497|  9.02k|Cache* InternalStats::GetBlockCacheForStats() {
 1498|  9.02k|  auto* table_factory = cfd_->ioptions()->table_factory.get();
 1499|  9.02k|  assert(table_factory != nullptr);
 1500|  9.02k|  return table_factory->GetOptions<Cache>(TableFactory::kBlockCacheOpts());
 1501|  9.02k|}
_ZN7rocksdb13InternalStats11DumpDBStatsEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1544|     46|void InternalStats::DumpDBStats(std::string* value) {
 1545|     46|  char buf[1000];
 1546|       |  // DB-level stats, only available from default column family
 1547|     46|  double seconds_up = (clock_->NowMicros() - started_at_) / kMicrosInSec;
 1548|     46|  double interval_seconds_up = seconds_up - db_stats_snapshot_.seconds_up;
 1549|     46|  snprintf(buf, sizeof(buf),
 1550|     46|           "\n** DB Stats **\nUptime(secs): %.1f total, %.1f interval\n",
 1551|     46|           seconds_up, interval_seconds_up);
 1552|     46|  value->append(buf);
 1553|       |  // Cumulative
 1554|     46|  uint64_t user_bytes_written =
 1555|     46|      GetDBStats(InternalStats::kIntStatsBytesWritten);
 1556|     46|  uint64_t num_keys_written =
 1557|     46|      GetDBStats(InternalStats::kIntStatsNumKeysWritten);
 1558|     46|  uint64_t write_other = GetDBStats(InternalStats::kIntStatsWriteDoneByOther);
 1559|     46|  uint64_t write_self = GetDBStats(InternalStats::kIntStatsWriteDoneBySelf);
 1560|     46|  uint64_t wal_bytes = GetDBStats(InternalStats::kIntStatsWalFileBytes);
 1561|     46|  uint64_t wal_synced = GetDBStats(InternalStats::kIntStatsWalFileSynced);
 1562|     46|  uint64_t write_with_wal = GetDBStats(InternalStats::kIntStatsWriteWithWal);
 1563|     46|  uint64_t write_stall_micros =
 1564|     46|      GetDBStats(InternalStats::kIntStatsWriteStallMicros);
 1565|       |
 1566|     46|  const int kHumanMicrosLen = 32;
 1567|     46|  char human_micros[kHumanMicrosLen];
 1568|       |
 1569|       |  // Data
 1570|       |  // writes: total number of write requests.
 1571|       |  // keys: total number of key updates issued by all the write requests
 1572|       |  // commit groups: number of group commits issued to the DB. Each group can
 1573|       |  //                contain one or more writes.
 1574|       |  // so writes/keys is the average number of put in multi-put or put
 1575|       |  // writes/groups is the average group commit size.
 1576|       |  //
 1577|       |  // The format is the same for interval stats.
 1578|     46|  snprintf(buf, sizeof(buf),
 1579|     46|           "Cumulative writes: %s writes, %s keys, %s commit groups, "
 1580|     46|           "%.1f writes per commit group, ingest: %.2f GB, %.2f MB/s\n",
 1581|     46|           NumberToHumanString(write_other + write_self).c_str(),
 1582|     46|           NumberToHumanString(num_keys_written).c_str(),
 1583|     46|           NumberToHumanString(write_self).c_str(),
 1584|     46|           (write_other + write_self) /
 1585|     46|               std::max(1.0, static_cast<double>(write_self)),
 1586|     46|           user_bytes_written / kGB,
 1587|     46|           user_bytes_written / kMB / std::max(seconds_up, 0.001));
 1588|     46|  value->append(buf);
 1589|       |  // WAL
 1590|     46|  snprintf(buf, sizeof(buf),
 1591|     46|           "Cumulative WAL: %s writes, %s syncs, "
 1592|     46|           "%.2f writes per sync, written: %.2f GB, %.2f MB/s\n",
 1593|     46|           NumberToHumanString(write_with_wal).c_str(),
 1594|     46|           NumberToHumanString(wal_synced).c_str(),
 1595|     46|           write_with_wal / std::max(1.0, static_cast<double>(wal_synced)),
 1596|     46|           wal_bytes / kGB, wal_bytes / kMB / std::max(seconds_up, 0.001));
 1597|     46|  value->append(buf);
 1598|       |  // Stall
 1599|     46|  AppendHumanMicros(write_stall_micros, human_micros, kHumanMicrosLen, true);
 1600|     46|  snprintf(buf, sizeof(buf), "Cumulative stall: %s, %.1f percent\n",
 1601|     46|           human_micros,
 1602|       |           // 10000 = divide by 1M to get secs, then multiply by 100 for pct
 1603|     46|           write_stall_micros / 10000.0 / std::max(seconds_up, 0.001));
 1604|     46|  value->append(buf);
 1605|       |
 1606|       |  // Interval
 1607|     46|  uint64_t interval_write_other = write_other - db_stats_snapshot_.write_other;
 1608|     46|  uint64_t interval_write_self = write_self - db_stats_snapshot_.write_self;
 1609|     46|  uint64_t interval_num_keys_written =
 1610|     46|      num_keys_written - db_stats_snapshot_.num_keys_written;
 1611|     46|  snprintf(
 1612|     46|      buf, sizeof(buf),
 1613|     46|      "Interval writes: %s writes, %s keys, %s commit groups, "
 1614|     46|      "%.1f writes per commit group, ingest: %.2f MB, %.2f MB/s\n",
 1615|     46|      NumberToHumanString(interval_write_other + interval_write_self).c_str(),
 1616|     46|      NumberToHumanString(interval_num_keys_written).c_str(),
 1617|     46|      NumberToHumanString(interval_write_self).c_str(),
 1618|     46|      static_cast<double>(interval_write_other + interval_write_self) /
 1619|     46|          std::max(1.0, static_cast<double>(interval_write_self)),
 1620|     46|      (user_bytes_written - db_stats_snapshot_.ingest_bytes) / kMB,
 1621|     46|      (user_bytes_written - db_stats_snapshot_.ingest_bytes) / kMB /
 1622|     46|          std::max(interval_seconds_up, 0.001)),
 1623|     46|      value->append(buf);
 1624|       |
 1625|     46|  uint64_t interval_write_with_wal =
 1626|     46|      write_with_wal - db_stats_snapshot_.write_with_wal;
 1627|     46|  uint64_t interval_wal_synced = wal_synced - db_stats_snapshot_.wal_synced;
 1628|     46|  uint64_t interval_wal_bytes = wal_bytes - db_stats_snapshot_.wal_bytes;
 1629|       |
 1630|     46|  snprintf(buf, sizeof(buf),
 1631|     46|           "Interval WAL: %s writes, %s syncs, "
 1632|     46|           "%.2f writes per sync, written: %.2f GB, %.2f MB/s\n",
 1633|     46|           NumberToHumanString(interval_write_with_wal).c_str(),
 1634|     46|           NumberToHumanString(interval_wal_synced).c_str(),
 1635|     46|           interval_write_with_wal /
 1636|     46|               std::max(1.0, static_cast<double>(interval_wal_synced)),
 1637|     46|           interval_wal_bytes / kGB,
 1638|     46|           interval_wal_bytes / kMB / std::max(interval_seconds_up, 0.001));
 1639|     46|  value->append(buf);
 1640|       |
 1641|       |  // Stall
 1642|     46|  AppendHumanMicros(write_stall_micros - db_stats_snapshot_.write_stall_micros,
 1643|     46|                    human_micros, kHumanMicrosLen, true);
 1644|     46|  snprintf(buf, sizeof(buf), "Interval stall: %s, %.1f percent\n", human_micros,
 1645|       |           // 10000 = divide by 1M to get secs, then multiply by 100 for pct
 1646|     46|           (write_stall_micros - db_stats_snapshot_.write_stall_micros) /
 1647|     46|               10000.0 / std::max(interval_seconds_up, 0.001));
 1648|     46|  value->append(buf);
 1649|       |
 1650|     46|  std::string write_stall_stats;
 1651|     46|  DumpDBStatsWriteStall(&write_stall_stats);
 1652|     46|  value->append(write_stall_stats);
 1653|       |
 1654|     46|  db_stats_snapshot_.seconds_up = seconds_up;
 1655|     46|  db_stats_snapshot_.ingest_bytes = user_bytes_written;
 1656|     46|  db_stats_snapshot_.write_other = write_other;
 1657|     46|  db_stats_snapshot_.write_self = write_self;
 1658|     46|  db_stats_snapshot_.num_keys_written = num_keys_written;
 1659|     46|  db_stats_snapshot_.wal_bytes = wal_bytes;
 1660|     46|  db_stats_snapshot_.wal_synced = wal_synced;
 1661|     46|  db_stats_snapshot_.write_with_wal = write_with_wal;
 1662|     46|  db_stats_snapshot_.write_stall_micros = write_stall_micros;
 1663|     46|}
_ZN7rocksdb13InternalStats24DumpDBMapStatsWriteStallEPNSt3__13mapINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES8_NS1_4lessIS8_EENS6_INS1_4pairIKS8_S8_EEEEEE:
 1666|     46|    std::map<std::string, std::string>* value) {
 1667|     46|  constexpr uint32_t max_db_scope_write_stall_cause =
 1668|     46|      static_cast<uint32_t>(WriteStallCause::kDBScopeWriteStallCauseEnumMax);
 1669|       |
 1670|     46|  for (uint32_t i =
 1671|     46|           max_db_scope_write_stall_cause - kNumDBScopeWriteStallCauses;
 1672|     92|       i < max_db_scope_write_stall_cause; ++i) {
  ------------------
  |  Branch (1672:8): [True: 46, False: 46]
  ------------------
 1673|     46|    for (uint32_t j = 0;
 1674|    138|         j < static_cast<uint32_t>(WriteStallCondition::kNormal); ++j) {
  ------------------
  |  Branch (1674:10): [True: 92, False: 46]
  ------------------
 1675|     92|      WriteStallCause cause = static_cast<WriteStallCause>(i);
 1676|     92|      WriteStallCondition condition = static_cast<WriteStallCondition>(j);
 1677|     92|      InternalStats::InternalDBStatsType internal_db_stat =
 1678|     92|          InternalDBStat(cause, condition);
 1679|       |
 1680|     92|      if (internal_db_stat == InternalStats::kIntStatsNumMax) {
  ------------------
  |  Branch (1680:11): [True: 46, False: 46]
  ------------------
 1681|     46|        continue;
 1682|     46|      }
 1683|       |
 1684|     46|      std::string name =
 1685|     46|          WriteStallStatsMapKeys::CauseConditionCount(cause, condition);
 1686|     46|      uint64_t stat =
 1687|     46|          db_stats_[static_cast<std::size_t>(internal_db_stat)].load(
 1688|     46|              std::memory_order_relaxed);
 1689|     46|      (*value)[name] = std::to_string(stat);
 1690|     46|    }
 1691|     46|  }
 1692|     46|}
_ZN7rocksdb13InternalStats21DumpDBStatsWriteStallEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1694|     46|void InternalStats::DumpDBStatsWriteStall(std::string* value) {
 1695|     46|  assert(value);
 1696|       |
 1697|     46|  std::map<std::string, std::string> write_stall_stats_map;
 1698|     46|  DumpDBMapStatsWriteStall(&write_stall_stats_map);
 1699|       |
 1700|     46|  std::ostringstream str;
 1701|     46|  str << "Write Stall (count): ";
 1702|       |
 1703|     46|  for (auto write_stall_stats_map_iter = write_stall_stats_map.begin();
 1704|     92|       write_stall_stats_map_iter != write_stall_stats_map.end();
  ------------------
  |  Branch (1704:8): [True: 46, False: 46]
  ------------------
 1705|     46|       write_stall_stats_map_iter++) {
 1706|     46|    const auto& name_and_stat = *write_stall_stats_map_iter;
 1707|     46|    str << name_and_stat.first << ": " << name_and_stat.second;
 1708|     46|    if (std::next(write_stall_stats_map_iter) == write_stall_stats_map.end()) {
  ------------------
  |  Branch (1708:9): [True: 46, False: 0]
  ------------------
 1709|     46|      str << "\n";
 1710|     46|    } else {
 1711|      0|      str << ", ";
 1712|      0|    }
 1713|     46|  }
 1714|     46|  *value = str.str();
 1715|     46|}
_ZN7rocksdb13InternalStats14DumpCFMapStatsEPKNS_18VersionStorageInfoEPNSt3__13mapIiNS5_INS_13LevelStatTypeEdNS4_4lessIS6_EENS4_9allocatorINS4_4pairIKS6_dEEEEEENS7_IiEENS9_INSA_IKiSE_EEEEEEPNS0_15CompactionStatsE:
 1749|     46|    CompactionStats* compaction_stats_sum) {
 1750|     46|  assert(vstorage);
 1751|       |
 1752|     46|  int num_levels_to_check =
 1753|     46|      (cfd_->ioptions()->compaction_style == kCompactionStyleLevel)
  ------------------
  |  Branch (1753:7): [True: 46, False: 0]
  ------------------
 1754|     46|          ? vstorage->num_levels() - 1
 1755|     46|          : 1;
 1756|       |
 1757|       |  // Compaction scores are sorted based on its value. Restore them to the
 1758|       |  // level order
 1759|     46|  std::vector<double> compaction_score(number_levels_, 0);
 1760|    322|  for (int i = 0; i < num_levels_to_check; ++i) {
  ------------------
  |  Branch (1760:19): [True: 276, False: 46]
  ------------------
 1761|    276|    compaction_score[vstorage->CompactionScoreLevel(i)] =
 1762|    276|        vstorage->CompactionScore(i);
 1763|    276|  }
 1764|       |  // Count # of files being compacted for each level
 1765|     46|  std::vector<int> files_being_compacted(number_levels_, 0);
 1766|    368|  for (int level = 0; level < number_levels_; ++level) {
  ------------------
  |  Branch (1766:23): [True: 322, False: 46]
  ------------------
 1767|    322|    for (auto* f : vstorage->LevelFiles(level)) {
  ------------------
  |  Branch (1767:18): [True: 0, False: 322]
  ------------------
 1768|      0|      if (f->being_compacted) {
  ------------------
  |  Branch (1768:11): [True: 0, False: 0]
  ------------------
 1769|      0|        ++files_being_compacted[level];
 1770|      0|      }
 1771|      0|    }
 1772|    322|  }
 1773|       |
 1774|     46|  int total_files = 0;
 1775|     46|  int total_files_being_compacted = 0;
 1776|     46|  double total_file_size = 0;
 1777|     46|  uint64_t flush_ingest = cf_stats_value_[BYTES_FLUSHED];
 1778|     46|  uint64_t add_file_ingest = cf_stats_value_[BYTES_INGESTED_ADD_FILE];
 1779|     46|  uint64_t curr_ingest = flush_ingest + add_file_ingest;
 1780|    368|  for (int level = 0; level < number_levels_; level++) {
  ------------------
  |  Branch (1780:23): [True: 322, False: 46]
  ------------------
 1781|    322|    int files = vstorage->NumLevelFiles(level);
 1782|    322|    total_files += files;
 1783|    322|    total_files_being_compacted += files_being_compacted[level];
 1784|    322|    if (comp_stats_[level].micros > 0 || comp_stats_[level].cpu_micros > 0 ||
  ------------------
  |  Branch (1784:9): [True: 0, False: 322]
  |  Branch (1784:42): [True: 0, False: 322]
  ------------------
 1785|    322|        files > 0) {
  ------------------
  |  Branch (1785:9): [True: 0, False: 322]
  ------------------
 1786|      0|      compaction_stats_sum->Add(comp_stats_[level]);
 1787|      0|      total_file_size += vstorage->NumLevelBytes(level);
 1788|      0|      uint64_t input_bytes;
 1789|      0|      if (level == 0) {
  ------------------
  |  Branch (1789:11): [True: 0, False: 0]
  ------------------
 1790|      0|        input_bytes = curr_ingest;
 1791|      0|      } else {
 1792|      0|        input_bytes = comp_stats_[level].bytes_read_non_output_levels +
 1793|      0|                      comp_stats_[level].bytes_read_blob;
 1794|      0|      }
 1795|      0|      double w_amp =
 1796|      0|          (input_bytes == 0)
  ------------------
  |  Branch (1796:11): [True: 0, False: 0]
  ------------------
 1797|      0|              ? 0.0
 1798|      0|              : static_cast<double>(comp_stats_[level].bytes_written +
 1799|      0|                                    comp_stats_[level].bytes_written_blob) /
 1800|      0|                    input_bytes;
 1801|      0|      std::map<LevelStatType, double> level_stats;
 1802|      0|      PrepareLevelStats(&level_stats, files, files_being_compacted[level],
 1803|      0|                        static_cast<double>(vstorage->NumLevelBytes(level)),
 1804|      0|                        compaction_score[level], w_amp, comp_stats_[level]);
 1805|      0|      (*levels_stats)[level] = level_stats;
 1806|      0|    }
 1807|    322|  }
 1808|       |  // Cumulative summary
 1809|     46|  double w_amp = (0 == curr_ingest)
  ------------------
  |  Branch (1809:18): [True: 46, False: 0]
  ------------------
 1810|     46|                     ? 0.0
 1811|     46|                     : (compaction_stats_sum->bytes_written +
 1812|      0|                        compaction_stats_sum->bytes_written_blob) /
 1813|      0|                           static_cast<double>(curr_ingest);
 1814|       |  // Stats summary across levels
 1815|     46|  std::map<LevelStatType, double> sum_stats;
 1816|     46|  PrepareLevelStats(&sum_stats, total_files, total_files_being_compacted,
 1817|     46|                    total_file_size, 0, w_amp, *compaction_stats_sum);
 1818|     46|  (*levels_stats)[-1] = sum_stats;  //  -1 is for the Sum level
 1819|     46|}
_ZN7rocksdb13InternalStats24DumpCFMapStatsByPriorityEPNSt3__13mapIiNS2_INS_13LevelStatTypeEdNS1_4lessIS3_EENS1_9allocatorINS1_4pairIKS3_dEEEEEENS4_IiEENS6_INS7_IKiSB_EEEEEE:
 1822|     46|    std::map<int, std::map<LevelStatType, double>>* priorities_stats) {
 1823|    230|  for (size_t priority = 0; priority < comp_stats_by_pri_.size(); priority++) {
  ------------------
  |  Branch (1823:29): [True: 184, False: 46]
  ------------------
 1824|    184|    if (comp_stats_by_pri_[priority].micros > 0) {
  ------------------
  |  Branch (1824:9): [True: 0, False: 184]
  ------------------
 1825|      0|      std::map<LevelStatType, double> priority_stats;
 1826|      0|      PrepareLevelStats(&priority_stats, 0 /* num_files */,
 1827|      0|                        0 /* being_compacted */, 0 /* total_file_size */,
 1828|      0|                        0 /* compaction_score */, 0 /* w_amp */,
 1829|      0|                        comp_stats_by_pri_[priority]);
 1830|      0|      (*priorities_stats)[static_cast<int>(priority)] = priority_stats;
 1831|      0|    }
 1832|    184|  }
 1833|     46|}
_ZN7rocksdb13InternalStats24DumpCFMapStatsWriteStallEPNSt3__13mapINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES8_NS1_4lessIS8_EENS6_INS1_4pairIKS8_S8_EEEEEE:
 1836|     46|    std::map<std::string, std::string>* value) {
 1837|     46|  uint64_t total_delays = 0;
 1838|     46|  uint64_t total_stops = 0;
 1839|     46|  constexpr uint32_t max_cf_scope_write_stall_cause =
 1840|     46|      static_cast<uint32_t>(WriteStallCause::kCFScopeWriteStallCauseEnumMax);
 1841|       |
 1842|     46|  for (uint32_t i =
 1843|     46|           max_cf_scope_write_stall_cause - kNumCFScopeWriteStallCauses;
 1844|    184|       i < max_cf_scope_write_stall_cause; ++i) {
  ------------------
  |  Branch (1844:8): [True: 138, False: 46]
  ------------------
 1845|    138|    for (uint32_t j = 0;
 1846|    414|         j < static_cast<uint32_t>(WriteStallCondition::kNormal); ++j) {
  ------------------
  |  Branch (1846:10): [True: 276, False: 138]
  ------------------
 1847|    276|      WriteStallCause cause = static_cast<WriteStallCause>(i);
 1848|    276|      WriteStallCondition condition = static_cast<WriteStallCondition>(j);
 1849|    276|      InternalStats::InternalCFStatsType internal_cf_stat =
 1850|    276|          InternalCFStat(cause, condition);
 1851|       |
 1852|    276|      if (internal_cf_stat == InternalStats::INTERNAL_CF_STATS_ENUM_MAX) {
  ------------------
  |  Branch (1852:11): [True: 0, False: 276]
  ------------------
 1853|      0|        continue;
 1854|      0|      }
 1855|       |
 1856|    276|      std::string name =
 1857|    276|          WriteStallStatsMapKeys::CauseConditionCount(cause, condition);
 1858|    276|      uint64_t stat =
 1859|    276|          cf_stats_count_[static_cast<std::size_t>(internal_cf_stat)];
 1860|    276|      (*value)[name] = std::to_string(stat);
 1861|       |
 1862|    276|      if (condition == WriteStallCondition::kDelayed) {
  ------------------
  |  Branch (1862:11): [True: 138, False: 138]
  ------------------
 1863|    138|        total_delays += stat;
 1864|    138|      } else if (condition == WriteStallCondition::kStopped) {
  ------------------
  |  Branch (1864:18): [True: 138, False: 0]
  ------------------
 1865|    138|        total_stops += stat;
 1866|    138|      }
 1867|    276|    }
 1868|    138|  }
 1869|       |
 1870|     46|  (*value)[WriteStallStatsMapKeys::
 1871|     46|               CFL0FileCountLimitDelaysWithOngoingCompaction()] =
 1872|     46|      std::to_string(
 1873|     46|          cf_stats_count_[L0_FILE_COUNT_LIMIT_DELAYS_WITH_ONGOING_COMPACTION]);
 1874|     46|  (*value)[WriteStallStatsMapKeys::
 1875|     46|               CFL0FileCountLimitStopsWithOngoingCompaction()] =
 1876|     46|      std::to_string(
 1877|     46|          cf_stats_count_[L0_FILE_COUNT_LIMIT_STOPS_WITH_ONGOING_COMPACTION]);
 1878|       |
 1879|     46|  (*value)[WriteStallStatsMapKeys::TotalStops()] = std::to_string(total_stops);
 1880|     46|  (*value)[WriteStallStatsMapKeys::TotalDelays()] =
 1881|     46|      std::to_string(total_delays);
 1882|     46|}
_ZN7rocksdb13InternalStats21DumpCFStatsWriteStallEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPm:
 1885|     46|                                          uint64_t* total_stall_count) {
 1886|     46|  assert(value);
 1887|       |
 1888|     46|  std::map<std::string, std::string> write_stall_stats_map;
 1889|     46|  DumpCFMapStatsWriteStall(&write_stall_stats_map);
 1890|       |
 1891|     46|  std::ostringstream str;
 1892|     46|  str << "Write Stall (count): ";
 1893|       |
 1894|     46|  for (auto write_stall_stats_map_iter = write_stall_stats_map.begin();
 1895|    506|       write_stall_stats_map_iter != write_stall_stats_map.end();
  ------------------
  |  Branch (1895:8): [True: 460, False: 46]
  ------------------
 1896|    460|       write_stall_stats_map_iter++) {
 1897|    460|    const auto& name_and_stat = *write_stall_stats_map_iter;
 1898|    460|    str << name_and_stat.first << ": " << name_and_stat.second;
 1899|    460|    if (std::next(write_stall_stats_map_iter) == write_stall_stats_map.end()) {
  ------------------
  |  Branch (1899:9): [True: 46, False: 414]
  ------------------
 1900|     46|      str << "\n";
 1901|    414|    } else {
 1902|    414|      str << ", ";
 1903|    414|    }
 1904|    460|  }
 1905|       |
 1906|     46|  if (total_stall_count) {
  ------------------
  |  Branch (1906:7): [True: 46, False: 0]
  ------------------
 1907|     46|    *total_stall_count =
 1908|     46|        ParseUint64(
 1909|     46|            write_stall_stats_map[WriteStallStatsMapKeys::TotalStops()]) +
 1910|     46|        ParseUint64(
 1911|     46|            write_stall_stats_map[WriteStallStatsMapKeys::TotalDelays()]);
 1912|     46|    if (*total_stall_count > 0) {
  ------------------
  |  Branch (1912:9): [True: 0, False: 46]
  ------------------
 1913|      0|      str << "interval: " << *total_stall_count - cf_stats_snapshot_.stall_count
 1914|      0|          << " total count\n";
 1915|      0|    }
 1916|     46|  }
 1917|     46|  *value = str.str();
 1918|     46|}
_ZN7rocksdb13InternalStats26DumpCFStatsNoFileHistogramEbPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1926|     46|                                               std::string* value) {
 1927|     46|  char buf[2000];
 1928|       |  // Per-ColumnFamily stats
 1929|     46|  PrintLevelStatsHeader(buf, sizeof(buf), cfd_->GetName(), "Level");
 1930|     46|  value->append(buf);
 1931|       |
 1932|       |  // Print stats for each level
 1933|     46|  const VersionStorageInfo* vstorage = cfd_->current()->storage_info();
 1934|     46|  std::map<int, std::map<LevelStatType, double>> levels_stats;
 1935|     46|  CompactionStats compaction_stats_sum;
 1936|     46|  DumpCFMapStats(vstorage, &levels_stats, &compaction_stats_sum);
 1937|    368|  for (int l = 0; l < number_levels_; ++l) {
  ------------------
  |  Branch (1937:19): [True: 322, False: 46]
  ------------------
 1938|    322|    if (levels_stats.find(l) != levels_stats.end()) {
  ------------------
  |  Branch (1938:9): [True: 0, False: 322]
  ------------------
 1939|      0|      PrintLevelStats(buf, sizeof(buf), "L" + std::to_string(l),
 1940|      0|                      levels_stats[l]);
 1941|      0|      value->append(buf);
 1942|      0|    }
 1943|    322|  }
 1944|       |
 1945|       |  // Print sum of level stats
 1946|     46|  PrintLevelStats(buf, sizeof(buf), "Sum", levels_stats[-1]);
 1947|     46|  value->append(buf);
 1948|       |
 1949|     46|  uint64_t flush_ingest = cf_stats_value_[BYTES_FLUSHED];
 1950|     46|  uint64_t add_file_ingest = cf_stats_value_[BYTES_INGESTED_ADD_FILE];
 1951|     46|  uint64_t ingest_files_addfile = cf_stats_value_[INGESTED_NUM_FILES_TOTAL];
 1952|     46|  uint64_t ingest_l0_files_addfile =
 1953|     46|      cf_stats_value_[INGESTED_LEVEL0_NUM_FILES_TOTAL];
 1954|     46|  uint64_t ingest_keys_addfile = cf_stats_value_[INGESTED_NUM_KEYS_TOTAL];
 1955|       |  // Interval summary
 1956|     46|  uint64_t interval_flush_ingest =
 1957|     46|      flush_ingest - cf_stats_snapshot_.ingest_bytes_flush;
 1958|     46|  uint64_t interval_add_file_inget =
 1959|     46|      add_file_ingest - cf_stats_snapshot_.ingest_bytes_addfile;
 1960|     46|  uint64_t interval_ingest =
 1961|     46|      interval_flush_ingest + interval_add_file_inget + 1;
 1962|     46|  CompactionStats interval_stats(compaction_stats_sum);
 1963|     46|  interval_stats.Subtract(cf_stats_snapshot_.comp_stats);
 1964|     46|  double w_amp =
 1965|     46|      (interval_stats.bytes_written + interval_stats.bytes_written_blob) /
 1966|     46|      static_cast<double>(interval_ingest);
 1967|     46|  PrintLevelStats(buf, sizeof(buf), "Int", 0, 0, 0, 0, w_amp, interval_stats);
 1968|     46|  value->append(buf);
 1969|       |
 1970|     46|  PrintLevelStatsHeader(buf, sizeof(buf), cfd_->GetName(), "Priority");
 1971|     46|  value->append(buf);
 1972|     46|  std::map<int, std::map<LevelStatType, double>> priorities_stats;
 1973|     46|  DumpCFMapStatsByPriority(&priorities_stats);
 1974|    230|  for (size_t priority = 0; priority < comp_stats_by_pri_.size(); ++priority) {
  ------------------
  |  Branch (1974:29): [True: 184, False: 46]
  ------------------
 1975|    184|    if (priorities_stats.find(static_cast<int>(priority)) !=
  ------------------
  |  Branch (1975:9): [True: 0, False: 184]
  ------------------
 1976|    184|        priorities_stats.end()) {
 1977|      0|      PrintLevelStats(
 1978|      0|          buf, sizeof(buf),
 1979|      0|          Env::PriorityToString(static_cast<Env::Priority>(priority)),
 1980|      0|          priorities_stats[static_cast<int>(priority)]);
 1981|      0|      value->append(buf);
 1982|      0|    }
 1983|    184|  }
 1984|       |
 1985|     46|  const auto blob_st = vstorage->GetBlobStats();
 1986|       |
 1987|     46|  snprintf(buf, sizeof(buf),
 1988|     46|           "\nBlob file count: %" ROCKSDB_PRIszt
 1989|     46|           ", total size: %.1f GB, garbage size: %.1f GB, space amp: %.1f\n\n",
 1990|     46|           vstorage->GetBlobFiles().size(), blob_st.total_file_size / kGB,
 1991|     46|           blob_st.total_garbage_size / kGB, blob_st.space_amp);
 1992|     46|  value->append(buf);
 1993|       |
 1994|     46|  uint64_t now_micros = clock_->NowMicros();
 1995|     46|  double seconds_up = (now_micros - started_at_) / kMicrosInSec;
 1996|     46|  double interval_seconds_up = seconds_up - cf_stats_snapshot_.seconds_up;
 1997|     46|  snprintf(buf, sizeof(buf), "Uptime(secs): %.1f total, %.1f interval\n",
 1998|     46|           seconds_up, interval_seconds_up);
 1999|     46|  value->append(buf);
 2000|     46|  snprintf(buf, sizeof(buf), "Flush(GB): cumulative %.3f, interval %.3f\n",
 2001|     46|           flush_ingest / kGB, interval_flush_ingest / kGB);
 2002|     46|  value->append(buf);
 2003|     46|  snprintf(buf, sizeof(buf), "AddFile(GB): cumulative %.3f, interval %.3f\n",
 2004|     46|           add_file_ingest / kGB, interval_add_file_inget / kGB);
 2005|     46|  value->append(buf);
 2006|       |
 2007|     46|  uint64_t interval_ingest_files_addfile =
 2008|     46|      ingest_files_addfile - cf_stats_snapshot_.ingest_files_addfile;
 2009|     46|  snprintf(buf, sizeof(buf),
 2010|     46|           "AddFile(Total Files): cumulative %" PRIu64 ", interval %" PRIu64
 2011|     46|           "\n",
 2012|     46|           ingest_files_addfile, interval_ingest_files_addfile);
 2013|     46|  value->append(buf);
 2014|       |
 2015|     46|  uint64_t interval_ingest_l0_files_addfile =
 2016|     46|      ingest_l0_files_addfile - cf_stats_snapshot_.ingest_l0_files_addfile;
 2017|     46|  snprintf(buf, sizeof(buf),
 2018|     46|           "AddFile(L0 Files): cumulative %" PRIu64 ", interval %" PRIu64 "\n",
 2019|     46|           ingest_l0_files_addfile, interval_ingest_l0_files_addfile);
 2020|     46|  value->append(buf);
 2021|       |
 2022|     46|  uint64_t interval_ingest_keys_addfile =
 2023|     46|      ingest_keys_addfile - cf_stats_snapshot_.ingest_keys_addfile;
 2024|     46|  snprintf(buf, sizeof(buf),
 2025|     46|           "AddFile(Keys): cumulative %" PRIu64 ", interval %" PRIu64 "\n",
 2026|     46|           ingest_keys_addfile, interval_ingest_keys_addfile);
 2027|     46|  value->append(buf);
 2028|       |
 2029|       |  // Compact
 2030|     46|  uint64_t compact_bytes_read = 0;
 2031|     46|  uint64_t compact_bytes_write = 0;
 2032|     46|  uint64_t compact_micros = 0;
 2033|    368|  for (int level = 0; level < number_levels_; level++) {
  ------------------
  |  Branch (2033:23): [True: 322, False: 46]
  ------------------
 2034|    322|    compact_bytes_read += comp_stats_[level].bytes_read_output_level +
 2035|    322|                          comp_stats_[level].bytes_read_non_output_levels +
 2036|    322|                          comp_stats_[level].bytes_read_blob;
 2037|    322|    compact_bytes_write += comp_stats_[level].bytes_written +
 2038|    322|                           comp_stats_[level].bytes_written_blob;
 2039|    322|    compact_micros += comp_stats_[level].micros;
 2040|    322|  }
 2041|       |
 2042|     46|  snprintf(buf, sizeof(buf),
 2043|     46|           "Cumulative compaction: %.2f GB write, %.2f MB/s write, "
 2044|     46|           "%.2f GB read, %.2f MB/s read, %.1f seconds\n",
 2045|     46|           compact_bytes_write / kGB,
 2046|     46|           compact_bytes_write / kMB / std::max(seconds_up, 0.001),
 2047|     46|           compact_bytes_read / kGB,
 2048|     46|           compact_bytes_read / kMB / std::max(seconds_up, 0.001),
 2049|     46|           compact_micros / kMicrosInSec);
 2050|     46|  value->append(buf);
 2051|       |
 2052|       |  // Compaction interval
 2053|     46|  uint64_t interval_compact_bytes_write =
 2054|     46|      compact_bytes_write - cf_stats_snapshot_.compact_bytes_write;
 2055|     46|  uint64_t interval_compact_bytes_read =
 2056|     46|      compact_bytes_read - cf_stats_snapshot_.compact_bytes_read;
 2057|     46|  uint64_t interval_compact_micros =
 2058|     46|      compact_micros - cf_stats_snapshot_.compact_micros;
 2059|       |
 2060|     46|  snprintf(
 2061|     46|      buf, sizeof(buf),
 2062|     46|      "Interval compaction: %.2f GB write, %.2f MB/s write, "
 2063|     46|      "%.2f GB read, %.2f MB/s read, %.1f seconds\n",
 2064|     46|      interval_compact_bytes_write / kGB,
 2065|     46|      interval_compact_bytes_write / kMB / std::max(interval_seconds_up, 0.001),
 2066|     46|      interval_compact_bytes_read / kGB,
 2067|     46|      interval_compact_bytes_read / kMB / std::max(interval_seconds_up, 0.001),
 2068|     46|      interval_compact_micros / kMicrosInSec);
 2069|     46|  value->append(buf);
 2070|       |
 2071|     46|  snprintf(buf, sizeof(buf),
 2072|     46|           "Estimated pending compaction bytes: %" PRIu64 "\n",
 2073|     46|           vstorage->estimated_compaction_needed_bytes());
 2074|     46|  value->append(buf);
 2075|       |
 2076|     46|  if (is_periodic) {
  ------------------
  |  Branch (2076:7): [True: 46, False: 0]
  ------------------
 2077|     46|    cf_stats_snapshot_.compact_bytes_write = compact_bytes_write;
 2078|     46|    cf_stats_snapshot_.compact_bytes_read = compact_bytes_read;
 2079|     46|    cf_stats_snapshot_.compact_micros = compact_micros;
 2080|     46|  }
 2081|       |
 2082|     46|  std::string write_stall_stats;
 2083|     46|  uint64_t total_stall_count;
 2084|     46|  DumpCFStatsWriteStall(&write_stall_stats, &total_stall_count);
 2085|     46|  value->append(write_stall_stats);
 2086|       |
 2087|     46|  if (is_periodic) {
  ------------------
  |  Branch (2087:7): [True: 46, False: 0]
  ------------------
 2088|     46|    cf_stats_snapshot_.seconds_up = seconds_up;
 2089|     46|    cf_stats_snapshot_.ingest_bytes_flush = flush_ingest;
 2090|     46|    cf_stats_snapshot_.ingest_bytes_addfile = add_file_ingest;
 2091|     46|    cf_stats_snapshot_.ingest_files_addfile = ingest_files_addfile;
 2092|     46|    cf_stats_snapshot_.ingest_l0_files_addfile = ingest_l0_files_addfile;
 2093|     46|    cf_stats_snapshot_.ingest_keys_addfile = ingest_keys_addfile;
 2094|     46|    cf_stats_snapshot_.comp_stats = compaction_stats_sum;
 2095|     46|    cf_stats_snapshot_.stall_count = total_stall_count;
 2096|     46|  }
 2097|       |
 2098|       |  // Do not gather cache entry stats during CFStats because DB
 2099|       |  // mutex is held. Only dump last cached collection (rely on DB
 2100|       |  // periodic stats dump to update)
 2101|     46|  if (cache_entry_stats_collector_) {
  ------------------
  |  Branch (2101:7): [True: 46, False: 0]
  ------------------
 2102|     46|    CacheEntryRoleStats stats;
 2103|       |    // thread safe
 2104|     46|    cache_entry_stats_collector_->GetStats(&stats);
 2105|       |
 2106|     46|    constexpr uint64_t kDayInMicros = uint64_t{86400} * 1000000U;
 2107|       |
 2108|       |    // Skip if stats are extremely old (> 1 day, incl not yet populated)
 2109|     46|    if (now_micros - stats.last_end_time_micros_ < kDayInMicros) {
  ------------------
  |  Branch (2109:9): [True: 46, False: 0]
  ------------------
 2110|     46|      value->append(stats.ToString(clock_));
 2111|     46|    }
 2112|     46|  }
 2113|     46|}
_ZN7rocksdb13InternalStats19DumpCFFileHistogramEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2115|     46|void InternalStats::DumpCFFileHistogram(std::string* value) {
 2116|     46|  assert(value);
 2117|     46|  assert(cfd_);
 2118|       |
 2119|     46|  std::ostringstream oss;
 2120|     46|  oss << "\n** File Read Latency Histogram By Level [" << cfd_->GetName()
 2121|     46|      << "] **\n";
 2122|       |
 2123|    368|  for (int level = 0; level < number_levels_; level++) {
  ------------------
  |  Branch (2123:23): [True: 322, False: 46]
  ------------------
 2124|    322|    if (!file_read_latency_[level].Empty()) {
  ------------------
  |  Branch (2124:9): [True: 0, False: 322]
  ------------------
 2125|      0|      oss << "** Level " << level << " read latency histogram (micros):\n"
 2126|      0|          << file_read_latency_[level].ToString() << '\n';
 2127|      0|    }
 2128|    322|  }
 2129|       |
 2130|     46|  if (!blob_file_read_latency_.Empty()) {
  ------------------
  |  Branch (2130:7): [True: 0, False: 46]
  ------------------
 2131|      0|    oss << "** Blob file read latency histogram (micros):\n"
 2132|      0|        << blob_file_read_latency_.ToString() << '\n';
 2133|      0|  }
 2134|       |
 2135|     46|  value->append(oss.str());
 2136|     46|}
internal_stats.cc:_ZN7rocksdb12_GLOBAL__N_121GetPropertyNameAndArgERKNS_5SliceE:
  227|    184|std::pair<Slice, Slice> GetPropertyNameAndArg(const Slice& property) {
  228|    184|  Slice name = property, arg = property;
  229|    184|  size_t sfx_len = 0;
  230|    184|  while (sfx_len < property.size() &&
  ------------------
  |  Branch (230:10): [True: 184, False: 0]
  ------------------
  231|    184|         isdigit(property[property.size() - sfx_len - 1])) {
  ------------------
  |  Branch (231:10): [True: 0, False: 184]
  ------------------
  232|      0|    ++sfx_len;
  233|      0|  }
  234|    184|  name.remove_suffix(sfx_len);
  235|    184|  arg.remove_prefix(property.size() - sfx_len);
  236|    184|  return {name, arg};
  237|    184|}
internal_stats.cc:_ZN7rocksdb12_GLOBAL__N_117PrepareLevelStatsEPNSt3__13mapINS_13LevelStatTypeEdNS1_4lessIS3_EENS1_9allocatorINS1_4pairIKS3_dEEEEEEiidddRKNS_13InternalStats15CompactionStatsE:
  126|     92|                       const InternalStats::CompactionStats& stats) {
  127|     92|  const uint64_t bytes_read = stats.bytes_read_non_output_levels +
  128|     92|                              stats.bytes_read_output_level +
  129|     92|                              stats.bytes_read_blob;
  130|     92|  const uint64_t bytes_written = stats.bytes_written + stats.bytes_written_blob;
  131|     92|  const int64_t bytes_new = stats.bytes_written - stats.bytes_read_output_level;
  132|     92|  const double elapsed = (stats.micros + 1) / kMicrosInSec;
  133|       |
  134|     92|  (*level_stats)[LevelStatType::NUM_FILES] = num_files;
  135|     92|  (*level_stats)[LevelStatType::COMPACTED_FILES] = being_compacted;
  136|     92|  (*level_stats)[LevelStatType::SIZE_BYTES] = total_file_size;
  137|     92|  (*level_stats)[LevelStatType::SCORE] = score;
  138|     92|  (*level_stats)[LevelStatType::READ_GB] = bytes_read / kGB;
  139|     92|  (*level_stats)[LevelStatType::RN_GB] =
  140|     92|      stats.bytes_read_non_output_levels / kGB;
  141|     92|  (*level_stats)[LevelStatType::RNP1_GB] = stats.bytes_read_output_level / kGB;
  142|     92|  (*level_stats)[LevelStatType::WRITE_GB] = stats.bytes_written / kGB;
  143|     92|  (*level_stats)[LevelStatType::W_NEW_GB] = bytes_new / kGB;
  144|     92|  (*level_stats)[LevelStatType::MOVED_GB] = stats.bytes_moved / kGB;
  145|     92|  (*level_stats)[LevelStatType::WRITE_AMP] = w_amp;
  146|     92|  (*level_stats)[LevelStatType::READ_MBPS] = bytes_read / kMB / elapsed;
  147|     92|  (*level_stats)[LevelStatType::WRITE_MBPS] = bytes_written / kMB / elapsed;
  148|     92|  (*level_stats)[LevelStatType::COMP_SEC] = stats.micros / kMicrosInSec;
  149|     92|  (*level_stats)[LevelStatType::COMP_CPU_SEC] = stats.cpu_micros / kMicrosInSec;
  150|     92|  (*level_stats)[LevelStatType::COMP_COUNT] = stats.count;
  151|     92|  (*level_stats)[LevelStatType::AVG_SEC] =
  152|     92|      stats.count == 0 ? 0 : stats.micros / kMicrosInSec / stats.count;
  ------------------
  |  Branch (152:7): [True: 92, False: 0]
  ------------------
  153|     92|  (*level_stats)[LevelStatType::KEY_IN] =
  154|     92|      static_cast<double>(stats.num_input_records);
  155|     92|  (*level_stats)[LevelStatType::KEY_DROP] =
  156|     92|      static_cast<double>(stats.num_dropped_records);
  157|     92|  (*level_stats)[LevelStatType::R_BLOB_GB] = stats.bytes_read_blob / kGB;
  158|     92|  (*level_stats)[LevelStatType::W_BLOB_GB] = stats.bytes_written_blob / kGB;
  159|     92|}
internal_stats.cc:_ZN7rocksdb12_GLOBAL__N_121PrintLevelStatsHeaderEPcmRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_:
   93|     92|                           const std::string& group_by) {
   94|     92|  int written_size =
   95|     92|      snprintf(buf, len, "\n** Compaction Stats [%s] **\n", cf_name.c_str());
   96|     92|  written_size = std::min(written_size, static_cast<int>(len));
   97|     92|  auto hdr = [](LevelStatType t) {
   98|     92|    return InternalStats::compaction_level_stats.at(t).header_name.c_str();
   99|     92|  };
  100|     92|  int line_size = snprintf(
  101|     92|      buf + written_size, len - written_size,
  102|     92|      "%s    %s   %s     %s %s  %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s "
  103|     92|      "%s\n",
  104|       |      // Note that we skip COMPACTED_FILES and merge it with Files column
  105|     92|      group_by.c_str(), hdr(LevelStatType::NUM_FILES),
  106|     92|      hdr(LevelStatType::SIZE_BYTES), hdr(LevelStatType::SCORE),
  107|     92|      hdr(LevelStatType::READ_GB), hdr(LevelStatType::RN_GB),
  108|     92|      hdr(LevelStatType::RNP1_GB), hdr(LevelStatType::WRITE_GB),
  109|     92|      hdr(LevelStatType::W_NEW_GB), hdr(LevelStatType::MOVED_GB),
  110|     92|      hdr(LevelStatType::WRITE_AMP), hdr(LevelStatType::READ_MBPS),
  111|     92|      hdr(LevelStatType::WRITE_MBPS), hdr(LevelStatType::COMP_SEC),
  112|     92|      hdr(LevelStatType::COMP_CPU_SEC), hdr(LevelStatType::COMP_COUNT),
  113|     92|      hdr(LevelStatType::AVG_SEC), hdr(LevelStatType::KEY_IN),
  114|     92|      hdr(LevelStatType::KEY_DROP), hdr(LevelStatType::R_BLOB_GB),
  115|     92|      hdr(LevelStatType::W_BLOB_GB));
  116|       |
  117|     92|  written_size += line_size;
  118|     92|  written_size = std::min(written_size, static_cast<int>(len));
  119|     92|  snprintf(buf + written_size, len - written_size, "%s\n",
  120|     92|           std::string(line_size, '-').c_str());
  121|     92|}
internal_stats.cc:_ZZN7rocksdb12_GLOBAL__N_121PrintLevelStatsHeaderEPcmRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_ENK3$_0clENS_13LevelStatTypeE:
   97|  1.84k|  auto hdr = [](LevelStatType t) {
   98|  1.84k|    return InternalStats::compaction_level_stats.at(t).header_name.c_str();
   99|  1.84k|  };
internal_stats.cc:_ZN7rocksdb12_GLOBAL__N_115PrintLevelStatsEPcmRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS2_3mapINS_13LevelStatTypeEdNS2_4lessISC_EENS6_INS2_4pairIKSC_dEEEEEE:
  162|     92|                     const std::map<LevelStatType, double>& stat_value) {
  163|     92|  snprintf(
  164|     92|      buf, len,
  165|     92|      "%4s "      /*  Level */
  166|     92|      "%6d/%-3d " /*  Files */
  167|     92|      "%8s "      /*  Size */
  168|     92|      "%5.1f "    /*  Score */
  169|     92|      "%8.1f "    /*  Read(GB) */
  170|     92|      "%7.1f "    /*  Rn(GB) */
  171|     92|      "%8.1f "    /*  Rnp1(GB) */
  172|     92|      "%9.1f "    /*  Write(GB) */
  173|     92|      "%8.1f "    /*  Wnew(GB) */
  174|     92|      "%9.1f "    /*  Moved(GB) */
  175|     92|      "%5.1f "    /*  W-Amp */
  176|     92|      "%8.1f "    /*  Rd(MB/s) */
  177|     92|      "%8.1f "    /*  Wr(MB/s) */
  178|     92|      "%9.2f "    /*  Comp(sec) */
  179|     92|      "%17.2f "   /*  CompMergeCPU(sec) */
  180|     92|      "%9d "      /*  Comp(cnt) */
  181|     92|      "%8.3f "    /*  Avg(sec) */
  182|     92|      "%7s "      /*  KeyIn */
  183|     92|      "%6s "      /*  KeyDrop */
  184|     92|      "%9.1f "    /*  Rblob(GB) */
  185|     92|      "%9.1f\n",  /*  Wblob(GB) */
  186|     92|      name.c_str(), static_cast<int>(stat_value.at(LevelStatType::NUM_FILES)),
  187|     92|      static_cast<int>(stat_value.at(LevelStatType::COMPACTED_FILES)),
  188|     92|      BytesToHumanString(
  189|     92|          static_cast<uint64_t>(stat_value.at(LevelStatType::SIZE_BYTES)))
  190|     92|          .c_str(),
  191|     92|      stat_value.at(LevelStatType::SCORE),
  192|     92|      stat_value.at(LevelStatType::READ_GB),
  193|     92|      stat_value.at(LevelStatType::RN_GB),
  194|     92|      stat_value.at(LevelStatType::RNP1_GB),
  195|     92|      stat_value.at(LevelStatType::WRITE_GB),
  196|     92|      stat_value.at(LevelStatType::W_NEW_GB),
  197|     92|      stat_value.at(LevelStatType::MOVED_GB),
  198|     92|      stat_value.at(LevelStatType::WRITE_AMP),
  199|     92|      stat_value.at(LevelStatType::READ_MBPS),
  200|     92|      stat_value.at(LevelStatType::WRITE_MBPS),
  201|     92|      stat_value.at(LevelStatType::COMP_SEC),
  202|     92|      stat_value.at(LevelStatType::COMP_CPU_SEC),
  203|     92|      static_cast<int>(stat_value.at(LevelStatType::COMP_COUNT)),
  204|     92|      stat_value.at(LevelStatType::AVG_SEC),
  205|     92|      NumberToHumanString(
  206|     92|          static_cast<std::int64_t>(stat_value.at(LevelStatType::KEY_IN)))
  207|     92|          .c_str(),
  208|     92|      NumberToHumanString(
  209|     92|          static_cast<std::int64_t>(stat_value.at(LevelStatType::KEY_DROP)))
  210|     92|          .c_str(),
  211|     92|      stat_value.at(LevelStatType::R_BLOB_GB),
  212|     92|      stat_value.at(LevelStatType::W_BLOB_GB));
  213|     92|}
internal_stats.cc:_ZN7rocksdb12_GLOBAL__N_115PrintLevelStatsEPcmRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEiidddRKNS_13InternalStats15CompactionStatsE:
  218|     46|                     const InternalStats::CompactionStats& stats) {
  219|     46|  std::map<LevelStatType, double> level_stats;
  220|     46|  PrepareLevelStats(&level_stats, num_files, being_compacted, total_file_size,
  221|     46|                    score, w_amp, stats);
  222|     46|  PrintLevelStats(buf, len, name, level_stats);
  223|     46|}
internal_stats.cc:_ZZN7rocksdb13InternalStats19CacheEntryRoleStats16GetEntryCallbackEvENK3$_0clERKNS_5SliceEPvmPKNS_5Cache15CacheItemHelperE:
  688|     46|             const Cache::CacheItemHelper* helper) -> void {
  689|     46|    size_t role_idx =
  690|     46|        static_cast<size_t>(helper ? helper->role : CacheEntryRole::kMisc);
  ------------------
  |  Branch (690:29): [True: 46, False: 0]
  ------------------
  691|     46|    entry_counts[role_idx]++;
  692|     46|    total_charges[role_idx] += charge;
  693|     46|  };

_ZN7rocksdb13InternalStats15CompactionStatsC2Ev:
  242|   117k|          count(0) {
  243|   117k|      int num_of_reasons = static_cast<int>(CompactionReason::kNumOfReasons);
  244|  2.46M|      for (int i = 0; i < num_of_reasons; i++) {
  ------------------
  |  Branch (244:23): [True: 2.34M, False: 117k]
  ------------------
  245|  2.34M|        counts[i] = 0;
  246|  2.34M|      }
  247|   117k|    }
_ZN7rocksdb13InternalStats15CompactionStatsC2ENS_16CompactionReasonEi:
  265|  4.48k|          count(c) {
  266|  4.48k|      int num_of_reasons = static_cast<int>(CompactionReason::kNumOfReasons);
  267|  94.1k|      for (int i = 0; i < num_of_reasons; i++) {
  ------------------
  |  Branch (267:23): [True: 89.6k, False: 4.48k]
  ------------------
  268|  89.6k|        counts[i] = 0;
  269|  89.6k|      }
  270|  4.48k|      int r = static_cast<int>(reason);
  271|  4.48k|      if (r >= 0 && r < num_of_reasons) {
  ------------------
  |  Branch (271:11): [True: 4.48k, False: 0]
  |  Branch (271:21): [True: 4.48k, False: 0]
  ------------------
  272|  4.48k|        counts[r] = c;
  273|  4.48k|      } else {
  274|      0|        count = 0;
  275|      0|      }
  276|  4.48k|    }
_ZN7rocksdb13InternalStats15CompactionStatsC2ERKS1_:
  295|     46|          count(c.count) {
  296|     46|      int num_of_reasons = static_cast<int>(CompactionReason::kNumOfReasons);
  297|    966|      for (int i = 0; i < num_of_reasons; i++) {
  ------------------
  |  Branch (297:23): [True: 920, False: 46]
  ------------------
  298|    920|        counts[i] = c.counts[i];
  299|    920|      }
  300|     46|    }
_ZN7rocksdb13InternalStats15CompactionStatsaSERKS1_:
  302|     46|    CompactionStats& operator=(const CompactionStats& c) {
  303|     46|      micros = c.micros;
  304|     46|      cpu_micros = c.cpu_micros;
  305|     46|      bytes_read_non_output_levels = c.bytes_read_non_output_levels;
  306|     46|      bytes_read_output_level = c.bytes_read_output_level;
  307|     46|      bytes_read_blob = c.bytes_read_blob;
  308|     46|      bytes_written = c.bytes_written;
  309|     46|      bytes_written_blob = c.bytes_written_blob;
  310|     46|      bytes_moved = c.bytes_moved;
  311|     46|      num_input_files_in_non_output_levels =
  312|     46|          c.num_input_files_in_non_output_levels;
  313|     46|      num_input_files_in_output_level = c.num_input_files_in_output_level;
  314|     46|      num_output_files = c.num_output_files;
  315|     46|      num_output_files_blob = c.num_output_files_blob;
  316|     46|      num_input_records = c.num_input_records;
  317|     46|      num_dropped_records = c.num_dropped_records;
  318|     46|      num_output_records = c.num_output_records;
  319|     46|      count = c.count;
  320|       |
  321|     46|      int num_of_reasons = static_cast<int>(CompactionReason::kNumOfReasons);
  322|    966|      for (int i = 0; i < num_of_reasons; i++) {
  ------------------
  |  Branch (322:23): [True: 920, False: 46]
  ------------------
  323|    920|        counts[i] = c.counts[i];
  324|    920|      }
  325|     46|      return *this;
  326|     46|    }
_ZN7rocksdb13InternalStats15CompactionStats3AddERKS1_:
  351|  8.96k|    void Add(const CompactionStats& c) {
  352|  8.96k|      this->micros += c.micros;
  353|  8.96k|      this->cpu_micros += c.cpu_micros;
  354|  8.96k|      this->bytes_read_non_output_levels += c.bytes_read_non_output_levels;
  355|  8.96k|      this->bytes_read_output_level += c.bytes_read_output_level;
  356|  8.96k|      this->bytes_read_blob += c.bytes_read_blob;
  357|  8.96k|      this->bytes_written += c.bytes_written;
  358|  8.96k|      this->bytes_written_blob += c.bytes_written_blob;
  359|  8.96k|      this->bytes_moved += c.bytes_moved;
  360|  8.96k|      this->num_input_files_in_non_output_levels +=
  361|  8.96k|          c.num_input_files_in_non_output_levels;
  362|  8.96k|      this->num_input_files_in_output_level +=
  363|  8.96k|          c.num_input_files_in_output_level;
  364|  8.96k|      this->num_output_files += c.num_output_files;
  365|  8.96k|      this->num_output_files_blob += c.num_output_files_blob;
  366|  8.96k|      this->num_input_records += c.num_input_records;
  367|  8.96k|      this->num_dropped_records += c.num_dropped_records;
  368|  8.96k|      this->num_output_records += c.num_output_records;
  369|  8.96k|      this->count += c.count;
  370|  8.96k|      int num_of_reasons = static_cast<int>(CompactionReason::kNumOfReasons);
  371|   188k|      for (int i = 0; i < num_of_reasons; i++) {
  ------------------
  |  Branch (371:23): [True: 179k, False: 8.96k]
  ------------------
  372|   179k|        counts[i] += c.counts[i];
  373|   179k|      }
  374|  8.96k|    }
_ZN7rocksdb13InternalStats15CompactionStats8SubtractERKS1_:
  385|     46|    void Subtract(const CompactionStats& c) {
  386|     46|      this->micros -= c.micros;
  387|     46|      this->cpu_micros -= c.cpu_micros;
  388|     46|      this->bytes_read_non_output_levels -= c.bytes_read_non_output_levels;
  389|     46|      this->bytes_read_output_level -= c.bytes_read_output_level;
  390|     46|      this->bytes_read_blob -= c.bytes_read_blob;
  391|     46|      this->bytes_written -= c.bytes_written;
  392|     46|      this->bytes_written_blob -= c.bytes_written_blob;
  393|     46|      this->bytes_moved -= c.bytes_moved;
  394|     46|      this->num_input_files_in_non_output_levels -=
  395|     46|          c.num_input_files_in_non_output_levels;
  396|     46|      this->num_input_files_in_output_level -=
  397|     46|          c.num_input_files_in_output_level;
  398|     46|      this->num_output_files -= c.num_output_files;
  399|     46|      this->num_output_files_blob -= c.num_output_files_blob;
  400|     46|      this->num_input_records -= c.num_input_records;
  401|     46|      this->num_dropped_records -= c.num_dropped_records;
  402|     46|      this->num_output_records -= c.num_output_records;
  403|     46|      this->count -= c.count;
  404|     46|      int num_of_reasons = static_cast<int>(CompactionReason::kNumOfReasons);
  405|    966|      for (int i = 0; i < num_of_reasons; i++) {
  ------------------
  |  Branch (405:23): [True: 920, False: 46]
  ------------------
  406|    920|        counts[i] -= c.counts[i];
  407|    920|      }
  408|     46|    }
_ZN7rocksdb13InternalStats19CacheEntryRoleStats5ClearEv:
  483|     46|    void Clear() {
  484|       |      // Wipe everything except collection_count
  485|     46|      uint32_t saved_collection_count = collection_count;
  486|     46|      *this = CacheEntryRoleStats();
  487|     46|      collection_count = saved_collection_count;
  488|     46|    }
_ZN7rocksdb13InternalStats18AddCompactionStatsEiNS_3Env8PriorityERKNS0_15CompactionStatsE:
  529|  4.48k|                          const CompactionStats& stats) {
  530|  4.48k|    comp_stats_[level].Add(stats);
  531|  4.48k|    comp_stats_by_pri_[thread_pri].Add(stats);
  532|  4.48k|  }
_ZN7rocksdb13InternalStats10AddCFStatsENS0_19InternalCFStatsTypeEm:
  547|  4.48k|  void AddCFStats(InternalCFStatsType type, uint64_t value) {
  548|  4.48k|    has_cf_change_since_dump_ = true;
  549|  4.48k|    cf_stats_value_[type] += value;
  550|  4.48k|    ++cf_stats_count_[type];
  551|  4.48k|  }
_ZN7rocksdb13InternalStats10AddDBStatsENS0_19InternalDBStatsTypeEmb:
  554|  6.80M|                  bool concurrent = false) {
  555|  6.80M|    auto& v = db_stats_[type];
  556|  6.80M|    if (concurrent) {
  ------------------
  |  Branch (556:9): [True: 0, False: 6.80M]
  ------------------
  557|      0|      v.fetch_add(value, std::memory_order_relaxed);
  558|  6.80M|    } else {
  559|  6.80M|      v.store(v.load(std::memory_order_relaxed) + value,
  560|  6.80M|              std::memory_order_relaxed);
  561|  6.80M|    }
  562|  6.80M|  }
_ZN7rocksdb13InternalStats10GetDBStatsENS0_19InternalDBStatsTypeE:
  564|    368|  uint64_t GetDBStats(InternalDBStatsType type) {
  565|    368|    return db_stats_[type].load(std::memory_order_relaxed);
  566|    368|  }
_ZN7rocksdb13InternalStats15GetFileReadHistEi:
  568|  13.4k|  HistogramImpl* GetFileReadHist(int level) {
  569|  13.4k|    return &file_read_latency_[level];
  570|  13.4k|  }
_ZN7rocksdb13InternalStats19GetBlobFileReadHistEv:
  572|  9.02k|  HistogramImpl* GetBlobFileReadHist() { return &blob_file_read_latency_; }
_ZN7rocksdb13InternalStats15CFStatsSnapshotC2Ev:
  698|  9.02k|          ingest_keys_addfile(0) {}
_ZN7rocksdb13InternalStats15DBStatsSnapshotC2Ev:
  743|  9.02k|          seconds_up(0) {}

_ZN7rocksdb10JobContextC2Eib:
  216|  36.1k|  explicit JobContext(int _job_id, bool create_superversion = false) {
  217|  36.1k|    job_id = _job_id;
  218|  36.1k|    manifest_file_number = 0;
  219|  36.1k|    pending_manifest_file_number = 0;
  220|  36.1k|    log_number = 0;
  221|  36.1k|    prev_log_number = 0;
  222|  36.1k|    superversion_contexts.emplace_back(
  223|  36.1k|        SuperVersionContext(create_superversion));
  224|  36.1k|  }
_ZN7rocksdb19SuperVersionContextC2EOS0_:
   52|  36.1k|        new_superversion(std::move(other.new_superversion)) {
   53|  36.1k|  }
_ZNK7rocksdb10JobContext21HaveSomethingToDeleteEv:
  115|  54.1k|  inline bool HaveSomethingToDelete() const {
  116|  54.1k|    return !(full_scan_candidate_files.empty() && sst_delete_files.empty() &&
  ------------------
  |  Branch (116:14): [True: 18.0k, False: 36.1k]
  |  Branch (116:51): [True: 18.0k, False: 0]
  ------------------
  117|  54.1k|             blob_delete_files.empty() && log_delete_files.empty() &&
  ------------------
  |  Branch (117:14): [True: 18.0k, False: 0]
  |  Branch (117:43): [True: 18.0k, False: 0]
  ------------------
  118|  54.1k|             manifest_delete_files.empty());
  ------------------
  |  Branch (118:14): [True: 18.0k, False: 0]
  ------------------
  119|  54.1k|  }
_ZN7rocksdb10JobContext5CleanEv:
  230|  36.1k|  void Clean() {
  231|       |    // free superversions
  232|  36.1k|    for (auto& sv_context : superversion_contexts) {
  ------------------
  |  Branch (232:27): [True: 36.1k, False: 36.1k]
  ------------------
  233|  36.1k|      sv_context.Clean();
  234|  36.1k|    }
  235|       |    // free pending memtables
  236|  36.1k|    for (auto m : memtables_to_free) {
  ------------------
  |  Branch (236:17): [True: 0, False: 36.1k]
  ------------------
  237|      0|      delete m;
  238|      0|    }
  239|  36.1k|    for (auto l : logs_to_free) {
  ------------------
  |  Branch (239:17): [True: 0, False: 36.1k]
  ------------------
  240|      0|      delete l;
  241|      0|    }
  242|       |
  243|  36.1k|    memtables_to_free.clear();
  244|  36.1k|    logs_to_free.clear();
  245|  36.1k|    job_snapshot.reset();
  246|  36.1k|  }
_ZN7rocksdb10JobContextD2Ev:
  248|  36.1k|  ~JobContext() {
  249|  36.1k|    assert(memtables_to_free.size() == 0);
  250|  36.1k|    assert(logs_to_free.size() == 0);
  251|  36.1k|  }
_ZN7rocksdb19SuperVersionContextC2Eb:
   45|  1.40M|      : new_superversion(create_superversion ? new SuperVersion() : nullptr) {}
_ZN7rocksdb19SuperVersionContext5CleanEv:
   89|  1.40M|  void Clean() {
   90|  1.40M|#if !defined(ROCKSDB_DISABLE_STALL_NOTIFICATION)
   91|       |    // notify listeners on changed write stall conditions
   92|  1.40M|    for (auto& notif : write_stall_notifications) {
  ------------------
  |  Branch (92:22): [True: 0, False: 1.40M]
  ------------------
   93|      0|      for (auto& listener : notif.immutable_options->listeners) {
  ------------------
  |  Branch (93:27): [True: 0, False: 0]
  ------------------
   94|      0|        listener->OnStallConditionsChanged(notif.write_stall_info);
   95|      0|      }
   96|      0|    }
   97|  1.40M|    write_stall_notifications.clear();
   98|  1.40M|#endif
   99|       |    // free superversions
  100|  1.40M|    for (auto s : superversions_to_free) {
  ------------------
  |  Branch (100:17): [True: 0, False: 1.40M]
  ------------------
  101|      0|      delete s;
  102|      0|    }
  103|  1.40M|    superversions_to_free.clear();
  104|  1.40M|  }
_ZN7rocksdb19SuperVersionContextD2Ev:
  106|  1.44M|  ~SuperVersionContext() {
  107|  1.44M|#ifndef ROCKSDB_DISABLE_STALL_NOTIFICATION
  108|  1.44M|    assert(write_stall_notifications.empty());
  109|  1.44M|#endif
  110|  1.44M|    assert(superversions_to_free.empty());
  111|  1.44M|  }
_ZN7rocksdb10JobContext17CandidateFileInfoC2ENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES8_:
  146|   175k|        : file_name(std::move(name)), file_path(std::move(path)) {}
_ZNK7rocksdb10JobContext17CandidateFileInfoeqERKS1_:
  147|   157k|    bool operator==(const CandidateFileInfo& other) const {
  148|   157k|      return file_name == other.file_name && file_path == other.file_path;
  ------------------
  |  Branch (148:14): [True: 9.02k, False: 148k]
  |  Branch (148:46): [True: 9.02k, False: 0]
  ------------------
  149|   157k|    }

_ZNK7rocksdb14ProtectionInfoImE6GetValEv:
   94|  7.97M|  T GetVal() const { return val_; }
_ZN7rocksdb14ProtectionInfoImEC2Ev:
   61|  1.36M|  ProtectionInfo() = default;
_ZNK7rocksdb14ProtectionInfoImE10ProtectKVOERKNS_5SliceES4_NS_9ValueTypeE:
  298|  1.36M|                                                   ValueType op_type) const {
  299|  1.36M|  T val = GetVal();
  300|  1.36M|  val = val ^ static_cast<T>(GetSliceNPHash64(key, ProtectionInfo<T>::kSeedK));
  301|  1.36M|  val =
  302|  1.36M|      val ^ static_cast<T>(GetSliceNPHash64(value, ProtectionInfo<T>::kSeedV));
  303|  1.36M|  val = val ^
  304|  1.36M|        static_cast<T>(NPHash64(reinterpret_cast<char*>(&op_type),
  305|  1.36M|                                sizeof(op_type), ProtectionInfo<T>::kSeedO));
  306|  1.36M|  return ProtectionInfoKVO<T>(val);
  307|  1.36M|}
_ZN7rocksdb17ProtectionInfoKVOImEC2Em:
  171|  6.52M|  explicit ProtectionInfoKVO(T val) : info_(val) {
  172|  6.52M|    static_assert(sizeof(ProtectionInfoKVO<T>) == sizeof(T), "");
  173|  6.52M|  }
_ZN7rocksdb14ProtectionInfoImEC2Em:
   90|  7.79M|  ProtectionInfo(T val) : val_(val) {
   91|  7.79M|    static_assert(sizeof(ProtectionInfo<T>) == sizeof(T), "");
   92|  7.79M|  }
_ZNK7rocksdb17ProtectionInfoKVOImE8ProtectSEm:
  454|  1.26M|    SequenceNumber sequence_number) const {
  455|  1.26M|  T val = GetVal();
  456|  1.26M|  val = val ^ static_cast<T>(NPHash64(reinterpret_cast<char*>(&sequence_number),
  457|  1.26M|                                      sizeof(sequence_number),
  458|  1.26M|                                      ProtectionInfo<T>::kSeedS));
  459|  1.26M|  return ProtectionInfoKVOS<T>(val);
  460|  1.26M|}
_ZNK7rocksdb17ProtectionInfoKVOImE6GetValEv:
  175|  6.61M|  T GetVal() const { return info_.GetVal(); }
_ZN7rocksdb18ProtectionInfoKVOSImEC2Em:
  257|  1.26M|  explicit ProtectionInfoKVOS(T val) : kvo_(val) {
  258|  1.26M|    static_assert(sizeof(ProtectionInfoKVOS<T>) == sizeof(T), "");
  259|  1.26M|  }
_ZNK7rocksdb18ProtectionInfoKVOSImE6StripSEm:
  464|  1.26M|    SequenceNumber sequence_number) const {
  465|  1.26M|  T val = GetVal();
  466|  1.26M|  val = val ^ static_cast<T>(NPHash64(reinterpret_cast<char*>(&sequence_number),
  467|  1.26M|                                      sizeof(sequence_number),
  468|  1.26M|                                      ProtectionInfo<T>::kSeedS));
  469|  1.26M|  return ProtectionInfoKVO<T>(val);
  470|  1.26M|}
_ZNK7rocksdb18ProtectionInfoKVOSImE6GetValEv:
  261|  1.26M|  T GetVal() const { return kvo_.GetVal(); }
_ZNK7rocksdb17ProtectionInfoKVOImE8StripKVOERKNS_5SliceES4_NS_9ValueTypeE:
  393|  1.26M|                                                 ValueType op_type) const {
  394|  1.26M|  T val = GetVal();
  395|  1.26M|  val = val ^ static_cast<T>(GetSliceNPHash64(key, ProtectionInfo<T>::kSeedK));
  396|  1.26M|  val =
  397|  1.26M|      val ^ static_cast<T>(GetSliceNPHash64(value, ProtectionInfo<T>::kSeedV));
  398|  1.26M|  val = val ^
  399|  1.26M|        static_cast<T>(NPHash64(reinterpret_cast<char*>(&op_type),
  400|  1.26M|                                sizeof(op_type), ProtectionInfo<T>::kSeedO));
  401|  1.26M|  return ProtectionInfo<T>(val);
  402|  1.26M|}
_ZNK7rocksdb14ProtectionInfoImE9GetStatusEv:
  288|  1.26M|Status ProtectionInfo<T>::GetStatus() const {
  289|  1.26M|  if (val_ != 0) {
  ------------------
  |  Branch (289:7): [True: 0, False: 1.26M]
  ------------------
  290|      0|    return Status::Corruption("ProtectionInfo mismatch");
  291|      0|  }
  292|  1.26M|  return Status::OK();
  293|  1.26M|}
_ZN7rocksdb17ProtectionInfoKVOImE6SetValEm:
  176|   186k|  void SetVal(T val) { info_.SetVal(val); }
_ZN7rocksdb14ProtectionInfoImE6SetValEm:
   95|   186k|  void SetVal(T val) { val_ = val; }
_ZN7rocksdb18ProtectionInfoKVOSImE7UpdateOENS_9ValueTypeES2_:
  243|   186k|  void UpdateO(ValueType old_op_type, ValueType new_op_type) {
  244|   186k|    kvo_.UpdateO(old_op_type, new_op_type);
  245|   186k|  }
_ZN7rocksdb17ProtectionInfoKVOImE7UpdateOENS_9ValueTypeES2_:
  379|   186k|                                   ValueType new_op_type) {
  380|   186k|  T val = GetVal();
  381|   186k|  val = val ^ static_cast<T>(NPHash64(reinterpret_cast<char*>(&old_op_type),
  382|   186k|                                      sizeof(old_op_type),
  383|   186k|                                      ProtectionInfo<T>::kSeedO));
  384|   186k|  val = val ^ static_cast<T>(NPHash64(reinterpret_cast<char*>(&new_op_type),
  385|   186k|                                      sizeof(new_op_type),
  386|   186k|                                      ProtectionInfo<T>::kSeedO));
  387|   186k|  SetVal(val);
  388|   186k|}
_ZNK7rocksdb17ProtectionInfoKVOImE8ProtectCEj:
  421|  1.36M|    ColumnFamilyId column_family_id) const {
  422|  1.36M|  T val = GetVal();
  423|  1.36M|  val = val ^ static_cast<T>(NPHash64(
  424|  1.36M|                  reinterpret_cast<char*>(&column_family_id),
  425|  1.36M|                  sizeof(column_family_id), ProtectionInfo<T>::kSeedC));
  426|  1.36M|  return ProtectionInfoKVOC<T>(val);
  427|  1.36M|}
_ZN7rocksdb18ProtectionInfoKVOCImEC2Em:
  214|  1.36M|  explicit ProtectionInfoKVOC(T val) : kvo_(val) {
  215|  1.36M|    static_assert(sizeof(ProtectionInfoKVOC<T>) == sizeof(T), "");
  216|  1.36M|  }
_ZNK7rocksdb18ProtectionInfoKVOCImE6StripCEj:
  431|  1.26M|    ColumnFamilyId column_family_id) const {
  432|  1.26M|  T val = GetVal();
  433|  1.26M|  val = val ^ static_cast<T>(NPHash64(
  434|  1.26M|                  reinterpret_cast<char*>(&column_family_id),
  435|  1.26M|                  sizeof(column_family_id), ProtectionInfo<T>::kSeedC));
  436|  1.26M|  return ProtectionInfoKVO<T>(val);
  437|  1.26M|}
_ZNK7rocksdb18ProtectionInfoKVOCImE6GetValEv:
  218|  1.26M|  T GetVal() const { return kvo_.GetVal(); }

_ZN7rocksdb3log6Reader8ReporterD2Ev:
   23|  13.5k|Reader::Reporter::~Reporter() = default;
_ZN7rocksdb3log6ReaderC2ENSt3__110shared_ptrINS_6LoggerEEEONS2_10unique_ptrINS_20SequentialFileReaderENS2_14default_deleteIS7_EEEEPNS1_8ReporterEbm:
   46|  13.5k|      uncompress_hash_state_(nullptr){}
_ZN7rocksdb3log6ReaderD2Ev:
   48|  13.5k|Reader::~Reader() {
   49|  13.5k|  delete[] backing_store_;
   50|  13.5k|  if (uncompress_) {
  ------------------
  |  Branch (50:7): [True: 0, False: 13.5k]
  ------------------
   51|      0|    delete uncompress_;
   52|      0|  }
   53|  13.5k|  if (hash_state_) {
  ------------------
  |  Branch (53:7): [True: 4.51k, False: 9.02k]
  ------------------
   54|  4.51k|    XXH3_freeState(hash_state_);
  ------------------
  |  |  415|  4.51k|#  define XXH3_freeState XXH_NAME2(XXH_NAMESPACE, XXH3_freeState)
  |  |  ------------------
  |  |  |  |  387|  4.51k|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  4.51k|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   55|  4.51k|  }
   56|  13.5k|  if (uncompress_hash_state_) {
  ------------------
  |  Branch (56:7): [True: 0, False: 13.5k]
  ------------------
   57|      0|    XXH3_freeState(uncompress_hash_state_);
  ------------------
  |  |  415|      0|#  define XXH3_freeState XXH_NAME2(XXH_NAMESPACE, XXH3_freeState)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   58|      0|  }
   59|  13.5k|}
_ZN7rocksdb3log6Reader10ReadRecordEPNS_5SliceEPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS_15WALRecoveryModeEPm:
   70|  1.39M|                        uint64_t* record_checksum) {
   71|  1.39M|  scratch->clear();
   72|  1.39M|  record->clear();
   73|  1.39M|  if (record_checksum != nullptr) {
  ------------------
  |  Branch (73:7): [True: 1.36M, False: 31.5k]
  ------------------
   74|  1.36M|    if (hash_state_ == nullptr) {
  ------------------
  |  Branch (74:9): [True: 4.51k, False: 1.36M]
  ------------------
   75|  4.51k|      hash_state_ = XXH3_createState();
  ------------------
  |  |  414|  4.51k|#  define XXH3_createState XXH_NAME2(XXH_NAMESPACE, XXH3_createState)
  |  |  ------------------
  |  |  |  |  387|  4.51k|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  4.51k|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   76|  4.51k|    }
   77|  1.36M|    XXH3_64bits_reset(hash_state_);
  ------------------
  |  |  417|  1.36M|#  define XXH3_64bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset)
  |  |  ------------------
  |  |  |  |  387|  1.36M|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  1.36M|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   78|  1.36M|  }
   79|  1.39M|  if (uncompress_) {
  ------------------
  |  Branch (79:7): [True: 0, False: 1.39M]
  ------------------
   80|      0|    uncompress_->Reset();
   81|      0|  }
   82|  1.39M|  bool in_fragmented_record = false;
   83|       |  // Record offset of the logical record that we're reading
   84|       |  // 0 is a dummy value to make compilers happy
   85|  1.39M|  uint64_t prospective_record_offset = 0;
   86|       |
   87|  1.39M|  Slice fragment;
   88|  1.40M|  while (true) {
  ------------------
  |  Branch (88:10): [Folded - Ignored]
  ------------------
   89|  1.40M|    uint64_t physical_record_offset = end_of_buffer_offset_ - buffer_.size();
   90|  1.40M|    size_t drop_size = 0;
   91|  1.40M|    const unsigned int record_type =
   92|  1.40M|        ReadPhysicalRecord(&fragment, &drop_size, record_checksum);
   93|  1.40M|    switch (record_type) {
   94|  1.37M|      case kFullType:
  ------------------
  |  Branch (94:7): [True: 1.37M, False: 30.7k]
  ------------------
   95|  1.37M|      case kRecyclableFullType:
  ------------------
  |  Branch (95:7): [True: 0, False: 1.40M]
  ------------------
   96|  1.37M|        if (in_fragmented_record && !scratch->empty()) {
  ------------------
  |  Branch (96:13): [True: 0, False: 1.37M]
  |  Branch (96:37): [True: 0, False: 0]
  ------------------
   97|       |          // Handle bug in earlier versions of log::Writer where
   98|       |          // it could emit an empty kFirstType record at the tail end
   99|       |          // of a block followed by a kFullType or kFirstType record
  100|       |          // at the beginning of the next block.
  101|      0|          ReportCorruption(scratch->size(), "partial record without end(1)");
  102|      0|        }
  103|       |        // No need to compute record_checksum since the record
  104|       |        // consists of a single fragment and the checksum is computed
  105|       |        // in ReadPhysicalRecord() if WAL compression is enabled
  106|  1.37M|        if (record_checksum != nullptr && uncompress_ == nullptr) {
  ------------------
  |  Branch (106:13): [True: 1.35M, False: 22.5k]
  |  Branch (106:43): [True: 1.35M, False: 0]
  ------------------
  107|       |          // No need to stream since the record is a single fragment
  108|  1.35M|          *record_checksum = XXH3_64bits(fragment.data(), fragment.size());
  ------------------
  |  |  410|  1.35M|#  define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits)
  |  |  ------------------
  |  |  |  |  387|  1.35M|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  1.35M|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  109|  1.35M|        }
  110|  1.37M|        prospective_record_offset = physical_record_offset;
  111|  1.37M|        scratch->clear();
  112|  1.37M|        *record = fragment;
  113|  1.37M|        last_record_offset_ = prospective_record_offset;
  114|  1.37M|        first_record_read_ = true;
  115|  1.37M|        return true;
  116|       |
  117|  7.03k|      case kFirstType:
  ------------------
  |  Branch (117:7): [True: 7.03k, False: 1.40M]
  ------------------
  118|  7.03k|      case kRecyclableFirstType:
  ------------------
  |  Branch (118:7): [True: 0, False: 1.40M]
  ------------------
  119|  7.03k|        if (in_fragmented_record && !scratch->empty()) {
  ------------------
  |  Branch (119:13): [True: 0, False: 7.03k]
  |  Branch (119:37): [True: 0, False: 0]
  ------------------
  120|       |          // Handle bug in earlier versions of log::Writer where
  121|       |          // it could emit an empty kFirstType record at the tail end
  122|       |          // of a block followed by a kFullType or kFirstType record
  123|       |          // at the beginning of the next block.
  124|      0|          ReportCorruption(scratch->size(), "partial record without end(2)");
  125|      0|          XXH3_64bits_reset(hash_state_);
  ------------------
  |  |  417|      0|#  define XXH3_64bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  126|      0|        }
  127|  7.03k|        if (record_checksum != nullptr) {
  ------------------
  |  Branch (127:13): [True: 7.03k, False: 0]
  ------------------
  128|  7.03k|          XXH3_64bits_update(hash_state_, fragment.data(), fragment.size());
  ------------------
  |  |  421|  7.03k|#  define XXH3_64bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_update)
  |  |  ------------------
  |  |  |  |  387|  7.03k|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  7.03k|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  129|  7.03k|        }
  130|  7.03k|        prospective_record_offset = physical_record_offset;
  131|  7.03k|        scratch->assign(fragment.data(), fragment.size());
  132|  7.03k|        in_fragmented_record = true;
  133|  7.03k|        break;
  134|       |
  135|  3.17k|      case kMiddleType:
  ------------------
  |  Branch (135:7): [True: 3.17k, False: 1.40M]
  ------------------
  136|  3.17k|      case kRecyclableMiddleType:
  ------------------
  |  Branch (136:7): [True: 0, False: 1.40M]
  ------------------
  137|  3.17k|        if (!in_fragmented_record) {
  ------------------
  |  Branch (137:13): [True: 0, False: 3.17k]
  ------------------
  138|      0|          ReportCorruption(fragment.size(),
  139|      0|                           "missing start of fragmented record(1)");
  140|  3.17k|        } else {
  141|  3.17k|          if (record_checksum != nullptr) {
  ------------------
  |  Branch (141:15): [True: 3.17k, False: 0]
  ------------------
  142|  3.17k|            XXH3_64bits_update(hash_state_, fragment.data(), fragment.size());
  ------------------
  |  |  421|  3.17k|#  define XXH3_64bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_update)
  |  |  ------------------
  |  |  |  |  387|  3.17k|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  3.17k|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  143|  3.17k|          }
  144|  3.17k|          scratch->append(fragment.data(), fragment.size());
  145|  3.17k|        }
  146|  3.17k|        break;
  147|       |
  148|  7.03k|      case kLastType:
  ------------------
  |  Branch (148:7): [True: 7.03k, False: 1.40M]
  ------------------
  149|  7.03k|      case kRecyclableLastType:
  ------------------
  |  Branch (149:7): [True: 0, False: 1.40M]
  ------------------
  150|  7.03k|        if (!in_fragmented_record) {
  ------------------
  |  Branch (150:13): [True: 0, False: 7.03k]
  ------------------
  151|      0|          ReportCorruption(fragment.size(),
  152|      0|                           "missing start of fragmented record(2)");
  153|  7.03k|        } else {
  154|  7.03k|          if (record_checksum != nullptr) {
  ------------------
  |  Branch (154:15): [True: 7.03k, False: 0]
  ------------------
  155|  7.03k|            XXH3_64bits_update(hash_state_, fragment.data(), fragment.size());
  ------------------
  |  |  421|  7.03k|#  define XXH3_64bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_update)
  |  |  ------------------
  |  |  |  |  387|  7.03k|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  7.03k|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  156|  7.03k|            *record_checksum = XXH3_64bits_digest(hash_state_);
  ------------------
  |  |  422|  7.03k|#  define XXH3_64bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_digest)
  |  |  ------------------
  |  |  |  |  387|  7.03k|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  7.03k|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  157|  7.03k|          }
  158|  7.03k|          scratch->append(fragment.data(), fragment.size());
  159|  7.03k|          *record = Slice(*scratch);
  160|  7.03k|          last_record_offset_ = prospective_record_offset;
  161|  7.03k|          first_record_read_ = true;
  162|  7.03k|          return true;
  163|  7.03k|        }
  164|      0|        break;
  165|       |
  166|      0|      case kSetCompressionType: {
  ------------------
  |  Branch (166:7): [True: 0, False: 1.40M]
  ------------------
  167|      0|        if (compression_type_record_read_) {
  ------------------
  |  Branch (167:13): [True: 0, False: 0]
  ------------------
  168|      0|          ReportCorruption(fragment.size(),
  169|      0|                           "read multiple SetCompressionType records");
  170|      0|        }
  171|      0|        if (first_record_read_) {
  ------------------
  |  Branch (171:13): [True: 0, False: 0]
  ------------------
  172|      0|          ReportCorruption(fragment.size(),
  173|      0|                           "SetCompressionType not the first record");
  174|      0|        }
  175|      0|        prospective_record_offset = physical_record_offset;
  176|      0|        scratch->clear();
  177|      0|        last_record_offset_ = prospective_record_offset;
  178|      0|        CompressionTypeRecord compression_record(kNoCompression);
  179|      0|        Status s = compression_record.DecodeFrom(&fragment);
  180|      0|        if (!s.ok()) {
  ------------------
  |  Branch (180:13): [True: 0, False: 0]
  ------------------
  181|      0|          ReportCorruption(fragment.size(),
  182|      0|                           "could not decode SetCompressionType record");
  183|      0|        } else {
  184|      0|          InitCompression(compression_record);
  185|      0|        }
  186|      0|        break;
  187|  7.03k|      }
  188|      0|      case kUserDefinedTimestampSizeType:
  ------------------
  |  Branch (188:7): [True: 0, False: 1.40M]
  ------------------
  189|      0|      case kRecyclableUserDefinedTimestampSizeType: {
  ------------------
  |  Branch (189:7): [True: 0, False: 1.40M]
  ------------------
  190|      0|        if (in_fragmented_record && !scratch->empty()) {
  ------------------
  |  Branch (190:13): [True: 0, False: 0]
  |  Branch (190:37): [True: 0, False: 0]
  ------------------
  191|      0|          ReportCorruption(
  192|      0|              scratch->size(),
  193|      0|              "user-defined timestamp size record interspersed partial record");
  194|      0|        }
  195|      0|        prospective_record_offset = physical_record_offset;
  196|      0|        scratch->clear();
  197|      0|        last_record_offset_ = prospective_record_offset;
  198|      0|        UserDefinedTimestampSizeRecord ts_record;
  199|      0|        Status s = ts_record.DecodeFrom(&fragment);
  200|      0|        if (!s.ok()) {
  ------------------
  |  Branch (200:13): [True: 0, False: 0]
  ------------------
  201|      0|          ReportCorruption(
  202|      0|              fragment.size(),
  203|      0|              "could not decode user-defined timestamp size record");
  204|      0|        } else {
  205|      0|          s = UpdateRecordedTimestampSize(
  206|      0|              ts_record.GetUserDefinedTimestampSize());
  207|      0|          if (!s.ok()) {
  ------------------
  |  Branch (207:15): [True: 0, False: 0]
  ------------------
  208|      0|            ReportCorruption(fragment.size(), s.getState());
  209|      0|          }
  210|      0|        }
  211|      0|        break;
  212|      0|      }
  213|       |
  214|      0|      case kBadHeader:
  ------------------
  |  Branch (214:7): [True: 0, False: 1.40M]
  ------------------
  215|      0|        if (wal_recovery_mode == WALRecoveryMode::kAbsoluteConsistency ||
  ------------------
  |  Branch (215:13): [True: 0, False: 0]
  ------------------
  216|      0|            wal_recovery_mode == WALRecoveryMode::kPointInTimeRecovery) {
  ------------------
  |  Branch (216:13): [True: 0, False: 0]
  ------------------
  217|       |          // In clean shutdown we don't expect any error in the log files.
  218|       |          // In point-in-time recovery an incomplete record at the end could
  219|       |          // produce a hole in the recovered data. Report an error here, which
  220|       |          // higher layers can choose to ignore when it's provable there is no
  221|       |          // hole.
  222|      0|          ReportCorruption(drop_size, "truncated header");
  223|      0|        }
  224|      0|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  225|       |
  226|  13.5k|      case kEof:
  ------------------
  |  Branch (226:7): [True: 13.5k, False: 1.39M]
  ------------------
  227|  13.5k|        if (in_fragmented_record) {
  ------------------
  |  Branch (227:13): [True: 0, False: 13.5k]
  ------------------
  228|      0|          if (wal_recovery_mode == WALRecoveryMode::kAbsoluteConsistency ||
  ------------------
  |  Branch (228:15): [True: 0, False: 0]
  ------------------
  229|      0|              wal_recovery_mode == WALRecoveryMode::kPointInTimeRecovery) {
  ------------------
  |  Branch (229:15): [True: 0, False: 0]
  ------------------
  230|       |            // In clean shutdown we don't expect any error in the log files.
  231|       |            // In point-in-time recovery an incomplete record at the end could
  232|       |            // produce a hole in the recovered data. Report an error here, which
  233|       |            // higher layers can choose to ignore when it's provable there is no
  234|       |            // hole.
  235|      0|            ReportCorruption(
  236|      0|                scratch->size(),
  237|      0|                "error reading trailing data due to encountering EOF");
  238|      0|          }
  239|       |          // This can be caused by the writer dying immediately after
  240|       |          //  writing a physical record but before completing the next; don't
  241|       |          //  treat it as a corruption, just ignore the entire logical record.
  242|      0|          scratch->clear();
  243|      0|        }
  244|  13.5k|        return false;
  245|       |
  246|      0|      case kOldRecord:
  ------------------
  |  Branch (246:7): [True: 0, False: 1.40M]
  ------------------
  247|      0|        if (wal_recovery_mode != WALRecoveryMode::kSkipAnyCorruptedRecords) {
  ------------------
  |  Branch (247:13): [True: 0, False: 0]
  ------------------
  248|       |          // Treat a record from a previous instance of the log as EOF.
  249|      0|          if (in_fragmented_record) {
  ------------------
  |  Branch (249:15): [True: 0, False: 0]
  ------------------
  250|      0|            if (wal_recovery_mode == WALRecoveryMode::kAbsoluteConsistency ||
  ------------------
  |  Branch (250:17): [True: 0, False: 0]
  ------------------
  251|      0|                wal_recovery_mode == WALRecoveryMode::kPointInTimeRecovery) {
  ------------------
  |  Branch (251:17): [True: 0, False: 0]
  ------------------
  252|       |              // In clean shutdown we don't expect any error in the log files.
  253|       |              // In point-in-time recovery an incomplete record at the end could
  254|       |              // produce a hole in the recovered data. Report an error here,
  255|       |              // which higher layers can choose to ignore when it's provable
  256|       |              // there is no hole.
  257|      0|              ReportCorruption(
  258|      0|                  scratch->size(),
  259|      0|                  "error reading trailing data due to encountering old record");
  260|      0|            }
  261|       |            // This can be caused by the writer dying immediately after
  262|       |            //  writing a physical record but before completing the next; don't
  263|       |            //  treat it as a corruption, just ignore the entire logical record.
  264|      0|            scratch->clear();
  265|      0|          } else {
  266|      0|            if (wal_recovery_mode == WALRecoveryMode::kPointInTimeRecovery) {
  ------------------
  |  Branch (266:17): [True: 0, False: 0]
  ------------------
  267|      0|              ReportOldLogRecord(scratch->size());
  268|      0|            }
  269|      0|          }
  270|      0|          return false;
  271|      0|        }
  272|      0|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  273|       |
  274|      0|      case kBadRecord:
  ------------------
  |  Branch (274:7): [True: 0, False: 1.40M]
  ------------------
  275|      0|        if (in_fragmented_record) {
  ------------------
  |  Branch (275:13): [True: 0, False: 0]
  ------------------
  276|      0|          ReportCorruption(scratch->size(), "error in middle of record");
  277|      0|          in_fragmented_record = false;
  278|      0|          scratch->clear();
  279|      0|        }
  280|      0|        break;
  281|       |
  282|      0|      case kBadRecordLen:
  ------------------
  |  Branch (282:7): [True: 0, False: 1.40M]
  ------------------
  283|      0|        if (eof_) {
  ------------------
  |  Branch (283:13): [True: 0, False: 0]
  ------------------
  284|      0|          if (wal_recovery_mode == WALRecoveryMode::kAbsoluteConsistency ||
  ------------------
  |  Branch (284:15): [True: 0, False: 0]
  ------------------
  285|      0|              wal_recovery_mode == WALRecoveryMode::kPointInTimeRecovery) {
  ------------------
  |  Branch (285:15): [True: 0, False: 0]
  ------------------
  286|       |            // In clean shutdown we don't expect any error in the log files.
  287|       |            // In point-in-time recovery an incomplete record at the end could
  288|       |            // produce a hole in the recovered data. Report an error here, which
  289|       |            // higher layers can choose to ignore when it's provable there is no
  290|       |            // hole.
  291|      0|            ReportCorruption(drop_size, "truncated record body");
  292|      0|          }
  293|      0|          return false;
  294|      0|        }
  295|      0|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  296|       |
  297|      0|      case kBadRecordChecksum:
  ------------------
  |  Branch (297:7): [True: 0, False: 1.40M]
  ------------------
  298|      0|        if (recycled_ && wal_recovery_mode ==
  ------------------
  |  Branch (298:13): [True: 0, False: 0]
  |  Branch (298:26): [True: 0, False: 0]
  ------------------
  299|      0|                             WALRecoveryMode::kTolerateCorruptedTailRecords) {
  300|      0|          scratch->clear();
  301|      0|          return false;
  302|      0|        }
  303|      0|        if (record_type == kBadRecordLen) {
  ------------------
  |  Branch (303:13): [True: 0, False: 0]
  ------------------
  304|      0|          ReportCorruption(drop_size, "bad record length");
  305|      0|        } else {
  306|      0|          ReportCorruption(drop_size, "checksum mismatch");
  307|      0|        }
  308|      0|        if (in_fragmented_record) {
  ------------------
  |  Branch (308:13): [True: 0, False: 0]
  ------------------
  309|      0|          ReportCorruption(scratch->size(), "error in middle of record");
  310|      0|          in_fragmented_record = false;
  311|      0|          scratch->clear();
  312|      0|        }
  313|      0|        break;
  314|       |
  315|      0|      default: {
  ------------------
  |  Branch (315:7): [True: 0, False: 1.40M]
  ------------------
  316|      0|        char buf[40];
  317|      0|        snprintf(buf, sizeof(buf), "unknown record type %u", record_type);
  318|      0|        ReportCorruption(
  319|      0|            (fragment.size() + (in_fragmented_record ? scratch->size() : 0)),
  ------------------
  |  Branch (319:33): [True: 0, False: 0]
  ------------------
  320|      0|            buf);
  321|      0|        in_fragmented_record = false;
  322|      0|        scratch->clear();
  323|      0|        break;
  324|      0|      }
  325|  1.40M|    }
  326|  1.40M|  }
  327|      0|  return false;
  328|  1.39M|}
_ZN7rocksdb3log6Reader13LastRecordEndEv:
  332|  31.5k|uint64_t Reader::LastRecordEnd() {
  333|  31.5k|  return end_of_buffer_offset_ - buffer_.size();
  334|  31.5k|}
_ZN7rocksdb3log6Reader8ReadMoreEPmPi:
  422|  37.5k|bool Reader::ReadMore(size_t* drop_size, int* error) {
  423|  37.5k|  if (!eof_ && !read_error_) {
  ------------------
  |  Branch (423:7): [True: 24.0k, False: 13.5k]
  |  Branch (423:16): [True: 24.0k, False: 0]
  ------------------
  424|       |    // Last read was a full read, so this is a trailer to skip
  425|  24.0k|    buffer_.clear();
  426|       |    // TODO: rate limit log reader with approriate priority.
  427|       |    // TODO: avoid overcharging rate limiter:
  428|       |    // Note that the Read here might overcharge SequentialFileReader's internal
  429|       |    // rate limiter if priority is not IO_TOTAL, e.g., when there is not enough
  430|       |    // content left until EOF to read.
  431|  24.0k|    Status status = file_->Read(kBlockSize, &buffer_, backing_store_,
  432|  24.0k|                                Env::IO_TOTAL /* rate_limiter_priority */);
  433|  24.0k|    TEST_SYNC_POINT_CALLBACK("LogReader::ReadMore:AfterReadFile", &status);
  434|  24.0k|    end_of_buffer_offset_ += buffer_.size();
  435|  24.0k|    if (!status.ok()) {
  ------------------
  |  Branch (435:9): [True: 0, False: 24.0k]
  ------------------
  436|      0|      buffer_.clear();
  437|      0|      ReportDrop(kBlockSize, status);
  438|      0|      read_error_ = true;
  439|      0|      *error = kEof;
  440|      0|      return false;
  441|  24.0k|    } else if (buffer_.size() < static_cast<size_t>(kBlockSize)) {
  ------------------
  |  Branch (441:16): [True: 13.5k, False: 10.4k]
  ------------------
  442|  13.5k|      eof_ = true;
  443|  13.5k|      eof_offset_ = buffer_.size();
  444|  13.5k|    }
  445|  24.0k|    return true;
  446|  24.0k|  } else {
  447|       |    // Note that if buffer_ is non-empty, we have a truncated header at the
  448|       |    //  end of the file, which can be caused by the writer crashing in the
  449|       |    //  middle of writing the header. Unless explicitly requested we don't
  450|       |    //  considering this an error, just report EOF.
  451|  13.5k|    if (buffer_.size()) {
  ------------------
  |  Branch (451:9): [True: 0, False: 13.5k]
  ------------------
  452|      0|      *drop_size = buffer_.size();
  453|      0|      buffer_.clear();
  454|      0|      *error = kBadHeader;
  455|      0|      return false;
  456|      0|    }
  457|  13.5k|    buffer_.clear();
  458|  13.5k|    *error = kEof;
  459|  13.5k|    return false;
  460|  13.5k|  }
  461|  37.5k|}
_ZN7rocksdb3log6Reader18ReadPhysicalRecordEPNS_5SliceEPmS4_:
  464|  1.40M|                                        uint64_t* fragment_checksum) {
  465|  1.43M|  while (true) {
  ------------------
  |  Branch (465:10): [Folded - Ignored]
  ------------------
  466|       |    // We need at least the minimum header size
  467|  1.43M|    if (buffer_.size() < static_cast<size_t>(kHeaderSize)) {
  ------------------
  |  Branch (467:9): [True: 37.5k, False: 1.39M]
  ------------------
  468|       |      // the default value of r is meaningless because ReadMore will overwrite
  469|       |      // it if it returns false; in case it returns true, the return value will
  470|       |      // not be used anyway
  471|  37.5k|      int r = kEof;
  472|  37.5k|      if (!ReadMore(drop_size, &r)) {
  ------------------
  |  Branch (472:11): [True: 13.5k, False: 24.0k]
  ------------------
  473|  13.5k|        return r;
  474|  13.5k|      }
  475|  24.0k|      continue;
  476|  37.5k|    }
  477|       |
  478|       |    // Parse the header
  479|  1.39M|    const char* header = buffer_.data();
  480|  1.39M|    const uint32_t a = static_cast<uint32_t>(header[4]) & 0xff;
  481|  1.39M|    const uint32_t b = static_cast<uint32_t>(header[5]) & 0xff;
  482|  1.39M|    const unsigned int type = header[6];
  483|  1.39M|    const uint32_t length = a | (b << 8);
  484|  1.39M|    int header_size = kHeaderSize;
  485|  1.39M|    const bool is_recyclable_type =
  486|  1.39M|        ((type >= kRecyclableFullType && type <= kRecyclableLastType) ||
  ------------------
  |  Branch (486:11): [True: 0, False: 1.39M]
  |  Branch (486:42): [True: 0, False: 0]
  ------------------
  487|  1.39M|         type == kRecyclableUserDefinedTimestampSizeType);
  ------------------
  |  Branch (487:10): [True: 0, False: 1.39M]
  ------------------
  488|  1.39M|    if (is_recyclable_type) {
  ------------------
  |  Branch (488:9): [True: 0, False: 1.39M]
  ------------------
  489|      0|      header_size = kRecyclableHeaderSize;
  490|      0|      if (first_record_read_ && !recycled_) {
  ------------------
  |  Branch (490:11): [True: 0, False: 0]
  |  Branch (490:33): [True: 0, False: 0]
  ------------------
  491|       |        // A recycled log should have started with a recycled record
  492|      0|        return kBadRecord;
  493|      0|      }
  494|      0|      recycled_ = true;
  495|       |      // We need enough for the larger header
  496|      0|      if (buffer_.size() < static_cast<size_t>(kRecyclableHeaderSize)) {
  ------------------
  |  Branch (496:11): [True: 0, False: 0]
  ------------------
  497|      0|        int r = kEof;
  498|      0|        if (!ReadMore(drop_size, &r)) {
  ------------------
  |  Branch (498:13): [True: 0, False: 0]
  ------------------
  499|      0|          return r;
  500|      0|        }
  501|      0|        continue;
  502|      0|      }
  503|      0|    }
  504|       |
  505|  1.39M|    if (header_size + length > buffer_.size()) {
  ------------------
  |  Branch (505:9): [True: 0, False: 1.39M]
  ------------------
  506|      0|      assert(buffer_.size() >= static_cast<size_t>(header_size));
  507|      0|      *drop_size = buffer_.size();
  508|      0|      buffer_.clear();
  509|       |      // If the end of the read has been reached without seeing
  510|       |      // `header_size + length` bytes of payload, report a corruption. The
  511|       |      // higher layers can decide how to handle it based on the recovery mode,
  512|       |      // whether this occurred at EOF, whether this is the final WAL, etc.
  513|      0|      return kBadRecordLen;
  514|      0|    }
  515|       |
  516|  1.39M|    if (is_recyclable_type) {
  ------------------
  |  Branch (516:9): [True: 0, False: 1.39M]
  ------------------
  517|      0|      const uint32_t log_num = DecodeFixed32(header + 7);
  518|      0|      if (log_num != log_number_) {
  ------------------
  |  Branch (518:11): [True: 0, False: 0]
  ------------------
  519|      0|        buffer_.remove_prefix(header_size + length);
  520|      0|        return kOldRecord;
  521|      0|      }
  522|      0|    }
  523|       |
  524|  1.39M|    if (type == kZeroType && length == 0) {
  ------------------
  |  Branch (524:9): [True: 0, False: 1.39M]
  |  Branch (524:30): [True: 0, False: 0]
  ------------------
  525|       |      // Skip zero length record without reporting any drops since
  526|       |      // such records are produced by the mmap based writing code in
  527|       |      // env_posix.cc that preallocates file regions.
  528|       |      // NOTE: this should never happen in DB written by new RocksDB versions,
  529|       |      // since we turn off mmap writes to manifest and log files
  530|      0|      buffer_.clear();
  531|      0|      return kBadRecord;
  532|      0|    }
  533|       |
  534|       |    // Check crc
  535|  1.39M|    if (checksum_) {
  ------------------
  |  Branch (535:9): [True: 1.39M, False: 0]
  ------------------
  536|  1.39M|      uint32_t expected_crc = crc32c::Unmask(DecodeFixed32(header));
  537|  1.39M|      uint32_t actual_crc = crc32c::Value(header + 6, length + header_size - 6);
  538|  1.39M|      if (actual_crc != expected_crc) {
  ------------------
  |  Branch (538:11): [True: 0, False: 1.39M]
  ------------------
  539|       |        // Drop the rest of the buffer since "length" itself may have
  540|       |        // been corrupted and if we trust it, we could find some
  541|       |        // fragment of a real log record that just happens to look
  542|       |        // like a valid log record.
  543|      0|        *drop_size = buffer_.size();
  544|      0|        buffer_.clear();
  545|      0|        return kBadRecordChecksum;
  546|      0|      }
  547|  1.39M|    }
  548|       |
  549|  1.39M|    buffer_.remove_prefix(header_size + length);
  550|       |
  551|  1.39M|    if (!uncompress_ || type == kSetCompressionType ||
  ------------------
  |  Branch (551:9): [True: 1.39M, False: 0]
  |  Branch (551:25): [True: 0, False: 0]
  ------------------
  552|  1.39M|        type == kUserDefinedTimestampSizeType ||
  ------------------
  |  Branch (552:9): [True: 0, False: 0]
  ------------------
  553|  1.39M|        type == kRecyclableUserDefinedTimestampSizeType) {
  ------------------
  |  Branch (553:9): [True: 0, False: 0]
  ------------------
  554|  1.39M|      *result = Slice(header + header_size, length);
  555|  1.39M|      return type;
  556|  1.39M|    } else {
  557|       |      // Uncompress compressed records
  558|      0|      uncompressed_record_.clear();
  559|      0|      if (fragment_checksum != nullptr) {
  ------------------
  |  Branch (559:11): [True: 0, False: 0]
  ------------------
  560|      0|        if (uncompress_hash_state_ == nullptr) {
  ------------------
  |  Branch (560:13): [True: 0, False: 0]
  ------------------
  561|      0|          uncompress_hash_state_ = XXH3_createState();
  ------------------
  |  |  414|      0|#  define XXH3_createState XXH_NAME2(XXH_NAMESPACE, XXH3_createState)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  562|      0|        }
  563|      0|        XXH3_64bits_reset(uncompress_hash_state_);
  ------------------
  |  |  417|      0|#  define XXH3_64bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  564|      0|      }
  565|       |
  566|      0|      size_t uncompressed_size = 0;
  567|      0|      int remaining = 0;
  568|      0|      const char* input = header + header_size;
  569|      0|      do {
  570|      0|        remaining = uncompress_->Uncompress(
  571|      0|            input, length, uncompressed_buffer_.get(), &uncompressed_size);
  572|      0|        input = nullptr;
  573|      0|        if (remaining < 0) {
  ------------------
  |  Branch (573:13): [True: 0, False: 0]
  ------------------
  574|      0|          buffer_.clear();
  575|      0|          return kBadRecord;
  576|      0|        }
  577|      0|        if (uncompressed_size > 0) {
  ------------------
  |  Branch (577:13): [True: 0, False: 0]
  ------------------
  578|      0|          if (fragment_checksum != nullptr) {
  ------------------
  |  Branch (578:15): [True: 0, False: 0]
  ------------------
  579|      0|            XXH3_64bits_update(uncompress_hash_state_,
  ------------------
  |  |  421|      0|#  define XXH3_64bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_update)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  580|      0|                               uncompressed_buffer_.get(), uncompressed_size);
  581|      0|          }
  582|      0|          uncompressed_record_.append(uncompressed_buffer_.get(),
  583|      0|                                      uncompressed_size);
  584|      0|        }
  585|      0|      } while (remaining > 0 || uncompressed_size == kBlockSize);
  ------------------
  |  Branch (585:16): [True: 0, False: 0]
  |  Branch (585:33): [True: 0, False: 0]
  ------------------
  586|       |
  587|      0|      if (fragment_checksum != nullptr) {
  ------------------
  |  Branch (587:11): [True: 0, False: 0]
  ------------------
  588|       |        // We can remove this check by updating hash_state_ directly,
  589|       |        // but that requires resetting hash_state_ for full and first types
  590|       |        // for edge cases like consecutive fist type records.
  591|       |        // Leaving the check as is since it is cleaner and can revert to the
  592|       |        // above approach if it causes performance impact.
  593|      0|        *fragment_checksum = XXH3_64bits_digest(uncompress_hash_state_);
  ------------------
  |  |  422|      0|#  define XXH3_64bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_digest)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  594|      0|        uint64_t actual_checksum = XXH3_64bits(uncompressed_record_.data(),
  ------------------
  |  |  410|      0|#  define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  595|      0|                                               uncompressed_record_.size());
  596|      0|        if (*fragment_checksum != actual_checksum) {
  ------------------
  |  Branch (596:13): [True: 0, False: 0]
  ------------------
  597|       |          // uncompressed_record_ contains bad content that does not match
  598|       |          // actual decompressed content
  599|      0|          return kBadRecord;
  600|      0|        }
  601|      0|      }
  602|      0|      *result = Slice(uncompressed_record_);
  603|      0|      return type;
  604|      0|    }
  605|  1.39M|  }
  606|  1.40M|}

_ZNK7rocksdb3log6Reader24GetRecordedTimestampSizeEv:
   85|  1.36M|  const UnorderedMap<uint32_t, size_t>& GetRecordedTimestampSize() const {
   86|  1.36M|    return recorded_cf_to_ts_sz_;
   87|  1.36M|  }
_ZNK7rocksdb3log6Reader13GetReadOffsetEv:
  118|  18.0k|  size_t GetReadOffset() const {
  119|  18.0k|    return static_cast<size_t>(end_of_buffer_offset_);
  120|  18.0k|  }

_ZN7rocksdb3log6WriterC2EONSt3__110unique_ptrINS_18WritableFileWriterENS2_14default_deleteIS4_EEEEmbbNS_15CompressionTypeE:
   34|  22.5k|      compress_(nullptr) {
   35|   293k|  for (int i = 0; i <= kMaxRecordType; i++) {
  ------------------
  |  Branch (35:19): [True: 270k, False: 22.5k]
  ------------------
   36|   270k|    char t = static_cast<char>(i);
   37|   270k|    type_crc_[i] = crc32c::Value(&t, 1);
   38|   270k|  }
   39|  22.5k|}
_ZN7rocksdb3log6WriterD2Ev:
   41|  22.5k|Writer::~Writer() {
   42|  22.5k|  ThreadStatus::OperationType cur_op_type =
   43|  22.5k|      ThreadStatusUtil::GetThreadOperation();
   44|  22.5k|  ThreadStatusUtil::SetThreadOperation(ThreadStatus::OperationType::OP_UNKNOWN);
   45|  22.5k|  if (dest_) {
  ------------------
  |  Branch (45:7): [True: 13.5k, False: 9.02k]
  ------------------
   46|  13.5k|    WriteBuffer(WriteOptions()).PermitUncheckedError();
   47|  13.5k|  }
   48|  22.5k|  if (compress_) {
  ------------------
  |  Branch (48:7): [True: 0, False: 22.5k]
  ------------------
   49|      0|    delete compress_;
   50|      0|  }
   51|  22.5k|  ThreadStatusUtil::SetThreadOperation(cur_op_type);
   52|  22.5k|}
_ZN7rocksdb3log6Writer11WriteBufferERKNS_12WriteOptionsE:
   54|  22.5k|IOStatus Writer::WriteBuffer(const WriteOptions& write_options) {
   55|  22.5k|  if (dest_->seen_error()) {
  ------------------
  |  Branch (55:7): [True: 0, False: 22.5k]
  ------------------
   56|       |#ifndef NDEBUG
   57|       |    if (dest_->seen_injected_error()) {
   58|       |      return IOStatus::IOError("Seen injected error. Skip writing buffer.");
   59|       |    }
   60|       |#endif  // NDEBUG
   61|      0|    return IOStatus::IOError("Seen error. Skip writing buffer.");
   62|      0|  }
   63|  22.5k|  IOOptions opts;
   64|  22.5k|  IOStatus s = WritableFileWriter::PrepareIOOptions(write_options, opts);
   65|  22.5k|  if (!s.ok()) {
  ------------------
  |  Branch (65:7): [True: 0, False: 22.5k]
  ------------------
   66|      0|    return s;
   67|      0|  }
   68|  22.5k|  return dest_->Flush(opts);
   69|  22.5k|}
_ZN7rocksdb3log6Writer5CloseERKNS_12WriteOptionsE:
   71|  9.02k|IOStatus Writer::Close(const WriteOptions& write_options) {
   72|  9.02k|  IOStatus s;
   73|  9.02k|  IOOptions opts;
   74|  9.02k|  s = WritableFileWriter::PrepareIOOptions(write_options, opts);
   75|  9.02k|  if (s.ok() && dest_) {
  ------------------
  |  Branch (75:7): [True: 9.02k, False: 0]
  |  Branch (75:17): [True: 9.02k, False: 0]
  ------------------
   76|  9.02k|    s = dest_->Close(opts);
   77|  9.02k|    dest_.reset();
   78|  9.02k|  }
   79|  9.02k|  return s;
   80|  9.02k|}
_ZN7rocksdb3log6Writer9AddRecordERKNS_12WriteOptionsERKNS_5SliceE:
   92|  1.41M|                           const Slice& slice) {
   93|  1.41M|  if (dest_->seen_error()) {
  ------------------
  |  Branch (93:7): [True: 0, False: 1.41M]
  ------------------
   94|       |#ifndef NDEBUG
   95|       |    if (dest_->seen_injected_error()) {
   96|       |      return IOStatus::IOError("Seen injected error. Skip writing buffer.");
   97|       |    }
   98|       |#endif  // NDEBUG
   99|      0|    return IOStatus::IOError("Seen error. Skip writing buffer.");
  100|      0|  }
  101|  1.41M|  const char* ptr = slice.data();
  102|  1.41M|  size_t left = slice.size();
  103|       |
  104|       |  // Fragment the record if necessary and emit it.  Note that if slice
  105|       |  // is empty, we still want to iterate once to emit a single
  106|       |  // zero-length record
  107|  1.41M|  bool begin = true;
  108|  1.41M|  int compress_remaining = 0;
  109|  1.41M|  bool compress_start = false;
  110|  1.41M|  if (compress_) {
  ------------------
  |  Branch (110:7): [True: 0, False: 1.41M]
  ------------------
  111|      0|    compress_->Reset();
  112|      0|    compress_start = true;
  113|      0|  }
  114|       |
  115|  1.41M|  IOStatus s;
  116|  1.41M|  IOOptions opts;
  117|  1.41M|  s = WritableFileWriter::PrepareIOOptions(write_options, opts);
  118|  1.41M|  if (s.ok()) {
  ------------------
  |  Branch (118:7): [True: 1.41M, False: 0]
  ------------------
  119|  1.42M|    do {
  120|  1.42M|      const int64_t leftover = kBlockSize - block_offset_;
  121|  1.42M|      assert(leftover >= 0);
  122|  1.42M|      if (leftover < header_size_) {
  ------------------
  |  Branch (122:11): [True: 11.3k, False: 1.41M]
  ------------------
  123|       |        // Switch to a new block
  124|  11.3k|        if (leftover > 0) {
  ------------------
  |  Branch (124:13): [True: 252, False: 11.0k]
  ------------------
  125|       |          // Fill the trailer (literal below relies on kHeaderSize and
  126|       |          // kRecyclableHeaderSize being <= 11)
  127|    252|          assert(header_size_ <= 11);
  128|    252|          s = dest_->Append(opts,
  129|    252|                            Slice("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
  130|    252|                                  static_cast<size_t>(leftover)),
  131|    252|                            0 /* crc32c_checksum */);
  132|    252|          if (!s.ok()) {
  ------------------
  |  Branch (132:15): [True: 0, False: 252]
  ------------------
  133|      0|            break;
  134|      0|          }
  135|    252|        }
  136|  11.3k|        block_offset_ = 0;
  137|  11.3k|      }
  138|       |
  139|       |      // Invariant: we never leave < header_size bytes in a block.
  140|  1.42M|      assert(static_cast<int64_t>(kBlockSize - block_offset_) >= header_size_);
  141|       |
  142|  1.42M|      const size_t avail = kBlockSize - block_offset_ - header_size_;
  143|       |
  144|       |      // Compress the record if compression is enabled.
  145|       |      // Compress() is called at least once (compress_start=true) and after the
  146|       |      // previous generated compressed chunk is written out as one or more
  147|       |      // physical records (left=0).
  148|  1.42M|      if (compress_ && (compress_start || left == 0)) {
  ------------------
  |  Branch (148:11): [True: 0, False: 1.42M]
  |  Branch (148:25): [True: 0, False: 0]
  |  Branch (148:43): [True: 0, False: 0]
  ------------------
  149|      0|        compress_remaining = compress_->Compress(
  150|      0|            slice.data(), slice.size(), compressed_buffer_.get(), &left);
  151|       |
  152|      0|        if (compress_remaining < 0) {
  ------------------
  |  Branch (152:13): [True: 0, False: 0]
  ------------------
  153|       |          // Set failure status
  154|      0|          s = IOStatus::IOError("Unexpected WAL compression error");
  155|      0|          s.SetDataLoss(true);
  156|      0|          break;
  157|      0|        } else if (left == 0) {
  ------------------
  |  Branch (157:20): [True: 0, False: 0]
  ------------------
  158|       |          // Nothing left to compress
  159|      0|          if (!compress_start) {
  ------------------
  |  Branch (159:15): [True: 0, False: 0]
  ------------------
  160|      0|            break;
  161|      0|          }
  162|      0|        }
  163|      0|        compress_start = false;
  164|      0|        ptr = compressed_buffer_.get();
  165|      0|      }
  166|       |
  167|  1.42M|      const size_t fragment_length = (left < avail) ? left : avail;
  ------------------
  |  Branch (167:38): [True: 1.41M, False: 11.0k]
  ------------------
  168|       |
  169|  1.42M|      RecordType type;
  170|  1.42M|      const bool end = (left == fragment_length && compress_remaining == 0);
  ------------------
  |  Branch (170:25): [True: 1.41M, False: 11.0k]
  |  Branch (170:52): [True: 1.41M, False: 0]
  ------------------
  171|  1.42M|      if (begin && end) {
  ------------------
  |  Branch (171:11): [True: 1.41M, False: 11.0k]
  |  Branch (171:20): [True: 1.40M, False: 7.18k]
  ------------------
  172|  1.40M|        type = recycle_log_files_ ? kRecyclableFullType : kFullType;
  ------------------
  |  Branch (172:16): [True: 0, False: 1.40M]
  ------------------
  173|  1.40M|      } else if (begin) {
  ------------------
  |  Branch (173:18): [True: 7.18k, False: 11.0k]
  ------------------
  174|  7.18k|        type = recycle_log_files_ ? kRecyclableFirstType : kFirstType;
  ------------------
  |  Branch (174:16): [True: 0, False: 7.18k]
  ------------------
  175|  11.0k|      } else if (end) {
  ------------------
  |  Branch (175:18): [True: 7.18k, False: 3.87k]
  ------------------
  176|  7.18k|        type = recycle_log_files_ ? kRecyclableLastType : kLastType;
  ------------------
  |  Branch (176:16): [True: 0, False: 7.18k]
  ------------------
  177|  7.18k|      } else {
  178|  3.87k|        type = recycle_log_files_ ? kRecyclableMiddleType : kMiddleType;
  ------------------
  |  Branch (178:16): [True: 0, False: 3.87k]
  ------------------
  179|  3.87k|      }
  180|       |
  181|  1.42M|      s = EmitPhysicalRecord(write_options, type, ptr, fragment_length);
  182|  1.42M|      ptr += fragment_length;
  183|  1.42M|      left -= fragment_length;
  184|  1.42M|      begin = false;
  185|  1.42M|    } while (s.ok() && (left > 0 || compress_remaining > 0));
  ------------------
  |  Branch (185:14): [True: 1.42M, False: 0]
  |  Branch (185:25): [True: 11.0k, False: 1.41M]
  |  Branch (185:37): [True: 0, False: 1.41M]
  ------------------
  186|  1.41M|  }
  187|  1.41M|  if (s.ok()) {
  ------------------
  |  Branch (187:7): [True: 1.41M, False: 0]
  ------------------
  188|  1.41M|    if (!manual_flush_) {
  ------------------
  |  Branch (188:9): [True: 1.41M, False: 0]
  ------------------
  189|  1.41M|      s = dest_->Flush(opts);
  190|  1.41M|    }
  191|  1.41M|  }
  192|       |
  193|  1.41M|  return s;
  194|  1.41M|}
_ZN7rocksdb3log6Writer24AddCompressionTypeRecordERKNS_12WriteOptionsE:
  196|  9.02k|IOStatus Writer::AddCompressionTypeRecord(const WriteOptions& write_options) {
  197|       |  // Should be the first record
  198|  9.02k|  assert(block_offset_ == 0);
  199|       |
  200|  9.02k|  if (compression_type_ == kNoCompression) {
  ------------------
  |  Branch (200:7): [True: 9.02k, False: 0]
  ------------------
  201|       |    // No need to add a record
  202|  9.02k|    return IOStatus::OK();
  203|  9.02k|  }
  204|       |
  205|      0|  if (dest_->seen_error()) {
  ------------------
  |  Branch (205:7): [True: 0, False: 0]
  ------------------
  206|       |#ifndef NDEBUG
  207|       |    if (dest_->seen_injected_error()) {
  208|       |      return IOStatus::IOError("Seen injected error. Skip writing buffer.");
  209|       |    }
  210|       |#endif  // NDEBUG
  211|      0|    return IOStatus::IOError("Seen error. Skip writing buffer.");
  212|      0|  }
  213|       |
  214|      0|  CompressionTypeRecord record(compression_type_);
  215|      0|  std::string encode;
  216|      0|  record.EncodeTo(&encode);
  217|      0|  IOStatus s = EmitPhysicalRecord(write_options, kSetCompressionType,
  218|      0|                                  encode.data(), encode.size());
  219|      0|  if (s.ok()) {
  ------------------
  |  Branch (219:7): [True: 0, False: 0]
  ------------------
  220|      0|    if (!manual_flush_) {
  ------------------
  |  Branch (220:9): [True: 0, False: 0]
  ------------------
  221|      0|      IOOptions io_opts;
  222|      0|      s = WritableFileWriter::PrepareIOOptions(write_options, io_opts);
  223|      0|      if (s.ok()) {
  ------------------
  |  Branch (223:11): [True: 0, False: 0]
  ------------------
  224|      0|        s = dest_->Flush(io_opts);
  225|      0|      }
  226|      0|    }
  227|       |    // Initialize fields required for compression
  228|      0|    const size_t max_output_buffer_len = kBlockSize - header_size_;
  229|      0|    CompressionOptions opts;
  230|      0|    constexpr uint32_t compression_format_version = 2;
  231|      0|    compress_ = StreamingCompress::Create(compression_type_, opts,
  232|      0|                                          compression_format_version,
  233|      0|                                          max_output_buffer_len);
  234|      0|    assert(compress_ != nullptr);
  235|      0|    compressed_buffer_ =
  236|      0|        std::unique_ptr<char[]>(new char[max_output_buffer_len]);
  237|      0|    assert(compressed_buffer_);
  238|      0|  } else {
  239|       |    // Disable compression if the record could not be added.
  240|      0|    compression_type_ = kNoCompression;
  241|      0|  }
  242|      0|  return s;
  243|      0|}
_ZN7rocksdb3log6Writer38MaybeAddUserDefinedTimestampSizeRecordERKNS_12WriteOptionsERKNSt3__113unordered_mapIjmNS5_4hashIjEENS5_8equal_toIjEENS5_9allocatorINS5_4pairIKjmEEEEEE:
  247|  1.36M|    const UnorderedMap<uint32_t, size_t>& cf_to_ts_sz) {
  248|  1.36M|  std::vector<std::pair<uint32_t, size_t>> ts_sz_to_record;
  249|  1.36M|  for (const auto& [cf_id, ts_sz] : cf_to_ts_sz) {
  ------------------
  |  Branch (249:35): [True: 0, False: 1.36M]
  ------------------
  250|      0|    if (recorded_cf_to_ts_sz_.count(cf_id) != 0) {
  ------------------
  |  Branch (250:9): [True: 0, False: 0]
  ------------------
  251|       |      // A column family's user-defined timestamp size should not be
  252|       |      // updated while DB is running.
  253|      0|      assert(recorded_cf_to_ts_sz_[cf_id] == ts_sz);
  254|      0|    } else if (ts_sz != 0) {
  ------------------
  |  Branch (254:16): [True: 0, False: 0]
  ------------------
  255|      0|      ts_sz_to_record.emplace_back(cf_id, ts_sz);
  256|      0|      recorded_cf_to_ts_sz_.insert(std::make_pair(cf_id, ts_sz));
  257|      0|    }
  258|      0|  }
  259|  1.36M|  if (ts_sz_to_record.empty()) {
  ------------------
  |  Branch (259:7): [True: 1.36M, False: 0]
  ------------------
  260|  1.36M|    return IOStatus::OK();
  261|  1.36M|  }
  262|       |
  263|      0|  UserDefinedTimestampSizeRecord record(std::move(ts_sz_to_record));
  264|      0|  std::string encoded;
  265|      0|  record.EncodeTo(&encoded);
  266|      0|  RecordType type = recycle_log_files_ ? kRecyclableUserDefinedTimestampSizeType
  ------------------
  |  Branch (266:21): [True: 0, False: 0]
  ------------------
  267|      0|                                       : kUserDefinedTimestampSizeType;
  268|       |
  269|       |  // If there's not enough space for this record, switch to a new block.
  270|      0|  const int64_t leftover = kBlockSize - block_offset_;
  271|      0|  if (leftover < header_size_ + (int)encoded.size()) {
  ------------------
  |  Branch (271:7): [True: 0, False: 0]
  ------------------
  272|      0|    IOOptions opts;
  273|      0|    IOStatus s = WritableFileWriter::PrepareIOOptions(write_options, opts);
  274|      0|    if (!s.ok()) {
  ------------------
  |  Branch (274:9): [True: 0, False: 0]
  ------------------
  275|      0|      return s;
  276|      0|    }
  277|       |
  278|      0|    std::vector<char> trailer(leftover, '\x00');
  279|      0|    s = dest_->Append(opts, Slice(trailer.data(), trailer.size()));
  280|      0|    if (!s.ok()) {
  ------------------
  |  Branch (280:9): [True: 0, False: 0]
  ------------------
  281|      0|      return s;
  282|      0|    }
  283|       |
  284|      0|    block_offset_ = 0;
  285|      0|  }
  286|       |
  287|      0|  return EmitPhysicalRecord(write_options, type, encoded.data(),
  288|      0|                            encoded.size());
  289|      0|}
_ZN7rocksdb3log6Writer13BufferIsEmptyEv:
  291|  9.02k|bool Writer::BufferIsEmpty() { return dest_->BufferIsEmpty(); }
_ZN7rocksdb3log6Writer18EmitPhysicalRecordERKNS_12WriteOptionsENS0_10RecordTypeEPKcm:
  294|  1.42M|                                    RecordType t, const char* ptr, size_t n) {
  295|  1.42M|  assert(n <= 0xffff);  // Must fit in two bytes
  296|       |
  297|  1.42M|  size_t header_size;
  298|  1.42M|  char buf[kRecyclableHeaderSize];
  299|       |
  300|       |  // Format the header
  301|  1.42M|  buf[4] = static_cast<char>(n & 0xff);
  302|  1.42M|  buf[5] = static_cast<char>(n >> 8);
  303|  1.42M|  buf[6] = static_cast<char>(t);
  304|       |
  305|  1.42M|  uint32_t crc = type_crc_[t];
  306|  1.42M|  if (t < kRecyclableFullType || t == kSetCompressionType ||
  ------------------
  |  Branch (306:7): [True: 1.42M, False: 0]
  |  Branch (306:34): [True: 0, False: 0]
  ------------------
  307|  1.42M|      t == kUserDefinedTimestampSizeType) {
  ------------------
  |  Branch (307:7): [True: 0, False: 0]
  ------------------
  308|       |    // Legacy record format
  309|  1.42M|    assert(block_offset_ + kHeaderSize + n <= kBlockSize);
  310|  1.42M|    header_size = kHeaderSize;
  311|  1.42M|  } else {
  312|       |    // Recyclable record format
  313|      0|    assert(block_offset_ + kRecyclableHeaderSize + n <= kBlockSize);
  314|      0|    header_size = kRecyclableHeaderSize;
  315|       |
  316|       |    // Only encode low 32-bits of the 64-bit log number.  This means
  317|       |    // we will fail to detect an old record if we recycled a log from
  318|       |    // ~4 billion logs ago, but that is effectively impossible, and
  319|       |    // even if it were we'dbe far more likely to see a false positive
  320|       |    // on the 32-bit CRC.
  321|      0|    EncodeFixed32(buf + 7, static_cast<uint32_t>(log_number_));
  322|      0|    crc = crc32c::Extend(crc, buf + 7, 4);
  323|      0|  }
  324|       |
  325|       |  // Compute the crc of the record type and the payload.
  326|  1.42M|  uint32_t payload_crc = crc32c::Value(ptr, n);
  327|  1.42M|  crc = crc32c::Crc32cCombine(crc, payload_crc, n);
  328|  1.42M|  crc = crc32c::Mask(crc);  // Adjust for storage
  329|  1.42M|  TEST_SYNC_POINT_CALLBACK("LogWriter::EmitPhysicalRecord:BeforeEncodeChecksum",
  330|  1.42M|                           &crc);
  331|  1.42M|  EncodeFixed32(buf, crc);
  332|       |
  333|       |  // Write the header and the payload
  334|  1.42M|  IOOptions opts;
  335|  1.42M|  IOStatus s = WritableFileWriter::PrepareIOOptions(write_options, opts);
  336|  1.42M|  if (s.ok()) {
  ------------------
  |  Branch (336:7): [True: 1.42M, False: 0]
  ------------------
  337|  1.42M|    s = dest_->Append(opts, Slice(buf, header_size), 0 /* crc32c_checksum */);
  338|  1.42M|  }
  339|  1.42M|  if (s.ok()) {
  ------------------
  |  Branch (339:7): [True: 1.42M, False: 0]
  ------------------
  340|  1.42M|    s = dest_->Append(opts, Slice(ptr, n), payload_crc);
  341|  1.42M|  }
  342|  1.42M|  block_offset_ += header_size + n;
  343|  1.42M|  return s;
  344|  1.42M|}

_ZNK7rocksdb3log6Writer14get_log_numberEv:
  104|  9.02k|  uint64_t get_log_number() const { return log_number_; }
_ZN7rocksdb3log6Writer4fileEv:
  101|  31.5k|  WritableFileWriter* file() { return dest_.get(); }

_ZN7rocksdb24ImmutableMemTableOptionsC2ERKNS_16ImmutableOptionsERKNS_16MutableCFOptionsE:
   72|  13.5k|          mutable_cf_options.memtable_protection_bytes_per_key) {}
_ZN7rocksdb8MemTableC2ERKNS_21InternalKeyComparatorERKNS_16ImmutableOptionsERKNS_16MutableCFOptionsEPNS_18WriteBufferManagerEmj:
  123|  13.5k|          mutable_cf_options.memtable_max_range_deletions) {
  124|  13.5k|  UpdateFlushState();
  125|       |  // something went wrong if we need to flush before inserting anything
  126|  13.5k|  assert(!ShouldScheduleFlush());
  127|       |
  128|       |  // use bloom_filter_ for both whole key and prefix bloom filter
  129|  13.5k|  if ((prefix_extractor_ || moptions_.memtable_whole_key_filtering) &&
  ------------------
  |  Branch (129:8): [True: 0, False: 13.5k]
  |  Branch (129:29): [True: 0, False: 13.5k]
  ------------------
  130|  13.5k|      moptions_.memtable_prefix_bloom_bits > 0) {
  ------------------
  |  Branch (130:7): [True: 0, False: 0]
  ------------------
  131|      0|    bloom_filter_.reset(
  132|      0|        new DynamicBloom(&arena_, moptions_.memtable_prefix_bloom_bits,
  133|      0|                         6 /* hard coded 6 probes */,
  134|      0|                         moptions_.memtable_huge_page_size, ioptions.logger));
  135|      0|  }
  136|       |  // Initialize cached_range_tombstone_ here since it could
  137|       |  // be read before it is constructed in MemTable::Add(), which could also lead
  138|       |  // to a data race on the global mutex table backing atomic shared_ptr.
  139|  13.5k|  auto new_cache = std::make_shared<FragmentedRangeTombstoneListCache>();
  140|  13.5k|  size_t size = cached_range_tombstone_.Size();
  141|   445k|  for (size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (141:22): [True: 432k, False: 13.5k]
  ------------------
  142|   432k|    std::shared_ptr<FragmentedRangeTombstoneListCache>* local_cache_ref_ptr =
  143|   432k|        cached_range_tombstone_.AccessAtCore(i);
  144|   432k|    auto new_local_cache_ref = std::make_shared<
  145|   432k|        const std::shared_ptr<FragmentedRangeTombstoneListCache>>(new_cache);
  146|   432k|    std::atomic_store_explicit(
  147|   432k|        local_cache_ref_ptr,
  148|   432k|        std::shared_ptr<FragmentedRangeTombstoneListCache>(new_local_cache_ref,
  149|   432k|                                                           new_cache.get()),
  150|   432k|        std::memory_order_relaxed);
  151|   432k|  }
  152|  13.5k|  const Comparator* ucmp = cmp.user_comparator();
  153|  13.5k|  assert(ucmp);
  154|  13.5k|  ts_sz_ = ucmp->timestamp_size();
  155|  13.5k|  persist_user_defined_timestamps_ = ioptions.persist_user_defined_timestamps;
  156|  13.5k|}
_ZN7rocksdb8MemTableD2Ev:
  158|  13.5k|MemTable::~MemTable() {
  159|  13.5k|  mem_tracker_.FreeMem();
  160|  13.5k|  assert(refs_ == 0);
  161|  13.5k|}
_ZN7rocksdb8MemTable14ShouldFlushNowEv:
  182|  2.54M|bool MemTable::ShouldFlushNow() {
  183|       |  // This is set if memtable_max_range_deletions is > 0,
  184|       |  // and that many range deletions are done
  185|  2.54M|  if (memtable_max_range_deletions_ > 0 &&
  ------------------
  |  Branch (185:7): [True: 0, False: 2.54M]
  ------------------
  186|  2.54M|      num_range_deletes_.load(std::memory_order_relaxed) >=
  ------------------
  |  Branch (186:7): [True: 0, False: 0]
  ------------------
  187|      0|          static_cast<uint64_t>(memtable_max_range_deletions_)) {
  188|      0|    return true;
  189|      0|  }
  190|       |
  191|  2.54M|  size_t write_buffer_size = write_buffer_size_.load(std::memory_order_relaxed);
  192|       |  // In a lot of times, we cannot allocate arena blocks that exactly matches the
  193|       |  // buffer size. Thus we have to decide if we should over-allocate or
  194|       |  // under-allocate.
  195|       |  // This constant variable can be interpreted as: if we still have more than
  196|       |  // "kAllowOverAllocationRatio * kArenaBlockSize" space left, we'd try to over
  197|       |  // allocate one more block.
  198|  2.54M|  const double kAllowOverAllocationRatio = 0.6;
  199|       |
  200|       |  // If arena still have room for new block allocation, we can safely say it
  201|       |  // shouldn't flush.
  202|  2.54M|  auto allocated_memory = table_->ApproximateMemoryUsage() +
  203|  2.54M|                          range_del_table_->ApproximateMemoryUsage() +
  204|  2.54M|                          arena_.MemoryAllocatedBytes();
  205|       |
  206|  2.54M|  approximate_memory_usage_.store(allocated_memory, std::memory_order_relaxed);
  207|       |
  208|       |  // if we can still allocate one more block without exceeding the
  209|       |  // over-allocation ratio, then we should not flush.
  210|  2.54M|  if (allocated_memory + kArenaBlockSize <
  ------------------
  |  Branch (210:7): [True: 2.54M, False: 0]
  ------------------
  211|  2.54M|      write_buffer_size + kArenaBlockSize * kAllowOverAllocationRatio) {
  212|  2.54M|    return false;
  213|  2.54M|  }
  214|       |
  215|       |  // if user keeps adding entries that exceeds write_buffer_size, we need to
  216|       |  // flush earlier even though we still have much available memory left.
  217|      0|  if (allocated_memory >
  ------------------
  |  Branch (217:7): [True: 0, False: 0]
  ------------------
  218|      0|      write_buffer_size + kArenaBlockSize * kAllowOverAllocationRatio) {
  219|      0|    return true;
  220|      0|  }
  221|       |
  222|       |  // In this code path, Arena has already allocated its "last block", which
  223|       |  // means the total allocatedmemory size is either:
  224|       |  //  (1) "moderately" over allocated the memory (no more than `0.6 * arena
  225|       |  // block size`. Or,
  226|       |  //  (2) the allocated memory is less than write buffer size, but we'll stop
  227|       |  // here since if we allocate a new arena block, we'll over allocate too much
  228|       |  // more (half of the arena block size) memory.
  229|       |  //
  230|       |  // In either case, to avoid over-allocate, the last block will stop allocation
  231|       |  // when its usage reaches a certain ratio, which we carefully choose "0.75
  232|       |  // full" as the stop condition because it addresses the following issue with
  233|       |  // great simplicity: What if the next inserted entry's size is
  234|       |  // bigger than AllocatedAndUnused()?
  235|       |  //
  236|       |  // The answer is: if the entry size is also bigger than 0.25 *
  237|       |  // kArenaBlockSize, a dedicated block will be allocated for it; otherwise
  238|       |  // arena will anyway skip the AllocatedAndUnused() and allocate a new, empty
  239|       |  // and regular block. In either case, we *overly* over-allocated.
  240|       |  //
  241|       |  // Therefore, setting the last block to be at most "0.75 full" avoids both
  242|       |  // cases.
  243|       |  //
  244|       |  // NOTE: the average percentage of waste space of this approach can be counted
  245|       |  // as: "arena block size * 0.25 / write buffer size". User who specify a small
  246|       |  // write buffer size and/or big arena block size may suffer.
  247|      0|  return arena_.AllocatedAndUnused() < kArenaBlockSize / 4;
  248|      0|}
_ZN7rocksdb8MemTable16UpdateFlushStateEv:
  250|  2.54M|void MemTable::UpdateFlushState() {
  251|  2.54M|  auto state = flush_state_.load(std::memory_order_relaxed);
  252|  2.54M|  if (state == FLUSH_NOT_REQUESTED && ShouldFlushNow()) {
  ------------------
  |  Branch (252:7): [True: 2.54M, False: 0]
  |  Branch (252:39): [True: 0, False: 2.54M]
  ------------------
  253|       |    // ignore CAS failure, because that means somebody else requested
  254|       |    // a flush
  255|      0|    flush_state_.compare_exchange_strong(state, FLUSH_REQUESTED,
  256|      0|                                         std::memory_order_relaxed,
  257|      0|                                         std::memory_order_relaxed);
  258|      0|  }
  259|  2.54M|}
_ZN7rocksdb8MemTable19UpdateOldestKeyTimeEv:
  261|  2.53M|void MemTable::UpdateOldestKeyTime() {
  262|  2.53M|  uint64_t oldest_key_time = oldest_key_time_.load(std::memory_order_relaxed);
  263|  2.53M|  if (oldest_key_time == std::numeric_limits<uint64_t>::max()) {
  ------------------
  |  Branch (263:7): [True: 8.96k, False: 2.52M]
  ------------------
  264|  8.96k|    int64_t current_time = 0;
  265|  8.96k|    auto s = clock_->GetCurrentTime(&current_time);
  266|  8.96k|    if (s.ok()) {
  ------------------
  |  Branch (266:9): [True: 8.96k, False: 0]
  ------------------
  267|  8.96k|      assert(current_time >= 0);
  268|       |      // If fail, the timestamp is already set.
  269|  8.96k|      oldest_key_time_.compare_exchange_strong(
  270|  8.96k|          oldest_key_time, static_cast<uint64_t>(current_time),
  271|  8.96k|          std::memory_order_relaxed, std::memory_order_relaxed);
  272|  8.96k|    }
  273|  8.96k|  }
  274|  2.53M|}
_ZNK7rocksdb8MemTable13KeyComparatorclEPKcS3_:
  327|  3.42M|                                        const char* prefix_len_key2) const {
  328|       |  // Internal keys are encoded as length-prefixed strings.
  329|  3.42M|  Slice k1 = GetLengthPrefixedSlice(prefix_len_key1);
  330|  3.42M|  Slice k2 = GetLengthPrefixedSlice(prefix_len_key2);
  331|  3.42M|  return comparator.CompareKeySeq(k1, k2);
  332|  3.42M|}
_ZNK7rocksdb8MemTable13KeyComparatorclEPKcRKNS_5SliceE:
  335|  23.2M|    const char* prefix_len_key, const KeyComparator::DecodedType& key) const {
  336|       |  // Internal keys are encoded as length-prefixed strings.
  337|  23.2M|  Slice a = GetLengthPrefixedSlice(prefix_len_key);
  338|  23.2M|  return comparator.CompareKeySeq(a, key);
  339|  23.2M|}
_ZN7rocksdb8MemTable11NewIteratorERKNS_11ReadOptionsENS_10UnownedPtrIKNS_18SeqnoToTimeMappingEEEPNS_5ArenaE:
  566|  8.99k|    UnownedPtr<const SeqnoToTimeMapping> seqno_to_time_mapping, Arena* arena) {
  567|  8.99k|  assert(arena != nullptr);
  568|  8.99k|  auto mem = arena->AllocateAligned(sizeof(MemTableIterator));
  569|  8.99k|  return new (mem)
  570|  8.99k|      MemTableIterator(*this, read_options, seqno_to_time_mapping, arena);
  571|  8.99k|}
_ZN7rocksdb8MemTable25NewRangeTombstoneIteratorERKNS_11ReadOptionsEmb:
  575|  8.99k|    bool immutable_memtable) {
  576|  8.99k|  if (read_options.ignore_range_deletions ||
  ------------------
  |  Branch (576:7): [True: 0, False: 8.99k]
  ------------------
  577|  8.99k|      is_range_del_table_empty_.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (577:7): [True: 6.09k, False: 2.90k]
  ------------------
  578|  6.09k|    return nullptr;
  579|  6.09k|  }
  580|  2.90k|  return NewRangeTombstoneIteratorInternal(read_options, read_seq,
  581|  2.90k|                                           immutable_memtable);
  582|  8.99k|}
_ZN7rocksdb8MemTable33NewRangeTombstoneIteratorInternalERKNS_11ReadOptionsEmb:
  586|  2.90k|    bool immutable_memtable) {
  587|  2.90k|  if (immutable_memtable) {
  ------------------
  |  Branch (587:7): [True: 0, False: 2.90k]
  ------------------
  588|       |    // Note that caller should already have verified that
  589|       |    // !is_range_del_table_empty_
  590|      0|    assert(IsFragmentedRangeTombstonesConstructed());
  591|      0|    return new FragmentedRangeTombstoneIterator(
  592|      0|        fragmented_range_tombstone_list_.get(), comparator_.comparator,
  593|      0|        read_seq, read_options.timestamp);
  594|      0|  }
  595|       |
  596|       |  // takes current cache
  597|  2.90k|  std::shared_ptr<FragmentedRangeTombstoneListCache> cache =
  598|  2.90k|      std::atomic_load_explicit(cached_range_tombstone_.Access(),
  599|  2.90k|                                std::memory_order_relaxed);
  600|       |  // construct fragmented tombstone list if necessary
  601|  2.90k|  if (!cache->initialized.load(std::memory_order_acquire)) {
  ------------------
  |  Branch (601:7): [True: 2.90k, False: 0]
  ------------------
  602|  2.90k|    cache->reader_mutex.lock();
  603|  2.90k|    if (!cache->tombstones) {
  ------------------
  |  Branch (603:9): [True: 2.90k, False: 0]
  ------------------
  604|  2.90k|      auto* unfragmented_iter = new MemTableIterator(
  605|  2.90k|          *this, read_options, nullptr /* seqno_to_time_mapping= */,
  606|  2.90k|          nullptr /* arena */, true /* use_range_del_table */);
  607|  2.90k|      cache->tombstones.reset(new FragmentedRangeTombstoneList(
  608|  2.90k|          std::unique_ptr<InternalIterator>(unfragmented_iter),
  609|  2.90k|          comparator_.comparator));
  610|  2.90k|      cache->initialized.store(true, std::memory_order_release);
  611|  2.90k|    }
  612|  2.90k|    cache->reader_mutex.unlock();
  613|  2.90k|  }
  614|       |
  615|  2.90k|  auto* fragmented_iter = new FragmentedRangeTombstoneIterator(
  616|  2.90k|      cache, comparator_.comparator, read_seq, read_options.timestamp);
  617|  2.90k|  return fragmented_iter;
  618|  2.90k|}
_ZN7rocksdb8MemTable18VerifyEncodedEntryENS_5SliceERKNS_18ProtectionInfoKVOSImEE:
  663|  1.26M|                                    const ProtectionInfoKVOS64& kv_prot_info) {
  664|  1.26M|  uint32_t ikey_len = 0;
  665|  1.26M|  if (!GetVarint32(&encoded, &ikey_len)) {
  ------------------
  |  Branch (665:7): [True: 0, False: 1.26M]
  ------------------
  666|      0|    return Status::Corruption("Unable to parse internal key length");
  667|      0|  }
  668|  1.26M|  if (ikey_len < 8 + ts_sz_) {
  ------------------
  |  Branch (668:7): [True: 0, False: 1.26M]
  ------------------
  669|      0|    return Status::Corruption("Internal key length too short");
  670|      0|  }
  671|  1.26M|  if (ikey_len > encoded.size()) {
  ------------------
  |  Branch (671:7): [True: 0, False: 1.26M]
  ------------------
  672|      0|    return Status::Corruption("Internal key length too long");
  673|      0|  }
  674|  1.26M|  uint32_t value_len = 0;
  675|  1.26M|  const size_t user_key_len = ikey_len - 8;
  676|  1.26M|  Slice key(encoded.data(), user_key_len);
  677|  1.26M|  encoded.remove_prefix(user_key_len);
  678|       |
  679|  1.26M|  uint64_t packed = DecodeFixed64(encoded.data());
  680|  1.26M|  ValueType value_type = kMaxValue;
  681|  1.26M|  SequenceNumber sequence_number = kMaxSequenceNumber;
  682|  1.26M|  UnPackSequenceAndType(packed, &sequence_number, &value_type);
  683|  1.26M|  encoded.remove_prefix(8);
  684|       |
  685|  1.26M|  if (!GetVarint32(&encoded, &value_len)) {
  ------------------
  |  Branch (685:7): [True: 0, False: 1.26M]
  ------------------
  686|      0|    return Status::Corruption("Unable to parse value length");
  687|      0|  }
  688|  1.26M|  if (value_len < encoded.size()) {
  ------------------
  |  Branch (688:7): [True: 0, False: 1.26M]
  ------------------
  689|      0|    return Status::Corruption("Value length too short");
  690|      0|  }
  691|  1.26M|  if (value_len > encoded.size()) {
  ------------------
  |  Branch (691:7): [True: 0, False: 1.26M]
  ------------------
  692|      0|    return Status::Corruption("Value length too long");
  693|      0|  }
  694|  1.26M|  Slice value(encoded.data(), value_len);
  695|       |
  696|  1.26M|  return kv_prot_info.StripS(sequence_number)
  697|  1.26M|      .StripKVO(key, value, value_type)
  698|  1.26M|      .GetStatus();
  699|  1.26M|}
_ZN7rocksdb8MemTable19UpdateEntryChecksumEPKNS_18ProtectionInfoKVOSImEERKNS_5SliceES7_NS_9ValueTypeEmPc:
  704|  2.53M|                                   char* checksum_ptr) {
  705|  2.53M|  if (moptions_.protection_bytes_per_key == 0) {
  ------------------
  |  Branch (705:7): [True: 2.53M, False: 0]
  ------------------
  706|  2.53M|    return;
  707|  2.53M|  }
  708|       |
  709|      0|  if (kv_prot_info == nullptr) {
  ------------------
  |  Branch (709:7): [True: 0, False: 0]
  ------------------
  710|      0|    ProtectionInfo64()
  711|      0|        .ProtectKVO(key, value, type)
  712|      0|        .ProtectS(s)
  713|      0|        .Encode(static_cast<uint8_t>(moptions_.protection_bytes_per_key),
  714|      0|                checksum_ptr);
  715|      0|  } else {
  716|      0|    kv_prot_info->Encode(
  717|      0|        static_cast<uint8_t>(moptions_.protection_bytes_per_key), checksum_ptr);
  718|      0|  }
  719|      0|}
_ZN7rocksdb8MemTable3AddEmNS_9ValueTypeERKNS_5SliceES4_PKNS_18ProtectionInfoKVOSImEEbPNS_23MemTablePostProcessInfoEPPv:
  726|  2.53M|                     MemTablePostProcessInfo* post_process_info, void** hint) {
  727|       |  // Format of an entry is concatenation of:
  728|       |  //  key_size     : varint32 of internal_key.size()
  729|       |  //  key bytes    : char[internal_key.size()]
  730|       |  //  value_size   : varint32 of value.size()
  731|       |  //  value bytes  : char[value.size()]
  732|       |  //  checksum     : char[moptions_.protection_bytes_per_key]
  733|  2.53M|  uint32_t key_size = static_cast<uint32_t>(key.size());
  734|  2.53M|  uint32_t val_size = static_cast<uint32_t>(value.size());
  735|  2.53M|  uint32_t internal_key_size = key_size + 8;
  736|  2.53M|  const uint32_t encoded_len = VarintLength(internal_key_size) +
  737|  2.53M|                               internal_key_size + VarintLength(val_size) +
  738|  2.53M|                               val_size + moptions_.protection_bytes_per_key;
  739|  2.53M|  char* buf = nullptr;
  740|  2.53M|  std::unique_ptr<MemTableRep>& table =
  741|  2.53M|      type == kTypeRangeDeletion ? range_del_table_ : table_;
  ------------------
  |  Branch (741:7): [True: 841k, False: 1.69M]
  ------------------
  742|  2.53M|  KeyHandle handle = table->Allocate(encoded_len, &buf);
  743|       |
  744|  2.53M|  char* p = EncodeVarint32(buf, internal_key_size);
  745|  2.53M|  memcpy(p, key.data(), key_size);
  746|  2.53M|  Slice key_slice(p, key_size);
  747|  2.53M|  p += key_size;
  748|  2.53M|  uint64_t packed = PackSequenceAndType(s, type);
  749|  2.53M|  EncodeFixed64(p, packed);
  750|  2.53M|  p += 8;
  751|  2.53M|  p = EncodeVarint32(p, val_size);
  752|  2.53M|  memcpy(p, value.data(), val_size);
  753|  2.53M|  assert((unsigned)(p + val_size - buf + moptions_.protection_bytes_per_key) ==
  754|  2.53M|         (unsigned)encoded_len);
  755|       |
  756|  2.53M|  UpdateEntryChecksum(kv_prot_info, key, value, type, s,
  757|  2.53M|                      buf + encoded_len - moptions_.protection_bytes_per_key);
  758|  2.53M|  Slice encoded(buf, encoded_len - moptions_.protection_bytes_per_key);
  759|  2.53M|  if (kv_prot_info != nullptr) {
  ------------------
  |  Branch (759:7): [True: 1.26M, False: 1.26M]
  ------------------
  760|  1.26M|    TEST_SYNC_POINT_CALLBACK("MemTable::Add:Encoded", &encoded);
  761|  1.26M|    Status status = VerifyEncodedEntry(encoded, *kv_prot_info);
  762|  1.26M|    if (!status.ok()) {
  ------------------
  |  Branch (762:9): [True: 0, False: 1.26M]
  ------------------
  763|      0|      return status;
  764|      0|    }
  765|  1.26M|  }
  766|       |
  767|  2.53M|  Slice key_without_ts = StripTimestampFromUserKey(key, ts_sz_);
  768|       |
  769|  2.53M|  if (!allow_concurrent) {
  ------------------
  |  Branch (769:7): [True: 2.53M, False: 0]
  ------------------
  770|       |    // Extract prefix for insert with hint. Hints are for point key table
  771|       |    // (`table_`) only, not `range_del_table_`.
  772|  2.53M|    if (table == table_ && insert_with_hint_prefix_extractor_ != nullptr &&
  ------------------
  |  Branch (772:9): [True: 1.69M, False: 841k]
  |  Branch (772:28): [True: 0, False: 1.69M]
  ------------------
  773|  2.53M|        insert_with_hint_prefix_extractor_->InDomain(key_slice)) {
  ------------------
  |  Branch (773:9): [True: 0, False: 0]
  ------------------
  774|      0|      Slice prefix = insert_with_hint_prefix_extractor_->Transform(key_slice);
  775|      0|      bool res = table->InsertKeyWithHint(handle, &insert_hints_[prefix]);
  776|      0|      if (UNLIKELY(!res)) {
  ------------------
  |  |   14|      0|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  777|      0|        return Status::TryAgain("key+seq exists");
  778|      0|      }
  779|  2.53M|    } else {
  780|  2.53M|      bool res = table->InsertKey(handle);
  781|  2.53M|      if (UNLIKELY(!res)) {
  ------------------
  |  |   14|  2.53M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 2.53M]
  |  |  ------------------
  ------------------
  782|      0|        return Status::TryAgain("key+seq exists");
  783|      0|      }
  784|  2.53M|    }
  785|       |
  786|       |    // this is a bit ugly, but is the way to avoid locked instructions
  787|       |    // when incrementing an atomic
  788|  2.53M|    num_entries_.store(num_entries_.load(std::memory_order_relaxed) + 1,
  789|  2.53M|                       std::memory_order_relaxed);
  790|  2.53M|    data_size_.store(data_size_.load(std::memory_order_relaxed) + encoded_len,
  791|  2.53M|                     std::memory_order_relaxed);
  792|  2.53M|    if (type == kTypeDeletion || type == kTypeSingleDeletion ||
  ------------------
  |  Branch (792:9): [True: 372k, False: 2.16M]
  |  Branch (792:34): [True: 0, False: 2.16M]
  ------------------
  793|  2.53M|        type == kTypeDeletionWithTimestamp) {
  ------------------
  |  Branch (793:9): [True: 0, False: 2.16M]
  ------------------
  794|   372k|      num_deletes_.store(num_deletes_.load(std::memory_order_relaxed) + 1,
  795|   372k|                         std::memory_order_relaxed);
  796|  2.16M|    } else if (type == kTypeRangeDeletion) {
  ------------------
  |  Branch (796:16): [True: 841k, False: 1.32M]
  ------------------
  797|   841k|      uint64_t val = num_range_deletes_.load(std::memory_order_relaxed) + 1;
  798|   841k|      num_range_deletes_.store(val, std::memory_order_relaxed);
  799|   841k|    }
  800|       |
  801|  2.53M|    if (bloom_filter_ && prefix_extractor_ &&
  ------------------
  |  Branch (801:9): [True: 0, False: 2.53M]
  |  Branch (801:26): [True: 0, False: 0]
  ------------------
  802|  2.53M|        prefix_extractor_->InDomain(key_without_ts)) {
  ------------------
  |  Branch (802:9): [True: 0, False: 0]
  ------------------
  803|      0|      bloom_filter_->Add(prefix_extractor_->Transform(key_without_ts));
  804|      0|    }
  805|  2.53M|    if (bloom_filter_ && moptions_.memtable_whole_key_filtering) {
  ------------------
  |  Branch (805:9): [True: 0, False: 2.53M]
  |  Branch (805:26): [True: 0, False: 0]
  ------------------
  806|      0|      bloom_filter_->Add(key_without_ts);
  807|      0|    }
  808|       |
  809|       |    // The first sequence number inserted into the memtable
  810|  2.53M|    assert(first_seqno_ == 0 || s >= first_seqno_);
  811|  2.53M|    if (first_seqno_ == 0) {
  ------------------
  |  Branch (811:9): [True: 8.96k, False: 2.52M]
  ------------------
  812|  8.96k|      first_seqno_.store(s, std::memory_order_relaxed);
  813|       |
  814|  8.96k|      if (earliest_seqno_ == kMaxSequenceNumber) {
  ------------------
  |  Branch (814:11): [True: 0, False: 8.96k]
  ------------------
  815|      0|        earliest_seqno_.store(GetFirstSequenceNumber(),
  816|      0|                              std::memory_order_relaxed);
  817|      0|      }
  818|  8.96k|      assert(first_seqno_.load() >= earliest_seqno_.load());
  819|  8.96k|    }
  820|  2.53M|    assert(post_process_info == nullptr);
  821|       |    // TODO(yuzhangyu): support updating newest UDT for when `allow_concurrent`
  822|       |    // is true.
  823|  2.53M|    MaybeUpdateNewestUDT(key_slice);
  824|  2.53M|    UpdateFlushState();
  825|  2.53M|  } else {
  826|      0|    bool res = (hint == nullptr)
  ------------------
  |  Branch (826:16): [True: 0, False: 0]
  ------------------
  827|      0|                   ? table->InsertKeyConcurrently(handle)
  828|      0|                   : table->InsertKeyWithHintConcurrently(handle, hint);
  829|      0|    if (UNLIKELY(!res)) {
  ------------------
  |  |   14|      0|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  830|      0|      return Status::TryAgain("key+seq exists");
  831|      0|    }
  832|       |
  833|      0|    assert(post_process_info != nullptr);
  834|      0|    post_process_info->num_entries++;
  835|      0|    post_process_info->data_size += encoded_len;
  836|      0|    if (type == kTypeDeletion) {
  ------------------
  |  Branch (836:9): [True: 0, False: 0]
  ------------------
  837|      0|      post_process_info->num_deletes++;
  838|      0|    }
  839|       |
  840|      0|    if (bloom_filter_ && prefix_extractor_ &&
  ------------------
  |  Branch (840:9): [True: 0, False: 0]
  |  Branch (840:26): [True: 0, False: 0]
  ------------------
  841|      0|        prefix_extractor_->InDomain(key_without_ts)) {
  ------------------
  |  Branch (841:9): [True: 0, False: 0]
  ------------------
  842|      0|      bloom_filter_->AddConcurrently(
  843|      0|          prefix_extractor_->Transform(key_without_ts));
  844|      0|    }
  845|      0|    if (bloom_filter_ && moptions_.memtable_whole_key_filtering) {
  ------------------
  |  Branch (845:9): [True: 0, False: 0]
  |  Branch (845:26): [True: 0, False: 0]
  ------------------
  846|      0|      bloom_filter_->AddConcurrently(key_without_ts);
  847|      0|    }
  848|       |
  849|       |    // atomically update first_seqno_ and earliest_seqno_.
  850|      0|    uint64_t cur_seq_num = first_seqno_.load(std::memory_order_relaxed);
  851|      0|    while ((cur_seq_num == 0 || s < cur_seq_num) &&
  ------------------
  |  Branch (851:13): [True: 0, False: 0]
  |  Branch (851:33): [True: 0, False: 0]
  ------------------
  852|      0|           !first_seqno_.compare_exchange_weak(cur_seq_num, s)) {
  ------------------
  |  Branch (852:12): [True: 0, False: 0]
  ------------------
  853|      0|    }
  854|      0|    uint64_t cur_earliest_seqno =
  855|      0|        earliest_seqno_.load(std::memory_order_relaxed);
  856|      0|    while (
  857|      0|        (cur_earliest_seqno == kMaxSequenceNumber || s < cur_earliest_seqno) &&
  ------------------
  |  Branch (857:10): [True: 0, False: 0]
  |  Branch (857:54): [True: 0, False: 0]
  ------------------
  858|      0|        !earliest_seqno_.compare_exchange_weak(cur_earliest_seqno, s)) {
  ------------------
  |  Branch (858:9): [True: 0, False: 0]
  ------------------
  859|      0|    }
  860|      0|  }
  861|  2.53M|  if (type == kTypeRangeDeletion) {
  ------------------
  |  Branch (861:7): [True: 841k, False: 1.69M]
  ------------------
  862|   841k|    auto new_cache = std::make_shared<FragmentedRangeTombstoneListCache>();
  863|   841k|    size_t size = cached_range_tombstone_.Size();
  864|   841k|    if (allow_concurrent) {
  ------------------
  |  Branch (864:9): [True: 0, False: 841k]
  ------------------
  865|      0|      post_process_info->num_range_deletes++;
  866|      0|      range_del_mutex_.lock();
  867|      0|    }
  868|  27.7M|    for (size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (868:24): [True: 26.9M, False: 841k]
  ------------------
  869|  26.9M|      std::shared_ptr<FragmentedRangeTombstoneListCache>* local_cache_ref_ptr =
  870|  26.9M|          cached_range_tombstone_.AccessAtCore(i);
  871|  26.9M|      auto new_local_cache_ref = std::make_shared<
  872|  26.9M|          const std::shared_ptr<FragmentedRangeTombstoneListCache>>(new_cache);
  873|       |      // It is okay for some reader to load old cache during invalidation as
  874|       |      // the new sequence number is not published yet.
  875|       |      // Each core will have a shared_ptr to a shared_ptr to the cached
  876|       |      // fragmented range tombstones, so that ref count is maintianed locally
  877|       |      // per-core using the per-core shared_ptr.
  878|  26.9M|      std::atomic_store_explicit(
  879|  26.9M|          local_cache_ref_ptr,
  880|  26.9M|          std::shared_ptr<FragmentedRangeTombstoneListCache>(
  881|  26.9M|              new_local_cache_ref, new_cache.get()),
  882|  26.9M|          std::memory_order_relaxed);
  883|  26.9M|    }
  884|       |
  885|   841k|    if (allow_concurrent) {
  ------------------
  |  Branch (885:9): [True: 0, False: 841k]
  ------------------
  886|      0|      range_del_mutex_.unlock();
  887|      0|    }
  888|   841k|    is_range_del_table_empty_.store(false, std::memory_order_relaxed);
  889|   841k|  }
  890|  2.53M|  UpdateOldestKeyTime();
  891|       |
  892|  2.53M|  TEST_SYNC_POINT_CALLBACK("MemTable::Add:BeforeReturn:Encoded", &encoded);
  893|  2.53M|  return Status::OK();
  894|  2.53M|}
_ZN7rocksdb8MemTable20MaybeUpdateNewestUDTERKNS_5SliceE:
 1666|  2.53M|void MemTable::MaybeUpdateNewestUDT(const Slice& user_key) {
 1667|  2.53M|  if (ts_sz_ == 0 || persist_user_defined_timestamps_) {
  ------------------
  |  Branch (1667:7): [True: 2.53M, False: 0]
  |  Branch (1667:22): [True: 0, False: 0]
  ------------------
 1668|  2.53M|    return;
 1669|  2.53M|  }
 1670|      0|  const Comparator* ucmp = GetInternalKeyComparator().user_comparator();
 1671|      0|  Slice udt = ExtractTimestampFromUserKey(user_key, ts_sz_);
 1672|      0|  if (newest_udt_.empty() || ucmp->CompareTimestamp(udt, newest_udt_) > 0) {
  ------------------
  |  Branch (1672:7): [True: 0, False: 0]
  |  Branch (1672:30): [True: 0, False: 0]
  ------------------
 1673|      0|    newest_udt_ = udt;
 1674|      0|  }
 1675|      0|}
_ZN7rocksdb16MemTableIteratorC2ERKNS_8MemTableERKNS_11ReadOptionsENS_10UnownedPtrIKNS_18SeqnoToTimeMappingEEEPNS_5ArenaEb:
  381|  11.9k|        ts_sz_(mem.ts_sz_) {
  382|  11.9k|    if (use_range_del_table) {
  ------------------
  |  Branch (382:9): [True: 2.90k, False: 8.99k]
  ------------------
  383|  2.90k|      iter_ = mem.range_del_table_->GetIterator(arena);
  384|  8.99k|    } else if (prefix_extractor_ != nullptr && !read_options.total_order_seek &&
  ------------------
  |  Branch (384:16): [True: 0, False: 8.99k]
  |  Branch (384:48): [True: 0, False: 0]
  ------------------
  385|  8.99k|               !read_options.auto_prefix_mode) {
  ------------------
  |  Branch (385:16): [True: 0, False: 0]
  ------------------
  386|       |      // Auto prefix mode is not implemented in memtable yet.
  387|      0|      bloom_ = mem.bloom_filter_.get();
  388|      0|      iter_ = mem.table_->GetDynamicPrefixIterator(arena);
  389|  8.99k|    } else {
  390|  8.99k|      iter_ = mem.table_->GetIterator(arena);
  391|  8.99k|    }
  392|  11.9k|    status_.PermitUncheckedError();
  393|  11.9k|  }
_ZN7rocksdb16MemTableIteratorD2Ev:
  398|  11.9k|  ~MemTableIterator() override {
  399|       |#ifndef NDEBUG
  400|       |    // Assert that the MemTableIterator is never deleted while
  401|       |    // Pinning is Enabled.
  402|       |    assert(!pinned_iters_mgr_ || !pinned_iters_mgr_->PinningEnabled());
  403|       |#endif
  404|  11.9k|    if (arena_mode_) {
  ------------------
  |  Branch (404:9): [True: 8.99k, False: 2.90k]
  ------------------
  405|  8.99k|      iter_->~Iterator();
  406|  8.99k|    } else {
  407|  2.90k|      delete iter_;
  408|  2.90k|    }
  409|  11.9k|  }
_ZNK7rocksdb16MemTableIterator5ValidEv:
  418|  1.75M|  bool Valid() const override { return valid_ && status_.ok(); }
  ------------------
  |  Branch (418:40): [True: 1.72M, False: 24.1k]
  |  Branch (418:50): [True: 1.72M, False: 0]
  ------------------
_ZN7rocksdb16MemTableIterator11SeekToFirstEv:
  466|  14.8k|  void SeekToFirst() override {
  467|  14.8k|    iter_->SeekToFirst();
  468|  14.8k|    valid_ = iter_->Valid();
  469|  14.8k|    VerifyEntryChecksum();
  470|  14.8k|  }
_ZN7rocksdb16MemTableIterator19VerifyEntryChecksumEv:
  553|  1.70M|  void VerifyEntryChecksum() {
  554|  1.70M|    if (protection_bytes_per_key_ > 0 && Valid()) {
  ------------------
  |  Branch (554:9): [True: 0, False: 1.70M]
  |  Branch (554:42): [True: 0, False: 0]
  ------------------
  555|      0|      status_ = MemTable::VerifyEntryChecksum(iter_->key(),
  556|      0|                                              protection_bytes_per_key_);
  557|      0|      if (!status_.ok()) {
  ------------------
  |  Branch (557:11): [True: 0, False: 0]
  ------------------
  558|      0|        ROCKS_LOG_ERROR(logger_, "In MemtableIterator: %s", status_.getState());
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  559|      0|      }
  560|      0|    }
  561|  1.70M|  }
_ZN7rocksdb16MemTableIterator4NextEv:
  476|  1.68M|  void Next() override {
  477|  1.68M|    PERF_COUNTER_ADD(next_on_memtable_count, 1);
  ------------------
  |  |   81|  1.68M|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 1.68M, False: 0]
  |  |  ------------------
  |  |   82|  1.68M|    perf_context.metric += value;              \
  |  |   83|  1.68M|  }                                            \
  |  |   84|  1.68M|  static_assert(true, "semicolon required")
  ------------------
  478|  1.68M|    assert(Valid());
  479|  1.68M|    iter_->Next();
  480|  1.68M|    TEST_SYNC_POINT_CALLBACK("MemTableIterator::Next:0", iter_);
  481|  1.68M|    valid_ = iter_->Valid();
  482|  1.68M|    VerifyEntryChecksum();
  483|  1.68M|  }
_ZNK7rocksdb16MemTableIterator3keyEv:
  501|  2.52M|  Slice key() const override {
  502|  2.52M|    assert(Valid());
  503|  2.52M|    return GetLengthPrefixedSlice(iter_->key());
  504|  2.52M|  }
_ZNK7rocksdb16MemTableIterator5valueEv:
  520|  1.68M|  Slice value() const override {
  521|  1.68M|    assert(Valid());
  522|  1.68M|    Slice key_slice = GetLengthPrefixedSlice(iter_->key());
  523|  1.68M|    return GetLengthPrefixedSlice(key_slice.data() + key_slice.size());
  524|  1.68M|  }
_ZNK7rocksdb16MemTableIterator6statusEv:
  526|  13.4k|  Status status() const override { return status_; }
_ZNK7rocksdb16MemTableIterator11IsKeyPinnedEv:
  528|   841k|  bool IsKeyPinned() const override {
  529|       |    // memtable data is always pinned
  530|   841k|    return true;
  531|   841k|  }
_ZNK7rocksdb16MemTableIterator13IsValuePinnedEv:
  533|   420k|  bool IsValuePinned() const override {
  534|       |    // memtable value is always pinned, except if we allow inplace update.
  535|   420k|    return value_pinned_;
  536|   420k|  }

_ZNK7rocksdb8MemTable19IsSnapshotSupportedEv:
  484|  9.02k|  bool IsSnapshotSupported() const {
  485|  9.02k|    return table_->IsSnapshotSupported() && !moptions_.inplace_update_support;
  ------------------
  |  Branch (485:12): [True: 9.02k, False: 0]
  |  Branch (485:45): [True: 9.02k, False: 0]
  ------------------
  486|  9.02k|  }
_ZN7rocksdb8MemTable13KeyComparatorC2ERKNS_21InternalKeyComparatorE:
   95|  13.5k|    explicit KeyComparator(const InternalKeyComparator& c) : comparator(c) {}
_ZN7rocksdb8MemTable3RefEv:
  126|  22.5k|  void Ref() { ++refs_; }
_ZN7rocksdb8MemTable5UnrefEv:
  132|  22.5k|  MemTable* Unref() {
  133|  22.5k|    --refs_;
  134|  22.5k|    assert(refs_ >= 0);
  135|  22.5k|    if (refs_ <= 0) {
  ------------------
  |  Branch (135:9): [True: 13.5k, False: 9.02k]
  ------------------
  136|  13.5k|      return this;
  137|  13.5k|    }
  138|  9.02k|    return nullptr;
  139|  22.5k|  }
_ZNK7rocksdb8MemTable19ShouldScheduleFlushEv:
  183|  2.53M|  bool ShouldScheduleFlush() const {
  184|  2.53M|    return flush_state_.load(std::memory_order_relaxed) == FLUSH_REQUESTED;
  185|  2.53M|  }
_ZNK7rocksdb8MemTable11num_entriesEv:
  354|  4.48k|  uint64_t num_entries() const {
  355|  4.48k|    return num_entries_.load(std::memory_order_relaxed);
  356|  4.48k|  }
_ZN7rocksdb8MemTable22GetFirstSequenceNumberEv:
  404|  4.54k|  SequenceNumber GetFirstSequenceNumber() {
  405|  4.54k|    return first_seqno_.load(std::memory_order_relaxed);
  406|  4.54k|  }
_ZNK7rocksdb8MemTable27GetImmutableMemTableOptionsEv:
  503|  1.33M|  const ImmutableMemTableOptions* GetImmutableMemTableOptions() const {
  504|  1.33M|    return &moptions_;
  505|  1.33M|  }
_ZN7rocksdb8MemTable5SetIDEm:
  512|  13.5k|  void SetID(uint64_t id) { id_ = id; }

_ZN7rocksdb19MemTableListVersionC2EPmil:
   72|  18.0k|      parent_memtable_list_memory_usage_(parent_memtable_list_memory_usage) {}
_ZN7rocksdb19MemTableListVersion3RefEv:
   74|  27.0k|void MemTableListVersion::Ref() { ++refs_; }
_ZN7rocksdb19MemTableListVersion5UnrefEPNS_10autovectorIPNS_8MemTableELm8EEE:
   77|  27.0k|void MemTableListVersion::Unref(autovector<MemTable*>* to_delete) {
   78|  27.0k|  assert(refs_ >= 1);
   79|  27.0k|  --refs_;
   80|  27.0k|  if (refs_ == 0) {
  ------------------
  |  Branch (80:7): [True: 18.0k, False: 9.02k]
  ------------------
   81|       |    // if to_delete is equal to nullptr it means we're confident
   82|       |    // that refs_ will not be zero
   83|  18.0k|    assert(to_delete != nullptr);
   84|  18.0k|    for (const auto& m : memlist_) {
  ------------------
  |  Branch (84:24): [True: 0, False: 18.0k]
  ------------------
   85|      0|      UnrefMemTable(to_delete, m);
   86|      0|    }
   87|  18.0k|    for (const auto& m : memlist_history_) {
  ------------------
  |  Branch (87:24): [True: 0, False: 18.0k]
  ------------------
   88|      0|      UnrefMemTable(to_delete, m);
   89|      0|    }
   90|  18.0k|    delete this;
   91|  18.0k|  }
   92|  27.0k|}
_ZNK7rocksdb12MemTableList13NumNotFlushedEv:
   94|  9.02k|int MemTableList::NumNotFlushed() const {
   95|  9.02k|  int size = static_cast<int>(current_->memlist_.size());
   96|  9.02k|  assert(num_flush_not_started_ <= size);
   97|  9.02k|  return size;
   98|  9.02k|}
_ZN7rocksdb19MemTableListVersion12AddIteratorsERKNS_11ReadOptionsENS_10UnownedPtrIKNS_18SeqnoToTimeMappingEEEPNS_20MergeIteratorBuilderEb:
  226|  4.51k|    MergeIteratorBuilder* merge_iter_builder, bool add_range_tombstone_iter) {
  227|  4.51k|  for (auto& m : memlist_) {
  ------------------
  |  Branch (227:16): [True: 0, False: 4.51k]
  ------------------
  228|      0|    auto mem_iter = m->NewIterator(options, seqno_to_time_mapping,
  229|      0|                                   merge_iter_builder->GetArena());
  230|      0|    if (!add_range_tombstone_iter || options.ignore_range_deletions) {
  ------------------
  |  Branch (230:9): [True: 0, False: 0]
  |  Branch (230:38): [True: 0, False: 0]
  ------------------
  231|      0|      merge_iter_builder->AddIterator(mem_iter);
  232|      0|    } else {
  233|       |      // Except for snapshot read, using kMaxSequenceNumber is OK because these
  234|       |      // are immutable memtables.
  235|      0|      SequenceNumber read_seq = options.snapshot != nullptr
  ------------------
  |  Branch (235:33): [True: 0, False: 0]
  ------------------
  236|      0|                                    ? options.snapshot->GetSequenceNumber()
  237|      0|                                    : kMaxSequenceNumber;
  238|      0|      std::unique_ptr<TruncatedRangeDelIterator> mem_tombstone_iter;
  239|      0|      auto range_del_iter = m->NewRangeTombstoneIterator(
  240|      0|          options, read_seq, true /* immutale_memtable */);
  241|      0|      if (range_del_iter == nullptr || range_del_iter->empty()) {
  ------------------
  |  Branch (241:11): [True: 0, False: 0]
  |  Branch (241:40): [True: 0, False: 0]
  ------------------
  242|      0|        delete range_del_iter;
  243|      0|      } else {
  244|      0|        mem_tombstone_iter = std::make_unique<TruncatedRangeDelIterator>(
  245|      0|            std::unique_ptr<FragmentedRangeTombstoneIterator>(range_del_iter),
  246|      0|            &m->GetInternalKeyComparator(), nullptr /* smallest */,
  247|      0|            nullptr /* largest */);
  248|      0|      }
  249|      0|      merge_iter_builder->AddPointAndTombstoneIterator(
  250|      0|          mem_iter, std::move(mem_tombstone_iter));
  251|      0|    }
  252|      0|  }
  253|  4.51k|}

_ZN7rocksdb12MemTableListC2Eiil:
  236|  18.0k|        current_has_history_(false) {
  237|  18.0k|    current_->Ref();
  238|  18.0k|  }
_ZN7rocksdb12MemTableListD2Ev:
  242|  18.0k|  ~MemTableList() {}
_ZNK7rocksdb12MemTableList7currentEv:
  244|  27.0k|  MemTableListVersion* current() const { return current_; }

_ZNK7rocksdb12MergeContext11GetOperandsEv:
   87|  4.48k|  const std::vector<Slice>& GetOperands() const {
   88|  4.48k|    return GetOperandsDirectionForward();
   89|  4.48k|  }
_ZNK7rocksdb12MergeContext27GetOperandsDirectionForwardEv:
   97|  4.48k|  const std::vector<Slice>& GetOperandsDirectionForward() const {
   98|  4.48k|    if (!operand_list_) {
  ------------------
  |  Branch (98:9): [True: 4.48k, False: 0]
  ------------------
   99|  4.48k|      return empty_operand_list;
  100|  4.48k|    }
  101|       |
  102|      0|    SetDirectionForward();
  103|      0|    return *operand_list_;
  104|  4.48k|  }

_ZN7rocksdb11MergeHelperC2EPNS_3EnvEPKNS_10ComparatorEPKNS_13MergeOperatorEPKNS_16CompactionFilterEPNS_6LoggerEbmPKNS_15SnapshotCheckerEiPNS_10StatisticsEPKNSt3__16atomicIbEE:
   53|  4.48k|      stats_(stats) {
   54|  4.48k|  assert(user_comparator_ != nullptr);
   55|  4.48k|  if (user_merge_operator_) {
  ------------------
  |  Branch (55:7): [True: 0, False: 4.48k]
  ------------------
   56|      0|    allow_single_operand_ = user_merge_operator_->AllowSingleOperand();
   57|      0|  }
   58|  4.48k|}
_ZN7rocksdb19MergeOutputIteratorC2EPKNS_11MergeHelperE:
  650|  4.48k|    : merge_helper_(merge_helper) {
  651|  4.48k|  it_keys_ = merge_helper_->keys().rend();
  652|  4.48k|  it_values_ = merge_helper_->values().rend();
  653|  4.48k|}

_ZNK7rocksdb11MergeHelper4keysEv:
  210|  39.1k|  const std::deque<std::string>& keys() const { return keys_; }
_ZNK7rocksdb11MergeHelper6valuesEv:
  211|  4.48k|  const std::vector<Slice>& values() const {
  212|  4.48k|    return merge_context_.GetOperands();
  213|  4.48k|  }
_ZN7rocksdb19MergeOutputIterator5ValidEv:
  310|  34.6k|  bool Valid() { return it_keys_ != merge_helper_->keys().rend(); }

_ZN7rocksdb15OutputValidator3AddERKNS_5SliceES3_:
   12|  34.6k|Status OutputValidator::Add(const Slice& key, const Slice& value) {
   13|  34.6k|  if (enable_hash_) {
  ------------------
  |  Branch (13:7): [True: 0, False: 34.6k]
  ------------------
   14|       |    // Generate a rolling 64-bit hash of the key and values
   15|      0|    paranoid_hash_ = NPHash64(key.data(), key.size(), paranoid_hash_);
   16|      0|    paranoid_hash_ = NPHash64(value.data(), value.size(), paranoid_hash_);
   17|      0|  }
   18|  34.6k|  if (key.size() < kNumInternalBytes) {
  ------------------
  |  Branch (18:7): [True: 0, False: 34.6k]
  ------------------
   19|      0|    return Status::Corruption(
   20|      0|        "Compaction tries to write a key without internal bytes.");
   21|      0|  }
   22|       |  // prev_key_ starts with empty.
   23|  34.6k|  if (!prev_key_.empty() && icmp_.Compare(key, prev_key_) < 0) {
  ------------------
  |  Branch (23:7): [True: 30.8k, False: 3.81k]
  |  Branch (23:7): [True: 0, False: 34.6k]
  |  Branch (23:29): [True: 0, False: 30.8k]
  ------------------
   24|      0|    return Status::Corruption("Compaction sees out-of-order keys.");
   25|      0|  }
   26|  34.6k|  prev_key_.assign(key.data(), key.size());
   27|  34.6k|  return Status::OK();
   28|  34.6k|}

_ZN7rocksdb15OutputValidatorC2ERKNS_21InternalKeyComparatorEbm:
   22|  4.48k|        enable_hash_(enable_hash) {}

_ZN7rocksdb21PeriodicTaskScheduler8RegisterENS_16PeriodicTaskTypeERKNSt3__18functionIFvvEEE:
   39|  9.02k|                                       const PeriodicTaskFunc& fn) {
   40|  9.02k|  return Register(task_type, fn, kDefaultPeriodSeconds.at(task_type));
   41|  9.02k|}
_ZN7rocksdb21PeriodicTaskScheduler8RegisterENS_16PeriodicTaskTypeERKNSt3__18functionIFvvEEEm:
   45|  27.0k|                                       uint64_t repeat_period_seconds) {
   46|  27.0k|  MutexLock l(&timer_mutex);
   47|  27.0k|  static std::atomic<uint64_t> initial_delay(0);
   48|       |
   49|  27.0k|  if (repeat_period_seconds == kInvalidPeriodSec) {
  ------------------
  |  Branch (49:7): [True: 0, False: 27.0k]
  ------------------
   50|      0|    return Status::InvalidArgument("Invalid task repeat period");
   51|      0|  }
   52|  27.0k|  auto it = tasks_map_.find(task_type);
   53|  27.0k|  if (it != tasks_map_.end()) {
  ------------------
  |  Branch (53:7): [True: 0, False: 27.0k]
  ------------------
   54|       |    // the task already exists and it's the same, no update needed
   55|      0|    if (it->second.repeat_every_sec == repeat_period_seconds) {
  ------------------
  |  Branch (55:9): [True: 0, False: 0]
  ------------------
   56|      0|      return Status::OK();
   57|      0|    }
   58|       |    // cancel the existing one before register new one
   59|      0|    timer_->Cancel(it->second.name);
   60|      0|    tasks_map_.erase(it);
   61|      0|  }
   62|       |
   63|  27.0k|  timer_->Start();
   64|       |  // put task type name as prefix, for easy debug
   65|  27.0k|  std::string unique_id =
   66|  27.0k|      kPeriodicTaskTypeNames.at(task_type) + std::to_string(id_++);
   67|       |
   68|  27.0k|  bool succeeded = timer_->Add(
   69|  27.0k|      fn, unique_id,
   70|  27.0k|      (initial_delay.fetch_add(1) % repeat_period_seconds) * kMicrosInSecond,
   71|  27.0k|      repeat_period_seconds * kMicrosInSecond);
   72|  27.0k|  if (!succeeded) {
  ------------------
  |  Branch (72:7): [True: 0, False: 27.0k]
  ------------------
   73|      0|    return Status::Aborted("Failed to register periodic task");
   74|      0|  }
   75|  27.0k|  auto result = tasks_map_.try_emplace(
   76|  27.0k|      task_type, TaskInfo{unique_id, repeat_period_seconds});
   77|  27.0k|  if (!result.second) {
  ------------------
  |  Branch (77:7): [True: 0, False: 27.0k]
  ------------------
   78|      0|    return Status::Aborted("Failed to add periodic task");
   79|      0|  }
   80|  27.0k|  return Status::OK();
   81|  27.0k|}
_ZN7rocksdb21PeriodicTaskScheduler10UnregisterENS_16PeriodicTaskTypeE:
   83|  45.1k|Status PeriodicTaskScheduler::Unregister(PeriodicTaskType task_type) {
   84|  45.1k|  MutexLock l(&timer_mutex);
   85|  45.1k|  auto it = tasks_map_.find(task_type);
   86|  45.1k|  if (it != tasks_map_.end()) {
  ------------------
  |  Branch (86:7): [True: 27.0k, False: 18.0k]
  ------------------
   87|  27.0k|    timer_->Cancel(it->second.name);
   88|  27.0k|    tasks_map_.erase(it);
   89|  27.0k|  }
   90|  45.1k|  if (!timer_->HasPendingTask()) {
  ------------------
  |  Branch (90:7): [True: 18.0k, False: 27.0k]
  ------------------
   91|  18.0k|    timer_->Shutdown();
   92|  18.0k|  }
   93|  45.1k|  return Status::OK();
   94|  45.1k|}
_ZN7rocksdb21PeriodicTaskScheduler7DefaultEv:
   96|  9.02k|Timer* PeriodicTaskScheduler::Default() {
   97|  9.02k|  STATIC_AVOID_DESTRUCTION(Timer, timer)(SystemClock::Default().get());
  ------------------
  |  |   53|  9.02k|#define STATIC_AVOID_DESTRUCTION(Type, name) static Type& name = *new Type
  ------------------
   98|  9.02k|  return &timer;
   99|  9.02k|}

_ZN7rocksdb21PeriodicTaskSchedulerC2Ev:
   38|  9.02k|  explicit PeriodicTaskScheduler() = default;
_ZN7rocksdb21PeriodicTaskScheduler8TaskInfoC2ENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEm:
   90|  27.0k|        : name(std::move(_name)), repeat_every_sec(_repeat_every_sec) {}

_ZN7rocksdb22PinnedIteratorsManagerC2Ev:
   21|  19.2k|  PinnedIteratorsManager() : pinning_enabled(false) {}
_ZN7rocksdb22PinnedIteratorsManagerD2Ev:
   22|  19.2k|  ~PinnedIteratorsManager() {
   23|  19.2k|    if (pinning_enabled) {
  ------------------
  |  Branch (23:9): [True: 10.3k, False: 8.99k]
  ------------------
   24|  10.3k|      ReleasePinnedData();
   25|  10.3k|    }
   26|  19.2k|  }
_ZN7rocksdb22PinnedIteratorsManager17ReleasePinnedDataEv:
   61|  10.3k|  inline void ReleasePinnedData() {
   62|  10.3k|    assert(pinning_enabled == true);
   63|  10.3k|    pinning_enabled = false;
   64|       |
   65|       |    // Remove duplicate pointers
   66|  10.3k|    std::sort(pinned_ptrs_.begin(), pinned_ptrs_.end());
   67|  10.3k|    auto unique_end = std::unique(pinned_ptrs_.begin(), pinned_ptrs_.end());
   68|       |
   69|  19.0k|    for (auto i = pinned_ptrs_.begin(); i != unique_end; ++i) {
  ------------------
  |  Branch (69:41): [True: 8.72k, False: 10.3k]
  ------------------
   70|  8.72k|      void* ptr = i->first;
   71|  8.72k|      ReleaseFunction release_func = i->second;
   72|  8.72k|      release_func(ptr);
   73|  8.72k|    }
   74|  10.3k|    pinned_ptrs_.clear();
   75|       |    // Also do cleanups from the base Cleanable
   76|  10.3k|    Cleanable::Reset();
   77|  10.3k|  }
_ZN7rocksdb22PinnedIteratorsManager12StartPinningEv:
   34|  10.3k|  void StartPinning() {
   35|  10.3k|    assert(pinning_enabled == false);
   36|  10.3k|    pinning_enabled = true;
   37|  10.3k|  }
_ZN7rocksdb22PinnedIteratorsManager14PinningEnabledEv:
   40|  51.2k|  bool PinningEnabled() { return pinning_enabled; }
_ZN7rocksdb22PinnedIteratorsManager11PinIteratorEPNS_20InternalIteratorBaseINS_5SliceEEEb:
   43|  8.72k|  void PinIterator(InternalIterator* iter, bool arena = false) {
   44|  8.72k|    if (arena) {
  ------------------
  |  Branch (44:9): [True: 0, False: 8.72k]
  ------------------
   45|      0|      PinPtr(iter, &PinnedIteratorsManager::ReleaseArenaInternalIterator);
   46|  8.72k|    } else {
   47|  8.72k|      PinPtr(iter, &PinnedIteratorsManager::ReleaseInternalIterator);
   48|  8.72k|    }
   49|  8.72k|  }
_ZN7rocksdb22PinnedIteratorsManager6PinPtrEPvPFvS1_E:
   52|  8.72k|  void PinPtr(void* ptr, ReleaseFunction release_func) {
   53|  8.72k|    assert(pinning_enabled);
   54|  8.72k|    if (ptr == nullptr) {
  ------------------
  |  Branch (54:9): [True: 0, False: 8.72k]
  ------------------
   55|      0|      return;
   56|      0|    }
   57|  8.72k|    pinned_ptrs_.emplace_back(ptr, release_func);
   58|  8.72k|  }
_ZN7rocksdb22PinnedIteratorsManager23ReleaseInternalIteratorEPv:
   80|  8.72k|  static void ReleaseInternalIterator(void* ptr) {
   81|  8.72k|    delete static_cast<InternalIterator*>(ptr);
   82|  8.72k|  }

_ZN7rocksdb25TruncatedRangeDelIteratorC2ENSt3__110unique_ptrINS_32FragmentedRangeTombstoneIteratorENS1_14default_deleteIS3_EEEEPKNS_21InternalKeyComparatorEPKNS_11InternalKeyESC_:
   30|  8.72k|      largest_ikey_(largest) {
   31|       |  // Set up bounds such that range tombstones from this iterator are
   32|       |  // truncated to range [smallest_, largest_).
   33|  8.72k|  if (smallest != nullptr) {
  ------------------
  |  Branch (33:7): [True: 2.90k, False: 5.81k]
  ------------------
   34|  2.90k|    pinned_bounds_.emplace_back();
   35|  2.90k|    auto& parsed_smallest = pinned_bounds_.back();
   36|  2.90k|    Status pik_status = ParseInternalKey(smallest->Encode(), &parsed_smallest,
   37|  2.90k|                                         false /* log_err_key */);  // TODO
   38|  2.90k|    pik_status.PermitUncheckedError();
   39|  2.90k|    parsed_smallest.type = kTypeMaxValid;
   40|  2.90k|    assert(pik_status.ok());
   41|  2.90k|    smallest_ = &parsed_smallest;
   42|  2.90k|  }
   43|  8.72k|  if (largest != nullptr) {
  ------------------
  |  Branch (43:7): [True: 2.90k, False: 5.81k]
  ------------------
   44|  2.90k|    pinned_bounds_.emplace_back();
   45|  2.90k|    auto& parsed_largest = pinned_bounds_.back();
   46|       |
   47|  2.90k|    Status pik_status = ParseInternalKey(largest->Encode(), &parsed_largest,
   48|  2.90k|                                         false /* log_err_key */);  // TODO
   49|  2.90k|    pik_status.PermitUncheckedError();
   50|  2.90k|    assert(pik_status.ok());
   51|       |
   52|  2.90k|    if (parsed_largest.type == kTypeRangeDeletion &&
  ------------------
  |  Branch (52:9): [True: 1.87k, False: 1.03k]
  ------------------
   53|  2.90k|        parsed_largest.sequence == kMaxSequenceNumber) {
  ------------------
  |  Branch (53:9): [True: 1.87k, False: 0]
  ------------------
   54|       |      // The file boundary has been artificially extended by a range tombstone.
   55|       |      // We do not need to adjust largest to properly truncate range
   56|       |      // tombstones that extend past the boundary.
   57|  1.87k|    } else if (parsed_largest.sequence == 0) {
  ------------------
  |  Branch (57:16): [True: 0, False: 1.03k]
  ------------------
   58|       |      // The largest key in the sstable has a sequence number of 0. Since we
   59|       |      // guarantee that no internal keys with the same user key and sequence
   60|       |      // number can exist in a DB, we know that the largest key in this sstable
   61|       |      // cannot exist as the smallest key in the next sstable. This further
   62|       |      // implies that no range tombstone in this sstable covers largest;
   63|       |      // otherwise, the file boundary would have been artificially extended.
   64|       |      //
   65|       |      // Therefore, we will never truncate a range tombstone at largest, so we
   66|       |      // can leave it unchanged.
   67|       |      // TODO: maybe use kMaxValid here to ensure range tombstone having
   68|       |      //  distinct key from point keys.
   69|  1.03k|    } else {
   70|       |      // The same user key may straddle two sstable boundaries. To ensure that
   71|       |      // the truncated end key can cover the largest key in this sstable, reduce
   72|       |      // its sequence number by 1.
   73|  1.03k|      parsed_largest.sequence -= 1;
   74|       |      // This line is not needed for correctness, but it ensures that the
   75|       |      // truncated end key is not covering keys from the next SST file.
   76|  1.03k|      parsed_largest.type = kTypeMaxValid;
   77|  1.03k|    }
   78|  2.90k|    largest_ = &parsed_largest;
   79|  2.90k|  }
   80|  8.72k|}
_ZNK7rocksdb25TruncatedRangeDelIterator5ValidEv:
   82|  75.1M|bool TruncatedRangeDelIterator::Valid() const {
   83|  75.1M|  assert(iter_ != nullptr);
   84|  75.1M|  return iter_->Valid() &&
  ------------------
  |  Branch (84:10): [True: 75.0M, False: 10.6k]
  ------------------
   85|  75.1M|         (smallest_ == nullptr ||
  ------------------
  |  Branch (85:11): [True: 74.9M, False: 131k]
  ------------------
   86|  75.0M|          icmp_->Compare(*smallest_, iter_->parsed_end_key()) < 0) &&
  ------------------
  |  Branch (86:11): [True: 131k, False: 0]
  ------------------
   87|  75.1M|         (largest_ == nullptr ||
  ------------------
  |  Branch (87:11): [True: 74.9M, False: 131k]
  ------------------
   88|  75.0M|          icmp_->Compare(iter_->parsed_start_key(), *largest_) < 0);
  ------------------
  |  Branch (88:11): [True: 131k, False: 0]
  ------------------
   89|  75.1M|}
_ZN7rocksdb25TruncatedRangeDelIterator4SeekERKNS_5SliceE:
   92|  2.59k|void TruncatedRangeDelIterator::Seek(const Slice& target) {
   93|  2.59k|  if (largest_ != nullptr &&
  ------------------
  |  Branch (93:7): [True: 0, False: 2.59k]
  |  Branch (93:7): [True: 0, False: 2.59k]
  ------------------
   94|  2.59k|      icmp_->Compare(*largest_, ParsedInternalKey(target, kMaxSequenceNumber,
  ------------------
  |  Branch (94:7): [True: 0, False: 0]
  ------------------
   95|      0|                                                  kTypeRangeDeletion)) <= 0) {
   96|      0|    iter_->Invalidate();
   97|      0|    return;
   98|      0|  }
   99|  2.59k|  if (smallest_ != nullptr &&
  ------------------
  |  Branch (99:7): [True: 0, False: 2.59k]
  ------------------
  100|  2.59k|      icmp_->user_comparator()->Compare(target, smallest_->user_key) < 0) {
  ------------------
  |  Branch (100:7): [True: 0, False: 0]
  ------------------
  101|      0|    iter_->Seek(smallest_->user_key);
  102|      0|    return;
  103|      0|  }
  104|  2.59k|  iter_->Seek(target);
  105|  2.59k|}
_ZN7rocksdb25TruncatedRangeDelIterator11SeekToFirstEv:
  141|  8.72k|void TruncatedRangeDelIterator::SeekToFirst() {
  142|  8.72k|  if (smallest_ != nullptr) {
  ------------------
  |  Branch (142:7): [True: 2.90k, False: 5.81k]
  ------------------
  143|  2.90k|    iter_->Seek(smallest_->user_key);
  144|  2.90k|    return;
  145|  2.90k|  }
  146|  5.81k|  iter_->SeekToTopFirst();
  147|  5.81k|}
_ZN7rocksdb25TruncatedRangeDelIterator15SplitBySnapshotERKNSt3__16vectorImNS1_9allocatorImEEEE:
  159|  2.90k|    const std::vector<SequenceNumber>& snapshots) {
  160|  2.90k|  using FragmentedIterPair =
  161|  2.90k|      std::pair<const SequenceNumber,
  162|  2.90k|                std::unique_ptr<FragmentedRangeTombstoneIterator>>;
  163|       |
  164|  2.90k|  auto split_untruncated_iters = iter_->SplitBySnapshot(snapshots);
  165|  2.90k|  std::map<SequenceNumber, std::unique_ptr<TruncatedRangeDelIterator>>
  166|  2.90k|      split_truncated_iters;
  167|  2.90k|  std::for_each(
  168|  2.90k|      split_untruncated_iters.begin(), split_untruncated_iters.end(),
  169|  2.90k|      [&](FragmentedIterPair& iter_pair) {
  170|  2.90k|        auto truncated_iter = std::make_unique<TruncatedRangeDelIterator>(
  171|  2.90k|            std::move(iter_pair.second), icmp_, smallest_ikey_, largest_ikey_);
  172|  2.90k|        split_truncated_iters.emplace(iter_pair.first,
  173|  2.90k|                                      std::move(truncated_iter));
  174|  2.90k|      });
  175|  2.90k|  return split_truncated_iters;
  176|  2.90k|}
_ZN7rocksdb23ForwardRangeDelIteratorC2EPKNS_21InternalKeyComparatorE:
  184|  2.90k|      inactive_iters_(StartKeyMinComparator(icmp)) {}
_ZN7rocksdb23ForwardRangeDelIterator12ShouldDeleteERKNS_17ParsedInternalKeyE:
  186|   118k|bool ForwardRangeDelIterator::ShouldDelete(const ParsedInternalKey& parsed) {
  187|       |  // Move active iterators that end before parsed.
  188|   168k|  while (!active_iters_.empty() &&
  ------------------
  |  Branch (188:10): [True: 151k, False: 16.8k]
  |  Branch (188:10): [True: 49.5k, False: 118k]
  ------------------
  189|   168k|         icmp_->Compare((*active_iters_.top())->end_key(), parsed) <= 0) {
  ------------------
  |  Branch (189:10): [True: 49.5k, False: 101k]
  ------------------
  190|  49.5k|    TruncatedRangeDelIterator* iter = PopActiveIter();
  191|   119k|    do {
  192|   119k|      iter->Next();
  193|   119k|    } while (iter->Valid() && icmp_->Compare(iter->end_key(), parsed) <= 0);
  ------------------
  |  Branch (193:14): [True: 118k, False: 797]
  |  Branch (193:14): [True: 69.9k, False: 49.5k]
  |  Branch (193:31): [True: 69.9k, False: 48.7k]
  ------------------
  194|  49.5k|    PushIter(iter, parsed);
  195|  49.5k|    assert(active_iters_.size() == active_seqnums_.size());
  196|  49.5k|  }
  197|       |
  198|       |  // Move inactive iterators that start before parsed.
  199|   122k|  while (!inactive_iters_.empty() &&
  ------------------
  |  Branch (199:10): [True: 13.1k, False: 108k]
  |  Branch (199:10): [True: 3.49k, False: 118k]
  ------------------
  200|   122k|         icmp_->Compare(inactive_iters_.top()->start_key(), parsed) <= 0) {
  ------------------
  |  Branch (200:10): [True: 3.49k, False: 9.66k]
  ------------------
  201|  3.49k|    TruncatedRangeDelIterator* iter = PopInactiveIter();
  202|  7.38k|    while (iter->Valid() && icmp_->Compare(iter->end_key(), parsed) <= 0) {
  ------------------
  |  Branch (202:12): [True: 7.25k, False: 129]
  |  Branch (202:12): [True: 3.89k, False: 3.49k]
  |  Branch (202:29): [True: 3.89k, False: 3.36k]
  ------------------
  203|  3.89k|      iter->Next();
  204|  3.89k|    }
  205|  3.49k|    PushIter(iter, parsed);
  206|  3.49k|    assert(active_iters_.size() == active_seqnums_.size());
  207|  3.49k|  }
  208|       |
  209|   118k|  return active_seqnums_.empty()
  ------------------
  |  Branch (209:10): [True: 13.5k, False: 105k]
  ------------------
  210|   118k|             ? false
  211|   118k|             : (*active_seqnums_.begin())->seq() > parsed.sequence;
  212|   118k|}
_ZN7rocksdb23ForwardRangeDelIterator10InvalidateEv:
  214|  2.90k|void ForwardRangeDelIterator::Invalidate() {
  215|  2.90k|  unused_idx_ = 0;
  216|  2.90k|  active_iters_.clear();
  217|  2.90k|  active_seqnums_.clear();
  218|  2.90k|  inactive_iters_.clear();
  219|  2.90k|}
_ZN7rocksdb23ReverseRangeDelIteratorC2EPKNS_21InternalKeyComparatorE:
  227|  2.90k|      inactive_iters_(EndKeyMaxComparator(icmp)) {}
_ZN7rocksdb23ReverseRangeDelIterator10InvalidateEv:
  257|   121k|void ReverseRangeDelIterator::Invalidate() {
  258|   121k|  unused_idx_ = 0;
  259|   121k|  active_iters_.clear();
  260|   121k|  active_seqnums_.clear();
  261|   121k|  inactive_iters_.clear();
  262|   121k|}
_ZN7rocksdb18RangeDelAggregator9StripeRep12ShouldDeleteERKNS_17ParsedInternalKeyENS_23RangeDelPositioningModeE:
  265|   118k|    const ParsedInternalKey& parsed, RangeDelPositioningMode mode) {
  266|   118k|  if (!InStripe(parsed.sequence) || IsEmpty()) {
  ------------------
  |  Branch (266:7): [True: 0, False: 118k]
  |  Branch (266:37): [True: 0, False: 118k]
  ------------------
  267|      0|    return false;
  268|      0|  }
  269|   118k|  switch (mode) {
  270|   118k|    case RangeDelPositioningMode::kForwardTraversal:
  ------------------
  |  Branch (270:5): [True: 118k, False: 0]
  ------------------
  271|   118k|      InvalidateReverseIter();
  272|       |
  273|       |      // Pick up previously unseen iterators.
  274|   118k|      for (auto it = std::next(iters_.begin(), forward_iter_.UnusedIdx());
  275|   121k|           it != iters_.end(); ++it, forward_iter_.IncUnusedIdx()) {
  ------------------
  |  Branch (275:12): [True: 2.59k, False: 118k]
  ------------------
  276|  2.59k|        auto& iter = *it;
  277|  2.59k|        forward_iter_.AddNewIter(iter.get(), parsed);
  278|  2.59k|      }
  279|       |
  280|   118k|      return forward_iter_.ShouldDelete(parsed);
  281|      0|    case RangeDelPositioningMode::kBackwardTraversal:
  ------------------
  |  Branch (281:5): [True: 0, False: 118k]
  ------------------
  282|      0|      InvalidateForwardIter();
  283|       |
  284|       |      // Pick up previously unseen iterators.
  285|      0|      for (auto it = std::next(iters_.begin(), reverse_iter_.UnusedIdx());
  286|      0|           it != iters_.end(); ++it, reverse_iter_.IncUnusedIdx()) {
  ------------------
  |  Branch (286:12): [True: 0, False: 0]
  ------------------
  287|      0|        auto& iter = *it;
  288|      0|        reverse_iter_.AddNewIter(iter.get(), parsed);
  289|      0|      }
  290|       |
  291|      0|      return reverse_iter_.ShouldDelete(parsed);
  292|      0|    default:
  ------------------
  |  Branch (292:5): [True: 0, False: 118k]
  ------------------
  293|      0|      assert(false);
  294|      0|      return false;
  295|   118k|  }
  296|   118k|}
_ZN7rocksdb28CompactionRangeDelAggregator13AddTombstonesENSt3__110unique_ptrINS_32FragmentedRangeTombstoneIteratorENS1_14default_deleteIS3_EEEEPKNS_11InternalKeyES9_:
  359|  2.90k|    const InternalKey* smallest, const InternalKey* largest) {
  360|  2.90k|  if (input_iter == nullptr || input_iter->empty()) {
  ------------------
  |  Branch (360:7): [True: 0, False: 2.90k]
  |  Branch (360:32): [True: 0, False: 2.90k]
  ------------------
  361|      0|    return;
  362|      0|  }
  363|       |  // This bounds output of CompactionRangeDelAggregator::NewIterator.
  364|  2.90k|  if (!trim_ts_.empty()) {
  ------------------
  |  Branch (364:7): [True: 0, False: 2.90k]
  ------------------
  365|      0|    assert(icmp_->user_comparator()->timestamp_size() > 0);
  366|      0|    input_iter->SetTimestampUpperBound(&trim_ts_);
  367|      0|  }
  368|       |
  369|  2.90k|  assert(input_iter->lower_bound() == 0);
  370|  2.90k|  assert(input_iter->upper_bound() == kMaxSequenceNumber);
  371|  2.90k|  parent_iters_.emplace_back(new TruncatedRangeDelIterator(
  372|  2.90k|      std::move(input_iter), icmp_, smallest, largest));
  373|       |
  374|  2.90k|  Slice* ts_upper_bound = nullptr;
  375|  2.90k|  if (!ts_upper_bound_.empty()) {
  ------------------
  |  Branch (375:7): [True: 0, False: 2.90k]
  ------------------
  376|      0|    assert(icmp_->user_comparator()->timestamp_size() > 0);
  377|      0|    ts_upper_bound = &ts_upper_bound_;
  378|      0|  }
  379|  2.90k|  auto split_iters = parent_iters_.back()->SplitBySnapshot(*snapshots_);
  380|  2.90k|  for (auto& split_iter : split_iters) {
  ------------------
  |  Branch (380:25): [True: 2.90k, False: 2.90k]
  ------------------
  381|  2.90k|    auto it = reps_.find(split_iter.first);
  382|  2.90k|    if (it == reps_.end()) {
  ------------------
  |  Branch (382:9): [True: 2.90k, False: 0]
  ------------------
  383|  2.90k|      bool inserted;
  384|  2.90k|      SequenceNumber upper_bound = split_iter.second->upper_bound();
  385|  2.90k|      SequenceNumber lower_bound = split_iter.second->lower_bound();
  386|  2.90k|      std::tie(it, inserted) = reps_.emplace(
  387|  2.90k|          split_iter.first, StripeRep(icmp_, upper_bound, lower_bound));
  388|  2.90k|      assert(inserted);
  389|  2.90k|    }
  390|  2.90k|    assert(it != reps_.end());
  391|       |    // ts_upper_bound is used to bound ShouldDelete() to only consider
  392|       |    // range tombstones under full_history_ts_low_ and trim_ts_. Keys covered by
  393|       |    // range tombstones that are above full_history_ts_low_ should not be
  394|       |    // dropped prematurely: user may read with a timestamp between the range
  395|       |    // tombstone and the covered key. Note that we cannot set timestamp
  396|       |    // upperbound on the original `input_iter` since `input_iter`s are later
  397|       |    // used in CompactionRangeDelAggregator::NewIterator to output range
  398|       |    // tombstones for persistence. We do not want to only persist range
  399|       |    // tombstones with timestamp lower than ts_upper_bound.
  400|  2.90k|    split_iter.second->SetTimestampUpperBound(ts_upper_bound);
  401|  2.90k|    it->second.AddTombstones(std::move(split_iter.second));
  402|  2.90k|  }
  403|  2.90k|}
_ZN7rocksdb28CompactionRangeDelAggregator12ShouldDeleteERKNS_17ParsedInternalKeyENS_23RangeDelPositioningModeE:
  406|   123k|                                                RangeDelPositioningMode mode) {
  407|   123k|  auto it = reps_.lower_bound(parsed.sequence);
  408|   123k|  if (it == reps_.end()) {
  ------------------
  |  Branch (408:7): [True: 5.00k, False: 118k]
  ------------------
  409|  5.00k|    return false;
  410|  5.00k|  }
  411|   118k|  return it->second.ShouldDelete(parsed, mode);
  412|   123k|}
_ZN7rocksdb28CompactionRangeDelAggregator11NewIteratorEPKNS_5SliceES3_:
  539|  4.48k|                                          const Slice* upper_bound) {
  540|  4.48k|  InvalidateRangeDelMapPositions();
  541|  4.48k|  auto merging_iter = std::make_unique<TruncatedRangeDelMergingIter>(
  542|  4.48k|      icmp_, lower_bound, upper_bound, parent_iters_);
  543|       |
  544|  4.48k|  auto fragmented_tombstone_list =
  545|  4.48k|      std::make_shared<FragmentedRangeTombstoneList>(
  546|  4.48k|          std::move(merging_iter), *icmp_, true /* for_compaction */,
  547|  4.48k|          *snapshots_);
  548|       |
  549|  4.48k|  return std::make_unique<FragmentedRangeTombstoneIterator>(
  550|  4.48k|      fragmented_tombstone_list, *icmp_, kMaxSequenceNumber /* upper_bound */);
  551|  4.48k|}
range_del_aggregator.cc:_ZZN7rocksdb25TruncatedRangeDelIterator15SplitBySnapshotERKNSt3__16vectorImNS1_9allocatorImEEEEENK3$_0clERNS1_4pairIKmNS1_10unique_ptrINS_32FragmentedRangeTombstoneIteratorENS1_14default_deleteISC_EEEEEE:
  169|  2.90k|      [&](FragmentedIterPair& iter_pair) {
  170|  2.90k|        auto truncated_iter = std::make_unique<TruncatedRangeDelIterator>(
  171|  2.90k|            std::move(iter_pair.second), icmp_, smallest_ikey_, largest_ikey_);
  172|  2.90k|        split_truncated_iters.emplace(iter_pair.first,
  173|  2.90k|                                      std::move(truncated_iter));
  174|  2.90k|      });
range_del_aggregator.cc:_ZN7rocksdb12_GLOBAL__N_128TruncatedRangeDelMergingIterC2EPKNS_21InternalKeyComparatorEPKNS_5SliceES7_RKNSt3__16vectorINS8_10unique_ptrINS_25TruncatedRangeDelIteratorENS8_14default_deleteISB_EEEENS8_9allocatorISE_EEEE:
  432|  4.48k|        ts_sz_(icmp_->user_comparator()->timestamp_size()) {
  433|  4.48k|    for (auto& child : children) {
  ------------------
  |  Branch (433:22): [True: 2.90k, False: 4.48k]
  ------------------
  434|  2.90k|      if (child != nullptr) {
  ------------------
  |  Branch (434:11): [True: 2.90k, False: 0]
  ------------------
  435|  2.90k|        assert(child->lower_bound() == 0);
  436|  2.90k|        assert(child->upper_bound() == kMaxSequenceNumber);
  437|  2.90k|        children_.push_back(child.get());
  438|  2.90k|      }
  439|  2.90k|    }
  440|  4.48k|  }
range_del_aggregator.cc:_ZNK7rocksdb12_GLOBAL__N_128TruncatedRangeDelMergingIter5ValidEv:
  442|  74.7M|  bool Valid() const override {
  443|  74.7M|    return !heap_.empty() && !AfterEndKey(heap_.top());
  ------------------
  |  Branch (443:12): [True: 74.7M, False: 8.96k]
  |  Branch (443:30): [True: 74.7M, False: 0]
  ------------------
  444|  74.7M|  }
range_del_aggregator.cc:_ZNK7rocksdb12_GLOBAL__N_128TruncatedRangeDelMergingIter11AfterEndKeyEPKNS_25TruncatedRangeDelIteratorE:
  517|  74.7M|  bool AfterEndKey(const TruncatedRangeDelIterator* iter) const {
  518|  74.7M|    if (upper_bound_ == nullptr) {
  ------------------
  |  Branch (518:9): [True: 74.7M, False: 0]
  ------------------
  519|  74.7M|      return false;
  520|  74.7M|    }
  521|      0|    return icmp_->Compare(iter->start_key(), *upper_bound_) > 0;
  522|  74.7M|  }
range_del_aggregator.cc:_ZN7rocksdb12_GLOBAL__N_128TruncatedRangeDelMergingIter11SeekToFirstEv:
  447|  8.96k|  void SeekToFirst() override {
  448|  8.96k|    heap_.clear();
  449|  8.96k|    for (auto& child : children_) {
  ------------------
  |  Branch (449:22): [True: 5.81k, False: 8.96k]
  ------------------
  450|  5.81k|      if (lower_bound_ != nullptr) {
  ------------------
  |  Branch (450:11): [True: 0, False: 5.81k]
  ------------------
  451|      0|        child->Seek(ExtractUserKey(*lower_bound_));
  452|       |        // Since the above `Seek()` operates on a user key while `lower_bound_`
  453|       |        // is an internal key, we may need to advance `child` farther for it to
  454|       |        // be in bounds.
  455|      0|        while (child->Valid() && BeforeStartKey(child)) {
  ------------------
  |  Branch (455:16): [True: 0, False: 0]
  |  Branch (455:34): [True: 0, False: 0]
  ------------------
  456|      0|          child->InternalNext();
  457|      0|        }
  458|  5.81k|      } else {
  459|  5.81k|        child->SeekToFirst();
  460|  5.81k|      }
  461|  5.81k|      if (child->Valid()) {
  ------------------
  |  Branch (461:11): [True: 5.81k, False: 0]
  ------------------
  462|  5.81k|        heap_.push(child);
  463|  5.81k|      }
  464|  5.81k|    }
  465|  8.96k|  }
range_del_aggregator.cc:_ZN7rocksdb12_GLOBAL__N_128TruncatedRangeDelMergingIter4NextEv:
  467|  74.7M|  void Next() override {
  468|  74.7M|    auto* top = heap_.top();
  469|  74.7M|    top->InternalNext();
  470|  74.7M|    if (top->Valid()) {
  ------------------
  |  Branch (470:9): [True: 74.7M, False: 5.81k]
  ------------------
  471|  74.7M|      heap_.replace_top(top);
  472|  74.7M|    } else {
  473|  5.81k|      heap_.pop();
  474|  5.81k|    }
  475|  74.7M|  }
range_del_aggregator.cc:_ZNK7rocksdb12_GLOBAL__N_128TruncatedRangeDelMergingIter3keyEv:
  477|   149M|  Slice key() const override {
  478|   149M|    auto* top = heap_.top();
  479|   149M|    if (ts_sz_) {
  ------------------
  |  Branch (479:9): [True: 0, False: 149M]
  ------------------
  480|      0|      cur_start_key_.Set(top->start_key().user_key, top->seq(),
  481|      0|                         kTypeRangeDeletion, top->timestamp());
  482|   149M|    } else {
  483|   149M|      cur_start_key_.Set(top->start_key().user_key, top->seq(),
  484|   149M|                         kTypeRangeDeletion);
  485|   149M|    }
  486|   149M|    assert(top->start_key().user_key.size() >= ts_sz_);
  487|   149M|    return cur_start_key_.Encode();
  488|   149M|  }
range_del_aggregator.cc:_ZNK7rocksdb12_GLOBAL__N_128TruncatedRangeDelMergingIter5valueEv:
  490|  74.7M|  Slice value() const override {
  491|  74.7M|    auto* top = heap_.top();
  492|  74.7M|    if (!ts_sz_) {
  ------------------
  |  Branch (492:9): [True: 74.7M, False: 0]
  ------------------
  493|  74.7M|      return top->end_key().user_key;
  494|  74.7M|    }
  495|      0|    assert(top->timestamp().size() == ts_sz_);
  496|      0|    cur_end_key_.clear();
  497|      0|    cur_end_key_.append(top->end_key().user_key.data(),
  498|      0|                        top->end_key().user_key.size() - ts_sz_);
  499|      0|    cur_end_key_.append(top->timestamp().data(), ts_sz_);
  500|      0|    return cur_end_key_;
  501|  74.7M|  }

_ZN7rocksdb25TruncatedRangeDelIterator4NextEv:
   44|   254k|  void Next() { iter_->TopNext(); }
_ZN7rocksdb25TruncatedRangeDelIterator12InternalNextEv:
   47|  74.7M|  void InternalNext() { iter_->Next(); }
_ZNK7rocksdb25TruncatedRangeDelIterator9start_keyEv:
   66|   149M|  ParsedInternalKey start_key() const {
   67|   149M|    return (smallest_ == nullptr ||
  ------------------
  |  Branch (67:13): [True: 149M, False: 131k]
  ------------------
   68|   149M|            icmp_->Compare(*smallest_, iter_->parsed_start_key()) <= 0)
  ------------------
  |  Branch (68:13): [True: 131k, False: 0]
  ------------------
   69|   149M|               ? iter_->parsed_start_key()
   70|   149M|               : *smallest_;
   71|   149M|  }
_ZNK7rocksdb25TruncatedRangeDelIterator7end_keyEv:
   73|  75.1M|  ParsedInternalKey end_key() const {
   74|  75.1M|    return (largest_ == nullptr ||
  ------------------
  |  Branch (74:13): [True: 75.0M, False: 131k]
  ------------------
   75|  75.1M|            icmp_->Compare(iter_->parsed_end_key(), *largest_) <= 0)
  ------------------
  |  Branch (75:13): [True: 131k, False: 0]
  ------------------
   76|  75.1M|               ? iter_->parsed_end_key()
   77|  75.1M|               : *largest_;
   78|  75.1M|  }
_ZNK7rocksdb25TruncatedRangeDelIterator3seqEv:
   80|   149M|  SequenceNumber seq() const { return iter_->seq(); }
_ZN7rocksdb25TruncatedRangeDelIterator22SetTimestampUpperBoundEPKNS_5SliceE:
   85|  2.90k|  void SetTimestampUpperBound(const Slice* ts_upper_bound) {
   86|  2.90k|    iter_->SetTimestampUpperBound(ts_upper_bound);
   87|  2.90k|  }
_ZNK7rocksdb25TruncatedRangeDelIterator11upper_boundEv:
   92|  2.90k|  SequenceNumber upper_bound() const { return iter_->upper_bound(); }
_ZNK7rocksdb25TruncatedRangeDelIterator11lower_boundEv:
   94|  2.90k|  SequenceNumber lower_bound() const { return iter_->lower_bound(); }
_ZN7rocksdb21StartKeyMinComparatorC2EPKNS_21InternalKeyComparatorE:
  115|  7.39k|  explicit StartKeyMinComparator(const InternalKeyComparator* c) : icmp(c) {}
_ZN7rocksdb23ForwardRangeDelIterator10AddNewIterEPNS_25TruncatedRangeDelIteratorERKNS_17ParsedInternalKeyE:
  133|  2.59k|                  const ParsedInternalKey& parsed) {
  134|  2.59k|    iter->Seek(parsed.user_key);
  135|  2.59k|    PushIter(iter, parsed);
  136|  2.59k|    assert(active_iters_.size() == active_seqnums_.size());
  137|  2.59k|  }
_ZNK7rocksdb23ForwardRangeDelIterator9UnusedIdxEv:
  139|   118k|  size_t UnusedIdx() const { return unused_idx_; }
_ZN7rocksdb23ForwardRangeDelIterator12IncUnusedIdxEv:
  140|  2.59k|  void IncUnusedIdx() { unused_idx_++; }
_ZN7rocksdb23ForwardRangeDelIterator19EndKeyMinComparatorC2EPKNS_21InternalKeyComparatorE:
  147|  2.90k|    explicit EndKeyMinComparator(const InternalKeyComparator* c) : icmp(c) {}
_ZN7rocksdb23ForwardRangeDelIterator8PushIterEPNS_25TruncatedRangeDelIteratorERKNS_17ParsedInternalKeyE:
  158|  55.6k|                const ParsedInternalKey& parsed) {
  159|  55.6k|    if (!iter->Valid()) {
  ------------------
  |  Branch (159:9): [True: 1.03k, False: 54.6k]
  ------------------
  160|       |      // The iterator has been fully consumed, so we don't need to add it to
  161|       |      // either of the heaps.
  162|  1.03k|      return;
  163|  1.03k|    }
  164|  54.6k|    int cmp = icmp_->Compare(parsed, iter->start_key());
  165|  54.6k|    if (cmp < 0) {
  ------------------
  |  Branch (165:9): [True: 3.70k, False: 50.9k]
  ------------------
  166|  3.70k|      PushInactiveIter(iter);
  167|  50.9k|    } else {
  168|  50.9k|      PushActiveIter(iter);
  169|  50.9k|    }
  170|  54.6k|  }
_ZN7rocksdb23ForwardRangeDelIterator14PushActiveIterEPNS_25TruncatedRangeDelIteratorE:
  172|  50.9k|  void PushActiveIter(TruncatedRangeDelIterator* iter) {
  173|  50.9k|    auto seq_pos = active_seqnums_.insert(iter);
  174|  50.9k|    active_iters_.push(seq_pos);
  175|  50.9k|  }
_ZN7rocksdb23ForwardRangeDelIterator13PopActiveIterEv:
  177|  49.5k|  TruncatedRangeDelIterator* PopActiveIter() {
  178|  49.5k|    auto active_top = active_iters_.top();
  179|  49.5k|    auto iter = *active_top;
  180|  49.5k|    active_iters_.pop();
  181|  49.5k|    active_seqnums_.erase(active_top);
  182|  49.5k|    return iter;
  183|  49.5k|  }
_ZN7rocksdb23ForwardRangeDelIterator16PushInactiveIterEPNS_25TruncatedRangeDelIteratorE:
  185|  3.70k|  void PushInactiveIter(TruncatedRangeDelIterator* iter) {
  186|  3.70k|    inactive_iters_.push(iter);
  187|  3.70k|  }
_ZN7rocksdb23ForwardRangeDelIterator15PopInactiveIterEv:
  189|  3.49k|  TruncatedRangeDelIterator* PopInactiveIter() {
  190|  3.49k|    auto* iter = inactive_iters_.top();
  191|  3.49k|    inactive_iters_.pop();
  192|  3.49k|    return iter;
  193|  3.49k|  }
_ZN7rocksdb23ReverseRangeDelIterator19EndKeyMaxComparatorC2EPKNS_21InternalKeyComparatorE:
  224|  2.90k|    explicit EndKeyMaxComparator(const InternalKeyComparator* c) : icmp(c) {}
_ZN7rocksdb23ReverseRangeDelIterator21StartKeyMaxComparatorC2EPKNS_21InternalKeyComparatorE:
  234|  2.90k|    explicit StartKeyMaxComparator(const InternalKeyComparator* c) : icmp(c) {}
_ZN7rocksdb18RangeDelAggregatorC2EPKNS_21InternalKeyComparatorE:
  290|  4.48k|      : icmp_(icmp) {}
_ZN7rocksdb18RangeDelAggregatorD2Ev:
  291|  4.48k|  virtual ~RangeDelAggregator() {}
_ZN7rocksdb18RangeDelAggregator12ShouldDeleteERKNS_5SliceENS_23RangeDelPositioningModeE:
  298|   123k|  bool ShouldDelete(const Slice& ikey, RangeDelPositioningMode mode) {
  299|   123k|    ParsedInternalKey parsed;
  300|       |
  301|   123k|    Status pik_status =
  302|   123k|        ParseInternalKey(ikey, &parsed, false /* log_err_key */);  // TODO
  303|   123k|    assert(pik_status.ok());
  304|   123k|    if (!pik_status.ok()) {
  ------------------
  |  Branch (304:9): [True: 0, False: 123k]
  ------------------
  305|      0|      return false;
  306|      0|    }
  307|       |
  308|   123k|    return ShouldDelete(parsed, mode);
  309|   123k|  }
_ZN7rocksdb18RangeDelAggregator9StripeRepC2EPKNS_21InternalKeyComparatorEmm:
  330|  2.90k|          lower_bound_(lower_bound) {}
_ZN7rocksdb18RangeDelAggregator9StripeRep13AddTombstonesENSt3__110unique_ptrINS_25TruncatedRangeDelIteratorENS2_14default_deleteIS4_EEEE:
  332|  2.90k|    void AddTombstones(std::unique_ptr<TruncatedRangeDelIterator> input_iter) {
  333|  2.90k|      iters_.push_back(std::move(input_iter));
  334|  2.90k|    }
_ZNK7rocksdb18RangeDelAggregator9StripeRep7IsEmptyEv:
  336|   121k|    bool IsEmpty() const { return iters_.empty(); }
_ZN7rocksdb18RangeDelAggregator9StripeRep10InvalidateEv:
  341|  2.90k|    void Invalidate() {
  342|  2.90k|      if (!IsEmpty()) {
  ------------------
  |  Branch (342:11): [True: 2.90k, False: 0]
  ------------------
  343|  2.90k|        InvalidateForwardIter();
  344|  2.90k|        InvalidateReverseIter();
  345|  2.90k|      }
  346|  2.90k|    }
_ZNK7rocksdb18RangeDelAggregator9StripeRep8InStripeEm:
  353|   118k|    bool InStripe(SequenceNumber seq) const {
  354|   118k|      return lower_bound_ <= seq && seq <= upper_bound_;
  ------------------
  |  Branch (354:14): [True: 118k, False: 0]
  |  Branch (354:37): [True: 118k, False: 0]
  ------------------
  355|   118k|    }
_ZN7rocksdb18RangeDelAggregator9StripeRep21InvalidateForwardIterEv:
  357|  2.90k|    void InvalidateForwardIter() { forward_iter_.Invalidate(); }
_ZN7rocksdb18RangeDelAggregator9StripeRep21InvalidateReverseIterEv:
  359|   121k|    void InvalidateReverseIter() { reverse_iter_.Invalidate(); }
_ZN7rocksdb28CompactionRangeDelAggregatorC2EPKNS_21InternalKeyComparatorERKNSt3__16vectorImNS4_9allocatorImEEEEPKNS4_12basic_stringIcNS4_11char_traitsIcEENS6_IcEEEESH_:
  416|  4.48k|      : RangeDelAggregator(icmp), snapshots_(&snapshots) {
  417|  4.48k|    if (full_history_ts_low) {
  ------------------
  |  Branch (417:9): [True: 0, False: 4.48k]
  ------------------
  418|      0|      ts_upper_bound_ = *full_history_ts_low;
  419|      0|    }
  420|  4.48k|    if (trim_ts) {
  ------------------
  |  Branch (420:9): [True: 0, False: 4.48k]
  ------------------
  421|      0|      trim_ts_ = *trim_ts;
  422|       |      // Range tombstone newer than `trim_ts` or `full_history_ts_low` should
  423|       |      // not be considered in ShouldDelete().
  424|      0|      if (ts_upper_bound_.empty()) {
  ------------------
  |  Branch (424:11): [True: 0, False: 0]
  ------------------
  425|      0|        ts_upper_bound_ = trim_ts_;
  426|      0|      } else if (!trim_ts_.empty() && icmp->user_comparator()->CompareTimestamp(
  ------------------
  |  Branch (426:18): [True: 0, False: 0]
  |  Branch (426:39): [True: 0, False: 0]
  ------------------
  427|      0|                                          trim_ts_, ts_upper_bound_) < 0) {
  428|      0|        ts_upper_bound_ = trim_ts_;
  429|      0|      }
  430|      0|    }
  431|  4.48k|  }
_ZN7rocksdb28CompactionRangeDelAggregatorD2Ev:
  432|  4.48k|  ~CompactionRangeDelAggregator() override {}
_ZN7rocksdb28CompactionRangeDelAggregator30InvalidateRangeDelMapPositionsEv:
  445|  4.48k|  void InvalidateRangeDelMapPositions() override {
  446|  4.48k|    for (auto& rep : reps_) {
  ------------------
  |  Branch (446:20): [True: 2.90k, False: 4.48k]
  ------------------
  447|  2.90k|      rep.second.Invalidate();
  448|  2.90k|    }
  449|  4.48k|  }
_ZNK7rocksdb28CompactionRangeDelAggregator7IsEmptyEv:
  451|    318|  bool IsEmpty() const override {
  452|    318|    for (const auto& rep : reps_) {
  ------------------
  |  Branch (452:26): [True: 318, False: 0]
  ------------------
  453|    318|      if (!rep.second.IsEmpty()) {
  ------------------
  |  Branch (453:11): [True: 318, False: 0]
  ------------------
  454|    318|        return false;
  455|    318|      }
  456|    318|    }
  457|      0|    return true;
  458|    318|  }

_ZN7rocksdb28FragmentedRangeTombstoneListC2ENSt3__110unique_ptrINS_20InternalIteratorBaseINS_5SliceEEENS1_14default_deleteIS5_EEEERKNS_21InternalKeyComparatorEbRKNS1_6vectorImNS1_9allocatorImEEEEb:
   24|  10.3k|    const bool tombstone_end_include_ts) {
   25|  10.3k|  if (unfragmented_tombstones == nullptr) {
  ------------------
  |  Branch (25:7): [True: 0, False: 10.3k]
  ------------------
   26|      0|    return;
   27|      0|  }
   28|  10.3k|  bool is_sorted = true;
   29|  10.3k|  InternalKey pinned_last_start_key;
   30|  10.3k|  Slice last_start_key;
   31|  10.3k|  num_unfragmented_tombstones_ = 0;
   32|  10.3k|  total_tombstone_payload_bytes_ = 0;
   33|  37.9M|  for (unfragmented_tombstones->SeekToFirst(); unfragmented_tombstones->Valid();
  ------------------
  |  Branch (33:48): [True: 37.9M, False: 10.3k]
  ------------------
   34|  37.9M|       unfragmented_tombstones->Next(), num_unfragmented_tombstones_++) {
   35|  37.9M|    total_tombstone_payload_bytes_ += unfragmented_tombstones->key().size() +
   36|  37.9M|                                      unfragmented_tombstones->value().size();
   37|  37.9M|    if (num_unfragmented_tombstones_ > 0 &&
  ------------------
  |  Branch (37:9): [True: 37.9M, False: 8.72k]
  |  Branch (37:9): [True: 0, False: 37.9M]
  ------------------
   38|  37.9M|        icmp.Compare(last_start_key, unfragmented_tombstones->key()) > 0) {
  ------------------
  |  Branch (38:9): [True: 0, False: 37.9M]
  ------------------
   39|      0|      is_sorted = false;
   40|      0|      break;
   41|      0|    }
   42|  37.9M|    if (unfragmented_tombstones->IsKeyPinned()) {
  ------------------
  |  Branch (42:9): [True: 551k, False: 37.3M]
  ------------------
   43|   551k|      last_start_key = unfragmented_tombstones->key();
   44|  37.3M|    } else {
   45|  37.3M|      pinned_last_start_key.DecodeFrom(unfragmented_tombstones->key());
   46|  37.3M|      last_start_key = pinned_last_start_key.Encode();
   47|  37.3M|    }
   48|  37.9M|  }
   49|       |
   50|  10.3k|  auto ucmp = icmp.user_comparator();
   51|  10.3k|  assert(ucmp);
   52|  10.3k|  const size_t ts_sz = ucmp->timestamp_size();
   53|  10.3k|  bool pad_min_ts_for_end = ts_sz > 0 && !tombstone_end_include_ts;
  ------------------
  |  Branch (53:29): [True: 0, False: 10.3k]
  |  Branch (53:42): [True: 0, False: 0]
  ------------------
   54|  10.3k|  if (is_sorted && !pad_min_ts_for_end) {
  ------------------
  |  Branch (54:7): [True: 10.3k, False: 0]
  |  Branch (54:20): [True: 10.3k, False: 0]
  ------------------
   55|  10.3k|    FragmentTombstones(std::move(unfragmented_tombstones), icmp, for_compaction,
   56|  10.3k|                       snapshots);
   57|  10.3k|    return;
   58|  10.3k|  }
   59|       |
   60|       |  // Sort the tombstones before fragmenting them.
   61|      0|  std::vector<std::string> keys, values;
   62|      0|  keys.reserve(num_unfragmented_tombstones_);
   63|      0|  values.reserve(num_unfragmented_tombstones_);
   64|       |  // Reset the counter to zero for the next iteration over keys.
   65|      0|  total_tombstone_payload_bytes_ = 0;
   66|      0|  for (unfragmented_tombstones->SeekToFirst(); unfragmented_tombstones->Valid();
  ------------------
  |  Branch (66:48): [True: 0, False: 0]
  ------------------
   67|      0|       unfragmented_tombstones->Next()) {
   68|      0|    total_tombstone_payload_bytes_ += unfragmented_tombstones->key().size() +
   69|      0|                                      unfragmented_tombstones->value().size();
   70|      0|    keys.emplace_back(unfragmented_tombstones->key().data(),
   71|      0|                      unfragmented_tombstones->key().size());
   72|      0|    Slice value = unfragmented_tombstones->value();
   73|      0|    if (pad_min_ts_for_end) {
  ------------------
  |  Branch (73:9): [True: 0, False: 0]
  ------------------
   74|      0|      AppendKeyWithMinTimestamp(&values.emplace_back(), value, ts_sz);
   75|      0|    } else {
   76|      0|      values.emplace_back(value.data(), value.size());
   77|      0|    }
   78|      0|  }
   79|      0|  if (pad_min_ts_for_end) {
  ------------------
  |  Branch (79:7): [True: 0, False: 0]
  ------------------
   80|      0|    total_tombstone_payload_bytes_ += num_unfragmented_tombstones_ * ts_sz;
   81|      0|  }
   82|       |  // VectorIterator implicitly sorts by key during construction.
   83|      0|  auto iter = std::make_unique<VectorIterator>(std::move(keys),
   84|      0|                                               std::move(values), &icmp);
   85|      0|  FragmentTombstones(std::move(iter), icmp, for_compaction, snapshots);
   86|      0|}
_ZN7rocksdb28FragmentedRangeTombstoneList18FragmentTombstonesENSt3__110unique_ptrINS_20InternalIteratorBaseINS_5SliceEEENS1_14default_deleteIS5_EEEERKNS_21InternalKeyComparatorEbRKNS1_6vectorImNS1_9allocatorImEEEE:
   91|  10.3k|    const std::vector<SequenceNumber>& snapshots) {
   92|  10.3k|  Slice cur_start_key(nullptr, 0);
   93|  10.3k|  auto cmp = ParsedInternalKeyComparator(&icmp);
   94|       |
   95|       |  // Stores the end keys and sequence numbers of range tombstones with a start
   96|       |  // key less than or equal to cur_start_key. Provides an ordering by end key
   97|       |  // for use in flush_current_tombstones.
   98|  10.3k|  std::set<ParsedInternalKey, ParsedInternalKeyComparator> cur_end_keys(cmp);
   99|       |
  100|  10.3k|  size_t ts_sz = icmp.user_comparator()->timestamp_size();
  101|       |  // Given the next start key in unfragmented_tombstones,
  102|       |  // flush_current_tombstones writes every tombstone fragment that starts
  103|       |  // and ends with a key before next_start_key, and starts with a key greater
  104|       |  // than or equal to cur_start_key.
  105|  10.3k|  auto flush_current_tombstones = [&](const Slice& next_start_key) {
  106|  10.3k|    auto it = cur_end_keys.begin();
  107|  10.3k|    bool reached_next_start_key = false;
  108|  10.3k|    for (; it != cur_end_keys.end() && !reached_next_start_key; ++it) {
  109|  10.3k|      Slice cur_end_key = it->user_key;
  110|  10.3k|      if (icmp.user_comparator()->CompareWithoutTimestamp(cur_start_key,
  111|  10.3k|                                                          cur_end_key) == 0) {
  112|       |        // Empty tombstone.
  113|  10.3k|        continue;
  114|  10.3k|      }
  115|  10.3k|      if (icmp.user_comparator()->CompareWithoutTimestamp(next_start_key,
  116|  10.3k|                                                          cur_end_key) <= 0) {
  117|       |        // All the end keys in [it, cur_end_keys.end()) are after
  118|       |        // next_start_key, so the tombstones they represent can be used in
  119|       |        // fragments that start with keys greater than or equal to
  120|       |        // next_start_key. However, the end keys we already passed will not be
  121|       |        // used in any more tombstone fragments.
  122|       |        //
  123|       |        // Remove the fully fragmented tombstones and stop iteration after a
  124|       |        // final round of flushing to preserve the tombstones we can create more
  125|       |        // fragments from.
  126|  10.3k|        reached_next_start_key = true;
  127|  10.3k|        cur_end_keys.erase(cur_end_keys.begin(), it);
  128|  10.3k|        cur_end_key = next_start_key;
  129|  10.3k|      }
  130|       |
  131|       |      // Flush a range tombstone fragment [cur_start_key, cur_end_key), which
  132|       |      // should not overlap with the last-flushed tombstone fragment.
  133|  10.3k|      assert(tombstones_.empty() ||
  134|  10.3k|             icmp.user_comparator()->CompareWithoutTimestamp(
  135|  10.3k|                 tombstones_.back().end_key, cur_start_key) <= 0);
  136|       |
  137|       |      // Sort the sequence numbers of the tombstones being fragmented in
  138|       |      // descending order, and then flush them in that order.
  139|  10.3k|      autovector<SequenceNumber> seqnums_to_flush;
  140|  10.3k|      autovector<Slice> timestamps_to_flush;
  141|  10.3k|      for (auto flush_it = it; flush_it != cur_end_keys.end(); ++flush_it) {
  142|  10.3k|        seqnums_to_flush.push_back(flush_it->sequence);
  143|  10.3k|        if (ts_sz) {
  144|  10.3k|          timestamps_to_flush.push_back(
  145|  10.3k|              ExtractTimestampFromUserKey(flush_it->user_key, ts_sz));
  146|  10.3k|        }
  147|  10.3k|      }
  148|       |      // TODO: bind the two sorting together to be more efficient
  149|  10.3k|      std::sort(seqnums_to_flush.begin(), seqnums_to_flush.end(),
  150|  10.3k|                std::greater<SequenceNumber>());
  151|  10.3k|      if (ts_sz) {
  152|  10.3k|        std::sort(timestamps_to_flush.begin(), timestamps_to_flush.end(),
  153|  10.3k|                  [icmp](const Slice& ts1, const Slice& ts2) {
  154|  10.3k|                    return icmp.user_comparator()->CompareTimestamp(ts1, ts2) >
  155|  10.3k|                           0;
  156|  10.3k|                  });
  157|  10.3k|      }
  158|       |
  159|  10.3k|      size_t start_idx = tombstone_seqs_.size();
  160|  10.3k|      size_t end_idx = start_idx + seqnums_to_flush.size();
  161|       |
  162|       |      // If user-defined timestamp is enabled, we should not drop tombstones
  163|       |      // from any snapshot stripe. Garbage collection of range tombstones
  164|       |      // happens in CompactionOutputs::AddRangeDels().
  165|  10.3k|      if (for_compaction && ts_sz == 0) {
  166|       |        // Drop all tombstone seqnums that are not preserved by a snapshot.
  167|  10.3k|        SequenceNumber next_snapshot = kMaxSequenceNumber;
  168|  10.3k|        for (auto seq : seqnums_to_flush) {
  169|  10.3k|          if (seq <= next_snapshot) {
  170|       |            // This seqnum is visible by a lower snapshot.
  171|  10.3k|            tombstone_seqs_.push_back(seq);
  172|  10.3k|            auto upper_bound_it =
  173|  10.3k|                std::lower_bound(snapshots.begin(), snapshots.end(), seq);
  174|  10.3k|            if (upper_bound_it == snapshots.begin()) {
  175|       |              // This seqnum is the topmost one visible by the earliest
  176|       |              // snapshot. None of the seqnums below it will be visible, so we
  177|       |              // can skip them.
  178|  10.3k|              break;
  179|  10.3k|            }
  180|  10.3k|            next_snapshot = *std::prev(upper_bound_it);
  181|  10.3k|          }
  182|  10.3k|        }
  183|  10.3k|        end_idx = tombstone_seqs_.size();
  184|  10.3k|      } else {
  185|       |        // The fragmentation is being done for reads, so preserve all seqnums.
  186|  10.3k|        tombstone_seqs_.insert(tombstone_seqs_.end(), seqnums_to_flush.begin(),
  187|  10.3k|                               seqnums_to_flush.end());
  188|  10.3k|        if (ts_sz) {
  189|  10.3k|          tombstone_timestamps_.insert(tombstone_timestamps_.end(),
  190|  10.3k|                                       timestamps_to_flush.begin(),
  191|  10.3k|                                       timestamps_to_flush.end());
  192|  10.3k|        }
  193|  10.3k|      }
  194|       |
  195|  10.3k|      assert(start_idx < end_idx);
  196|  10.3k|      if (ts_sz) {
  197|  10.3k|        std::string start_key_with_max_ts;
  198|  10.3k|        AppendUserKeyWithMaxTimestamp(&start_key_with_max_ts, cur_start_key,
  199|  10.3k|                                      ts_sz);
  200|  10.3k|        pinned_slices_.emplace_back(std::move(start_key_with_max_ts));
  201|  10.3k|        Slice start_key = pinned_slices_.back();
  202|       |
  203|  10.3k|        std::string end_key_with_max_ts;
  204|  10.3k|        AppendUserKeyWithMaxTimestamp(&end_key_with_max_ts, cur_end_key, ts_sz);
  205|  10.3k|        pinned_slices_.emplace_back(std::move(end_key_with_max_ts));
  206|  10.3k|        Slice end_key = pinned_slices_.back();
  207|       |
  208|       |        // RangeTombstoneStack expects start_key and end_key to have max
  209|       |        // timestamp.
  210|  10.3k|        tombstones_.emplace_back(start_key, end_key, start_idx, end_idx);
  211|  10.3k|      } else {
  212|  10.3k|        tombstones_.emplace_back(cur_start_key, cur_end_key, start_idx,
  213|  10.3k|                                 end_idx);
  214|  10.3k|      }
  215|       |
  216|  10.3k|      cur_start_key = cur_end_key;
  217|  10.3k|    }
  218|  10.3k|    if (!reached_next_start_key) {
  219|       |      // There is a gap between the last flushed tombstone fragment and
  220|       |      // the next tombstone's start key. Remove all the end keys in
  221|       |      // the working set, since we have fully fragmented their corresponding
  222|       |      // tombstones.
  223|  10.3k|      cur_end_keys.clear();
  224|  10.3k|    }
  225|  10.3k|    cur_start_key = next_start_key;
  226|  10.3k|  };
  227|       |
  228|  10.3k|  pinned_iters_mgr_.StartPinning();
  229|       |
  230|  10.3k|  bool no_tombstones = true;
  231|  37.9M|  for (unfragmented_tombstones->SeekToFirst(); unfragmented_tombstones->Valid();
  ------------------
  |  Branch (231:48): [True: 37.9M, False: 10.3k]
  ------------------
  232|  37.9M|       unfragmented_tombstones->Next()) {
  233|  37.9M|    const Slice& ikey = unfragmented_tombstones->key();
  234|  37.9M|    Slice tombstone_start_key = ExtractUserKey(ikey);
  235|  37.9M|    SequenceNumber tombstone_seq = GetInternalKeySeqno(ikey);
  236|  37.9M|    if (!unfragmented_tombstones->IsKeyPinned()) {
  ------------------
  |  Branch (236:9): [True: 37.3M, False: 551k]
  ------------------
  237|  37.3M|      pinned_slices_.emplace_back(tombstone_start_key.data(),
  238|  37.3M|                                  tombstone_start_key.size());
  239|  37.3M|      tombstone_start_key = pinned_slices_.back();
  240|  37.3M|    }
  241|  37.9M|    no_tombstones = false;
  242|       |
  243|  37.9M|    Slice tombstone_end_key = unfragmented_tombstones->value();
  244|  37.9M|    if (!unfragmented_tombstones->IsValuePinned()) {
  ------------------
  |  Branch (244:9): [True: 37.3M, False: 551k]
  ------------------
  245|  37.3M|      pinned_slices_.emplace_back(tombstone_end_key.data(),
  246|  37.3M|                                  tombstone_end_key.size());
  247|  37.3M|      tombstone_end_key = pinned_slices_.back();
  248|  37.3M|    }
  249|  37.9M|    if (!cur_end_keys.empty() &&
  ------------------
  |  Branch (249:9): [True: 37.9M, False: 8.72k]
  ------------------
  250|  37.9M|        icmp.user_comparator()->CompareWithoutTimestamp(
  ------------------
  |  Branch (250:9): [True: 295k, False: 37.6M]
  ------------------
  251|  37.9M|            cur_start_key, tombstone_start_key) != 0) {
  252|       |      // The start key has changed. Flush all tombstones that start before
  253|       |      // this new start key.
  254|   295k|      flush_current_tombstones(tombstone_start_key);
  255|   295k|    }
  256|  37.9M|    cur_start_key = tombstone_start_key;
  257|       |
  258|  37.9M|    cur_end_keys.emplace(tombstone_end_key, tombstone_seq, kTypeRangeDeletion);
  259|  37.9M|  }
  260|  10.3k|  if (!cur_end_keys.empty()) {
  ------------------
  |  Branch (260:7): [True: 8.72k, False: 1.57k]
  ------------------
  261|  8.72k|    ParsedInternalKey last_end_key = *std::prev(cur_end_keys.end());
  262|  8.72k|    flush_current_tombstones(last_end_key.user_key);
  263|  8.72k|  }
  264|       |
  265|  10.3k|  if (!no_tombstones) {
  ------------------
  |  Branch (265:7): [True: 8.72k, False: 1.57k]
  ------------------
  266|  8.72k|    pinned_iters_mgr_.PinIterator(unfragmented_tombstones.release(),
  267|  8.72k|                                  false /* arena */);
  268|  8.72k|  }
  269|  10.3k|}
_ZN7rocksdb28FragmentedRangeTombstoneList13ContainsRangeEmm:
  272|  2.90k|                                                 SequenceNumber upper) {
  273|  2.90k|  std::call_once(seq_set_init_once_flag_, [this]() {
  274|  2.90k|    for (auto s : tombstone_seqs_) {
  275|  2.90k|      seq_set_.insert(s);
  276|  2.90k|    }
  277|  2.90k|  });
  278|  2.90k|  auto seq_it = seq_set_.lower_bound(lower);
  279|  2.90k|  return seq_it != seq_set_.end() && *seq_it <= upper;
  ------------------
  |  Branch (279:10): [True: 2.90k, False: 0]
  |  Branch (279:38): [True: 2.90k, False: 0]
  ------------------
  280|  2.90k|}
_ZN7rocksdb32FragmentedRangeTombstoneIteratorC2EPNS_28FragmentedRangeTombstoneListERKNS_21InternalKeyComparatorEmPKNS_5SliceEm:
  293|  2.90k|      ts_upper_bound_(ts_upper_bound) {
  294|  2.90k|  assert(tombstones_ != nullptr);
  295|  2.90k|  Invalidate();
  296|  2.90k|}
_ZN7rocksdb32FragmentedRangeTombstoneIteratorC2ERKNSt3__110shared_ptrINS_28FragmentedRangeTombstoneListEEERKNS_21InternalKeyComparatorEmPKNS_5SliceEm:
  310|  7.39k|      ts_upper_bound_(ts_upper_bound) {
  311|  7.39k|  assert(tombstones_ != nullptr);
  312|  7.39k|  Invalidate();
  313|  7.39k|}
_ZN7rocksdb32FragmentedRangeTombstoneIteratorC2ERKNSt3__110shared_ptrINS_33FragmentedRangeTombstoneListCacheEEERKNS_21InternalKeyComparatorEmPKNS_5SliceEm:
  326|  2.90k|      lower_bound_(_lower_bound) {
  327|  2.90k|  assert(tombstones_ != nullptr);
  328|  2.90k|  if (!ts_upper_bound || ts_upper_bound->empty()) {
  ------------------
  |  Branch (328:7): [True: 2.90k, False: 0]
  |  Branch (328:26): [True: 0, False: 0]
  ------------------
  329|  2.90k|    ts_upper_bound_ = nullptr;
  330|  2.90k|  } else {
  331|      0|    ts_upper_bound_ = ts_upper_bound;
  332|      0|  }
  333|  2.90k|  Invalidate();
  334|  2.90k|}
_ZN7rocksdb32FragmentedRangeTombstoneIterator11SeekToFirstEv:
  336|  4.48k|void FragmentedRangeTombstoneIterator::SeekToFirst() {
  337|  4.48k|  pos_ = tombstones_->begin();
  338|  4.48k|  seq_pos_ = tombstones_->seq_begin();
  339|  4.48k|}
_ZN7rocksdb32FragmentedRangeTombstoneIterator14SeekToTopFirstEv:
  341|  5.81k|void FragmentedRangeTombstoneIterator::SeekToTopFirst() {
  342|  5.81k|  if (tombstones_->empty()) {
  ------------------
  |  Branch (342:7): [True: 0, False: 5.81k]
  ------------------
  343|      0|    Invalidate();
  344|      0|    return;
  345|      0|  }
  346|  5.81k|  pos_ = tombstones_->begin();
  347|  5.81k|  SetMaxVisibleSeqAndTimestamp();
  348|  5.81k|  ScanForwardToVisibleTombstone();
  349|  5.81k|}
_ZN7rocksdb32FragmentedRangeTombstoneIterator4SeekERKNS_5SliceE:
  368|  5.49k|void FragmentedRangeTombstoneIterator::Seek(const Slice& target) {
  369|  5.49k|  if (tombstones_->empty()) {
  ------------------
  |  Branch (369:7): [True: 0, False: 5.49k]
  ------------------
  370|      0|    Invalidate();
  371|      0|    return;
  372|      0|  }
  373|  5.49k|  SeekToCoveringTombstone(target);
  374|  5.49k|  ScanForwardToVisibleTombstone();
  375|  5.49k|}
_ZN7rocksdb32FragmentedRangeTombstoneIterator23SeekToCoveringTombstoneERKNS_5SliceE:
  387|  5.49k|    const Slice& target) {
  388|  5.49k|  pos_ = std::upper_bound(tombstones_->begin(), tombstones_->end(), target,
  389|  5.49k|                          tombstone_end_cmp_);
  390|  5.49k|  if (pos_ == tombstones_->end()) {
  ------------------
  |  Branch (390:7): [True: 107, False: 5.39k]
  ------------------
  391|       |    // All tombstones end before target.
  392|    107|    seq_pos_ = tombstones_->seq_end();
  393|    107|    return;
  394|    107|  }
  395|  5.39k|  SetMaxVisibleSeqAndTimestamp();
  396|  5.39k|}
_ZN7rocksdb32FragmentedRangeTombstoneIterator29ScanForwardToVisibleTombstoneEv:
  415|   261k|void FragmentedRangeTombstoneIterator::ScanForwardToVisibleTombstone() {
  416|   261k|  while (pos_ != tombstones_->end() &&
  ------------------
  |  Branch (416:10): [True: 261k, False: 107]
  |  Branch (416:10): [True: 0, False: 261k]
  ------------------
  417|   261k|         (seq_pos_ == tombstones_->seq_iter(pos_->seq_end_idx) ||
  ------------------
  |  Branch (417:11): [True: 0, False: 261k]
  ------------------
  418|   261k|          *seq_pos_ < lower_bound_)) {
  ------------------
  |  Branch (418:11): [True: 0, False: 261k]
  ------------------
  419|      0|    ++pos_;
  420|      0|    if (pos_ == tombstones_->end()) {
  ------------------
  |  Branch (420:9): [True: 0, False: 0]
  ------------------
  421|      0|      Invalidate();
  422|      0|      return;
  423|      0|    }
  424|      0|    SetMaxVisibleSeqAndTimestamp();
  425|      0|  }
  426|   261k|}
_ZN7rocksdb32FragmentedRangeTombstoneIterator4NextEv:
  441|  74.9M|void FragmentedRangeTombstoneIterator::Next() {
  442|  74.9M|  ++seq_pos_;
  443|  74.9M|  if (seq_pos_ == tombstones_->seq_iter(pos_->seq_end_idx)) {
  ------------------
  |  Branch (443:7): [True: 393k, False: 74.5M]
  ------------------
  444|   393k|    ++pos_;
  445|   393k|  }
  446|  74.9M|}
_ZN7rocksdb32FragmentedRangeTombstoneIterator7TopNextEv:
  448|   254k|void FragmentedRangeTombstoneIterator::TopNext() {
  449|   254k|  ++pos_;
  450|   254k|  if (pos_ == tombstones_->end()) {
  ------------------
  |  Branch (450:7): [True: 3.83k, False: 250k]
  ------------------
  451|  3.83k|    return;
  452|  3.83k|  }
  453|   250k|  SetMaxVisibleSeqAndTimestamp();
  454|   250k|  ScanForwardToVisibleTombstone();
  455|   250k|}
_ZNK7rocksdb32FragmentedRangeTombstoneIterator5ValidEv:
  479|  75.2M|bool FragmentedRangeTombstoneIterator::Valid() const {
  480|  75.2M|  return tombstones_ != nullptr && pos_ != tombstones_->end();
  ------------------
  |  Branch (480:10): [True: 75.2M, False: 0]
  |  Branch (480:36): [True: 75.2M, False: 15.1k]
  ------------------
  481|  75.2M|}
_ZN7rocksdb32FragmentedRangeTombstoneIterator15SplitBySnapshotERKNSt3__16vectorImNS1_9allocatorImEEEE:
  494|  2.90k|    const std::vector<SequenceNumber>& snapshots) {
  495|  2.90k|  std::map<SequenceNumber, std::unique_ptr<FragmentedRangeTombstoneIterator>>
  496|  2.90k|      splits;
  497|  2.90k|  SequenceNumber lower = 0;
  498|  2.90k|  SequenceNumber upper;
  499|  5.81k|  for (size_t i = 0; i <= snapshots.size(); i++) {
  ------------------
  |  Branch (499:22): [True: 2.90k, False: 2.90k]
  ------------------
  500|  2.90k|    if (i >= snapshots.size()) {
  ------------------
  |  Branch (500:9): [True: 2.90k, False: 0]
  ------------------
  501|  2.90k|      upper = kMaxSequenceNumber;
  502|  2.90k|    } else {
  503|      0|      upper = snapshots[i];
  504|      0|    }
  505|  2.90k|    if (tombstones_->ContainsRange(lower, upper)) {
  ------------------
  |  Branch (505:9): [True: 2.90k, False: 0]
  ------------------
  506|  2.90k|      splits.emplace(upper,
  507|  2.90k|                     std::make_unique<FragmentedRangeTombstoneIterator>(
  508|  2.90k|                         tombstones_, *icmp_, upper, ts_upper_bound_, lower));
  509|  2.90k|    }
  510|  2.90k|    lower = upper + 1;
  511|  2.90k|  }
  512|  2.90k|  return splits;
  513|  2.90k|}
range_tombstone_fragmenter.cc:_ZZN7rocksdb28FragmentedRangeTombstoneList18FragmentTombstonesENSt3__110unique_ptrINS_20InternalIteratorBaseINS_5SliceEEENS1_14default_deleteIS5_EEEERKNS_21InternalKeyComparatorEbRKNS1_6vectorImNS1_9allocatorImEEEEENK3$_0clERKS4_:
  105|   304k|  auto flush_current_tombstones = [&](const Slice& next_start_key) {
  106|   304k|    auto it = cur_end_keys.begin();
  107|   304k|    bool reached_next_start_key = false;
  108|  38.5M|    for (; it != cur_end_keys.end() && !reached_next_start_key; ++it) {
  ------------------
  |  Branch (108:12): [True: 38.3M, False: 137k]
  |  Branch (108:12): [True: 38.2M, False: 304k]
  |  Branch (108:40): [True: 38.2M, False: 166k]
  ------------------
  109|  38.2M|      Slice cur_end_key = it->user_key;
  110|  38.2M|      if (icmp.user_comparator()->CompareWithoutTimestamp(cur_start_key,
  ------------------
  |  Branch (110:11): [True: 37.8M, False: 393k]
  ------------------
  111|  38.2M|                                                          cur_end_key) == 0) {
  112|       |        // Empty tombstone.
  113|  37.8M|        continue;
  114|  37.8M|      }
  115|   393k|      if (icmp.user_comparator()->CompareWithoutTimestamp(next_start_key,
  ------------------
  |  Branch (115:11): [True: 303k, False: 89.9k]
  ------------------
  116|   393k|                                                          cur_end_key) <= 0) {
  117|       |        // All the end keys in [it, cur_end_keys.end()) are after
  118|       |        // next_start_key, so the tombstones they represent can be used in
  119|       |        // fragments that start with keys greater than or equal to
  120|       |        // next_start_key. However, the end keys we already passed will not be
  121|       |        // used in any more tombstone fragments.
  122|       |        //
  123|       |        // Remove the fully fragmented tombstones and stop iteration after a
  124|       |        // final round of flushing to preserve the tombstones we can create more
  125|       |        // fragments from.
  126|   303k|        reached_next_start_key = true;
  127|   303k|        cur_end_keys.erase(cur_end_keys.begin(), it);
  128|   303k|        cur_end_key = next_start_key;
  129|   303k|      }
  130|       |
  131|       |      // Flush a range tombstone fragment [cur_start_key, cur_end_key), which
  132|       |      // should not overlap with the last-flushed tombstone fragment.
  133|   393k|      assert(tombstones_.empty() ||
  134|   393k|             icmp.user_comparator()->CompareWithoutTimestamp(
  135|   393k|                 tombstones_.back().end_key, cur_start_key) <= 0);
  136|       |
  137|       |      // Sort the sequence numbers of the tombstones being fragmented in
  138|       |      // descending order, and then flush them in that order.
  139|   393k|      autovector<SequenceNumber> seqnums_to_flush;
  140|   393k|      autovector<Slice> timestamps_to_flush;
  141|  75.3M|      for (auto flush_it = it; flush_it != cur_end_keys.end(); ++flush_it) {
  ------------------
  |  Branch (141:32): [True: 74.9M, False: 393k]
  ------------------
  142|  74.9M|        seqnums_to_flush.push_back(flush_it->sequence);
  143|  74.9M|        if (ts_sz) {
  ------------------
  |  Branch (143:13): [True: 0, False: 74.9M]
  ------------------
  144|      0|          timestamps_to_flush.push_back(
  145|      0|              ExtractTimestampFromUserKey(flush_it->user_key, ts_sz));
  146|      0|        }
  147|  74.9M|      }
  148|       |      // TODO: bind the two sorting together to be more efficient
  149|   393k|      std::sort(seqnums_to_flush.begin(), seqnums_to_flush.end(),
  150|   393k|                std::greater<SequenceNumber>());
  151|   393k|      if (ts_sz) {
  ------------------
  |  Branch (151:11): [True: 0, False: 393k]
  ------------------
  152|      0|        std::sort(timestamps_to_flush.begin(), timestamps_to_flush.end(),
  153|      0|                  [icmp](const Slice& ts1, const Slice& ts2) {
  154|      0|                    return icmp.user_comparator()->CompareTimestamp(ts1, ts2) >
  155|      0|                           0;
  156|      0|                  });
  157|      0|      }
  158|       |
  159|   393k|      size_t start_idx = tombstone_seqs_.size();
  160|   393k|      size_t end_idx = start_idx + seqnums_to_flush.size();
  161|       |
  162|       |      // If user-defined timestamp is enabled, we should not drop tombstones
  163|       |      // from any snapshot stripe. Garbage collection of range tombstones
  164|       |      // happens in CompactionOutputs::AddRangeDels().
  165|   393k|      if (for_compaction && ts_sz == 0) {
  ------------------
  |  Branch (165:11): [True: 131k, False: 262k]
  |  Branch (165:29): [True: 131k, False: 0]
  ------------------
  166|       |        // Drop all tombstone seqnums that are not preserved by a snapshot.
  167|   131k|        SequenceNumber next_snapshot = kMaxSequenceNumber;
  168|   131k|        for (auto seq : seqnums_to_flush) {
  ------------------
  |  Branch (168:23): [True: 131k, False: 0]
  ------------------
  169|   131k|          if (seq <= next_snapshot) {
  ------------------
  |  Branch (169:15): [True: 131k, False: 0]
  ------------------
  170|       |            // This seqnum is visible by a lower snapshot.
  171|   131k|            tombstone_seqs_.push_back(seq);
  172|   131k|            auto upper_bound_it =
  173|   131k|                std::lower_bound(snapshots.begin(), snapshots.end(), seq);
  174|   131k|            if (upper_bound_it == snapshots.begin()) {
  ------------------
  |  Branch (174:17): [True: 131k, False: 0]
  ------------------
  175|       |              // This seqnum is the topmost one visible by the earliest
  176|       |              // snapshot. None of the seqnums below it will be visible, so we
  177|       |              // can skip them.
  178|   131k|              break;
  179|   131k|            }
  180|      0|            next_snapshot = *std::prev(upper_bound_it);
  181|      0|          }
  182|   131k|        }
  183|   131k|        end_idx = tombstone_seqs_.size();
  184|   262k|      } else {
  185|       |        // The fragmentation is being done for reads, so preserve all seqnums.
  186|   262k|        tombstone_seqs_.insert(tombstone_seqs_.end(), seqnums_to_flush.begin(),
  187|   262k|                               seqnums_to_flush.end());
  188|   262k|        if (ts_sz) {
  ------------------
  |  Branch (188:13): [True: 0, False: 262k]
  ------------------
  189|      0|          tombstone_timestamps_.insert(tombstone_timestamps_.end(),
  190|      0|                                       timestamps_to_flush.begin(),
  191|      0|                                       timestamps_to_flush.end());
  192|      0|        }
  193|   262k|      }
  194|       |
  195|   393k|      assert(start_idx < end_idx);
  196|   393k|      if (ts_sz) {
  ------------------
  |  Branch (196:11): [True: 0, False: 393k]
  ------------------
  197|      0|        std::string start_key_with_max_ts;
  198|      0|        AppendUserKeyWithMaxTimestamp(&start_key_with_max_ts, cur_start_key,
  199|      0|                                      ts_sz);
  200|      0|        pinned_slices_.emplace_back(std::move(start_key_with_max_ts));
  201|      0|        Slice start_key = pinned_slices_.back();
  202|       |
  203|      0|        std::string end_key_with_max_ts;
  204|      0|        AppendUserKeyWithMaxTimestamp(&end_key_with_max_ts, cur_end_key, ts_sz);
  205|      0|        pinned_slices_.emplace_back(std::move(end_key_with_max_ts));
  206|      0|        Slice end_key = pinned_slices_.back();
  207|       |
  208|       |        // RangeTombstoneStack expects start_key and end_key to have max
  209|       |        // timestamp.
  210|      0|        tombstones_.emplace_back(start_key, end_key, start_idx, end_idx);
  211|   393k|      } else {
  212|   393k|        tombstones_.emplace_back(cur_start_key, cur_end_key, start_idx,
  213|   393k|                                 end_idx);
  214|   393k|      }
  215|       |
  216|   393k|      cur_start_key = cur_end_key;
  217|   393k|    }
  218|   304k|    if (!reached_next_start_key) {
  ------------------
  |  Branch (218:9): [True: 831, False: 303k]
  ------------------
  219|       |      // There is a gap between the last flushed tombstone fragment and
  220|       |      // the next tombstone's start key. Remove all the end keys in
  221|       |      // the working set, since we have fully fragmented their corresponding
  222|       |      // tombstones.
  223|    831|      cur_end_keys.clear();
  224|    831|    }
  225|   304k|    cur_start_key = next_start_key;
  226|   304k|  };
range_tombstone_fragmenter.cc:_ZZN7rocksdb28FragmentedRangeTombstoneList13ContainsRangeEmmENK3$_0clEv:
  273|  2.90k|  std::call_once(seq_set_init_once_flag_, [this]() {
  274|  37.3M|    for (auto s : tombstone_seqs_) {
  ------------------
  |  Branch (274:17): [True: 37.3M, False: 2.90k]
  ------------------
  275|  37.3M|      seq_set_.insert(s);
  276|  37.3M|    }
  277|  2.90k|  });

_ZNK7rocksdb32FragmentedRangeTombstoneIterator5emptyEv:
  192|  5.81k|  bool empty() const { return tombstones_->empty(); }
_ZNK7rocksdb28FragmentedRangeTombstoneList5emptyEv:
   74|  17.1k|  bool empty() const { return tombstones_.empty(); }
_ZN7rocksdb28FragmentedRangeTombstoneList19RangeTombstoneStackC2ERKNS_5SliceES4_mm:
   36|   393k|          seq_end_idx(end_idx) {}
_ZNK7rocksdb28FragmentedRangeTombstoneList5beginEv:
   50|  15.7k|  std::vector<RangeTombstoneStack>::const_iterator begin() const {
   51|  15.7k|    return tombstones_.begin();
   52|  15.7k|  }
_ZNK7rocksdb28FragmentedRangeTombstoneList3endEv:
   54|  75.7M|  std::vector<RangeTombstoneStack>::const_iterator end() const {
   55|  75.7M|    return tombstones_.end();
   56|  75.7M|  }
_ZNK7rocksdb28FragmentedRangeTombstoneList8seq_iterEm:
   58|  75.6M|  std::vector<SequenceNumber>::const_iterator seq_iter(size_t idx) const {
   59|  75.6M|    return std::next(tombstone_seqs_.begin(), idx);
   60|  75.6M|  }
_ZNK7rocksdb28FragmentedRangeTombstoneList9seq_beginEv:
   66|  4.48k|  std::vector<SequenceNumber>::const_iterator seq_begin() const {
   67|  4.48k|    return tombstone_seqs_.begin();
   68|  4.48k|  }
_ZNK7rocksdb28FragmentedRangeTombstoneList7seq_endEv:
   70|  26.5k|  std::vector<SequenceNumber>::const_iterator seq_end() const {
   71|  26.5k|    return tombstone_seqs_.end();
   72|  26.5k|  }
_ZNK7rocksdb28FragmentedRangeTombstoneList27num_unfragmented_tombstonesEv:
   82|  2.90k|  uint64_t num_unfragmented_tombstones() const {
   83|  2.90k|    return num_unfragmented_tombstones_;
   84|  2.90k|  }
_ZNK7rocksdb28FragmentedRangeTombstoneList29total_tombstone_payload_bytesEv:
   86|  2.90k|  uint64_t total_tombstone_payload_bytes() const {
   87|  2.90k|    return total_tombstone_payload_bytes_;
   88|  2.90k|  }
_ZN7rocksdb32FragmentedRangeTombstoneIterator10InvalidateEv:
  193|  13.2k|  void Invalidate() {
  194|  13.2k|    pos_ = tombstones_->end();
  195|  13.2k|    seq_pos_ = tombstones_->seq_end();
  196|  13.2k|    pinned_pos_ = tombstones_->end();
  197|  13.2k|    pinned_seq_pos_ = tombstones_->seq_end();
  198|  13.2k|  }
_ZNK7rocksdb32FragmentedRangeTombstoneIterator9TombstoneEb:
  200|   131k|  RangeTombstone Tombstone(bool logical_strip_timestamp = false) const {
  201|   131k|    assert(Valid());
  202|   131k|    if (icmp_->user_comparator()->timestamp_size()) {
  ------------------
  |  Branch (202:9): [True: 0, False: 131k]
  ------------------
  203|      0|      return RangeTombstone(start_key(), end_key(), seq(), timestamp(),
  204|      0|                            logical_strip_timestamp);
  205|      0|    }
  206|   131k|    return RangeTombstone(start_key(), end_key(), seq());
  207|   131k|  }
_ZNK7rocksdb32FragmentedRangeTombstoneIterator9start_keyEv:
  212|   388k|  Slice start_key() const { return pos_->start_key; }
_ZNK7rocksdb32FragmentedRangeTombstoneIterator7end_keyEv:
  213|   131k|  Slice end_key() const { return pos_->end_key; }
_ZNK7rocksdb32FragmentedRangeTombstoneIterator3seqEv:
  214|   299M|  SequenceNumber seq() const { return *seq_pos_; }
_ZN7rocksdb32FragmentedRangeTombstoneIterator22SetTimestampUpperBoundEPKNS_5SliceE:
  221|  2.90k|  void SetTimestampUpperBound(const Slice* ts_upper_bound) {
  222|  2.90k|    ts_upper_bound_ = ts_upper_bound;
  223|  2.90k|  }
_ZNK7rocksdb32FragmentedRangeTombstoneIterator16parsed_start_keyEv:
  225|   150M|  ParsedInternalKey parsed_start_key() const {
  226|   150M|    return ParsedInternalKey(pos_->start_key, seq(), kTypeRangeDeletion);
  227|   150M|  }
_ZNK7rocksdb32FragmentedRangeTombstoneIterator14parsed_end_keyEv:
  228|  75.4M|  ParsedInternalKey parsed_end_key() const {
  229|  75.4M|    return ParsedInternalKey(pos_->end_key, kMaxSequenceNumber,
  230|  75.4M|                             kTypeRangeDeletion);
  231|  75.4M|  }
_ZNK7rocksdb32FragmentedRangeTombstoneIterator11upper_boundEv:
  250|  2.90k|  SequenceNumber upper_bound() const { return upper_bound_; }
_ZNK7rocksdb32FragmentedRangeTombstoneIterator11lower_boundEv:
  251|  2.90k|  SequenceNumber lower_bound() const { return lower_bound_; }
_ZNK7rocksdb32FragmentedRangeTombstoneIterator27num_unfragmented_tombstonesEv:
  253|  2.90k|  uint64_t num_unfragmented_tombstones() const {
  254|  2.90k|    return tombstones_->num_unfragmented_tombstones();
  255|  2.90k|  }
_ZNK7rocksdb32FragmentedRangeTombstoneIterator29total_tombstone_payload_bytesEv:
  256|  2.90k|  uint64_t total_tombstone_payload_bytes() const {
  257|  2.90k|    return tombstones_->total_tombstone_payload_bytes();
  258|  2.90k|  }
_ZN7rocksdb32FragmentedRangeTombstoneIterator34RangeTombstoneStackStartComparatorC2EPKNS_10ComparatorE:
  264|  13.2k|    explicit RangeTombstoneStackStartComparator(const Comparator* c) : cmp(c) {}
_ZN7rocksdb32FragmentedRangeTombstoneIterator32RangeTombstoneStackEndComparatorC2EPKNS_10ComparatorE:
  283|  13.2k|    explicit RangeTombstoneStackEndComparator(const Comparator* c) : cmp(c) {}
_ZNK7rocksdb32FragmentedRangeTombstoneIterator32RangeTombstoneStackEndComparatorclERKNS_5SliceERKNS_28FragmentedRangeTombstoneList19RangeTombstoneStackE:
  294|  22.4k|    bool operator()(const Slice& a, const RangeTombstoneStack& b) const {
  295|  22.4k|      return cmp->CompareWithoutTimestamp(a, b.end_key) < 0;
  296|  22.4k|    }
_ZN7rocksdb32FragmentedRangeTombstoneIterator28SetMaxVisibleSeqAndTimestampEv:
  339|   261k|  void SetMaxVisibleSeqAndTimestamp() {
  340|   261k|    seq_pos_ = std::lower_bound(tombstones_->seq_iter(pos_->seq_start_idx),
  341|   261k|                                tombstones_->seq_iter(pos_->seq_end_idx),
  342|   261k|                                upper_bound_, std::greater<SequenceNumber>());
  343|   261k|    if (ts_upper_bound_ && !ts_upper_bound_->empty()) {
  ------------------
  |  Branch (343:9): [True: 0, False: 261k]
  |  Branch (343:28): [True: 0, False: 0]
  ------------------
  344|      0|      auto ts_pos = std::lower_bound(
  345|      0|          tombstones_->ts_iter(pos_->seq_start_idx),
  346|      0|          tombstones_->ts_iter(pos_->seq_end_idx), *ts_upper_bound_,
  347|      0|          [this](const Slice& s1, const Slice& s2) {
  348|      0|            return ucmp_->CompareTimestamp(s1, s2) > 0;
  349|      0|          });
  350|      0|      auto ts_idx = ts_pos - tombstones_->ts_iter(pos_->seq_start_idx);
  351|      0|      auto seq_idx = seq_pos_ - tombstones_->seq_iter(pos_->seq_start_idx);
  352|      0|      if (seq_idx < ts_idx) {
  ------------------
  |  Branch (352:11): [True: 0, False: 0]
  ------------------
  353|       |        // seq and ts are ordered in non-increasing order. Only updates seq_pos_
  354|       |        // to a larger index for smaller sequence number and timestamp.
  355|      0|        seq_pos_ = tombstones_->seq_iter(pos_->seq_start_idx + ts_idx);
  356|      0|      }
  357|      0|    }
  358|   261k|  }

_ZN7rocksdb18SeqnoToTimeMapping18EnforceMaxTimeSpanEm:
  102|  9.02k|void SeqnoToTimeMapping::EnforceMaxTimeSpan(uint64_t now) {
  103|  9.02k|  assert(enforced_);  // at least sorted
  104|  9.02k|  uint64_t cutoff_time;
  105|  9.02k|  if (pairs_.size() <= 1) {
  ------------------
  |  Branch (105:7): [True: 9.02k, False: 0]
  ------------------
  106|  9.02k|    return;
  107|  9.02k|  }
  108|      0|  if (now > 0) {
  ------------------
  |  Branch (108:7): [True: 0, False: 0]
  ------------------
  109|      0|    if (now < max_time_span_) {
  ------------------
  |  Branch (109:9): [True: 0, False: 0]
  ------------------
  110|       |      // Nothing eligible to prune / avoid underflow
  111|      0|      return;
  112|      0|    }
  113|      0|    cutoff_time = now - max_time_span_;
  114|      0|  } else {
  115|      0|    const auto& last = pairs_.back();
  116|      0|    if (last.time < max_time_span_) {
  ------------------
  |  Branch (116:9): [True: 0, False: 0]
  ------------------
  117|       |      // Nothing eligible to prune / avoid underflow
  118|      0|      return;
  119|      0|    }
  120|      0|    cutoff_time = last.time - max_time_span_;
  121|      0|  }
  122|       |  // Keep one entry <= cutoff_time
  123|      0|  while (pairs_.size() >= 2 && pairs_[0].time <= cutoff_time &&
  ------------------
  |  Branch (123:10): [True: 0, False: 0]
  |  Branch (123:32): [True: 0, False: 0]
  ------------------
  124|      0|         pairs_[1].time <= cutoff_time) {
  ------------------
  |  Branch (124:10): [True: 0, False: 0]
  ------------------
  125|      0|    pairs_.pop_front();
  126|      0|  }
  127|      0|}
_ZN7rocksdb18SeqnoToTimeMapping15EnforceCapacityEb:
  129|  9.02k|void SeqnoToTimeMapping::EnforceCapacity(bool strict) {
  130|  9.02k|  assert(enforced_);  // at least sorted
  131|  9.02k|  uint64_t strict_cap = capacity_;
  132|  9.02k|  if (strict_cap == 0) {
  ------------------
  |  Branch (132:7): [True: 9.02k, False: 0]
  ------------------
  133|  9.02k|    pairs_.clear();
  134|  9.02k|    return;
  135|  9.02k|  }
  136|       |  // Treat cap of 1 as 2 to work with the below algorithm (etc.)
  137|      0|  if (strict_cap == 1) {
  ------------------
  |  Branch (137:7): [True: 0, False: 0]
  ------------------
  138|      0|    strict_cap = 2;
  139|      0|  }
  140|       |  // When !strict, allow being over nominal capacity by a modest fraction.
  141|      0|  uint64_t effective_cap = strict_cap + (strict ? 0 : strict_cap / 8);
  ------------------
  |  Branch (141:42): [True: 0, False: 0]
  ------------------
  142|      0|  if (effective_cap < strict_cap) {
  ------------------
  |  Branch (142:7): [True: 0, False: 0]
  ------------------
  143|       |    // Correct overflow
  144|      0|    effective_cap = UINT64_MAX;
  145|      0|  }
  146|      0|  if (pairs_.size() <= effective_cap) {
  ------------------
  |  Branch (146:7): [True: 0, False: 0]
  ------------------
  147|      0|    return;
  148|      0|  }
  149|       |  // The below algorithm expects at least one removal candidate between first
  150|       |  // and last.
  151|      0|  assert(pairs_.size() >= 3);
  152|      0|  size_t to_remove_count = pairs_.size() - strict_cap;
  153|       |
  154|      0|  struct RemovalCandidate {
  155|      0|    uint64_t new_time_gap;
  156|      0|    std::deque<SeqnoTimePair>::iterator it;
  157|      0|    RemovalCandidate(uint64_t _new_time_gap,
  158|      0|                     std::deque<SeqnoTimePair>::iterator _it)
  159|      0|        : new_time_gap(_new_time_gap), it(_it) {}
  160|      0|    bool operator>(const RemovalCandidate& other) const {
  161|      0|      if (new_time_gap == other.new_time_gap) {
  162|       |        // If same gap, treat the newer entry as less attractive
  163|       |        // for removal (like larger gap)
  164|      0|        return it->seqno > other.it->seqno;
  165|      0|      }
  166|      0|      return new_time_gap > other.new_time_gap;
  167|      0|    }
  168|      0|  };
  169|       |
  170|       |  // A priority queue of best removal candidates (smallest time gap remaining
  171|       |  // after removal)
  172|      0|  using RC = RemovalCandidate;
  173|      0|  using PQ = std::priority_queue<RC, std::vector<RC>, std::greater<RC>>;
  174|      0|  PQ pq;
  175|       |
  176|       |  // Add all the candidates (not including first and last)
  177|      0|  {
  178|      0|    auto it = pairs_.begin();
  179|      0|    assert(it->time != kUnknownTimeBeforeAll);
  180|      0|    uint64_t prev_prev_time = it->time;
  181|      0|    ++it;
  182|      0|    assert(it->time != kUnknownTimeBeforeAll);
  183|      0|    auto prev_it = it;
  184|      0|    ++it;
  185|      0|    while (it != pairs_.end()) {
  ------------------
  |  Branch (185:12): [True: 0, False: 0]
  ------------------
  186|      0|      assert(it->time != kUnknownTimeBeforeAll);
  187|      0|      uint64_t gap = it->time - prev_prev_time;
  188|      0|      pq.emplace(gap, prev_it);
  189|      0|      prev_prev_time = prev_it->time;
  190|      0|      prev_it = it;
  191|      0|      ++it;
  192|      0|    }
  193|      0|  }
  194|       |
  195|       |  // Greedily remove the best candidate, iteratively
  196|      0|  while (to_remove_count > 0) {
  ------------------
  |  Branch (196:10): [True: 0, False: 0]
  ------------------
  197|      0|    assert(!pq.empty());
  198|       |    // Remove the candidate with smallest gap
  199|      0|    auto rc = pq.top();
  200|      0|    pq.pop();
  201|       |
  202|       |    // NOTE: priority_queue does not support updating an existing element,
  203|       |    // but we can work around that because the gap tracked in pq is only
  204|       |    // going to be better than actuality, and we can detect and adjust
  205|       |    // when a better-than-actual gap is found.
  206|       |
  207|       |    // Determine actual time gap if this entry is removed (zero entries are
  208|       |    // marked for deletion)
  209|      0|    auto it = rc.it + 1;
  210|      0|    uint64_t after_time = it->time;
  211|      0|    while (after_time == kUnknownTimeBeforeAll) {
  ------------------
  |  Branch (211:12): [True: 0, False: 0]
  ------------------
  212|      0|      assert(it != pairs_.end());
  213|      0|      ++it;
  214|      0|      after_time = it->time;
  215|      0|    }
  216|      0|    it = rc.it - 1;
  217|      0|    uint64_t before_time = it->time;
  218|      0|    while (before_time == kUnknownTimeBeforeAll) {
  ------------------
  |  Branch (218:12): [True: 0, False: 0]
  ------------------
  219|      0|      assert(it != pairs_.begin());
  220|      0|      --it;
  221|      0|      before_time = it->time;
  222|      0|    }
  223|       |    // Check whether the gap is still valid (or needs to be recomputed)
  224|      0|    if (rc.new_time_gap == after_time - before_time) {
  ------------------
  |  Branch (224:9): [True: 0, False: 0]
  ------------------
  225|       |      // Mark the entry as removed
  226|      0|      rc.it->time = kUnknownTimeBeforeAll;
  227|      0|      --to_remove_count;
  228|      0|    } else {
  229|       |      // Insert a replacement up-to-date removal candidate
  230|      0|      pq.emplace(after_time - before_time, rc.it);
  231|      0|    }
  232|      0|  }
  233|       |
  234|       |  // Collapse away entries marked for deletion
  235|      0|  auto from_it = pairs_.begin();
  236|      0|  auto to_it = from_it;
  237|       |
  238|      0|  for (; from_it != pairs_.end(); ++from_it) {
  ------------------
  |  Branch (238:10): [True: 0, False: 0]
  ------------------
  239|      0|    if (from_it->time != kUnknownTimeBeforeAll) {
  ------------------
  |  Branch (239:9): [True: 0, False: 0]
  ------------------
  240|      0|      if (from_it != to_it) {
  ------------------
  |  Branch (240:11): [True: 0, False: 0]
  ------------------
  241|      0|        *to_it = *from_it;
  242|      0|      }
  243|      0|      ++to_it;
  244|      0|    }
  245|      0|  }
  246|       |
  247|       |  // Erase slots freed up
  248|      0|  pairs_.erase(to_it, pairs_.end());
  249|      0|  assert(pairs_.size() == strict_cap);
  250|      0|}
_ZN7rocksdb18SeqnoToTimeMapping14SetMaxTimeSpanEm:
  302|  9.02k|SeqnoToTimeMapping& SeqnoToTimeMapping::SetMaxTimeSpan(uint64_t max_time_span) {
  303|  9.02k|  max_time_span_ = max_time_span;
  304|  9.02k|  if (enforced_) {
  ------------------
  |  Branch (304:7): [True: 9.02k, False: 0]
  ------------------
  305|  9.02k|    EnforceMaxTimeSpan();
  306|  9.02k|  }
  307|  9.02k|  return *this;
  308|  9.02k|}
_ZN7rocksdb18SeqnoToTimeMapping11SetCapacityEm:
  310|  9.02k|SeqnoToTimeMapping& SeqnoToTimeMapping::SetCapacity(uint64_t capacity) {
  311|  9.02k|  capacity_ = capacity;
  312|  9.02k|  if (enforced_) {
  ------------------
  |  Branch (312:7): [True: 9.02k, False: 0]
  ------------------
  313|  9.02k|    EnforceCapacity(/*strict=*/true);
  314|  9.02k|  }
  315|  9.02k|  return *this;
  316|  9.02k|}
_ZNK7rocksdb18SeqnoToTimeMapping8EncodeToERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  345|  4.48k|void SeqnoToTimeMapping::EncodeTo(std::string& dest) const {
  346|  4.48k|  assert(enforced_);
  347|       |  // Can use empty string for empty mapping
  348|  4.48k|  if (pairs_.empty()) {
  ------------------
  |  Branch (348:7): [True: 4.48k, False: 0]
  ------------------
  349|  4.48k|    return;
  350|  4.48k|  }
  351|       |  // Encode number of entries
  352|      0|  PutVarint64(&dest, pairs_.size());
  353|      0|  SeqnoTimePair base;
  354|      0|  for (auto& cur : pairs_) {
  ------------------
  |  Branch (354:18): [True: 0, False: 0]
  ------------------
  355|      0|    assert(base < cur);
  356|       |    // Delta encode each entry
  357|      0|    SeqnoTimePair val = cur.ComputeDelta(base);
  358|      0|    base = cur;
  359|      0|    val.Encode(dest);
  360|      0|  }
  361|      0|}
_ZN7rocksdb18SeqnoToTimeMapping10DecodeFromERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  394|  4.48k|Status SeqnoToTimeMapping::DecodeFrom(const std::string& pairs_str) {
  395|  4.48k|  size_t orig_size = pairs_.size();
  396|       |
  397|  4.48k|  Slice input(pairs_str);
  398|  4.48k|  Status s = DecodeImpl(input, pairs_);
  399|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (399:7): [True: 0, False: 4.48k]
  ------------------
  400|       |    // Roll back in case of corrupted data
  401|      0|    pairs_.resize(orig_size);
  402|  4.48k|  } else if (orig_size > 0 || max_time_span_ < UINT64_MAX ||
  ------------------
  |  Branch (402:14): [True: 0, False: 4.48k]
  |  Branch (402:31): [True: 0, False: 4.48k]
  ------------------
  403|  4.48k|             capacity_ < UINT64_MAX) {
  ------------------
  |  Branch (403:14): [True: 0, False: 4.48k]
  ------------------
  404|      0|    enforced_ = false;
  405|      0|  }
  406|  4.48k|  return s;
  407|  4.48k|}
seqno_to_time_mapping.cc:_ZN7rocksdb12_GLOBAL__N_110DecodeImplERNS_5SliceERNSt3__15dequeINS_18SeqnoToTimeMapping13SeqnoTimePairENS3_9allocatorIS6_EEEE:
  365|  4.48k|                  std::deque<SeqnoToTimeMapping::SeqnoTimePair>& pairs) {
  366|  4.48k|  if (input.empty()) {
  ------------------
  |  Branch (366:7): [True: 4.48k, False: 0]
  ------------------
  367|  4.48k|    return Status::OK();
  368|  4.48k|  }
  369|      0|  uint64_t count;
  370|      0|  if (!GetVarint64(&input, &count)) {
  ------------------
  |  Branch (370:7): [True: 0, False: 0]
  ------------------
  371|      0|    return Status::Corruption("Invalid sequence number time size");
  372|      0|  }
  373|       |
  374|      0|  SeqnoToTimeMapping::SeqnoTimePair base;
  375|      0|  for (uint64_t i = 0; i < count; i++) {
  ------------------
  |  Branch (375:24): [True: 0, False: 0]
  ------------------
  376|      0|    SeqnoToTimeMapping::SeqnoTimePair val;
  377|      0|    Status s = val.Decode(input);
  378|      0|    if (!s.ok()) {
  ------------------
  |  Branch (378:9): [True: 0, False: 0]
  ------------------
  379|      0|      return s;
  380|      0|    }
  381|      0|    val.ApplyDelta(base);
  382|      0|    pairs.emplace_back(val);
  383|      0|    base = val;
  384|      0|  }
  385|       |
  386|      0|  if (!input.empty()) {
  ------------------
  |  Branch (386:7): [True: 0, False: 0]
  ------------------
  387|      0|    return Status::Corruption(
  388|      0|        "Extra bytes at end of sequence number time mapping");
  389|      0|  }
  390|      0|  return Status::OK();
  391|      0|}

_ZN7rocksdb18SeqnoToTimeMappingC2Ev:
  121|  17.9k|  SeqnoToTimeMapping() {}
_ZNK7rocksdb18SeqnoToTimeMapping5EmptyEv:
  236|  38.6k|  bool Empty() const { return pairs_.empty(); }

_ZN7rocksdb12SnapshotListC2Ev:
   56|  9.02k|  SnapshotList() {
   57|  9.02k|    list_.prev_ = &list_;
   58|  9.02k|    list_.next_ = &list_;
   59|  9.02k|    list_.number_ = 0xFFFFFFFFL;  // placeholder marker, for debugging
   60|       |    // Set all the variables to make UBSAN happy.
   61|  9.02k|    list_.list_ = nullptr;
   62|  9.02k|    list_.unix_time_ = 0;
   63|  9.02k|    list_.timestamp_ = 0;
   64|  9.02k|    list_.is_write_conflict_boundary_ = false;
   65|  9.02k|    count_ = 0;
   66|  9.02k|  }
_ZN7rocksdb23TimestampedSnapshotListC2Ev:
  190|  9.02k|  explicit TimestampedSnapshotList() = default;
_ZN7rocksdb23TimestampedSnapshotList25ReleaseSnapshotsOlderThanEmRNS_10autovectorINSt3__110shared_ptrIKNS_12SnapshotImplEEELm8EEE:
  227|  9.02k|      autovector<std::shared_ptr<const SnapshotImpl>>& snapshots_to_release) {
  228|  9.02k|    auto ub = snapshots_.lower_bound(ts);
  229|  9.02k|    for (auto it = snapshots_.begin(); it != ub; ++it) {
  ------------------
  |  Branch (229:40): [True: 0, False: 9.02k]
  ------------------
  230|      0|      snapshots_to_release.emplace_back(it->second);
  231|      0|    }
  232|  9.02k|    snapshots_.erase(snapshots_.begin(), ub);
  233|  9.02k|  }
_ZNK7rocksdb12SnapshotList5countEv:
  179|  9.02k|  uint64_t count() const { return count_; }
_ZNK7rocksdb12SnapshotList5emptyEv:
   71|  4.48k|  bool empty() const {
   72|  4.48k|    assert(list_.next_ != &list_ || 0 == count_);
   73|  4.48k|    return list_.next_ == &list_;
   74|  4.48k|  }
_ZNK7rocksdb12SnapshotList6GetAllEPmRKm:
  112|  4.48k|      const SequenceNumber& max_seq = kMaxSequenceNumber) const {
  113|  4.48k|    std::vector<SequenceNumber> ret;
  114|  4.48k|    GetAll(&ret, oldest_write_conflict_snapshot, max_seq);
  115|  4.48k|    return ret;
  116|  4.48k|  }
_ZNK7rocksdb12SnapshotList6GetAllEPNSt3__16vectorImNS1_9allocatorImEEEEPmRKm:
  120|  4.48k|              const SequenceNumber& max_seq = kMaxSequenceNumber) const {
  121|  4.48k|    std::vector<SequenceNumber>& ret = *snap_vector;
  122|       |    // So far we have no use case that would pass a non-empty vector
  123|  4.48k|    assert(ret.size() == 0);
  124|       |
  125|  4.48k|    if (oldest_write_conflict_snapshot != nullptr) {
  ------------------
  |  Branch (125:9): [True: 4.48k, False: 0]
  ------------------
  126|  4.48k|      *oldest_write_conflict_snapshot = kMaxSequenceNumber;
  127|  4.48k|    }
  128|       |
  129|  4.48k|    if (empty()) {
  ------------------
  |  Branch (129:9): [True: 4.48k, False: 0]
  ------------------
  130|  4.48k|      return;
  131|  4.48k|    }
  132|      0|    const SnapshotImpl* s = &list_;
  133|      0|    while (s->next_ != &list_) {
  ------------------
  |  Branch (133:12): [True: 0, False: 0]
  ------------------
  134|      0|      if (s->next_->number_ > max_seq) {
  ------------------
  |  Branch (134:11): [True: 0, False: 0]
  ------------------
  135|      0|        break;
  136|      0|      }
  137|       |      // Avoid duplicates
  138|      0|      if (ret.empty() || ret.back() != s->next_->number_) {
  ------------------
  |  Branch (138:11): [True: 0, False: 0]
  |  Branch (138:26): [True: 0, False: 0]
  ------------------
  139|      0|        ret.push_back(s->next_->number_);
  140|      0|      }
  141|       |
  142|      0|      if (oldest_write_conflict_snapshot != nullptr &&
  ------------------
  |  Branch (142:11): [True: 0, False: 0]
  ------------------
  143|      0|          *oldest_write_conflict_snapshot == kMaxSequenceNumber &&
  ------------------
  |  Branch (143:11): [True: 0, False: 0]
  ------------------
  144|      0|          s->next_->is_write_conflict_boundary_) {
  ------------------
  |  Branch (144:11): [True: 0, False: 0]
  ------------------
  145|       |        // If this is the first write-conflict boundary snapshot in the list,
  146|       |        // it is the oldest
  147|      0|        *oldest_write_conflict_snapshot = s->next_->number_;
  148|      0|      }
  149|       |
  150|      0|      s = s->next_;
  151|      0|    }
  152|      0|    return;
  153|  4.48k|  }

_ZN7rocksdb10TableCacheC2ERKNS_16ImmutableOptionsEPKNS_11FileOptionsEPNS_5CacheEPNS_16BlockCacheTracerERKNSt3__110shared_ptrINS_8IOTracerEEERKNSB_12basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEE:
   80|  9.02k|      db_session_id_(db_session_id) {
   81|  9.02k|  if (ioptions_.row_cache) {
  ------------------
  |  Branch (81:7): [True: 0, False: 9.02k]
  ------------------
   82|       |    // If the same cache is shared by multiple instances, we need to
   83|       |    // disambiguate its entries.
   84|      0|    PutVarint64(&row_cache_id_, ioptions_.row_cache->NewId());
   85|      0|  }
   86|  9.02k|}
_ZN7rocksdb10TableCacheD2Ev:
   88|  9.02k|TableCache::~TableCache() = default;
_ZN7rocksdb10TableCache14GetTableReaderERKNS_11ReadOptionsERKNS_11FileOptionsERKNS_21InternalKeyComparatorERKNS_12FileMetaDataEbhPNS_13HistogramImplEPNSt3__110unique_ptrINS_11TableReaderENSF_14default_deleteISH_EEEERKNSF_10shared_ptrIKNS_14SliceTransformEEEbibmNS_11TemperatureE:
   98|  4.48k|    size_t max_file_size_for_l0_meta_pin, Temperature file_temperature) {
   99|  4.48k|  std::string fname = TableFileName(
  100|  4.48k|      ioptions_.cf_paths, file_meta.fd.GetNumber(), file_meta.fd.GetPathId());
  101|  4.48k|  std::unique_ptr<FSRandomAccessFile> file;
  102|  4.48k|  FileOptions fopts = file_options;
  103|  4.48k|  fopts.temperature = file_temperature;
  104|  4.48k|  Status s = PrepareIOFromReadOptions(ro, ioptions_.clock, fopts.io_options);
  105|  4.48k|  TEST_SYNC_POINT_CALLBACK("TableCache::GetTableReader:BeforeOpenFile",
  106|  4.48k|                           const_cast<Status*>(&s));
  107|  4.48k|  if (s.ok()) {
  ------------------
  |  Branch (107:7): [True: 4.48k, False: 0]
  ------------------
  108|  4.48k|    s = ioptions_.fs->NewRandomAccessFile(fname, fopts, &file, nullptr);
  109|  4.48k|  }
  110|  4.48k|  if (s.ok()) {
  ------------------
  |  Branch (110:7): [True: 4.48k, False: 0]
  ------------------
  111|  4.48k|    RecordTick(ioptions_.stats, NO_FILE_OPENS);
  112|  4.48k|  } else if (s.IsPathNotFound()) {
  ------------------
  |  Branch (112:14): [True: 0, False: 0]
  ------------------
  113|      0|    fname = Rocks2LevelTableFileName(fname);
  114|       |    // If this file is also not found, we want to use the error message
  115|       |    // that contains the table file name which is less confusing.
  116|      0|    Status temp_s =
  117|      0|        PrepareIOFromReadOptions(ro, ioptions_.clock, fopts.io_options);
  118|      0|    if (temp_s.ok()) {
  ------------------
  |  Branch (118:9): [True: 0, False: 0]
  ------------------
  119|      0|      temp_s = ioptions_.fs->NewRandomAccessFile(fname, file_options, &file,
  120|      0|                                                 nullptr);
  121|      0|    }
  122|      0|    if (temp_s.ok()) {
  ------------------
  |  Branch (122:9): [True: 0, False: 0]
  ------------------
  123|      0|      RecordTick(ioptions_.stats, NO_FILE_OPENS);
  124|      0|      s = temp_s;
  125|      0|    }
  126|      0|  }
  127|       |
  128|  4.48k|  if (s.ok()) {
  ------------------
  |  Branch (128:7): [True: 4.48k, False: 0]
  ------------------
  129|  4.48k|    if (!sequential_mode && ioptions_.advise_random_on_open) {
  ------------------
  |  Branch (129:9): [True: 4.48k, False: 0]
  |  Branch (129:29): [True: 4.48k, False: 0]
  ------------------
  130|  4.48k|      file->Hint(FSRandomAccessFile::kRandom);
  131|  4.48k|    }
  132|  4.48k|    if (ioptions_.default_temperature != Temperature::kUnknown &&
  ------------------
  |  Branch (132:9): [True: 0, False: 4.48k]
  ------------------
  133|  4.48k|        file_temperature == Temperature::kUnknown) {
  ------------------
  |  Branch (133:9): [True: 0, False: 0]
  ------------------
  134|      0|      file_temperature = ioptions_.default_temperature;
  135|      0|    }
  136|  4.48k|    StopWatch sw(ioptions_.clock, ioptions_.stats, TABLE_OPEN_IO_MICROS);
  137|  4.48k|    std::unique_ptr<RandomAccessFileReader> file_reader(
  138|  4.48k|        new RandomAccessFileReader(std::move(file), fname, ioptions_.clock,
  139|  4.48k|                                   io_tracer_, ioptions_.stats, SST_READ_MICROS,
  140|  4.48k|                                   file_read_hist, ioptions_.rate_limiter.get(),
  141|  4.48k|                                   ioptions_.listeners, file_temperature,
  142|  4.48k|                                   level == ioptions_.num_levels - 1));
  143|  4.48k|    UniqueId64x2 expected_unique_id;
  144|  4.48k|    if (ioptions_.verify_sst_unique_id_in_manifest) {
  ------------------
  |  Branch (144:9): [True: 4.48k, False: 0]
  ------------------
  145|  4.48k|      expected_unique_id = file_meta.unique_id;
  146|  4.48k|    } else {
  147|      0|      expected_unique_id = kNullUniqueId64x2;  // null ID == no verification
  148|      0|    }
  149|  4.48k|    s = ioptions_.table_factory->NewTableReader(
  150|  4.48k|        ro,
  151|  4.48k|        TableReaderOptions(
  152|  4.48k|            ioptions_, prefix_extractor, file_options, internal_comparator,
  153|  4.48k|            block_protection_bytes_per_key, skip_filters, immortal_tables_,
  154|  4.48k|            false /* force_direct_prefetch */, level, block_cache_tracer_,
  155|  4.48k|            max_file_size_for_l0_meta_pin, db_session_id_,
  156|  4.48k|            file_meta.fd.GetNumber(), expected_unique_id,
  157|  4.48k|            file_meta.fd.largest_seqno, file_meta.tail_size,
  158|  4.48k|            file_meta.user_defined_timestamps_persisted),
  159|  4.48k|        std::move(file_reader), file_meta.fd.GetFileSize(), table_reader,
  160|  4.48k|        prefetch_index_and_filter_in_cache);
  161|  4.48k|    TEST_SYNC_POINT("TableCache::GetTableReader:0");
  162|  4.48k|  }
  163|  4.48k|  return s;
  164|  4.48k|}
_ZN7rocksdb10TableCache9FindTableERKNS_11ReadOptionsERKNS_11FileOptionsERKNS_21InternalKeyComparatorERKNS_12FileMetaDataEPPNS_24BasicTypedCacheInterfaceINS_11TableReaderELNS_14CacheEntryRoleE13EPNS_5CacheEE11TypedHandleEhRKNSt3__110shared_ptrIKNS_14SliceTransformEEEbPNS_13HistogramImplEbibmNS_11TemperatureE:
  179|  8.96k|    size_t max_file_size_for_l0_meta_pin, Temperature file_temperature) {
  180|  8.96k|  PERF_TIMER_GUARD_WITH_CLOCK(find_table_nanos, ioptions_.clock);
  ------------------
  |  |   51|  8.96k|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric), clock); \
  |  |   52|  8.96k|  perf_step_timer_##metric.Start();
  ------------------
  181|  8.96k|  uint64_t number = file_meta.fd.GetNumber();
  182|  8.96k|  Slice key = GetSliceForFileNumber(&number);
  183|  8.96k|  *handle = cache_.Lookup(key);
  184|  8.96k|  TEST_SYNC_POINT_CALLBACK("TableCache::FindTable:0",
  185|  8.96k|                           const_cast<bool*>(&no_io));
  186|       |
  187|  8.96k|  if (*handle == nullptr) {
  ------------------
  |  Branch (187:7): [True: 4.48k, False: 4.48k]
  ------------------
  188|  4.48k|    if (no_io) {
  ------------------
  |  Branch (188:9): [True: 0, False: 4.48k]
  ------------------
  189|      0|      return Status::Incomplete("Table not found in table_cache, no_io is set");
  190|      0|    }
  191|  4.48k|    MutexLock load_lock(&loader_mutex_.Get(key));
  192|       |    // We check the cache again under loading mutex
  193|  4.48k|    *handle = cache_.Lookup(key);
  194|  4.48k|    if (*handle != nullptr) {
  ------------------
  |  Branch (194:9): [True: 0, False: 4.48k]
  ------------------
  195|      0|      return Status::OK();
  196|      0|    }
  197|       |
  198|  4.48k|    std::unique_ptr<TableReader> table_reader;
  199|  4.48k|    Status s = GetTableReader(ro, file_options, internal_comparator, file_meta,
  200|  4.48k|                              false /* sequential mode */,
  201|  4.48k|                              block_protection_bytes_per_key, file_read_hist,
  202|  4.48k|                              &table_reader, prefix_extractor, skip_filters,
  203|  4.48k|                              level, prefetch_index_and_filter_in_cache,
  204|  4.48k|                              max_file_size_for_l0_meta_pin, file_temperature);
  205|  4.48k|    if (!s.ok()) {
  ------------------
  |  Branch (205:9): [True: 0, False: 4.48k]
  ------------------
  206|      0|      assert(table_reader == nullptr);
  207|      0|      RecordTick(ioptions_.stats, NO_FILE_ERRORS);
  208|       |      // We do not cache error results so that if the error is transient,
  209|       |      // or somebody repairs the file, we recover automatically.
  210|  4.48k|    } else {
  211|  4.48k|      s = cache_.Insert(key, table_reader.get(), 1, handle);
  212|  4.48k|      if (s.ok()) {
  ------------------
  |  Branch (212:11): [True: 4.48k, False: 0]
  ------------------
  213|       |        // Release ownership of table reader.
  214|  4.48k|        table_reader.release();
  215|  4.48k|      }
  216|  4.48k|    }
  217|  4.48k|    return s;
  218|  4.48k|  }
  219|  4.48k|  return Status::OK();
  220|  8.96k|}
_ZN7rocksdb10TableCache11NewIteratorERKNS_11ReadOptionsERKNS_11FileOptionsERKNS_21InternalKeyComparatorERKNS_12FileMetaDataEPNS_18RangeDelAggregatorERKNSt3__110shared_ptrIKNS_14SliceTransformEEEPPNS_11TableReaderEPNS_13HistogramImplENS_17TableReaderCallerEPNS_5ArenaEbimPKNS_11InternalKeyESW_bhPKmPNSF_10unique_ptrINS_25TruncatedRangeDelIteratorENSF_14default_deleteIS10_EEEE:
  233|  8.96k|    std::unique_ptr<TruncatedRangeDelIterator>* range_del_iter) {
  234|  8.96k|  PERF_TIMER_GUARD(new_table_iterator_nanos);
  ------------------
  |  |   46|  8.96k|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  8.96k|  perf_step_timer_##metric.Start();
  ------------------
  235|       |
  236|  8.96k|  Status s;
  237|  8.96k|  TableReader* table_reader = nullptr;
  238|  8.96k|  TypedHandle* handle = nullptr;
  239|  8.96k|  if (table_reader_ptr != nullptr) {
  ------------------
  |  Branch (239:7): [True: 0, False: 8.96k]
  ------------------
  240|      0|    *table_reader_ptr = nullptr;
  241|      0|  }
  242|  8.96k|  bool for_compaction = caller == TableReaderCaller::kCompaction;
  243|  8.96k|  auto& fd = file_meta.fd;
  244|  8.96k|  table_reader = fd.table_reader;
  245|  8.96k|  if (table_reader == nullptr) {
  ------------------
  |  Branch (245:7): [True: 4.48k, False: 4.48k]
  ------------------
  246|  4.48k|    s = FindTable(options, file_options, icomparator, file_meta, &handle,
  247|  4.48k|                  block_protection_bytes_per_key, prefix_extractor,
  248|  4.48k|                  options.read_tier == kBlockCacheTier /* no_io */,
  249|  4.48k|                  file_read_hist, skip_filters, level,
  250|  4.48k|                  true /* prefetch_index_and_filter_in_cache */,
  251|  4.48k|                  max_file_size_for_l0_meta_pin, file_meta.temperature);
  252|  4.48k|    if (s.ok()) {
  ------------------
  |  Branch (252:9): [True: 4.48k, False: 0]
  ------------------
  253|  4.48k|      table_reader = cache_.Value(handle);
  254|  4.48k|    }
  255|  4.48k|  }
  256|  8.96k|  InternalIterator* result = nullptr;
  257|  8.96k|  if (s.ok()) {
  ------------------
  |  Branch (257:7): [True: 8.96k, False: 0]
  ------------------
  258|  8.96k|    if (options.table_filter &&
  ------------------
  |  Branch (258:9): [True: 0, False: 8.96k]
  |  Branch (258:9): [True: 0, False: 8.96k]
  ------------------
  259|  8.96k|        !options.table_filter(*table_reader->GetTableProperties())) {
  ------------------
  |  Branch (259:9): [True: 0, False: 0]
  ------------------
  260|      0|      result = NewEmptyInternalIterator<Slice>(arena);
  261|  8.96k|    } else {
  262|  8.96k|      result = table_reader->NewIterator(
  263|  8.96k|          options, prefix_extractor.get(), arena, skip_filters, caller,
  264|  8.96k|          file_options.compaction_readahead_size, allow_unprepared_value);
  265|  8.96k|    }
  266|  8.96k|    if (handle != nullptr) {
  ------------------
  |  Branch (266:9): [True: 4.48k, False: 4.48k]
  ------------------
  267|  4.48k|      cache_.RegisterReleaseAsCleanup(handle, *result);
  268|  4.48k|      handle = nullptr;  // prevent from releasing below
  269|  4.48k|    }
  270|       |
  271|  8.96k|    if (for_compaction) {
  ------------------
  |  Branch (271:9): [True: 0, False: 8.96k]
  ------------------
  272|      0|      table_reader->SetupForCompaction();
  273|      0|    }
  274|  8.96k|    if (table_reader_ptr != nullptr) {
  ------------------
  |  Branch (274:9): [True: 0, False: 8.96k]
  ------------------
  275|      0|      *table_reader_ptr = table_reader;
  276|      0|    }
  277|  8.96k|  }
  278|  8.96k|  if (s.ok() && !options.ignore_range_deletions) {
  ------------------
  |  Branch (278:7): [True: 8.96k, False: 0]
  |  Branch (278:17): [True: 8.96k, False: 0]
  ------------------
  279|  8.96k|    if (range_del_iter != nullptr) {
  ------------------
  |  Branch (279:9): [True: 4.48k, False: 4.48k]
  ------------------
  280|  4.48k|      auto new_range_del_iter =
  281|  4.48k|          read_seqno ? table_reader->NewRangeTombstoneIterator(
  ------------------
  |  Branch (281:11): [True: 0, False: 4.48k]
  ------------------
  282|      0|                           *read_seqno, options.timestamp)
  283|  4.48k|                     : table_reader->NewRangeTombstoneIterator(options);
  284|  4.48k|      if (new_range_del_iter == nullptr || new_range_del_iter->empty()) {
  ------------------
  |  Branch (284:11): [True: 1.57k, False: 2.90k]
  |  Branch (284:44): [True: 0, False: 2.90k]
  ------------------
  285|  1.57k|        delete new_range_del_iter;
  286|  1.57k|        *range_del_iter = nullptr;
  287|  2.90k|      } else {
  288|  2.90k|        *range_del_iter = std::make_unique<TruncatedRangeDelIterator>(
  289|  2.90k|            std::unique_ptr<FragmentedRangeTombstoneIterator>(
  290|  2.90k|                new_range_del_iter),
  291|  2.90k|            &icomparator, &file_meta.smallest, &file_meta.largest);
  292|  2.90k|      }
  293|  4.48k|    }
  294|  8.96k|    if (range_del_agg != nullptr) {
  ------------------
  |  Branch (294:9): [True: 0, False: 8.96k]
  ------------------
  295|      0|      if (range_del_agg->AddFile(fd.GetNumber())) {
  ------------------
  |  Branch (295:11): [True: 0, False: 0]
  ------------------
  296|      0|        std::unique_ptr<FragmentedRangeTombstoneIterator> new_range_del_iter(
  297|      0|            static_cast<FragmentedRangeTombstoneIterator*>(
  298|      0|                table_reader->NewRangeTombstoneIterator(options)));
  299|      0|        if (new_range_del_iter != nullptr) {
  ------------------
  |  Branch (299:13): [True: 0, False: 0]
  ------------------
  300|      0|          s = new_range_del_iter->status();
  301|      0|        }
  302|      0|        if (s.ok()) {
  ------------------
  |  Branch (302:13): [True: 0, False: 0]
  ------------------
  303|      0|          const InternalKey* smallest = &file_meta.smallest;
  304|      0|          const InternalKey* largest = &file_meta.largest;
  305|      0|          if (smallest_compaction_key != nullptr) {
  ------------------
  |  Branch (305:15): [True: 0, False: 0]
  ------------------
  306|      0|            smallest = smallest_compaction_key;
  307|      0|          }
  308|      0|          if (largest_compaction_key != nullptr) {
  ------------------
  |  Branch (308:15): [True: 0, False: 0]
  ------------------
  309|      0|            largest = largest_compaction_key;
  310|      0|          }
  311|      0|          range_del_agg->AddTombstones(std::move(new_range_del_iter), smallest,
  312|      0|                                       largest);
  313|      0|        }
  314|      0|      }
  315|      0|    }
  316|  8.96k|  }
  317|       |
  318|  8.96k|  if (handle != nullptr) {
  ------------------
  |  Branch (318:7): [True: 0, False: 8.96k]
  ------------------
  319|      0|    cache_.Release(handle);
  320|      0|  }
  321|  8.96k|  if (!s.ok()) {
  ------------------
  |  Branch (321:7): [True: 0, False: 8.96k]
  ------------------
  322|      0|    assert(result == nullptr);
  323|      0|    result = NewErrorInternalIterator<Slice>(s, arena);
  324|      0|  }
  325|  8.96k|  return result;
  326|  8.96k|}
_ZN7rocksdb10TableCache18GetTablePropertiesERKNS_11FileOptionsERKNS_11ReadOptionsERKNS_21InternalKeyComparatorERKNS_12FileMetaDataEPNSt3__110shared_ptrIKNS_15TablePropertiesEEEhRKNSE_IKNS_14SliceTransformEEEb:
  603|  4.48k|    const std::shared_ptr<const SliceTransform>& prefix_extractor, bool no_io) {
  604|  4.48k|  auto table_reader = file_meta.fd.table_reader;
  605|       |  // table already been pre-loaded?
  606|  4.48k|  if (table_reader) {
  ------------------
  |  Branch (606:7): [True: 4.48k, False: 0]
  ------------------
  607|  4.48k|    *properties = table_reader->GetTableProperties();
  608|       |
  609|  4.48k|    return Status::OK();
  610|  4.48k|  }
  611|       |
  612|      0|  TypedHandle* table_handle = nullptr;
  613|      0|  Status s = FindTable(read_options, file_options, internal_comparator,
  614|      0|                       file_meta, &table_handle, block_protection_bytes_per_key,
  615|      0|                       prefix_extractor, no_io);
  616|      0|  if (!s.ok()) {
  ------------------
  |  Branch (616:7): [True: 0, False: 0]
  ------------------
  617|      0|    return s;
  618|      0|  }
  619|      0|  assert(table_handle);
  620|      0|  auto table = cache_.Value(table_handle);
  621|      0|  *properties = table->GetTableProperties();
  622|      0|  cache_.Release(table_handle);
  623|      0|  return s;
  624|      0|}
_ZN7rocksdb10TableCache15ReleaseObsoleteEPNS_5CacheEPNS1_6HandleEj:
  737|  4.48k|                                 uint32_t uncache_aggressiveness) {
  738|  4.48k|  CacheInterface typed_cache(cache);
  739|  4.48k|  TypedHandle* table_handle = reinterpret_cast<TypedHandle*>(h);
  740|  4.48k|  TableReader* table_reader = typed_cache.Value(table_handle);
  741|  4.48k|  table_reader->MarkObsolete(uncache_aggressiveness);
  742|  4.48k|  typed_cache.ReleaseAndEraseIfLastRef(table_handle);
  743|  4.48k|}
table_cache.cc:_ZN7rocksdb12_GLOBAL__N_121GetSliceForFileNumberEPKm:
   51|  8.96k|static Slice GetSliceForFileNumber(const uint64_t* file_number) {
   52|  8.96k|  return Slice(reinterpret_cast<const char*>(file_number),
   53|  8.96k|               sizeof(*file_number));
   54|  8.96k|}

_ZN7rocksdb10TableCache9get_cacheEv:
  237|  22.5k|  CacheInterface& get_cache() { return cache_; }

_ZN7rocksdb19InternalTblPropCollD2Ev:
   22|  4.48k|  virtual ~InternalTblPropColl() {}
_ZNK7rocksdb19InternalTblPropColl11NeedCompactEv:
   38|  4.48k|  virtual bool NeedCompact() const { return false; }

_ZN7rocksdb20TrimHistoryScheduler20TakeNextColumnFamilyEv:
   21|  13.5k|ColumnFamilyData* TrimHistoryScheduler::TakeNextColumnFamily() {
   22|  13.5k|  std::lock_guard<std::mutex> lock(checking_mutex_);
   23|  13.5k|  while (true) {
  ------------------
  |  Branch (23:10): [Folded - Ignored]
  ------------------
   24|  13.5k|    if (cfds_.empty()) {
  ------------------
  |  Branch (24:9): [True: 13.5k, False: 0]
  ------------------
   25|  13.5k|      return nullptr;
   26|  13.5k|    }
   27|      0|    ColumnFamilyData* cfd = cfds_.back();
   28|      0|    cfds_.pop_back();
   29|      0|    if (cfds_.empty()) {
  ------------------
  |  Branch (29:9): [True: 0, False: 0]
  ------------------
   30|      0|      is_empty_.store(true, std::memory_order_relaxed);
   31|      0|    }
   32|       |
   33|      0|    if (!cfd->IsDropped()) {
  ------------------
  |  Branch (33:9): [True: 0, False: 0]
  ------------------
   34|       |      // success
   35|      0|      return cfd;
   36|      0|    }
   37|      0|    cfd->UnrefAndTryDelete();
   38|      0|  }
   39|  13.5k|}
_ZN7rocksdb20TrimHistoryScheduler5EmptyEv:
   41|  1.36M|bool TrimHistoryScheduler::Empty() {
   42|  1.36M|  bool is_empty = is_empty_.load(std::memory_order_relaxed);
   43|  1.36M|  return is_empty;
   44|  1.36M|}
_ZN7rocksdb20TrimHistoryScheduler5ClearEv:
   46|  13.5k|void TrimHistoryScheduler::Clear() {
   47|  13.5k|  ColumnFamilyData* cfd;
   48|  13.5k|  while ((cfd = TakeNextColumnFamily()) != nullptr) {
  ------------------
  |  Branch (48:10): [True: 0, False: 13.5k]
  ------------------
   49|      0|    cfd->UnrefAndTryDelete();
   50|      0|  }
   51|  13.5k|  assert(Empty());
   52|  13.5k|}

_ZN7rocksdb20TrimHistorySchedulerC2Ev:
   26|  9.02k|  TrimHistoryScheduler() : is_empty_(true) {}

_ZN7rocksdb14VersionBuilderC2ERKNS_11FileOptionsEPKNS_18ImmutableCFOptionsEPNS_10TableCacheEPNS_18VersionStorageInfoEPNS_10VersionSetENSt3__110shared_ptrINS_23CacheReservationManagerEEE:
 1374|  18.0k|                   version_set, file_metadata_cache_res_mgr)) {}
_ZN7rocksdb14VersionBuilderD2Ev:
 1376|  18.0k|VersionBuilder::~VersionBuilder() = default;
_ZN7rocksdb14VersionBuilder28CheckConsistencyForNumLevelsEv:
 1378|  9.02k|bool VersionBuilder::CheckConsistencyForNumLevels() {
 1379|  9.02k|  return rep_->CheckConsistencyForNumLevels();
 1380|  9.02k|}
_ZN7rocksdb14VersionBuilder5ApplyEPKNS_11VersionEditE:
 1382|  40.6k|Status VersionBuilder::Apply(const VersionEdit* edit) {
 1383|  40.6k|  return rep_->Apply(edit);
 1384|  40.6k|}
_ZNK7rocksdb14VersionBuilder6SaveToEPNS_18VersionStorageInfoE:
 1386|  18.0k|Status VersionBuilder::SaveTo(VersionStorageInfo* vstorage) const {
 1387|  18.0k|  return rep_->SaveTo(vstorage);
 1388|  18.0k|}
_ZN7rocksdb14VersionBuilder17LoadTableHandlersEPNS_13InternalStatsEibbRKNSt3__110shared_ptrIKNS_14SliceTransformEEEmRKNS_11ReadOptionsEh:
 1395|  18.0k|    uint8_t block_protection_bytes_per_key) {
 1396|  18.0k|  return rep_->LoadTableHandlers(
 1397|  18.0k|      internal_stats, max_threads, prefetch_index_and_filter_in_cache,
 1398|  18.0k|      is_initial_load, prefix_extractor, max_file_size_for_l0_meta_pin,
 1399|  18.0k|      read_options, block_protection_bytes_per_key);
 1400|  18.0k|}
_ZN7rocksdb28BaseReferencedVersionBuilderC2EPNS_16ColumnFamilyDataE:
 1413|  18.0k|      version_(cfd->current()) {
 1414|  18.0k|  version_->Ref();
 1415|  18.0k|}
_ZN7rocksdb28BaseReferencedVersionBuilderD2Ev:
 1427|  18.0k|BaseReferencedVersionBuilder::~BaseReferencedVersionBuilder() {
 1428|  18.0k|  version_->Unref();
 1429|  18.0k|}
_ZN7rocksdb14VersionBuilder3RepC2ERKNS_11FileOptionsEPKNS_18ImmutableCFOptionsEPNS_10TableCacheEPNS_18VersionStorageInfoEPNS_10VersionSetENSt3__110shared_ptrINS_23CacheReservationManagerEEE:
  275|  18.0k|        file_metadata_cache_res_mgr_(file_metadata_cache_res_mgr) {
  276|  18.0k|    assert(ioptions_);
  277|       |
  278|  18.0k|    levels_ = new LevelState[num_levels_];
  279|  18.0k|  }
_ZN7rocksdb14VersionBuilder3Rep13BySmallestKeyC2EPKNS_21InternalKeyComparatorE:
   58|  18.0k|    explicit BySmallestKey(const InternalKeyComparator* cmp) : cmp_(cmp) {}
_ZNK7rocksdb14VersionBuilder3Rep28CheckConsistencyForNumLevelsEv:
  552|  9.02k|  bool CheckConsistencyForNumLevels() const {
  553|       |    // Make sure there are no files on or beyond num_levels().
  554|  9.02k|    if (has_invalid_levels_) {
  ------------------
  |  Branch (554:9): [True: 0, False: 9.02k]
  ------------------
  555|      0|      return false;
  556|      0|    }
  557|       |
  558|  9.02k|    for (const auto& pair : invalid_level_sizes_) {
  ------------------
  |  Branch (558:27): [True: 0, False: 9.02k]
  ------------------
  559|      0|      const size_t level_size = pair.second;
  560|      0|      if (level_size != 0) {
  ------------------
  |  Branch (560:11): [True: 0, False: 0]
  ------------------
  561|      0|        return false;
  562|      0|      }
  563|      0|    }
  564|       |
  565|  9.02k|    return true;
  566|  9.02k|  }
_ZN7rocksdb14VersionBuilder3Rep5ApplyEPKNS_11VersionEditE:
  847|  40.6k|  Status Apply(const VersionEdit* edit) {
  848|  40.6k|    {
  849|  40.6k|      const Status s = CheckConsistency(base_vstorage_);
  850|  40.6k|      if (!s.ok()) {
  ------------------
  |  Branch (850:11): [True: 0, False: 40.6k]
  ------------------
  851|      0|        return s;
  852|      0|      }
  853|  40.6k|    }
  854|       |
  855|       |    // Note: we process the blob file related changes first because the
  856|       |    // table file addition/deletion logic depends on the blob files
  857|       |    // already being there.
  858|       |
  859|       |    // Add new blob files
  860|  40.6k|    for (const auto& blob_file_addition : edit->GetBlobFileAdditions()) {
  ------------------
  |  Branch (860:41): [True: 0, False: 40.6k]
  ------------------
  861|      0|      const Status s = ApplyBlobFileAddition(blob_file_addition);
  862|      0|      if (!s.ok()) {
  ------------------
  |  Branch (862:11): [True: 0, False: 0]
  ------------------
  863|      0|        return s;
  864|      0|      }
  865|      0|    }
  866|       |
  867|       |    // Increase the amount of garbage for blob files affected by GC
  868|  40.6k|    for (const auto& blob_file_garbage : edit->GetBlobFileGarbages()) {
  ------------------
  |  Branch (868:40): [True: 0, False: 40.6k]
  ------------------
  869|      0|      const Status s = ApplyBlobFileGarbage(blob_file_garbage);
  870|      0|      if (!s.ok()) {
  ------------------
  |  Branch (870:11): [True: 0, False: 0]
  ------------------
  871|      0|        return s;
  872|      0|      }
  873|      0|    }
  874|       |
  875|       |    // Delete table files
  876|  40.6k|    for (const auto& deleted_file : edit->GetDeletedFiles()) {
  ------------------
  |  Branch (876:35): [True: 0, False: 40.6k]
  ------------------
  877|      0|      const int level = deleted_file.first;
  878|      0|      const uint64_t file_number = deleted_file.second;
  879|       |
  880|      0|      const Status s = ApplyFileDeletion(level, file_number);
  881|      0|      if (!s.ok()) {
  ------------------
  |  Branch (881:11): [True: 0, False: 0]
  ------------------
  882|      0|        return s;
  883|      0|      }
  884|      0|    }
  885|       |
  886|       |    // Add new table files
  887|  40.6k|    for (const auto& new_file : edit->GetNewFiles()) {
  ------------------
  |  Branch (887:31): [True: 4.48k, False: 40.6k]
  ------------------
  888|  4.48k|      const int level = new_file.first;
  889|  4.48k|      const FileMetaData& meta = new_file.second;
  890|       |
  891|  4.48k|      const Status s = ApplyFileAddition(level, meta);
  892|  4.48k|      if (!s.ok()) {
  ------------------
  |  Branch (892:11): [True: 0, False: 4.48k]
  ------------------
  893|      0|        return s;
  894|      0|      }
  895|  4.48k|    }
  896|       |
  897|       |    // Populate compact cursors for round-robin compaction, leave
  898|       |    // the cursor to be empty to indicate it is invalid
  899|  40.6k|    for (const auto& cursor : edit->GetCompactCursors()) {
  ------------------
  |  Branch (899:29): [True: 0, False: 40.6k]
  ------------------
  900|      0|      const int level = cursor.first;
  901|      0|      const InternalKey smallest_uncompacted_key = cursor.second;
  902|      0|      const Status s = ApplyCompactCursors(level, smallest_uncompacted_key);
  903|      0|      if (!s.ok()) {
  ------------------
  |  Branch (903:11): [True: 0, False: 0]
  ------------------
  904|      0|        return s;
  905|      0|      }
  906|      0|    }
  907|  40.6k|    return Status::OK();
  908|  40.6k|  }
_ZNK7rocksdb14VersionBuilder3Rep16CheckConsistencyEPKNS_18VersionStorageInfoE:
  526|  76.7k|  Status CheckConsistency(const VersionStorageInfo* vstorage) const {
  527|  76.7k|    assert(vstorage);
  528|       |
  529|       |    // Always run consistency checks in debug build
  530|  76.7k|#ifdef NDEBUG
  531|  76.7k|    if (!vstorage->force_consistency_checks()) {
  ------------------
  |  Branch (531:9): [True: 0, False: 76.7k]
  ------------------
  532|      0|      return Status::OK();
  533|      0|    }
  534|  76.7k|#endif
  535|  76.7k|    Status s = CheckConsistencyDetails(vstorage);
  536|  76.7k|    if (s.IsCorruption() && s.getState()) {
  ------------------
  |  Branch (536:9): [True: 0, False: 76.7k]
  |  Branch (536:29): [True: 0, False: 0]
  ------------------
  537|       |      // Make it clear the error is due to force_consistency_checks = 1 or
  538|       |      // debug build
  539|      0|#ifdef NDEBUG
  540|      0|      auto prefix = "force_consistency_checks";
  541|       |#else
  542|       |      auto prefix = "force_consistency_checks(DEBUG)";
  543|       |#endif
  544|      0|      s = Status::Corruption(prefix, s.getState());
  545|  76.7k|    } else {
  546|       |      // was only expecting corruption with message, or OK
  547|  76.7k|      assert(s.ok());
  548|  76.7k|    }
  549|  76.7k|    return s;
  550|  76.7k|  }
_ZNK7rocksdb14VersionBuilder3Rep23CheckConsistencyDetailsEPKNS_18VersionStorageInfoE:
  380|  76.7k|  Status CheckConsistencyDetails(const VersionStorageInfo* vstorage) const {
  381|  76.7k|    assert(vstorage);
  382|       |
  383|  76.7k|    ExpectedLinkedSsts expected_linked_ssts;
  384|       |
  385|  76.7k|    if (num_levels_ > 0) {
  ------------------
  |  Branch (385:9): [True: 76.7k, False: 0]
  ------------------
  386|  76.7k|      const InternalKeyComparator* const icmp = vstorage->InternalComparator();
  387|  76.7k|      EpochNumberRequirement epoch_number_requirement =
  388|  76.7k|          vstorage->GetEpochNumberRequirement();
  389|  76.7k|      assert(icmp);
  390|       |      // Check L0
  391|  76.7k|      {
  392|  76.7k|        auto l0_checker = [this, epoch_number_requirement, icmp](
  393|  76.7k|                              const FileMetaData* lhs,
  394|  76.7k|                              const FileMetaData* rhs) {
  395|  76.7k|          assert(lhs);
  396|  76.7k|          assert(rhs);
  397|       |
  398|  76.7k|          if (epoch_number_requirement ==
  399|  76.7k|              EpochNumberRequirement::kMightMissing) {
  400|  76.7k|            if (!level_zero_cmp_by_seqno_(lhs, rhs)) {
  401|  76.7k|              std::ostringstream oss;
  402|  76.7k|              oss << "L0 files are not sorted properly: files #"
  403|  76.7k|                  << lhs->fd.GetNumber() << " with seqnos (largest, smallest) "
  404|  76.7k|                  << lhs->fd.largest_seqno << " , " << lhs->fd.smallest_seqno
  405|  76.7k|                  << ", #" << rhs->fd.GetNumber()
  406|  76.7k|                  << " with seqnos (largest, smallest) "
  407|  76.7k|                  << rhs->fd.largest_seqno << " , " << rhs->fd.smallest_seqno;
  408|  76.7k|              return Status::Corruption("VersionBuilder", oss.str());
  409|  76.7k|            }
  410|  76.7k|          } else if (epoch_number_requirement ==
  411|  76.7k|                     EpochNumberRequirement::kMustPresent) {
  412|  76.7k|            if (lhs->epoch_number == rhs->epoch_number) {
  413|  76.7k|              bool range_overlapped =
  414|  76.7k|                  icmp->Compare(lhs->smallest, rhs->largest) <= 0 &&
  415|  76.7k|                  icmp->Compare(lhs->largest, rhs->smallest) >= 0;
  416|       |
  417|  76.7k|              if (range_overlapped) {
  418|  76.7k|                std::ostringstream oss;
  419|  76.7k|                oss << "L0 files of same epoch number but overlapping range #"
  420|  76.7k|                    << lhs->fd.GetNumber()
  421|  76.7k|                    << " , smallest key: " << lhs->smallest.DebugString(true)
  422|  76.7k|                    << " , largest key: " << lhs->largest.DebugString(true)
  423|  76.7k|                    << " , epoch number: " << lhs->epoch_number << " vs. file #"
  424|  76.7k|                    << rhs->fd.GetNumber()
  425|  76.7k|                    << " , smallest key: " << rhs->smallest.DebugString(true)
  426|  76.7k|                    << " , largest key: " << rhs->largest.DebugString(true)
  427|  76.7k|                    << " , epoch number: " << rhs->epoch_number;
  428|  76.7k|                return Status::Corruption("VersionBuilder", oss.str());
  429|  76.7k|              }
  430|  76.7k|            }
  431|       |
  432|  76.7k|            if (!level_zero_cmp_by_epochno_(lhs, rhs)) {
  433|  76.7k|              std::ostringstream oss;
  434|  76.7k|              oss << "L0 files are not sorted properly: files #"
  435|  76.7k|                  << lhs->fd.GetNumber() << " with epoch number "
  436|  76.7k|                  << lhs->epoch_number << ", #" << rhs->fd.GetNumber()
  437|  76.7k|                  << " with epoch number " << rhs->epoch_number;
  438|  76.7k|              return Status::Corruption("VersionBuilder", oss.str());
  439|  76.7k|            }
  440|  76.7k|          }
  441|       |
  442|  76.7k|          return Status::OK();
  443|  76.7k|        };
  444|       |
  445|  76.7k|        const Status s = CheckConsistencyDetailsForLevel(
  446|  76.7k|            vstorage, /* level */ 0, l0_checker,
  447|  76.7k|            "VersionBuilder::CheckConsistency0", &expected_linked_ssts);
  448|  76.7k|        if (!s.ok()) {
  ------------------
  |  Branch (448:13): [True: 0, False: 76.7k]
  ------------------
  449|      0|          return s;
  450|      0|        }
  451|  76.7k|      }
  452|       |
  453|       |      // Check L1 and up
  454|       |
  455|   537k|      for (int level = 1; level < num_levels_; ++level) {
  ------------------
  |  Branch (455:27): [True: 460k, False: 76.7k]
  ------------------
  456|   460k|        auto checker = [this, level, icmp](const FileMetaData* lhs,
  457|   460k|                                           const FileMetaData* rhs) {
  458|   460k|          assert(lhs);
  459|   460k|          assert(rhs);
  460|       |
  461|   460k|          if (!level_nonzero_cmp_(lhs, rhs)) {
  462|   460k|            std::ostringstream oss;
  463|   460k|            oss << 'L' << level << " files are not sorted properly: files #"
  464|   460k|                << lhs->fd.GetNumber() << ", #" << rhs->fd.GetNumber();
  465|       |
  466|   460k|            return Status::Corruption("VersionBuilder", oss.str());
  467|   460k|          }
  468|       |
  469|       |          // Make sure there is no overlap in level
  470|   460k|          if (icmp->Compare(lhs->largest, rhs->smallest) >= 0) {
  471|   460k|            std::ostringstream oss;
  472|   460k|            oss << 'L' << level << " has overlapping ranges: file #"
  473|   460k|                << lhs->fd.GetNumber()
  474|   460k|                << " largest key: " << lhs->largest.DebugString(true)
  475|   460k|                << " vs. file #" << rhs->fd.GetNumber()
  476|   460k|                << " smallest key: " << rhs->smallest.DebugString(true);
  477|       |
  478|   460k|            return Status::Corruption("VersionBuilder", oss.str());
  479|   460k|          }
  480|       |
  481|   460k|          return Status::OK();
  482|   460k|        };
  483|       |
  484|   460k|        const Status s = CheckConsistencyDetailsForLevel(
  485|   460k|            vstorage, level, checker, "VersionBuilder::CheckConsistency1",
  486|   460k|            &expected_linked_ssts);
  487|   460k|        if (!s.ok()) {
  ------------------
  |  Branch (487:13): [True: 0, False: 460k]
  ------------------
  488|      0|          return s;
  489|      0|        }
  490|   460k|      }
  491|  76.7k|    }
  492|       |
  493|       |    // Make sure that all blob files in the version have non-garbage data and
  494|       |    // the links between them and the table files are consistent.
  495|  76.7k|    const auto& blob_files = vstorage->GetBlobFiles();
  496|  76.7k|    for (const auto& blob_file_meta : blob_files) {
  ------------------
  |  Branch (496:37): [True: 0, False: 76.7k]
  ------------------
  497|      0|      assert(blob_file_meta);
  498|       |
  499|      0|      const uint64_t blob_file_number = blob_file_meta->GetBlobFileNumber();
  500|       |
  501|      0|      if (blob_file_meta->GetGarbageBlobCount() >=
  ------------------
  |  Branch (501:11): [True: 0, False: 0]
  ------------------
  502|      0|          blob_file_meta->GetTotalBlobCount()) {
  503|      0|        std::ostringstream oss;
  504|      0|        oss << "Blob file #" << blob_file_number
  505|      0|            << " consists entirely of garbage";
  506|       |
  507|      0|        return Status::Corruption("VersionBuilder", oss.str());
  508|      0|      }
  509|       |
  510|      0|      if (blob_file_meta->GetLinkedSsts() !=
  ------------------
  |  Branch (510:11): [True: 0, False: 0]
  ------------------
  511|      0|          expected_linked_ssts[blob_file_number]) {
  512|      0|        std::ostringstream oss;
  513|      0|        oss << "Links are inconsistent between table files and blob file #"
  514|      0|            << blob_file_number;
  515|       |
  516|      0|        return Status::Corruption("VersionBuilder", oss.str());
  517|      0|      }
  518|      0|    }
  519|       |
  520|  76.7k|    Status ret_s;
  521|  76.7k|    TEST_SYNC_POINT_CALLBACK("VersionBuilder::CheckConsistencyBeforeReturn",
  522|  76.7k|                             &ret_s);
  523|  76.7k|    return ret_s;
  524|  76.7k|  }
_ZNK7rocksdb14VersionBuilder3Rep31CheckConsistencyDetailsForLevelIZNKS1_23CheckConsistencyDetailsEPKNS_18VersionStorageInfoEEUlPKNS_12FileMetaDataES8_E_EENS_6StatusES5_iT_RKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEEPNSC_13unordered_mapImNSC_13unordered_setImNSC_4hashImEENSC_8equal_toImEENSG_ImEEEESO_SQ_NSG_INSC_4pairIKmSS_EEEEEE:
  335|  76.7k|      ExpectedLinkedSsts* expected_linked_ssts) const {
  336|  76.7k|#ifdef NDEBUG
  337|  76.7k|    (void)sync_point;
  338|  76.7k|#endif
  339|       |
  340|  76.7k|    assert(vstorage);
  341|  76.7k|    assert(level >= 0 && level < num_levels_);
  342|  76.7k|    assert(expected_linked_ssts);
  343|       |
  344|  76.7k|    const auto& level_files = vstorage->LevelFiles(level);
  345|       |
  346|  76.7k|    if (level_files.empty()) {
  ------------------
  |  Branch (346:9): [True: 72.2k, False: 4.48k]
  ------------------
  347|  72.2k|      return Status::OK();
  348|  72.2k|    }
  349|       |
  350|  4.48k|    assert(level_files[0]);
  351|  4.48k|    UpdateExpectedLinkedSsts(level_files[0]->fd.GetNumber(),
  352|  4.48k|                             level_files[0]->oldest_blob_file_number,
  353|  4.48k|                             expected_linked_ssts);
  354|       |
  355|  4.48k|    for (size_t i = 1; i < level_files.size(); ++i) {
  ------------------
  |  Branch (355:24): [True: 0, False: 4.48k]
  ------------------
  356|      0|      assert(level_files[i]);
  357|      0|      UpdateExpectedLinkedSsts(level_files[i]->fd.GetNumber(),
  358|      0|                               level_files[i]->oldest_blob_file_number,
  359|      0|                               expected_linked_ssts);
  360|       |
  361|      0|      auto lhs = level_files[i - 1];
  362|      0|      auto rhs = level_files[i];
  363|       |
  364|       |#ifndef NDEBUG
  365|       |      auto pair = std::make_pair(&lhs, &rhs);
  366|       |      TEST_SYNC_POINT_CALLBACK(sync_point, &pair);
  367|       |#endif
  368|       |
  369|      0|      const Status s = checker(lhs, rhs);
  370|      0|      if (!s.ok()) {
  ------------------
  |  Branch (370:11): [True: 0, False: 0]
  ------------------
  371|      0|        return s;
  372|      0|      }
  373|      0|    }
  374|       |
  375|  4.48k|    return Status::OK();
  376|  4.48k|  }
_ZN7rocksdb14VersionBuilder3Rep24UpdateExpectedLinkedSstsEmmPNSt3__113unordered_mapImNS2_13unordered_setImNS2_4hashImEENS2_8equal_toImEENS2_9allocatorImEEEES6_S8_NS9_INS2_4pairIKmSB_EEEEEE:
  321|  4.48k|      ExpectedLinkedSsts* expected_linked_ssts) {
  322|  4.48k|    assert(expected_linked_ssts);
  323|       |
  324|  4.48k|    if (blob_file_number == kInvalidBlobFileNumber) {
  ------------------
  |  Branch (324:9): [True: 4.48k, False: 0]
  ------------------
  325|  4.48k|      return;
  326|  4.48k|    }
  327|       |
  328|      0|    (*expected_linked_ssts)[blob_file_number].emplace(table_file_number);
  329|      0|  }
_ZNK7rocksdb14VersionBuilder3Rep31CheckConsistencyDetailsForLevelIZNKS1_23CheckConsistencyDetailsEPKNS_18VersionStorageInfoEEUlPKNS_12FileMetaDataES8_E0_EENS_6StatusES5_iT_RKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEEPNSC_13unordered_mapImNSC_13unordered_setImNSC_4hashImEENSC_8equal_toImEENSG_ImEEEESO_SQ_NSG_INSC_4pairIKmSS_EEEEEE:
  335|   460k|      ExpectedLinkedSsts* expected_linked_ssts) const {
  336|   460k|#ifdef NDEBUG
  337|   460k|    (void)sync_point;
  338|   460k|#endif
  339|       |
  340|   460k|    assert(vstorage);
  341|   460k|    assert(level >= 0 && level < num_levels_);
  342|   460k|    assert(expected_linked_ssts);
  343|       |
  344|   460k|    const auto& level_files = vstorage->LevelFiles(level);
  345|       |
  346|   460k|    if (level_files.empty()) {
  ------------------
  |  Branch (346:9): [True: 460k, False: 0]
  ------------------
  347|   460k|      return Status::OK();
  348|   460k|    }
  349|       |
  350|      0|    assert(level_files[0]);
  351|      0|    UpdateExpectedLinkedSsts(level_files[0]->fd.GetNumber(),
  352|      0|                             level_files[0]->oldest_blob_file_number,
  353|      0|                             expected_linked_ssts);
  354|       |
  355|      0|    for (size_t i = 1; i < level_files.size(); ++i) {
  ------------------
  |  Branch (355:24): [True: 0, False: 0]
  ------------------
  356|      0|      assert(level_files[i]);
  357|      0|      UpdateExpectedLinkedSsts(level_files[i]->fd.GetNumber(),
  358|      0|                               level_files[i]->oldest_blob_file_number,
  359|      0|                               expected_linked_ssts);
  360|       |
  361|      0|      auto lhs = level_files[i - 1];
  362|      0|      auto rhs = level_files[i];
  363|       |
  364|       |#ifndef NDEBUG
  365|       |      auto pair = std::make_pair(&lhs, &rhs);
  366|       |      TEST_SYNC_POINT_CALLBACK(sync_point, &pair);
  367|       |#endif
  368|       |
  369|      0|      const Status s = checker(lhs, rhs);
  370|      0|      if (!s.ok()) {
  ------------------
  |  Branch (370:11): [True: 0, False: 0]
  ------------------
  371|      0|        return s;
  372|      0|      }
  373|      0|    }
  374|       |
  375|      0|    return Status::OK();
  376|      0|  }
_ZNK7rocksdb14VersionBuilder3Rep27GetCurrentLevelForTableFileEm:
  663|  4.48k|  int GetCurrentLevelForTableFile(uint64_t file_number) const {
  664|  4.48k|    auto it = table_file_levels_.find(file_number);
  665|  4.48k|    if (it != table_file_levels_.end()) {
  ------------------
  |  Branch (665:9): [True: 0, False: 4.48k]
  ------------------
  666|      0|      return it->second;
  667|      0|    }
  668|       |
  669|  4.48k|    assert(base_vstorage_);
  670|  4.48k|    return base_vstorage_->GetFileLocation(file_number).GetLevel();
  671|  4.48k|  }
_ZN7rocksdb14VersionBuilder3Rep9UnrefFileEPNS_12FileMetaDataE:
  292|  4.48k|  void UnrefFile(FileMetaData* f) {
  293|  4.48k|    f->refs--;
  294|  4.48k|    if (f->refs <= 0) {
  ------------------
  |  Branch (294:9): [True: 0, False: 4.48k]
  ------------------
  295|      0|      if (f->table_reader_handle) {
  ------------------
  |  Branch (295:11): [True: 0, False: 0]
  ------------------
  296|      0|        assert(table_cache_ != nullptr);
  297|       |        // NOTE: have to release in raw cache interface to avoid using a
  298|       |        // TypedHandle for FileMetaData::table_reader_handle
  299|      0|        table_cache_->get_cache().get()->Release(f->table_reader_handle);
  300|      0|        f->table_reader_handle = nullptr;
  301|      0|      }
  302|       |
  303|      0|      if (file_metadata_cache_res_mgr_) {
  ------------------
  |  Branch (303:11): [True: 0, False: 0]
  ------------------
  304|      0|        Status s = file_metadata_cache_res_mgr_->UpdateCacheReservation(
  305|      0|            f->ApproximateMemoryUsage(), false /* increase */);
  306|      0|        s.PermitUncheckedError();
  307|      0|      }
  308|      0|      delete f;
  309|      0|    }
  310|  4.48k|  }
_ZN7rocksdb14VersionBuilder3Rep17ApplyFileAdditionEiRKNS_12FileMetaDataE:
  758|  4.48k|  Status ApplyFileAddition(int level, const FileMetaData& meta) {
  759|  4.48k|    assert(level != VersionStorageInfo::FileLocation::Invalid().GetLevel());
  760|       |
  761|  4.48k|    const uint64_t file_number = meta.fd.GetNumber();
  762|       |
  763|  4.48k|    const int current_level = GetCurrentLevelForTableFile(file_number);
  764|       |
  765|  4.48k|    if (current_level !=
  ------------------
  |  Branch (765:9): [True: 0, False: 4.48k]
  ------------------
  766|  4.48k|        VersionStorageInfo::FileLocation::Invalid().GetLevel()) {
  767|      0|      if (level >= num_levels_) {
  ------------------
  |  Branch (767:11): [True: 0, False: 0]
  ------------------
  768|      0|        has_invalid_levels_ = true;
  769|      0|      }
  770|       |
  771|      0|      std::ostringstream oss;
  772|      0|      oss << "Cannot add table file #" << file_number << " to level " << level
  773|      0|          << " since it is already in the LSM tree on level " << current_level;
  774|      0|      return Status::Corruption("VersionBuilder", oss.str());
  775|      0|    }
  776|       |
  777|  4.48k|    if (level >= num_levels_) {
  ------------------
  |  Branch (777:9): [True: 0, False: 4.48k]
  ------------------
  778|      0|      ++invalid_level_sizes_[level];
  779|      0|      table_file_levels_[file_number] = level;
  780|       |
  781|      0|      return Status::OK();
  782|      0|    }
  783|       |
  784|  4.48k|    auto& level_state = levels_[level];
  785|       |
  786|  4.48k|    auto& del_files = level_state.deleted_files;
  787|  4.48k|    auto del_it = del_files.find(file_number);
  788|  4.48k|    if (del_it != del_files.end()) {
  ------------------
  |  Branch (788:9): [True: 0, False: 4.48k]
  ------------------
  789|      0|      del_files.erase(del_it);
  790|      0|    }
  791|       |
  792|  4.48k|    FileMetaData* const f = new FileMetaData(meta);
  793|  4.48k|    f->refs = 1;
  794|       |
  795|  4.48k|    if (file_metadata_cache_res_mgr_) {
  ------------------
  |  Branch (795:9): [True: 0, False: 4.48k]
  ------------------
  796|      0|      Status s = file_metadata_cache_res_mgr_->UpdateCacheReservation(
  797|      0|          f->ApproximateMemoryUsage(), true /* increase */);
  798|      0|      if (!s.ok()) {
  ------------------
  |  Branch (798:11): [True: 0, False: 0]
  ------------------
  799|      0|        delete f;
  800|      0|        s = Status::MemoryLimit(
  801|      0|            "Can't allocate " +
  802|      0|            kCacheEntryRoleToCamelString[static_cast<std::uint32_t>(
  803|      0|                CacheEntryRole::kFileMetadata)] +
  804|      0|            " due to exceeding the memory limit "
  805|      0|            "based on "
  806|      0|            "cache capacity");
  807|      0|        return s;
  808|      0|      }
  809|      0|    }
  810|       |
  811|  4.48k|    auto& add_files = level_state.added_files;
  812|  4.48k|    assert(add_files.find(file_number) == add_files.end());
  813|  4.48k|    add_files.emplace(file_number, f);
  814|       |
  815|  4.48k|    const uint64_t blob_file_number = f->oldest_blob_file_number;
  816|       |
  817|  4.48k|    if (blob_file_number != kInvalidBlobFileNumber) {
  ------------------
  |  Branch (817:9): [True: 0, False: 4.48k]
  ------------------
  818|      0|      MutableBlobFileMetaData* const mutable_meta =
  819|      0|          GetOrCreateMutableBlobFileMetaData(blob_file_number);
  820|      0|      if (mutable_meta) {
  ------------------
  |  Branch (820:11): [True: 0, False: 0]
  ------------------
  821|      0|        mutable_meta->LinkSst(file_number);
  822|      0|      }
  823|      0|    }
  824|       |
  825|  4.48k|    table_file_levels_[file_number] = level;
  826|       |
  827|  4.48k|    return Status::OK();
  828|  4.48k|  }
_ZNK7rocksdb14VersionBuilder3Rep6SaveToEPNS_18VersionStorageInfoE:
 1236|  18.0k|  Status SaveTo(VersionStorageInfo* vstorage) const {
 1237|  18.0k|    Status s;
 1238|       |
 1239|       |#ifndef NDEBUG
 1240|       |    // The same check is done within Apply() so we skip it in release mode.
 1241|       |    s = CheckConsistency(base_vstorage_);
 1242|       |    if (!s.ok()) {
 1243|       |      return s;
 1244|       |    }
 1245|       |#endif  // NDEBUG
 1246|       |
 1247|  18.0k|    s = CheckConsistency(vstorage);
 1248|  18.0k|    if (!s.ok()) {
  ------------------
  |  Branch (1248:9): [True: 0, False: 18.0k]
  ------------------
 1249|      0|      return s;
 1250|      0|    }
 1251|       |
 1252|  18.0k|    SaveSSTFilesTo(vstorage);
 1253|       |
 1254|  18.0k|    SaveBlobFilesTo(vstorage);
 1255|       |
 1256|  18.0k|    SaveCompactCursorsTo(vstorage);
 1257|       |
 1258|  18.0k|    s = CheckConsistency(vstorage);
 1259|  18.0k|    return s;
 1260|  18.0k|  }
_ZNK7rocksdb14VersionBuilder3Rep14SaveSSTFilesToEPNS_18VersionStorageInfoE:
 1200|  18.0k|  void SaveSSTFilesTo(VersionStorageInfo* vstorage) const {
 1201|  18.0k|    assert(vstorage);
 1202|       |
 1203|  18.0k|    if (!num_levels_) {
  ------------------
  |  Branch (1203:9): [True: 0, False: 18.0k]
  ------------------
 1204|      0|      return;
 1205|      0|    }
 1206|       |
 1207|  18.0k|    EpochNumberRequirement epoch_number_requirement =
 1208|  18.0k|        vstorage->GetEpochNumberRequirement();
 1209|       |
 1210|  18.0k|    if (epoch_number_requirement == EpochNumberRequirement::kMightMissing) {
  ------------------
  |  Branch (1210:9): [True: 9.02k, False: 9.02k]
  ------------------
 1211|  9.02k|      bool promoted = PromoteEpochNumberRequirementIfNeeded(vstorage);
 1212|  9.02k|      if (promoted) {
  ------------------
  |  Branch (1212:11): [True: 9.02k, False: 0]
  ------------------
 1213|  9.02k|        epoch_number_requirement = vstorage->GetEpochNumberRequirement();
 1214|  9.02k|      }
 1215|  9.02k|    }
 1216|       |
 1217|  18.0k|    if (epoch_number_requirement == EpochNumberRequirement::kMightMissing) {
  ------------------
  |  Branch (1217:9): [True: 0, False: 18.0k]
  ------------------
 1218|      0|      SaveSSTFilesTo(vstorage, /* level */ 0, level_zero_cmp_by_seqno_);
 1219|  18.0k|    } else {
 1220|  18.0k|      SaveSSTFilesTo(vstorage, /* level */ 0, level_zero_cmp_by_epochno_);
 1221|  18.0k|    }
 1222|       |
 1223|   126k|    for (int level = 1; level < num_levels_; ++level) {
  ------------------
  |  Branch (1223:25): [True: 108k, False: 18.0k]
  ------------------
 1224|   108k|      SaveSSTFilesTo(vstorage, level, level_nonzero_cmp_);
 1225|   108k|    }
 1226|  18.0k|  }
_ZNK7rocksdb14VersionBuilder3Rep37PromoteEpochNumberRequirementIfNeededEPNS_18VersionStorageInfoE:
 1182|  9.02k|      VersionStorageInfo* vstorage) const {
 1183|  9.02k|    if (vstorage->HasMissingEpochNumber()) {
  ------------------
  |  Branch (1183:9): [True: 0, False: 9.02k]
  ------------------
 1184|      0|      return false;
 1185|      0|    }
 1186|       |
 1187|  72.2k|    for (int level = 0; level < num_levels_; ++level) {
  ------------------
  |  Branch (1187:25): [True: 63.1k, False: 9.02k]
  ------------------
 1188|  63.1k|      for (const auto& pair : levels_[level].added_files) {
  ------------------
  |  Branch (1188:29): [True: 0, False: 63.1k]
  ------------------
 1189|      0|        const FileMetaData* f = pair.second;
 1190|      0|        if (f->epoch_number == kUnknownEpochNumber) {
  ------------------
  |  Branch (1190:13): [True: 0, False: 0]
  ------------------
 1191|      0|          return false;
 1192|      0|        }
 1193|      0|      }
 1194|  63.1k|    }
 1195|       |
 1196|  9.02k|    vstorage->SetEpochNumberRequirement(EpochNumberRequirement::kMustPresent);
 1197|  9.02k|    return true;
 1198|  9.02k|  }
_ZNK7rocksdb14VersionBuilder3Rep12MaybeAddFileEPNS_18VersionStorageInfoEiPNS_12FileMetaDataE:
 1126|  4.48k|                    FileMetaData* f) const {
 1127|  4.48k|    const uint64_t file_number = f->fd.GetNumber();
 1128|       |
 1129|  4.48k|    const auto& level_state = levels_[level];
 1130|       |
 1131|  4.48k|    const auto& del_files = level_state.deleted_files;
 1132|  4.48k|    const auto del_it = del_files.find(file_number);
 1133|       |
 1134|  4.48k|    if (del_it != del_files.end()) {
  ------------------
  |  Branch (1134:9): [True: 0, False: 4.48k]
  ------------------
 1135|       |      // f is to-be-deleted table file
 1136|      0|      vstorage->RemoveCurrentStats(f);
 1137|  4.48k|    } else {
 1138|  4.48k|      const auto& add_files = level_state.added_files;
 1139|  4.48k|      const auto add_it = add_files.find(file_number);
 1140|       |
 1141|       |      // Note: if the file appears both in the base version and in the added
 1142|       |      // list, the added FileMetaData supersedes the one in the base version.
 1143|  4.48k|      if (add_it != add_files.end() && add_it->second != f) {
  ------------------
  |  Branch (1143:11): [True: 4.48k, False: 0]
  |  Branch (1143:11): [True: 0, False: 4.48k]
  |  Branch (1143:40): [True: 0, False: 4.48k]
  ------------------
 1144|      0|        vstorage->RemoveCurrentStats(f);
 1145|  4.48k|      } else {
 1146|  4.48k|        vstorage->AddFile(level, f);
 1147|  4.48k|      }
 1148|  4.48k|    }
 1149|  4.48k|  }
_ZNK7rocksdb14VersionBuilder3Rep14SaveSSTFilesToINS1_24NewestFirstByEpochNumberEEEvPNS_18VersionStorageInfoEiT_:
 1152|  18.0k|  void SaveSSTFilesTo(VersionStorageInfo* vstorage, int level, Cmp cmp) const {
 1153|       |    // Merge the set of added files with the set of pre-existing files.
 1154|       |    // Drop any deleted files.  Store the result in *vstorage.
 1155|  18.0k|    const auto& base_files = base_vstorage_->LevelFiles(level);
 1156|  18.0k|    const auto& unordered_added_files = levels_[level].added_files;
 1157|  18.0k|    vstorage->Reserve(level, base_files.size() + unordered_added_files.size());
 1158|       |
 1159|       |    // Sort added files for the level.
 1160|  18.0k|    std::vector<FileMetaData*> added_files;
 1161|  18.0k|    added_files.reserve(unordered_added_files.size());
 1162|  18.0k|    for (const auto& pair : unordered_added_files) {
  ------------------
  |  Branch (1162:27): [True: 4.48k, False: 18.0k]
  ------------------
 1163|  4.48k|      added_files.push_back(pair.second);
 1164|  4.48k|    }
 1165|  18.0k|    std::sort(added_files.begin(), added_files.end(), cmp);
 1166|       |
 1167|  18.0k|    auto base_iter = base_files.begin();
 1168|  18.0k|    auto base_end = base_files.end();
 1169|  18.0k|    auto added_iter = added_files.begin();
 1170|  18.0k|    auto added_end = added_files.end();
 1171|  22.5k|    while (added_iter != added_end || base_iter != base_end) {
  ------------------
  |  Branch (1171:12): [True: 4.48k, False: 18.0k]
  |  Branch (1171:39): [True: 0, False: 18.0k]
  ------------------
 1172|  4.48k|      if (base_iter == base_end ||
  ------------------
  |  Branch (1172:11): [True: 4.48k, False: 0]
  ------------------
 1173|  4.48k|          (added_iter != added_end && cmp(*added_iter, *base_iter))) {
  ------------------
  |  Branch (1173:12): [True: 0, False: 0]
  |  Branch (1173:39): [True: 0, False: 0]
  ------------------
 1174|  4.48k|        MaybeAddFile(vstorage, level, *added_iter++);
 1175|  4.48k|      } else {
 1176|      0|        MaybeAddFile(vstorage, level, *base_iter++);
 1177|      0|      }
 1178|  4.48k|    }
 1179|  18.0k|  }
_ZNK7rocksdb14VersionBuilder3Rep14SaveSSTFilesToINS1_13BySmallestKeyEEEvPNS_18VersionStorageInfoEiT_:
 1152|   108k|  void SaveSSTFilesTo(VersionStorageInfo* vstorage, int level, Cmp cmp) const {
 1153|       |    // Merge the set of added files with the set of pre-existing files.
 1154|       |    // Drop any deleted files.  Store the result in *vstorage.
 1155|   108k|    const auto& base_files = base_vstorage_->LevelFiles(level);
 1156|   108k|    const auto& unordered_added_files = levels_[level].added_files;
 1157|   108k|    vstorage->Reserve(level, base_files.size() + unordered_added_files.size());
 1158|       |
 1159|       |    // Sort added files for the level.
 1160|   108k|    std::vector<FileMetaData*> added_files;
 1161|   108k|    added_files.reserve(unordered_added_files.size());
 1162|   108k|    for (const auto& pair : unordered_added_files) {
  ------------------
  |  Branch (1162:27): [True: 0, False: 108k]
  ------------------
 1163|      0|      added_files.push_back(pair.second);
 1164|      0|    }
 1165|   108k|    std::sort(added_files.begin(), added_files.end(), cmp);
 1166|       |
 1167|   108k|    auto base_iter = base_files.begin();
 1168|   108k|    auto base_end = base_files.end();
 1169|   108k|    auto added_iter = added_files.begin();
 1170|   108k|    auto added_end = added_files.end();
 1171|   108k|    while (added_iter != added_end || base_iter != base_end) {
  ------------------
  |  Branch (1171:12): [True: 0, False: 108k]
  |  Branch (1171:39): [True: 0, False: 108k]
  ------------------
 1172|      0|      if (base_iter == base_end ||
  ------------------
  |  Branch (1172:11): [True: 0, False: 0]
  ------------------
 1173|      0|          (added_iter != added_end && cmp(*added_iter, *base_iter))) {
  ------------------
  |  Branch (1173:12): [True: 0, False: 0]
  |  Branch (1173:39): [True: 0, False: 0]
  ------------------
 1174|      0|        MaybeAddFile(vstorage, level, *added_iter++);
 1175|      0|      } else {
 1176|      0|        MaybeAddFile(vstorage, level, *base_iter++);
 1177|      0|      }
 1178|      0|    }
 1179|   108k|  }
_ZNK7rocksdb14VersionBuilder3Rep15SaveBlobFilesToEPNS_18VersionStorageInfoE:
 1066|  18.0k|  void SaveBlobFilesTo(VersionStorageInfo* vstorage) const {
 1067|  18.0k|    assert(vstorage);
 1068|       |
 1069|  18.0k|    assert(base_vstorage_);
 1070|  18.0k|    vstorage->ReserveBlob(base_vstorage_->GetBlobFiles().size() +
 1071|  18.0k|                          mutable_blob_file_metas_.size());
 1072|       |
 1073|  18.0k|    const uint64_t oldest_blob_file_with_linked_ssts =
 1074|  18.0k|        GetMinOldestBlobFileNumber();
 1075|       |
 1076|       |    // If there are no blob files with linked SSTs, meaning that there are no
 1077|       |    // valid blob files
 1078|  18.0k|    if (oldest_blob_file_with_linked_ssts == kInvalidBlobFileNumber) {
  ------------------
  |  Branch (1078:9): [True: 18.0k, False: 0]
  ------------------
 1079|  18.0k|      return;
 1080|  18.0k|    }
 1081|       |
 1082|      0|    auto process_base =
 1083|      0|        [vstorage](const std::shared_ptr<BlobFileMetaData>& base_meta) {
 1084|      0|          assert(base_meta);
 1085|       |
 1086|      0|          AddBlobFileIfNeeded(vstorage, base_meta);
 1087|       |
 1088|      0|          return true;
 1089|      0|        };
 1090|       |
 1091|      0|    auto process_mutable =
 1092|      0|        [vstorage](const MutableBlobFileMetaData& mutable_meta) {
 1093|      0|          AddBlobFileIfNeeded(vstorage, CreateBlobFileMetaData(mutable_meta));
 1094|       |
 1095|      0|          return true;
 1096|      0|        };
 1097|       |
 1098|      0|    auto process_both = [vstorage](
 1099|      0|                            const std::shared_ptr<BlobFileMetaData>& base_meta,
 1100|      0|                            const MutableBlobFileMetaData& mutable_meta) {
 1101|      0|      assert(base_meta);
 1102|      0|      assert(base_meta->GetSharedMeta() == mutable_meta.GetSharedMeta());
 1103|       |
 1104|      0|      if (!mutable_meta.HasDelta()) {
 1105|      0|        assert(base_meta->GetGarbageBlobCount() ==
 1106|      0|               mutable_meta.GetGarbageBlobCount());
 1107|      0|        assert(base_meta->GetGarbageBlobBytes() ==
 1108|      0|               mutable_meta.GetGarbageBlobBytes());
 1109|      0|        assert(base_meta->GetLinkedSsts() == mutable_meta.GetLinkedSsts());
 1110|       |
 1111|      0|        AddBlobFileIfNeeded(vstorage, base_meta);
 1112|       |
 1113|      0|        return true;
 1114|      0|      }
 1115|       |
 1116|      0|      AddBlobFileIfNeeded(vstorage, CreateBlobFileMetaData(mutable_meta));
 1117|       |
 1118|      0|      return true;
 1119|      0|    };
 1120|       |
 1121|      0|    MergeBlobFileMetas(oldest_blob_file_with_linked_ssts, process_base,
 1122|      0|                       process_mutable, process_both);
 1123|      0|  }
_ZNK7rocksdb14VersionBuilder3Rep20SaveCompactCursorsToEPNS_18VersionStorageInfoE:
 1228|  18.0k|  void SaveCompactCursorsTo(VersionStorageInfo* vstorage) const {
 1229|  18.0k|    for (auto iter = updated_compact_cursors_.begin();
 1230|  18.0k|         iter != updated_compact_cursors_.end(); iter++) {
  ------------------
  |  Branch (1230:10): [True: 0, False: 18.0k]
  ------------------
 1231|      0|      vstorage->AddCursorForOneLevel(iter->first, iter->second);
 1232|      0|    }
 1233|  18.0k|  }
_ZN7rocksdb14VersionBuilder3Rep17LoadTableHandlersEPNS_13InternalStatsEibbRKNSt3__110shared_ptrIKNS_14SliceTransformEEEmRKNS_11ReadOptionsEh:
 1267|  18.0k|      uint8_t block_protection_bytes_per_key) {
 1268|  18.0k|    assert(table_cache_ != nullptr);
 1269|       |
 1270|  18.0k|    size_t table_cache_capacity =
 1271|  18.0k|        table_cache_->get_cache().get()->GetCapacity();
 1272|  18.0k|    bool always_load = (table_cache_capacity == TableCache::kInfiniteCapacity);
 1273|  18.0k|    size_t max_load = std::numeric_limits<size_t>::max();
 1274|       |
 1275|  18.0k|    if (!always_load) {
  ------------------
  |  Branch (1275:9): [True: 0, False: 18.0k]
  ------------------
 1276|       |      // If it is initial loading and not set to always loading all the
 1277|       |      // files, we only load up to kInitialLoadLimit files, to limit the
 1278|       |      // time reopening the DB.
 1279|      0|      const size_t kInitialLoadLimit = 16;
 1280|      0|      size_t load_limit;
 1281|       |      // If the table cache is not 1/4 full, we pin the table handle to
 1282|       |      // file metadata to avoid the cache read costs when reading the file.
 1283|       |      // The downside of pinning those files is that LRU won't be followed
 1284|       |      // for those files. This doesn't matter much because if number of files
 1285|       |      // of the DB excceeds table cache capacity, eventually no table reader
 1286|       |      // will be pinned and LRU will be followed.
 1287|      0|      if (is_initial_load) {
  ------------------
  |  Branch (1287:11): [True: 0, False: 0]
  ------------------
 1288|      0|        load_limit = std::min(kInitialLoadLimit, table_cache_capacity / 4);
 1289|      0|      } else {
 1290|      0|        load_limit = table_cache_capacity / 4;
 1291|      0|      }
 1292|       |
 1293|      0|      size_t table_cache_usage = table_cache_->get_cache().get()->GetUsage();
 1294|      0|      if (table_cache_usage >= load_limit) {
  ------------------
  |  Branch (1294:11): [True: 0, False: 0]
  ------------------
 1295|       |        // TODO (yanqin) find a suitable status code.
 1296|      0|        return Status::OK();
 1297|      0|      } else {
 1298|      0|        max_load = load_limit - table_cache_usage;
 1299|      0|      }
 1300|      0|    }
 1301|       |
 1302|       |    // <file metadata, level>
 1303|  18.0k|    std::vector<std::pair<FileMetaData*, int>> files_meta;
 1304|  18.0k|    std::vector<Status> statuses;
 1305|   144k|    for (int level = 0; level < num_levels_; level++) {
  ------------------
  |  Branch (1305:25): [True: 126k, False: 18.0k]
  ------------------
 1306|   126k|      for (auto& file_meta_pair : levels_[level].added_files) {
  ------------------
  |  Branch (1306:33): [True: 4.48k, False: 126k]
  ------------------
 1307|  4.48k|        auto* file_meta = file_meta_pair.second;
 1308|       |        // If the file has been opened before, just skip it.
 1309|  4.48k|        if (!file_meta->table_reader_handle) {
  ------------------
  |  Branch (1309:13): [True: 4.48k, False: 0]
  ------------------
 1310|  4.48k|          files_meta.emplace_back(file_meta, level);
 1311|  4.48k|          statuses.emplace_back(Status::OK());
 1312|  4.48k|        }
 1313|  4.48k|        if (files_meta.size() >= max_load) {
  ------------------
  |  Branch (1313:13): [True: 0, False: 4.48k]
  ------------------
 1314|      0|          break;
 1315|      0|        }
 1316|  4.48k|      }
 1317|   126k|      if (files_meta.size() >= max_load) {
  ------------------
  |  Branch (1317:11): [True: 0, False: 126k]
  ------------------
 1318|      0|        break;
 1319|      0|      }
 1320|   126k|    }
 1321|       |
 1322|  18.0k|    std::atomic<size_t> next_file_meta_idx(0);
 1323|  18.0k|    std::function<void()> load_handlers_func([&]() {
 1324|  18.0k|      while (true) {
 1325|  18.0k|        size_t file_idx = next_file_meta_idx.fetch_add(1);
 1326|  18.0k|        if (file_idx >= files_meta.size()) {
 1327|  18.0k|          break;
 1328|  18.0k|        }
 1329|       |
 1330|  18.0k|        auto* file_meta = files_meta[file_idx].first;
 1331|  18.0k|        int level = files_meta[file_idx].second;
 1332|  18.0k|        TableCache::TypedHandle* handle = nullptr;
 1333|  18.0k|        statuses[file_idx] = table_cache_->FindTable(
 1334|  18.0k|            read_options, file_options_,
 1335|  18.0k|            *(base_vstorage_->InternalComparator()), *file_meta, &handle,
 1336|  18.0k|            block_protection_bytes_per_key, prefix_extractor, false /*no_io */,
 1337|  18.0k|            internal_stats->GetFileReadHist(level), false, level,
 1338|  18.0k|            prefetch_index_and_filter_in_cache, max_file_size_for_l0_meta_pin,
 1339|  18.0k|            file_meta->temperature);
 1340|  18.0k|        if (handle != nullptr) {
 1341|  18.0k|          file_meta->table_reader_handle = handle;
 1342|       |          // Load table_reader
 1343|  18.0k|          file_meta->fd.table_reader = table_cache_->get_cache().Value(handle);
 1344|  18.0k|        }
 1345|  18.0k|      }
 1346|  18.0k|    });
 1347|       |
 1348|  18.0k|    std::vector<port::Thread> threads;
 1349|   153k|    for (int i = 1; i < max_threads; i++) {
  ------------------
  |  Branch (1349:21): [True: 135k, False: 18.0k]
  ------------------
 1350|   135k|      threads.emplace_back(load_handlers_func);
 1351|   135k|    }
 1352|  18.0k|    load_handlers_func();
 1353|   135k|    for (auto& t : threads) {
  ------------------
  |  Branch (1353:18): [True: 135k, False: 18.0k]
  ------------------
 1354|   135k|      t.join();
 1355|   135k|    }
 1356|  18.0k|    Status ret;
 1357|  18.0k|    for (const auto& s : statuses) {
  ------------------
  |  Branch (1357:24): [True: 4.48k, False: 18.0k]
  ------------------
 1358|  4.48k|      if (!s.ok()) {
  ------------------
  |  Branch (1358:11): [True: 0, False: 4.48k]
  ------------------
 1359|      0|        if (ret.ok()) {
  ------------------
  |  Branch (1359:13): [True: 0, False: 0]
  ------------------
 1360|      0|          ret = s;
 1361|      0|        }
 1362|      0|      }
 1363|  4.48k|    }
 1364|  18.0k|    return ret;
 1365|  18.0k|  }
_ZZN7rocksdb14VersionBuilder3Rep17LoadTableHandlersEPNS_13InternalStatsEibbRKNSt3__110shared_ptrIKNS_14SliceTransformEEEmRKNS_11ReadOptionsEhENKUlvE_clEv:
 1323|   153k|    std::function<void()> load_handlers_func([&]() {
 1324|   157k|      while (true) {
  ------------------
  |  Branch (1324:14): [Folded - Ignored]
  ------------------
 1325|   157k|        size_t file_idx = next_file_meta_idx.fetch_add(1);
 1326|   157k|        if (file_idx >= files_meta.size()) {
  ------------------
  |  Branch (1326:13): [True: 153k, False: 4.47k]
  ------------------
 1327|   153k|          break;
 1328|   153k|        }
 1329|       |
 1330|  4.47k|        auto* file_meta = files_meta[file_idx].first;
 1331|  4.47k|        int level = files_meta[file_idx].second;
 1332|  4.47k|        TableCache::TypedHandle* handle = nullptr;
 1333|  4.47k|        statuses[file_idx] = table_cache_->FindTable(
 1334|  4.47k|            read_options, file_options_,
 1335|  4.47k|            *(base_vstorage_->InternalComparator()), *file_meta, &handle,
 1336|  4.47k|            block_protection_bytes_per_key, prefix_extractor, false /*no_io */,
 1337|  4.47k|            internal_stats->GetFileReadHist(level), false, level,
 1338|  4.47k|            prefetch_index_and_filter_in_cache, max_file_size_for_l0_meta_pin,
 1339|  4.47k|            file_meta->temperature);
 1340|  4.48k|        if (handle != nullptr) {
  ------------------
  |  Branch (1340:13): [True: 4.48k, False: 18.4E]
  ------------------
 1341|  4.48k|          file_meta->table_reader_handle = handle;
 1342|       |          // Load table_reader
 1343|  4.48k|          file_meta->fd.table_reader = table_cache_->get_cache().Value(handle);
 1344|  4.48k|        }
 1345|  4.47k|      }
 1346|   153k|    });
_ZNK7rocksdb14VersionBuilder3Rep26GetMinOldestBlobFileNumberEv:
 1006|  18.0k|  uint64_t GetMinOldestBlobFileNumber() const {
 1007|  18.0k|    uint64_t min_oldest_blob_file_num = kInvalidBlobFileNumber;
 1008|       |
 1009|  18.0k|    auto process_base =
 1010|  18.0k|        [&min_oldest_blob_file_num](
 1011|  18.0k|            const std::shared_ptr<BlobFileMetaData>& base_meta) {
 1012|  18.0k|          assert(base_meta);
 1013|       |
 1014|  18.0k|          return CheckLinkedSsts(*base_meta, &min_oldest_blob_file_num);
 1015|  18.0k|        };
 1016|       |
 1017|  18.0k|    auto process_mutable = [&min_oldest_blob_file_num](
 1018|  18.0k|                               const MutableBlobFileMetaData& mutable_meta) {
 1019|  18.0k|      return CheckLinkedSsts(mutable_meta, &min_oldest_blob_file_num);
 1020|  18.0k|    };
 1021|       |
 1022|  18.0k|    auto process_both = [&min_oldest_blob_file_num](
 1023|  18.0k|                            const std::shared_ptr<BlobFileMetaData>& base_meta,
 1024|  18.0k|                            const MutableBlobFileMetaData& mutable_meta) {
 1025|       |#ifndef NDEBUG
 1026|       |      assert(base_meta);
 1027|       |      assert(base_meta->GetSharedMeta() == mutable_meta.GetSharedMeta());
 1028|       |#else
 1029|  18.0k|      (void)base_meta;
 1030|  18.0k|#endif
 1031|       |
 1032|       |      // Look at mutable_meta since it supersedes *base_meta
 1033|  18.0k|      return CheckLinkedSsts(mutable_meta, &min_oldest_blob_file_num);
 1034|  18.0k|    };
 1035|       |
 1036|  18.0k|    MergeBlobFileMetas(kInvalidBlobFileNumber, process_base, process_mutable,
 1037|  18.0k|                       process_both);
 1038|       |
 1039|  18.0k|    return min_oldest_blob_file_num;
 1040|  18.0k|  }
_ZNK7rocksdb14VersionBuilder3Rep18MergeBlobFileMetasIZNKS1_26GetMinOldestBlobFileNumberEvEUlRKNSt3__110shared_ptrINS_16BlobFileMetaDataEEEE_ZNKS1_26GetMinOldestBlobFileNumberEvEUlRKNS1_23MutableBlobFileMetaDataEE_ZNKS1_26GetMinOldestBlobFileNumberEvEUlS8_SC_E_EEvmT_T0_T1_:
  922|  18.0k|                          ProcessBoth process_both) const {
  923|  18.0k|    assert(base_vstorage_);
  924|       |
  925|  18.0k|    auto base_it = base_vstorage_->GetBlobFileMetaDataLB(first_blob_file);
  926|  18.0k|    const auto base_it_end = base_vstorage_->GetBlobFiles().end();
  927|       |
  928|  18.0k|    auto mutable_it = mutable_blob_file_metas_.lower_bound(first_blob_file);
  929|  18.0k|    const auto mutable_it_end = mutable_blob_file_metas_.end();
  930|       |
  931|  18.0k|    while (base_it != base_it_end && mutable_it != mutable_it_end) {
  ------------------
  |  Branch (931:12): [True: 0, False: 18.0k]
  |  Branch (931:38): [True: 0, False: 0]
  ------------------
  932|      0|      const auto& base_meta = *base_it;
  933|      0|      assert(base_meta);
  934|       |
  935|      0|      const uint64_t base_blob_file_number = base_meta->GetBlobFileNumber();
  936|      0|      const uint64_t mutable_blob_file_number = mutable_it->first;
  937|       |
  938|      0|      if (base_blob_file_number < mutable_blob_file_number) {
  ------------------
  |  Branch (938:11): [True: 0, False: 0]
  ------------------
  939|      0|        if (!process_base(base_meta)) {
  ------------------
  |  Branch (939:13): [True: 0, False: 0]
  ------------------
  940|      0|          return;
  941|      0|        }
  942|       |
  943|      0|        ++base_it;
  944|      0|      } else if (mutable_blob_file_number < base_blob_file_number) {
  ------------------
  |  Branch (944:18): [True: 0, False: 0]
  ------------------
  945|      0|        const auto& mutable_meta = mutable_it->second;
  946|       |
  947|      0|        if (!process_mutable(mutable_meta)) {
  ------------------
  |  Branch (947:13): [True: 0, False: 0]
  ------------------
  948|      0|          return;
  949|      0|        }
  950|       |
  951|      0|        ++mutable_it;
  952|      0|      } else {
  953|      0|        assert(base_blob_file_number == mutable_blob_file_number);
  954|       |
  955|      0|        const auto& mutable_meta = mutable_it->second;
  956|       |
  957|      0|        if (!process_both(base_meta, mutable_meta)) {
  ------------------
  |  Branch (957:13): [True: 0, False: 0]
  ------------------
  958|      0|          return;
  959|      0|        }
  960|       |
  961|      0|        ++base_it;
  962|      0|        ++mutable_it;
  963|      0|      }
  964|      0|    }
  965|       |
  966|  18.0k|    while (base_it != base_it_end) {
  ------------------
  |  Branch (966:12): [True: 0, False: 18.0k]
  ------------------
  967|      0|      const auto& base_meta = *base_it;
  968|       |
  969|      0|      if (!process_base(base_meta)) {
  ------------------
  |  Branch (969:11): [True: 0, False: 0]
  ------------------
  970|      0|        return;
  971|      0|      }
  972|       |
  973|      0|      ++base_it;
  974|      0|    }
  975|       |
  976|  18.0k|    while (mutable_it != mutable_it_end) {
  ------------------
  |  Branch (976:12): [True: 0, False: 18.0k]
  ------------------
  977|      0|      const auto& mutable_meta = mutable_it->second;
  978|       |
  979|      0|      if (!process_mutable(mutable_meta)) {
  ------------------
  |  Branch (979:11): [True: 0, False: 0]
  ------------------
  980|      0|        return;
  981|      0|      }
  982|       |
  983|      0|      ++mutable_it;
  984|      0|    }
  985|  18.0k|  }
_ZN7rocksdb14VersionBuilder3RepD2Ev:
  281|  18.0k|  ~Rep() {
  282|   144k|    for (int level = 0; level < num_levels_; level++) {
  ------------------
  |  Branch (282:25): [True: 126k, False: 18.0k]
  ------------------
  283|   126k|      const auto& added = levels_[level].added_files;
  284|   126k|      for (auto& pair : added) {
  ------------------
  |  Branch (284:23): [True: 4.48k, False: 126k]
  ------------------
  285|  4.48k|        UnrefFile(pair.second);
  286|  4.48k|      }
  287|   126k|    }
  288|       |
  289|  18.0k|    delete[] levels_;
  290|  18.0k|  }

_ZNK7rocksdb28BaseReferencedVersionBuilder15version_builderEv:
   68|  76.7k|  VersionBuilder* version_builder() const { return version_builder_.get(); }

_ZN7rocksdb23PackFileNumberAndPathIdEmm:
   25|  40.5k|uint64_t PackFileNumberAndPathId(uint64_t number, uint64_t path_id) {
   26|  40.5k|  assert(number <= kFileNumberMask);
   27|  40.5k|  return number | (path_id * (kFileNumberMask + 1));
   28|  40.5k|}
_ZN7rocksdb12FileMetaData16UpdateBoundariesERKNS_5SliceES3_mNS_9ValueTypeE:
   32|  34.6k|                                      ValueType value_type) {
   33|  34.6k|  if (value_type == kTypeBlobIndex) {
  ------------------
  |  Branch (33:7): [True: 0, False: 34.6k]
  ------------------
   34|      0|    BlobIndex blob_index;
   35|      0|    const Status s = blob_index.DecodeFrom(value);
   36|      0|    if (!s.ok()) {
  ------------------
  |  Branch (36:9): [True: 0, False: 0]
  ------------------
   37|      0|      return s;
   38|      0|    }
   39|       |
   40|      0|    if (!blob_index.IsInlined() && !blob_index.HasTTL()) {
  ------------------
  |  Branch (40:9): [True: 0, False: 0]
  |  Branch (40:36): [True: 0, False: 0]
  ------------------
   41|      0|      if (blob_index.file_number() == kInvalidBlobFileNumber) {
  ------------------
  |  Branch (41:11): [True: 0, False: 0]
  ------------------
   42|      0|        return Status::Corruption("Invalid blob file number");
   43|      0|      }
   44|       |
   45|      0|      if (oldest_blob_file_number == kInvalidBlobFileNumber ||
  ------------------
  |  Branch (45:11): [True: 0, False: 0]
  ------------------
   46|      0|          oldest_blob_file_number > blob_index.file_number()) {
  ------------------
  |  Branch (46:11): [True: 0, False: 0]
  ------------------
   47|      0|        oldest_blob_file_number = blob_index.file_number();
   48|      0|      }
   49|      0|    }
   50|      0|  }
   51|       |
   52|  34.6k|  if (smallest.size() == 0) {
  ------------------
  |  Branch (52:7): [True: 3.81k, False: 30.8k]
  ------------------
   53|  3.81k|    smallest.DecodeFrom(key);
   54|  3.81k|  }
   55|  34.6k|  largest.DecodeFrom(key);
   56|  34.6k|  fd.smallest_seqno = std::min(fd.smallest_seqno, seqno);
   57|  34.6k|  fd.largest_seqno = std::max(fd.largest_seqno, seqno);
   58|       |
   59|  34.6k|  return Status::OK();
   60|  34.6k|}
_ZN7rocksdb11VersionEdit5ClearEv:
   62|  22.5k|void VersionEdit::Clear() {
   63|  22.5k|  max_level_ = 0;
   64|  22.5k|  db_id_.clear();
   65|  22.5k|  comparator_.clear();
   66|  22.5k|  log_number_ = 0;
   67|  22.5k|  prev_log_number_ = 0;
   68|  22.5k|  next_file_number_ = 0;
   69|  22.5k|  max_column_family_ = 0;
   70|  22.5k|  min_log_number_to_keep_ = 0;
   71|  22.5k|  last_sequence_ = 0;
   72|  22.5k|  has_db_id_ = false;
   73|  22.5k|  has_comparator_ = false;
   74|  22.5k|  has_log_number_ = false;
   75|  22.5k|  has_prev_log_number_ = false;
   76|  22.5k|  has_next_file_number_ = false;
   77|  22.5k|  has_max_column_family_ = false;
   78|  22.5k|  has_min_log_number_to_keep_ = false;
   79|  22.5k|  has_last_sequence_ = false;
   80|  22.5k|  compact_cursors_.clear();
   81|  22.5k|  deleted_files_.clear();
   82|  22.5k|  new_files_.clear();
   83|  22.5k|  blob_file_additions_.clear();
   84|  22.5k|  blob_file_garbages_.clear();
   85|  22.5k|  wal_additions_.clear();
   86|  22.5k|  wal_deletion_.Reset();
   87|  22.5k|  column_family_ = 0;
   88|  22.5k|  is_column_family_add_ = false;
   89|  22.5k|  is_column_family_drop_ = false;
   90|  22.5k|  column_family_name_.clear();
   91|  22.5k|  is_in_atomic_group_ = false;
   92|  22.5k|  remaining_entries_ = 0;
   93|  22.5k|  full_history_ts_low_.clear();
   94|  22.5k|}
_ZNK7rocksdb11VersionEdit8EncodeToEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS1_8optionalImEE:
   97|  49.6k|                           std::optional<size_t> ts_sz) const {
   98|  49.6k|  if (has_db_id_) {
  ------------------
  |  Branch (98:7): [True: 0, False: 49.6k]
  ------------------
   99|      0|    PutVarint32(dst, kDbId);
  100|      0|    PutLengthPrefixedSlice(dst, db_id_);
  101|      0|  }
  102|  49.6k|  if (has_comparator_) {
  ------------------
  |  Branch (102:7): [True: 9.02k, False: 40.6k]
  ------------------
  103|  9.02k|    assert(has_persist_user_defined_timestamps_);
  104|  9.02k|    PutVarint32(dst, kComparator);
  105|  9.02k|    PutLengthPrefixedSlice(dst, comparator_);
  106|  9.02k|  }
  107|  49.6k|  if (has_log_number_) {
  ------------------
  |  Branch (107:7): [True: 18.0k, False: 31.5k]
  ------------------
  108|  18.0k|    PutVarint32Varint64(dst, kLogNumber, log_number_);
  109|  18.0k|  }
  110|  49.6k|  if (has_prev_log_number_) {
  ------------------
  |  Branch (110:7): [True: 18.0k, False: 31.5k]
  ------------------
  111|  18.0k|    PutVarint32Varint64(dst, kPrevLogNumber, prev_log_number_);
  112|  18.0k|  }
  113|  49.6k|  if (has_next_file_number_) {
  ------------------
  |  Branch (113:7): [True: 22.5k, False: 27.0k]
  ------------------
  114|  22.5k|    PutVarint32Varint64(dst, kNextFileNumber, next_file_number_);
  115|  22.5k|  }
  116|  49.6k|  if (has_max_column_family_) {
  ------------------
  |  Branch (116:7): [True: 0, False: 49.6k]
  ------------------
  117|      0|    PutVarint32Varint32(dst, kMaxColumnFamily, max_column_family_);
  118|      0|  }
  119|  49.6k|  if (has_min_log_number_to_keep_) {
  ------------------
  |  Branch (119:7): [True: 4.51k, False: 45.1k]
  ------------------
  120|  4.51k|    PutVarint32Varint64(dst, kMinLogNumberToKeep, min_log_number_to_keep_);
  121|  4.51k|  }
  122|  49.6k|  if (has_last_sequence_) {
  ------------------
  |  Branch (122:7): [True: 31.5k, False: 18.0k]
  ------------------
  123|  31.5k|    PutVarint32Varint64(dst, kLastSequence, last_sequence_);
  124|  31.5k|  }
  125|  49.6k|  for (size_t i = 0; i < compact_cursors_.size(); i++) {
  ------------------
  |  Branch (125:22): [True: 0, False: 49.6k]
  ------------------
  126|      0|    if (compact_cursors_[i].second.Valid()) {
  ------------------
  |  Branch (126:9): [True: 0, False: 0]
  ------------------
  127|      0|      PutVarint32(dst, kCompactCursor);
  128|      0|      PutVarint32(dst, compact_cursors_[i].first);  // level
  129|      0|      PutLengthPrefixedSlice(dst, compact_cursors_[i].second.Encode());
  130|      0|    }
  131|      0|  }
  132|  49.6k|  for (const auto& deleted : deleted_files_) {
  ------------------
  |  Branch (132:28): [True: 0, False: 49.6k]
  ------------------
  133|      0|    PutVarint32Varint32Varint64(dst, kDeletedFile, deleted.first /* level */,
  134|      0|                                deleted.second /* file number */);
  135|      0|  }
  136|       |
  137|  49.6k|  bool min_log_num_written = false;
  138|       |
  139|  49.6k|  assert(new_files_.empty() || ts_sz.has_value());
  140|  54.1k|  for (size_t i = 0; i < new_files_.size(); i++) {
  ------------------
  |  Branch (140:22): [True: 4.48k, False: 49.6k]
  ------------------
  141|  4.48k|    const FileMetaData& f = new_files_[i].second;
  142|  4.48k|    if (!f.smallest.Valid() || !f.largest.Valid() ||
  ------------------
  |  Branch (142:9): [True: 0, False: 4.48k]
  |  Branch (142:32): [True: 0, False: 4.48k]
  ------------------
  143|  4.48k|        f.epoch_number == kUnknownEpochNumber) {
  ------------------
  |  Branch (143:9): [True: 0, False: 4.48k]
  ------------------
  144|      0|      return false;
  145|      0|    }
  146|  4.48k|    PutVarint32(dst, kNewFile4);
  147|  4.48k|    PutVarint32Varint64(dst, new_files_[i].first /* level */, f.fd.GetNumber());
  148|  4.48k|    PutVarint64(dst, f.fd.GetFileSize());
  149|  4.48k|    EncodeFileBoundaries(dst, f, ts_sz.value());
  150|  4.48k|    PutVarint64Varint64(dst, f.fd.smallest_seqno, f.fd.largest_seqno);
  151|       |    // Customized fields' format:
  152|       |    // +-----------------------------+
  153|       |    // | 1st field's tag (varint32)  |
  154|       |    // +-----------------------------+
  155|       |    // | 1st field's size (varint32) |
  156|       |    // +-----------------------------+
  157|       |    // |    bytes for 1st field      |
  158|       |    // |  (based on size decoded)    |
  159|       |    // +-----------------------------+
  160|       |    // |                             |
  161|       |    // |          ......             |
  162|       |    // |                             |
  163|       |    // +-----------------------------+
  164|       |    // | last field's size (varint32)|
  165|       |    // +-----------------------------+
  166|       |    // |    bytes for last field     |
  167|       |    // |  (based on size decoded)    |
  168|       |    // +-----------------------------+
  169|       |    // | terminating tag (varint32)  |
  170|       |    // +-----------------------------+
  171|       |    //
  172|       |    // Customized encoding for fields:
  173|       |    //   tag kPathId: 1 byte as path_id
  174|       |    //   tag kNeedCompaction:
  175|       |    //        now only can take one char value 1 indicating need-compaction
  176|       |    //
  177|  4.48k|    PutVarint32(dst, NewFileCustomTag::kOldestAncesterTime);
  178|  4.48k|    std::string varint_oldest_ancester_time;
  179|  4.48k|    PutVarint64(&varint_oldest_ancester_time, f.oldest_ancester_time);
  180|  4.48k|    TEST_SYNC_POINT_CALLBACK("VersionEdit::EncodeTo:VarintOldestAncesterTime",
  181|  4.48k|                             &varint_oldest_ancester_time);
  182|  4.48k|    PutLengthPrefixedSlice(dst, Slice(varint_oldest_ancester_time));
  183|       |
  184|  4.48k|    PutVarint32(dst, NewFileCustomTag::kFileCreationTime);
  185|  4.48k|    std::string varint_file_creation_time;
  186|  4.48k|    PutVarint64(&varint_file_creation_time, f.file_creation_time);
  187|  4.48k|    TEST_SYNC_POINT_CALLBACK("VersionEdit::EncodeTo:VarintFileCreationTime",
  188|  4.48k|                             &varint_file_creation_time);
  189|  4.48k|    PutLengthPrefixedSlice(dst, Slice(varint_file_creation_time));
  190|       |
  191|  4.48k|    PutVarint32(dst, NewFileCustomTag::kEpochNumber);
  192|  4.48k|    std::string varint_epoch_number;
  193|  4.48k|    PutVarint64(&varint_epoch_number, f.epoch_number);
  194|  4.48k|    PutLengthPrefixedSlice(dst, Slice(varint_epoch_number));
  195|       |
  196|  4.48k|    PutVarint32(dst, NewFileCustomTag::kFileChecksum);
  197|  4.48k|    PutLengthPrefixedSlice(dst, Slice(f.file_checksum));
  198|       |
  199|  4.48k|    PutVarint32(dst, NewFileCustomTag::kFileChecksumFuncName);
  200|  4.48k|    PutLengthPrefixedSlice(dst, Slice(f.file_checksum_func_name));
  201|       |
  202|  4.48k|    if (f.fd.GetPathId() != 0) {
  ------------------
  |  Branch (202:9): [True: 0, False: 4.48k]
  ------------------
  203|      0|      PutVarint32(dst, NewFileCustomTag::kPathId);
  204|      0|      char p = static_cast<char>(f.fd.GetPathId());
  205|      0|      PutLengthPrefixedSlice(dst, Slice(&p, 1));
  206|      0|    }
  207|  4.48k|    if (f.temperature != Temperature::kUnknown) {
  ------------------
  |  Branch (207:9): [True: 0, False: 4.48k]
  ------------------
  208|      0|      PutVarint32(dst, NewFileCustomTag::kTemperature);
  209|      0|      char p = static_cast<char>(f.temperature);
  210|      0|      PutLengthPrefixedSlice(dst, Slice(&p, 1));
  211|      0|    }
  212|  4.48k|    if (f.marked_for_compaction) {
  ------------------
  |  Branch (212:9): [True: 0, False: 4.48k]
  ------------------
  213|      0|      PutVarint32(dst, NewFileCustomTag::kNeedCompaction);
  214|      0|      char p = static_cast<char>(1);
  215|      0|      PutLengthPrefixedSlice(dst, Slice(&p, 1));
  216|      0|    }
  217|  4.48k|    if (has_min_log_number_to_keep_ && !min_log_num_written) {
  ------------------
  |  Branch (217:9): [True: 0, False: 4.48k]
  |  Branch (217:40): [True: 0, False: 0]
  ------------------
  218|      0|      PutVarint32(dst, NewFileCustomTag::kMinLogNumberToKeepHack);
  219|      0|      std::string varint_log_number;
  220|      0|      PutFixed64(&varint_log_number, min_log_number_to_keep_);
  221|      0|      PutLengthPrefixedSlice(dst, Slice(varint_log_number));
  222|      0|      min_log_num_written = true;
  223|      0|    }
  224|  4.48k|    if (f.oldest_blob_file_number != kInvalidBlobFileNumber) {
  ------------------
  |  Branch (224:9): [True: 0, False: 4.48k]
  ------------------
  225|      0|      PutVarint32(dst, NewFileCustomTag::kOldestBlobFileNumber);
  226|      0|      std::string oldest_blob_file_number;
  227|      0|      PutVarint64(&oldest_blob_file_number, f.oldest_blob_file_number);
  228|      0|      PutLengthPrefixedSlice(dst, Slice(oldest_blob_file_number));
  229|      0|    }
  230|  4.48k|    UniqueId64x2 unique_id = f.unique_id;
  231|  4.48k|    TEST_SYNC_POINT_CALLBACK("VersionEdit::EncodeTo:UniqueId", &unique_id);
  232|  4.48k|    if (unique_id != kNullUniqueId64x2) {
  ------------------
  |  Branch (232:9): [True: 4.48k, False: 0]
  ------------------
  233|  4.48k|      PutVarint32(dst, NewFileCustomTag::kUniqueId);
  234|  4.48k|      std::string unique_id_str = EncodeUniqueIdBytes(&unique_id);
  235|  4.48k|      PutLengthPrefixedSlice(dst, Slice(unique_id_str));
  236|  4.48k|    }
  237|  4.48k|    if (f.compensated_range_deletion_size) {
  ------------------
  |  Branch (237:9): [True: 0, False: 4.48k]
  ------------------
  238|      0|      PutVarint32(dst, kCompensatedRangeDeletionSize);
  239|      0|      std::string compensated_range_deletion_size;
  240|      0|      PutVarint64(&compensated_range_deletion_size,
  241|      0|                  f.compensated_range_deletion_size);
  242|      0|      PutLengthPrefixedSlice(dst, Slice(compensated_range_deletion_size));
  243|      0|    }
  244|  4.48k|    if (f.tail_size) {
  ------------------
  |  Branch (244:9): [True: 4.48k, False: 0]
  ------------------
  245|  4.48k|      PutVarint32(dst, NewFileCustomTag::kTailSize);
  246|  4.48k|      std::string varint_tail_size;
  247|  4.48k|      PutVarint64(&varint_tail_size, f.tail_size);
  248|  4.48k|      PutLengthPrefixedSlice(dst, Slice(varint_tail_size));
  249|  4.48k|    }
  250|  4.48k|    if (!f.user_defined_timestamps_persisted) {
  ------------------
  |  Branch (250:9): [True: 0, False: 4.48k]
  ------------------
  251|       |      // The default value for the flag is true, it's only explicitly persisted
  252|       |      // when it's false. We are putting 0 as the value here to signal false
  253|       |      // (i.e. UDTS not persisted).
  254|      0|      PutVarint32(dst, NewFileCustomTag::kUserDefinedTimestampsPersisted);
  255|      0|      char p = static_cast<char>(0);
  256|      0|      PutLengthPrefixedSlice(dst, Slice(&p, 1));
  257|      0|    }
  258|  4.48k|    TEST_SYNC_POINT_CALLBACK("VersionEdit::EncodeTo:NewFile4:CustomizeFields",
  259|  4.48k|                             dst);
  260|       |
  261|  4.48k|    PutVarint32(dst, NewFileCustomTag::kTerminate);
  262|  4.48k|  }
  263|       |
  264|  49.6k|  for (const auto& blob_file_addition : blob_file_additions_) {
  ------------------
  |  Branch (264:39): [True: 0, False: 49.6k]
  ------------------
  265|      0|    PutVarint32(dst, kBlobFileAddition);
  266|      0|    blob_file_addition.EncodeTo(dst);
  267|      0|  }
  268|       |
  269|  49.6k|  for (const auto& blob_file_garbage : blob_file_garbages_) {
  ------------------
  |  Branch (269:38): [True: 0, False: 49.6k]
  ------------------
  270|      0|    PutVarint32(dst, kBlobFileGarbage);
  271|      0|    blob_file_garbage.EncodeTo(dst);
  272|      0|  }
  273|       |
  274|  49.6k|  for (const auto& wal_addition : wal_additions_) {
  ------------------
  |  Branch (274:33): [True: 0, False: 49.6k]
  ------------------
  275|      0|    PutVarint32(dst, kWalAddition2);
  276|      0|    std::string encoded;
  277|      0|    wal_addition.EncodeTo(&encoded);
  278|      0|    PutLengthPrefixedSlice(dst, encoded);
  279|      0|  }
  280|       |
  281|  49.6k|  if (!wal_deletion_.IsEmpty()) {
  ------------------
  |  Branch (281:7): [True: 0, False: 49.6k]
  ------------------
  282|      0|    PutVarint32(dst, kWalDeletion2);
  283|      0|    std::string encoded;
  284|      0|    wal_deletion_.EncodeTo(&encoded);
  285|      0|    PutLengthPrefixedSlice(dst, encoded);
  286|      0|  }
  287|       |
  288|       |  // 0 is default and does not need to be explicitly written
  289|  49.6k|  if (column_family_ != 0) {
  ------------------
  |  Branch (289:7): [True: 0, False: 49.6k]
  ------------------
  290|      0|    PutVarint32Varint32(dst, kColumnFamily, column_family_);
  291|      0|  }
  292|       |
  293|  49.6k|  if (is_column_family_add_) {
  ------------------
  |  Branch (293:7): [True: 0, False: 49.6k]
  ------------------
  294|      0|    PutVarint32(dst, kColumnFamilyAdd);
  295|      0|    PutLengthPrefixedSlice(dst, Slice(column_family_name_));
  296|      0|  }
  297|       |
  298|  49.6k|  if (is_column_family_drop_) {
  ------------------
  |  Branch (298:7): [True: 0, False: 49.6k]
  ------------------
  299|      0|    PutVarint32(dst, kColumnFamilyDrop);
  300|      0|  }
  301|       |
  302|  49.6k|  if (is_in_atomic_group_) {
  ------------------
  |  Branch (302:7): [True: 0, False: 49.6k]
  ------------------
  303|      0|    PutVarint32(dst, kInAtomicGroup);
  304|      0|    PutVarint32(dst, remaining_entries_);
  305|      0|  }
  306|       |
  307|  49.6k|  if (HasFullHistoryTsLow()) {
  ------------------
  |  Branch (307:7): [True: 0, False: 49.6k]
  ------------------
  308|      0|    PutVarint32(dst, kFullHistoryTsLow);
  309|      0|    PutLengthPrefixedSlice(dst, full_history_ts_low_);
  310|      0|  }
  311|       |
  312|  49.6k|  if (HasPersistUserDefinedTimestamps()) {
  ------------------
  |  Branch (312:7): [True: 9.02k, False: 40.6k]
  ------------------
  313|       |    // persist_user_defined_timestamps flag should be logged in the same
  314|       |    // VersionEdit as the user comparator name.
  315|  9.02k|    assert(has_comparator_);
  316|  9.02k|    PutVarint32(dst, kPersistUserDefinedTimestamps);
  317|  9.02k|    char p = static_cast<char>(persist_user_defined_timestamps_);
  318|  9.02k|    PutLengthPrefixedSlice(dst, Slice(&p, 1));
  319|  9.02k|  }
  320|  49.6k|  return true;
  321|  49.6k|}
_ZNK7rocksdb11VersionEdit20EncodeFileBoundariesEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_12FileMetaDataEm:
  474|  4.48k|                                       size_t ts_sz) const {
  475|  4.48k|  if (ts_sz == 0 || meta.user_defined_timestamps_persisted) {
  ------------------
  |  Branch (475:7): [True: 4.48k, False: 0]
  |  Branch (475:21): [True: 0, False: 0]
  ------------------
  476|  4.48k|    PutLengthPrefixedSlice(dst, meta.smallest.Encode());
  477|  4.48k|    PutLengthPrefixedSlice(dst, meta.largest.Encode());
  478|  4.48k|    return;
  479|  4.48k|  }
  480|      0|  std::string smallest_buf;
  481|      0|  std::string largest_buf;
  482|      0|  StripTimestampFromInternalKey(&smallest_buf, meta.smallest.Encode(), ts_sz);
  483|      0|  StripTimestampFromInternalKey(&largest_buf, meta.largest.Encode(), ts_sz);
  484|      0|  PutLengthPrefixedSlice(dst, smallest_buf);
  485|      0|  PutLengthPrefixedSlice(dst, largest_buf);
  486|      0|}
_ZN7rocksdb11VersionEdit10DecodeFromERKNS_5SliceE:
  488|  22.5k|Status VersionEdit::DecodeFrom(const Slice& src) {
  489|  22.5k|  Clear();
  490|       |#ifndef NDEBUG
  491|       |  bool ignore_ignorable_tags = false;
  492|       |  TEST_SYNC_POINT_CALLBACK("VersionEdit::EncodeTo:IgnoreIgnorableTags",
  493|       |                           &ignore_ignorable_tags);
  494|       |#endif
  495|  22.5k|  Slice input = src;
  496|  22.5k|  const char* msg = nullptr;
  497|  22.5k|  uint32_t tag = 0;
  498|       |
  499|       |  // Temporary storage for parsing
  500|  22.5k|  int level = 0;
  501|  22.5k|  FileMetaData f;
  502|  22.5k|  Slice str;
  503|  22.5k|  InternalKey key;
  504|  67.7k|  while (msg == nullptr && GetVarint32(&input, &tag)) {
  ------------------
  |  Branch (504:10): [True: 67.7k, False: 0]
  |  Branch (504:28): [True: 45.1k, False: 22.5k]
  ------------------
  505|       |#ifndef NDEBUG
  506|       |    if (ignore_ignorable_tags && tag > kTagSafeIgnoreMask) {
  507|       |      tag = kTagSafeIgnoreMask;
  508|       |    }
  509|       |#endif
  510|  45.1k|    switch (tag) {
  511|      0|      case kDbId:
  ------------------
  |  Branch (511:7): [True: 0, False: 45.1k]
  ------------------
  512|      0|        if (GetLengthPrefixedSlice(&input, &str)) {
  ------------------
  |  Branch (512:13): [True: 0, False: 0]
  ------------------
  513|      0|          db_id_ = str.ToString();
  514|      0|          has_db_id_ = true;
  515|      0|        } else {
  516|      0|          msg = "db id";
  517|      0|        }
  518|      0|        break;
  519|  4.51k|      case kComparator:
  ------------------
  |  Branch (519:7): [True: 4.51k, False: 40.6k]
  ------------------
  520|  4.51k|        if (GetLengthPrefixedSlice(&input, &str)) {
  ------------------
  |  Branch (520:13): [True: 4.51k, False: 0]
  ------------------
  521|  4.51k|          comparator_ = str.ToString();
  522|  4.51k|          has_comparator_ = true;
  523|  4.51k|        } else {
  524|      0|          msg = "comparator name";
  525|      0|        }
  526|  4.51k|        break;
  527|       |
  528|  9.02k|      case kLogNumber:
  ------------------
  |  Branch (528:7): [True: 9.02k, False: 36.1k]
  ------------------
  529|  9.02k|        if (GetVarint64(&input, &log_number_)) {
  ------------------
  |  Branch (529:13): [True: 9.02k, False: 0]
  ------------------
  530|  9.02k|          has_log_number_ = true;
  531|  9.02k|        } else {
  532|      0|          msg = "log number";
  533|      0|        }
  534|  9.02k|        break;
  535|       |
  536|  4.51k|      case kPrevLogNumber:
  ------------------
  |  Branch (536:7): [True: 4.51k, False: 40.6k]
  ------------------
  537|  4.51k|        if (GetVarint64(&input, &prev_log_number_)) {
  ------------------
  |  Branch (537:13): [True: 4.51k, False: 0]
  ------------------
  538|  4.51k|          has_prev_log_number_ = true;
  539|  4.51k|        } else {
  540|      0|          msg = "previous log number";
  541|      0|        }
  542|  4.51k|        break;
  543|       |
  544|  9.02k|      case kNextFileNumber:
  ------------------
  |  Branch (544:7): [True: 9.02k, False: 36.1k]
  ------------------
  545|  9.02k|        if (GetVarint64(&input, &next_file_number_)) {
  ------------------
  |  Branch (545:13): [True: 9.02k, False: 0]
  ------------------
  546|  9.02k|          has_next_file_number_ = true;
  547|  9.02k|        } else {
  548|      0|          msg = "next file number";
  549|      0|        }
  550|  9.02k|        break;
  551|       |
  552|      0|      case kMaxColumnFamily:
  ------------------
  |  Branch (552:7): [True: 0, False: 45.1k]
  ------------------
  553|      0|        if (GetVarint32(&input, &max_column_family_)) {
  ------------------
  |  Branch (553:13): [True: 0, False: 0]
  ------------------
  554|      0|          has_max_column_family_ = true;
  555|      0|        } else {
  556|      0|          msg = "max column family";
  557|      0|        }
  558|      0|        break;
  559|       |
  560|      0|      case kMinLogNumberToKeep:
  ------------------
  |  Branch (560:7): [True: 0, False: 45.1k]
  ------------------
  561|      0|        if (GetVarint64(&input, &min_log_number_to_keep_)) {
  ------------------
  |  Branch (561:13): [True: 0, False: 0]
  ------------------
  562|      0|          has_min_log_number_to_keep_ = true;
  563|      0|        } else {
  564|      0|          msg = "min log number to kee";
  565|      0|        }
  566|      0|        break;
  567|       |
  568|  13.5k|      case kLastSequence:
  ------------------
  |  Branch (568:7): [True: 13.5k, False: 31.5k]
  ------------------
  569|  13.5k|        if (GetVarint64(&input, &last_sequence_)) {
  ------------------
  |  Branch (569:13): [True: 13.5k, False: 0]
  ------------------
  570|  13.5k|          has_last_sequence_ = true;
  571|  13.5k|        } else {
  572|      0|          msg = "last sequence number";
  573|      0|        }
  574|  13.5k|        break;
  575|       |
  576|      0|      case kCompactCursor:
  ------------------
  |  Branch (576:7): [True: 0, False: 45.1k]
  ------------------
  577|      0|        if (GetLevel(&input, &level, &msg) && GetInternalKey(&input, &key)) {
  ------------------
  |  Branch (577:13): [True: 0, False: 0]
  |  Branch (577:47): [True: 0, False: 0]
  ------------------
  578|       |          // Here we re-use the output format of compact pointer in LevelDB
  579|       |          // to persist compact_cursors_
  580|      0|          compact_cursors_.push_back(std::make_pair(level, key));
  581|      0|        } else {
  582|      0|          if (!msg) {
  ------------------
  |  Branch (582:15): [True: 0, False: 0]
  ------------------
  583|      0|            msg = "compaction cursor";
  584|      0|          }
  585|      0|        }
  586|      0|        break;
  587|       |
  588|      0|      case kDeletedFile: {
  ------------------
  |  Branch (588:7): [True: 0, False: 45.1k]
  ------------------
  589|      0|        uint64_t number = 0;
  590|      0|        if (GetLevel(&input, &level, &msg) && GetVarint64(&input, &number)) {
  ------------------
  |  Branch (590:13): [True: 0, False: 0]
  |  Branch (590:47): [True: 0, False: 0]
  ------------------
  591|      0|          deleted_files_.insert(std::make_pair(level, number));
  592|      0|        } else {
  593|      0|          if (!msg) {
  ------------------
  |  Branch (593:15): [True: 0, False: 0]
  ------------------
  594|      0|            msg = "deleted file";
  595|      0|          }
  596|      0|        }
  597|      0|        break;
  598|      0|      }
  599|       |
  600|      0|      case kNewFile: {
  ------------------
  |  Branch (600:7): [True: 0, False: 45.1k]
  ------------------
  601|      0|        uint64_t number = 0;
  602|      0|        uint64_t file_size = 0;
  603|      0|        if (GetLevel(&input, &level, &msg) && GetVarint64(&input, &number) &&
  ------------------
  |  Branch (603:13): [True: 0, False: 0]
  |  Branch (603:47): [True: 0, False: 0]
  ------------------
  604|      0|            GetVarint64(&input, &file_size) &&
  ------------------
  |  Branch (604:13): [True: 0, False: 0]
  ------------------
  605|      0|            GetInternalKey(&input, &f.smallest) &&
  ------------------
  |  Branch (605:13): [True: 0, False: 0]
  ------------------
  606|      0|            GetInternalKey(&input, &f.largest)) {
  ------------------
  |  Branch (606:13): [True: 0, False: 0]
  ------------------
  607|      0|          f.fd = FileDescriptor(number, 0, file_size);
  608|      0|          new_files_.push_back(std::make_pair(level, f));
  609|      0|        } else {
  610|      0|          if (!msg) {
  ------------------
  |  Branch (610:15): [True: 0, False: 0]
  ------------------
  611|      0|            msg = "new-file entry";
  612|      0|          }
  613|      0|        }
  614|      0|        break;
  615|      0|      }
  616|      0|      case kNewFile2: {
  ------------------
  |  Branch (616:7): [True: 0, False: 45.1k]
  ------------------
  617|      0|        uint64_t number = 0;
  618|      0|        uint64_t file_size = 0;
  619|      0|        SequenceNumber smallest_seqno = 0;
  620|      0|        SequenceNumber largest_seqno = kMaxSequenceNumber;
  621|      0|        if (GetLevel(&input, &level, &msg) && GetVarint64(&input, &number) &&
  ------------------
  |  Branch (621:13): [True: 0, False: 0]
  |  Branch (621:47): [True: 0, False: 0]
  ------------------
  622|      0|            GetVarint64(&input, &file_size) &&
  ------------------
  |  Branch (622:13): [True: 0, False: 0]
  ------------------
  623|      0|            GetInternalKey(&input, &f.smallest) &&
  ------------------
  |  Branch (623:13): [True: 0, False: 0]
  ------------------
  624|      0|            GetInternalKey(&input, &f.largest) &&
  ------------------
  |  Branch (624:13): [True: 0, False: 0]
  ------------------
  625|      0|            GetVarint64(&input, &smallest_seqno) &&
  ------------------
  |  Branch (625:13): [True: 0, False: 0]
  ------------------
  626|      0|            GetVarint64(&input, &largest_seqno)) {
  ------------------
  |  Branch (626:13): [True: 0, False: 0]
  ------------------
  627|      0|          f.fd = FileDescriptor(number, 0, file_size, smallest_seqno,
  628|      0|                                largest_seqno);
  629|      0|          new_files_.push_back(std::make_pair(level, f));
  630|      0|        } else {
  631|      0|          if (!msg) {
  ------------------
  |  Branch (631:15): [True: 0, False: 0]
  ------------------
  632|      0|            msg = "new-file2 entry";
  633|      0|          }
  634|      0|        }
  635|      0|        break;
  636|      0|      }
  637|       |
  638|      0|      case kNewFile3: {
  ------------------
  |  Branch (638:7): [True: 0, False: 45.1k]
  ------------------
  639|      0|        uint64_t number = 0;
  640|      0|        uint32_t path_id = 0;
  641|      0|        uint64_t file_size = 0;
  642|      0|        SequenceNumber smallest_seqno = 0;
  643|      0|        SequenceNumber largest_seqno = kMaxSequenceNumber;
  644|      0|        if (GetLevel(&input, &level, &msg) && GetVarint64(&input, &number) &&
  ------------------
  |  Branch (644:13): [True: 0, False: 0]
  |  Branch (644:47): [True: 0, False: 0]
  ------------------
  645|      0|            GetVarint32(&input, &path_id) && GetVarint64(&input, &file_size) &&
  ------------------
  |  Branch (645:13): [True: 0, False: 0]
  |  Branch (645:46): [True: 0, False: 0]
  ------------------
  646|      0|            GetInternalKey(&input, &f.smallest) &&
  ------------------
  |  Branch (646:13): [True: 0, False: 0]
  ------------------
  647|      0|            GetInternalKey(&input, &f.largest) &&
  ------------------
  |  Branch (647:13): [True: 0, False: 0]
  ------------------
  648|      0|            GetVarint64(&input, &smallest_seqno) &&
  ------------------
  |  Branch (648:13): [True: 0, False: 0]
  ------------------
  649|      0|            GetVarint64(&input, &largest_seqno)) {
  ------------------
  |  Branch (649:13): [True: 0, False: 0]
  ------------------
  650|      0|          f.fd = FileDescriptor(number, path_id, file_size, smallest_seqno,
  651|      0|                                largest_seqno);
  652|      0|          new_files_.push_back(std::make_pair(level, f));
  653|      0|        } else {
  654|      0|          if (!msg) {
  ------------------
  |  Branch (654:15): [True: 0, False: 0]
  ------------------
  655|      0|            msg = "new-file3 entry";
  656|      0|          }
  657|      0|        }
  658|      0|        break;
  659|      0|      }
  660|       |
  661|      0|      case kNewFile4: {
  ------------------
  |  Branch (661:7): [True: 0, False: 45.1k]
  ------------------
  662|      0|        msg = DecodeNewFile4From(&input);
  663|      0|        break;
  664|      0|      }
  665|       |
  666|      0|      case kBlobFileAddition:
  ------------------
  |  Branch (666:7): [True: 0, False: 45.1k]
  ------------------
  667|      0|      case kBlobFileAddition_DEPRECATED: {
  ------------------
  |  Branch (667:7): [True: 0, False: 45.1k]
  ------------------
  668|      0|        BlobFileAddition blob_file_addition;
  669|      0|        const Status s = blob_file_addition.DecodeFrom(&input);
  670|      0|        if (!s.ok()) {
  ------------------
  |  Branch (670:13): [True: 0, False: 0]
  ------------------
  671|      0|          return s;
  672|      0|        }
  673|       |
  674|      0|        AddBlobFile(std::move(blob_file_addition));
  675|      0|        break;
  676|      0|      }
  677|       |
  678|      0|      case kBlobFileGarbage:
  ------------------
  |  Branch (678:7): [True: 0, False: 45.1k]
  ------------------
  679|      0|      case kBlobFileGarbage_DEPRECATED: {
  ------------------
  |  Branch (679:7): [True: 0, False: 45.1k]
  ------------------
  680|      0|        BlobFileGarbage blob_file_garbage;
  681|      0|        const Status s = blob_file_garbage.DecodeFrom(&input);
  682|      0|        if (!s.ok()) {
  ------------------
  |  Branch (682:13): [True: 0, False: 0]
  ------------------
  683|      0|          return s;
  684|      0|        }
  685|       |
  686|      0|        AddBlobFileGarbage(std::move(blob_file_garbage));
  687|      0|        break;
  688|      0|      }
  689|       |
  690|      0|      case kWalAddition: {
  ------------------
  |  Branch (690:7): [True: 0, False: 45.1k]
  ------------------
  691|      0|        WalAddition wal_addition;
  692|      0|        const Status s = wal_addition.DecodeFrom(&input);
  693|      0|        if (!s.ok()) {
  ------------------
  |  Branch (693:13): [True: 0, False: 0]
  ------------------
  694|      0|          return s;
  695|      0|        }
  696|       |
  697|      0|        wal_additions_.emplace_back(std::move(wal_addition));
  698|      0|        break;
  699|      0|      }
  700|       |
  701|      0|      case kWalAddition2: {
  ------------------
  |  Branch (701:7): [True: 0, False: 45.1k]
  ------------------
  702|      0|        Slice encoded;
  703|      0|        if (!GetLengthPrefixedSlice(&input, &encoded)) {
  ------------------
  |  Branch (703:13): [True: 0, False: 0]
  ------------------
  704|      0|          msg = "WalAddition not prefixed by length";
  705|      0|          break;
  706|      0|        }
  707|       |
  708|      0|        WalAddition wal_addition;
  709|      0|        const Status s = wal_addition.DecodeFrom(&encoded);
  710|      0|        if (!s.ok()) {
  ------------------
  |  Branch (710:13): [True: 0, False: 0]
  ------------------
  711|      0|          return s;
  712|      0|        }
  713|       |
  714|      0|        wal_additions_.emplace_back(std::move(wal_addition));
  715|      0|        break;
  716|      0|      }
  717|       |
  718|      0|      case kWalDeletion: {
  ------------------
  |  Branch (718:7): [True: 0, False: 45.1k]
  ------------------
  719|      0|        WalDeletion wal_deletion;
  720|      0|        const Status s = wal_deletion.DecodeFrom(&input);
  721|      0|        if (!s.ok()) {
  ------------------
  |  Branch (721:13): [True: 0, False: 0]
  ------------------
  722|      0|          return s;
  723|      0|        }
  724|       |
  725|      0|        wal_deletion_ = std::move(wal_deletion);
  726|      0|        break;
  727|      0|      }
  728|       |
  729|      0|      case kWalDeletion2: {
  ------------------
  |  Branch (729:7): [True: 0, False: 45.1k]
  ------------------
  730|      0|        Slice encoded;
  731|      0|        if (!GetLengthPrefixedSlice(&input, &encoded)) {
  ------------------
  |  Branch (731:13): [True: 0, False: 0]
  ------------------
  732|      0|          msg = "WalDeletion not prefixed by length";
  733|      0|          break;
  734|      0|        }
  735|       |
  736|      0|        WalDeletion wal_deletion;
  737|      0|        const Status s = wal_deletion.DecodeFrom(&encoded);
  738|      0|        if (!s.ok()) {
  ------------------
  |  Branch (738:13): [True: 0, False: 0]
  ------------------
  739|      0|          return s;
  740|      0|        }
  741|       |
  742|      0|        wal_deletion_ = std::move(wal_deletion);
  743|      0|        break;
  744|      0|      }
  745|       |
  746|      0|      case kColumnFamily:
  ------------------
  |  Branch (746:7): [True: 0, False: 45.1k]
  ------------------
  747|      0|        if (!GetVarint32(&input, &column_family_)) {
  ------------------
  |  Branch (747:13): [True: 0, False: 0]
  ------------------
  748|      0|          if (!msg) {
  ------------------
  |  Branch (748:15): [True: 0, False: 0]
  ------------------
  749|      0|            msg = "set column family id";
  750|      0|          }
  751|      0|        }
  752|      0|        break;
  753|       |
  754|      0|      case kColumnFamilyAdd:
  ------------------
  |  Branch (754:7): [True: 0, False: 45.1k]
  ------------------
  755|      0|        if (GetLengthPrefixedSlice(&input, &str)) {
  ------------------
  |  Branch (755:13): [True: 0, False: 0]
  ------------------
  756|      0|          is_column_family_add_ = true;
  757|      0|          column_family_name_ = str.ToString();
  758|      0|        } else {
  759|      0|          if (!msg) {
  ------------------
  |  Branch (759:15): [True: 0, False: 0]
  ------------------
  760|      0|            msg = "column family add";
  761|      0|          }
  762|      0|        }
  763|      0|        break;
  764|       |
  765|      0|      case kColumnFamilyDrop:
  ------------------
  |  Branch (765:7): [True: 0, False: 45.1k]
  ------------------
  766|      0|        is_column_family_drop_ = true;
  767|      0|        break;
  768|       |
  769|      0|      case kInAtomicGroup:
  ------------------
  |  Branch (769:7): [True: 0, False: 45.1k]
  ------------------
  770|      0|        is_in_atomic_group_ = true;
  771|      0|        if (!GetVarint32(&input, &remaining_entries_)) {
  ------------------
  |  Branch (771:13): [True: 0, False: 0]
  ------------------
  772|      0|          if (!msg) {
  ------------------
  |  Branch (772:15): [True: 0, False: 0]
  ------------------
  773|      0|            msg = "remaining entries";
  774|      0|          }
  775|      0|        }
  776|      0|        break;
  777|       |
  778|      0|      case kFullHistoryTsLow:
  ------------------
  |  Branch (778:7): [True: 0, False: 45.1k]
  ------------------
  779|      0|        if (!GetLengthPrefixedSlice(&input, &str)) {
  ------------------
  |  Branch (779:13): [True: 0, False: 0]
  ------------------
  780|      0|          msg = "full_history_ts_low";
  781|      0|        } else if (str.empty()) {
  ------------------
  |  Branch (781:20): [True: 0, False: 0]
  ------------------
  782|      0|          msg = "full_history_ts_low: empty";
  783|      0|        } else {
  784|      0|          full_history_ts_low_.assign(str.data(), str.size());
  785|      0|        }
  786|      0|        break;
  787|       |
  788|  4.51k|      case kPersistUserDefinedTimestamps:
  ------------------
  |  Branch (788:7): [True: 4.51k, False: 40.6k]
  ------------------
  789|  4.51k|        if (!GetLengthPrefixedSlice(&input, &str)) {
  ------------------
  |  Branch (789:13): [True: 0, False: 4.51k]
  ------------------
  790|      0|          msg = "persist_user_defined_timestamps";
  791|  4.51k|        } else if (str.size() != 1) {
  ------------------
  |  Branch (791:20): [True: 0, False: 4.51k]
  ------------------
  792|      0|          msg = "persist_user_defined_timestamps field wrong size";
  793|  4.51k|        } else {
  794|  4.51k|          persist_user_defined_timestamps_ = (str[0] == 1);
  795|  4.51k|          has_persist_user_defined_timestamps_ = true;
  796|  4.51k|        }
  797|  4.51k|        break;
  798|       |
  799|      0|      default:
  ------------------
  |  Branch (799:7): [True: 0, False: 45.1k]
  ------------------
  800|      0|        if (tag & kTagSafeIgnoreMask) {
  ------------------
  |  Branch (800:13): [True: 0, False: 0]
  ------------------
  801|       |          // Tag from future which can be safely ignored.
  802|       |          // The next field must be the length of the entry.
  803|      0|          uint32_t field_len;
  804|      0|          if (!GetVarint32(&input, &field_len) ||
  ------------------
  |  Branch (804:15): [True: 0, False: 0]
  ------------------
  805|      0|              static_cast<size_t>(field_len) > input.size()) {
  ------------------
  |  Branch (805:15): [True: 0, False: 0]
  ------------------
  806|      0|            if (!msg) {
  ------------------
  |  Branch (806:17): [True: 0, False: 0]
  ------------------
  807|      0|              msg = "safely ignoreable tag length error";
  808|      0|            }
  809|      0|          } else {
  810|      0|            input.remove_prefix(static_cast<size_t>(field_len));
  811|      0|          }
  812|      0|        } else {
  813|      0|          msg = "unknown tag";
  814|      0|        }
  815|      0|        break;
  816|  45.1k|    }
  817|  45.1k|  }
  818|       |
  819|  22.5k|  if (msg == nullptr && !input.empty()) {
  ------------------
  |  Branch (819:7): [True: 22.5k, False: 0]
  |  Branch (819:25): [True: 0, False: 22.5k]
  ------------------
  820|      0|    msg = "invalid tag";
  821|      0|  }
  822|       |
  823|  22.5k|  Status result;
  824|  22.5k|  if (msg != nullptr) {
  ------------------
  |  Branch (824:7): [True: 0, False: 22.5k]
  ------------------
  825|      0|    result = Status::Corruption("VersionEdit", msg);
  826|      0|  }
  827|  22.5k|  return result;
  828|  22.5k|}

_ZN7rocksdb11VersionEdit15SetLastSequenceEm:
  454|  45.1k|  void SetLastSequence(SequenceNumber seq) {
  455|  45.1k|    has_last_sequence_ = true;
  456|  45.1k|    last_sequence_ = seq;
  457|  45.1k|  }
_ZNK7rocksdb11VersionEdit13IsWalAdditionEv:
  600|  40.6k|  bool IsWalAddition() const { return !wal_additions_.empty(); }
_ZN7rocksdb11VersionEdit15AddColumnFamilyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  634|  9.02k|  void AddColumnFamily(const std::string& name) {
  635|  9.02k|    assert(!is_column_family_drop_);
  636|  9.02k|    assert(!is_column_family_add_);
  637|  9.02k|    assert(NumEntries() == 0);
  638|  9.02k|    is_column_family_add_ = true;
  639|  9.02k|    column_family_name_ = name;
  640|  9.02k|  }
_ZN7rocksdb11VersionEdit15SetColumnFamilyEj:
  626|  22.5k|  void SetColumnFamily(uint32_t column_family_id) {
  627|  22.5k|    column_family_ = column_family_id;
  628|  22.5k|  }
_ZN7rocksdb11VersionEdit12SetLogNumberEm:
  419|  27.0k|  void SetLogNumber(uint64_t num) {
  420|  27.0k|    has_log_number_ = true;
  421|  27.0k|    log_number_ = num;
  422|  27.0k|  }
_ZN7rocksdb11VersionEdit17SetComparatorNameERKNS_5SliceE:
  401|  9.02k|  void SetComparatorName(const Slice& name) {
  402|  9.02k|    has_comparator_ = true;
  403|  9.02k|    comparator_ = name.ToString();
  404|  9.02k|  }
_ZN7rocksdb11VersionEdit31SetPersistUserDefinedTimestampsEb:
  408|  9.02k|  void SetPersistUserDefinedTimestamps(bool persist_user_defined_timestamps) {
  409|  9.02k|    has_persist_user_defined_timestamps_ = true;
  410|  9.02k|    persist_user_defined_timestamps_ = persist_user_defined_timestamps;
  411|  9.02k|  }
_ZNK7rocksdb14FileDescriptor9GetNumberEv:
  155|  89.6k|  uint64_t GetNumber() const {
  156|  89.6k|    return packed_number_and_path_id & kFileNumberMask;
  157|  89.6k|  }
_ZNK7rocksdb11VersionEdit15GetDeletedFilesEv:
  468|  40.6k|  const DeletedFiles& GetDeletedFiles() const { return deleted_files_; }
_ZNK7rocksdb14FileDescriptor9GetPathIdEv:
  158|  26.9k|  uint32_t GetPathId() const {
  159|  26.9k|    return static_cast<uint32_t>(packed_number_and_path_id /
  160|  26.9k|                                 (kFileNumberMask + 1));
  161|  26.9k|  }
_ZN7rocksdb14FileDescriptorC2ERKS0_:
  144|  17.9k|  FileDescriptor(const FileDescriptor& fd) { *this = fd; }
_ZN7rocksdb14FileDescriptoraSERKS0_:
  146|  26.9k|  FileDescriptor& operator=(const FileDescriptor& fd) {
  147|  26.9k|    table_reader = fd.table_reader;
  148|  26.9k|    packed_number_and_path_id = fd.packed_number_and_path_id;
  149|  26.9k|    file_size = fd.file_size;
  150|  26.9k|    smallest_seqno = fd.smallest_seqno;
  151|  26.9k|    largest_seqno = fd.largest_seqno;
  152|  26.9k|    return *this;
  153|  26.9k|  }
_ZN7rocksdb14FileDescriptorC2Ev:
  131|  31.5k|  FileDescriptor() : FileDescriptor(0, 0, 0) {}
_ZN7rocksdb14FileDescriptorC2Emjm:
  134|  36.0k|      : FileDescriptor(number, path_id, _file_size, kMaxSequenceNumber, 0) {}
_ZN7rocksdb14FileDescriptorC2Emjmmm:
  142|  40.5k|        largest_seqno(_largest_seqno) {}
_ZN7rocksdb16FileSampledStatsC2ERKS0_:
  167|  13.4k|  FileSampledStats(const FileSampledStats& other) { *this = other; }
_ZN7rocksdb16FileSampledStatsaSERKS0_:
  168|  13.4k|  FileSampledStats& operator=(const FileSampledStats& other) {
  169|  13.4k|    num_reads_sampled = other.num_reads_sampled.load();
  170|  13.4k|    return *this;
  171|  13.4k|  }
_ZNK7rocksdb14FileDescriptor11GetFileSizeEv:
  162|  76.2k|  uint64_t GetFileSize() const { return file_size; }
_ZN7rocksdb16FileSampledStatsC2Ev:
  166|  31.5k|  FileSampledStats() : num_reads_sampled(0) {}
_ZN7rocksdb12FileMetaDataC2EmjmRKNS_11InternalKeyES3_RKmS5_bNS_11TemperatureEmmmmRKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEESF_NS7_5arrayImLm2EEEmmb:
  288|  4.48k|        user_defined_timestamps_persisted(_user_defined_timestamps_persisted) {
  289|  4.48k|    TEST_SYNC_POINT_CALLBACK("FileMetaData::FileMetaData", this);
  290|  4.48k|  }
_ZN7rocksdb12FileMetaData24UpdateBoundariesForRangeERKNS_11InternalKeyES3_mRKNS_21InternalKeyComparatorE:
  301|   131k|                                const InternalKeyComparator& icmp) {
  302|   131k|    if (smallest.size() == 0 || icmp.Compare(start, smallest) < 0) {
  ------------------
  |  Branch (302:9): [True: 671, False: 130k]
  |  Branch (302:33): [True: 636, False: 129k]
  ------------------
  303|  1.30k|      smallest = start;
  304|  1.30k|    }
  305|   131k|    if (largest.size() == 0 || icmp.Compare(largest, end) < 0) {
  ------------------
  |  Branch (305:9): [True: 671, False: 130k]
  |  Branch (305:32): [True: 54.7k, False: 75.6k]
  ------------------
  306|  55.4k|      largest = end;
  307|  55.4k|    }
  308|   131k|    assert(icmp.Compare(smallest, largest) <= 0);
  309|   131k|    fd.smallest_seqno = std::min(fd.smallest_seqno, seqno);
  310|   131k|    fd.largest_seqno = std::max(fd.largest_seqno, seqno);
  311|   131k|  }
_ZN7rocksdb12FileMetaData24TryGetOldestAncesterTimeEv:
  316|  8.96k|  uint64_t TryGetOldestAncesterTime() {
  317|  8.96k|    if (oldest_ancester_time != kUnknownOldestAncesterTime) {
  ------------------
  |  Branch (317:9): [True: 8.96k, False: 0]
  ------------------
  318|  8.96k|      return oldest_ancester_time;
  319|  8.96k|    } else if (fd.table_reader != nullptr &&
  ------------------
  |  Branch (319:16): [True: 0, False: 0]
  |  Branch (319:16): [True: 0, False: 0]
  ------------------
  320|      0|               fd.table_reader->GetTableProperties() != nullptr) {
  ------------------
  |  Branch (320:16): [True: 0, False: 0]
  ------------------
  321|      0|      return fd.table_reader->GetTableProperties()->creation_time;
  322|      0|    }
  323|      0|    return kUnknownOldestAncesterTime;
  324|  8.96k|  }
_ZN7rocksdb12FileMetaData22TryGetFileCreationTimeEv:
  326|  4.48k|  uint64_t TryGetFileCreationTime() {
  327|  4.48k|    if (file_creation_time != kUnknownFileCreationTime) {
  ------------------
  |  Branch (327:9): [True: 0, False: 4.48k]
  ------------------
  328|      0|      return file_creation_time;
  329|  4.48k|    } else if (fd.table_reader != nullptr &&
  ------------------
  |  Branch (329:16): [True: 4.48k, False: 0]
  |  Branch (329:16): [True: 4.48k, False: 0]
  ------------------
  330|  4.48k|               fd.table_reader->GetTableProperties() != nullptr) {
  ------------------
  |  Branch (330:16): [True: 4.48k, False: 0]
  ------------------
  331|  4.48k|      return fd.table_reader->GetTableProperties()->file_creation_time;
  332|  4.48k|    }
  333|      0|    return kUnknownFileCreationTime;
  334|  4.48k|  }
_ZN7rocksdb14FdWithKeyRangeC2Ev:
  365|  4.48k|      : fd(), file_metadata(nullptr), smallest_key(), largest_key() {}
_ZN7rocksdb15LevelFilesBriefC2Ev:
  380|  4.48k|  LevelFilesBrief() {
  381|  4.48k|    num_files = 0;
  382|  4.48k|    files = nullptr;
  383|  4.48k|  }
_ZNK7rocksdb11VersionEdit7HasDbIdEv:
  398|  31.5k|  bool HasDbId() const { return has_db_id_; }
_ZNK7rocksdb11VersionEdit17HasComparatorNameEv:
  405|  22.5k|  bool HasComparatorName() const { return has_comparator_; }
_ZNK7rocksdb11VersionEdit17GetComparatorNameEv:
  406|  4.51k|  const std::string& GetComparatorName() const { return comparator_; }
_ZNK7rocksdb11VersionEdit31HasPersistUserDefinedTimestampsEv:
  412|  49.6k|  bool HasPersistUserDefinedTimestamps() const {
  413|  49.6k|    return has_persist_user_defined_timestamps_;
  414|  49.6k|  }
_ZNK7rocksdb11VersionEdit31GetPersistUserDefinedTimestampsEv:
  415|  4.51k|  bool GetPersistUserDefinedTimestamps() const {
  416|  4.51k|    return persist_user_defined_timestamps_;
  417|  4.51k|  }
_ZNK7rocksdb11VersionEdit12HasLogNumberEv:
  423|  67.7k|  bool HasLogNumber() const { return has_log_number_; }
_ZNK7rocksdb11VersionEdit12GetLogNumberEv:
  424|  63.1k|  uint64_t GetLogNumber() const { return log_number_; }
_ZN7rocksdb11VersionEdit16SetPrevLogNumberEm:
  426|  31.5k|  void SetPrevLogNumber(uint64_t num) {
  427|  31.5k|    has_prev_log_number_ = true;
  428|  31.5k|    prev_log_number_ = num;
  429|  31.5k|  }
_ZNK7rocksdb11VersionEdit16HasPrevLogNumberEv:
  430|  63.1k|  bool HasPrevLogNumber() const { return has_prev_log_number_; }
_ZNK7rocksdb11VersionEdit16GetPrevLogNumberEv:
  431|  31.5k|  uint64_t GetPrevLogNumber() const { return prev_log_number_; }
_ZN7rocksdb11VersionEdit11SetNextFileEm:
  433|  49.6k|  void SetNextFile(uint64_t num) {
  434|  49.6k|    has_next_file_number_ = true;
  435|  49.6k|    next_file_number_ = num;
  436|  49.6k|  }
_ZNK7rocksdb11VersionEdit11HasNextFileEv:
  437|  31.5k|  bool HasNextFile() const { return has_next_file_number_; }
_ZNK7rocksdb11VersionEdit11GetNextFileEv:
  438|  18.0k|  uint64_t GetNextFile() const { return next_file_number_; }
_ZNK7rocksdb11VersionEdit18HasMaxColumnFamilyEv:
  444|  22.5k|  bool HasMaxColumnFamily() const { return has_max_column_family_; }
_ZNK7rocksdb11VersionEdit18GetMaxColumnFamilyEv:
  445|  9.02k|  uint32_t GetMaxColumnFamily() const { return max_column_family_; }
_ZN7rocksdb11VersionEdit21SetMinLogNumberToKeepEm:
  447|  4.51k|  void SetMinLogNumberToKeep(uint64_t num) {
  448|  4.51k|    has_min_log_number_to_keep_ = true;
  449|  4.51k|    min_log_number_to_keep_ = num;
  450|  4.51k|  }
_ZNK7rocksdb11VersionEdit21HasMinLogNumberToKeepEv:
  451|  40.6k|  bool HasMinLogNumberToKeep() const { return has_min_log_number_to_keep_; }
_ZNK7rocksdb11VersionEdit21GetMinLogNumberToKeepEv:
  452|  13.5k|  uint64_t GetMinLogNumberToKeep() const { return min_log_number_to_keep_; }
_ZNK7rocksdb11VersionEdit15HasLastSequenceEv:
  458|  54.1k|  bool HasLastSequence() const { return has_last_sequence_; }
_ZNK7rocksdb11VersionEdit15GetLastSequenceEv:
  459|  31.5k|  SequenceNumber GetLastSequence() const { return last_sequence_; }
_ZN7rocksdb11VersionEdit7AddFileEimjmRKNS_11InternalKeyES3_RKmS5_bNS_11TemperatureEmmmmRKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEESF_RKNS7_5arrayImLm2EEEmmb:
  484|  4.48k|               uint64_t tail_size, bool user_defined_timestamps_persisted) {
  485|  4.48k|    assert(smallest_seqno <= largest_seqno);
  486|  4.48k|    new_files_.emplace_back(
  487|  4.48k|        level,
  488|  4.48k|        FileMetaData(file, file_path_id, file_size, smallest, largest,
  489|  4.48k|                     smallest_seqno, largest_seqno, marked_for_compaction,
  490|  4.48k|                     temperature, oldest_blob_file_number, oldest_ancester_time,
  491|  4.48k|                     file_creation_time, epoch_number, file_checksum,
  492|  4.48k|                     file_checksum_func_name, unique_id,
  493|  4.48k|                     compensated_range_deletion_size, tail_size,
  494|  4.48k|                     user_defined_timestamps_persisted));
  495|  4.48k|    files_to_quarantine_.push_back(file);
  496|  4.48k|    if (!HasLastSequence() || largest_seqno > GetLastSequence()) {
  ------------------
  |  Branch (496:9): [True: 4.48k, False: 0]
  |  Branch (496:31): [True: 0, False: 0]
  ------------------
  497|  4.48k|      SetLastSequence(largest_seqno);
  498|  4.48k|    }
  499|  4.48k|  }
_ZNK7rocksdb11VersionEdit11GetNewFilesEv:
  512|  63.1k|  const NewFiles& GetNewFiles() const { return new_files_; }
_ZNK7rocksdb11VersionEdit17GetCompactCursorsEv:
  518|  40.6k|  const CompactCursors& GetCompactCursors() const { return compact_cursors_; }
_ZN7rocksdb11VersionEdit17SetCompactCursorsERKNSt3__16vectorINS_11InternalKeyENS1_9allocatorIS3_EEEE:
  523|  9.02k|      const std::vector<InternalKey>& compact_cursors_by_level) {
  524|  9.02k|    compact_cursors_.clear();
  525|  9.02k|    compact_cursors_.reserve(compact_cursors_by_level.size());
  526|  72.2k|    for (int i = 0; i < (int)compact_cursors_by_level.size(); i++) {
  ------------------
  |  Branch (526:21): [True: 63.1k, False: 9.02k]
  ------------------
  527|  63.1k|      if (compact_cursors_by_level[i].Valid()) {
  ------------------
  |  Branch (527:11): [True: 0, False: 63.1k]
  ------------------
  528|      0|        compact_cursors_.push_back(
  529|      0|            std::make_pair(i, compact_cursors_by_level[i]));
  530|      0|      }
  531|  63.1k|    }
  532|  9.02k|  }
_ZNK7rocksdb11VersionEdit20GetBlobFileAdditionsEv:
  552|  45.1k|  const BlobFileAdditions& GetBlobFileAdditions() const {
  553|  45.1k|    return blob_file_additions_;
  554|  45.1k|  }
_ZNK7rocksdb11VersionEdit19GetBlobFileGarbagesEv:
  581|  40.6k|  const BlobFileGarbages& GetBlobFileGarbages() const {
  582|  40.6k|    return blob_file_garbages_;
  583|  40.6k|  }
_ZNK7rocksdb11VersionEdit15GetWalAdditionsEv:
  598|  9.02k|  const WalAdditions& GetWalAdditions() const { return wal_additions_; }
_ZN7rocksdb11VersionEdit16DeleteWalsBeforeEm:
  604|  9.02k|  void DeleteWalsBefore(WalNumber number) {
  605|  9.02k|    assert((NumEntries() == 1) == !wal_deletion_.IsEmpty());
  606|  9.02k|    wal_deletion_ = WalDeletion(number);
  607|  9.02k|  }
_ZNK7rocksdb11VersionEdit13IsWalDeletionEv:
  611|  40.6k|  bool IsWalDeletion() const { return !wal_deletion_.IsEmpty(); }
_ZNK7rocksdb11VersionEdit17IsWalManipulationEv:
  613|  9.02k|  bool IsWalManipulation() const {
  614|  9.02k|    size_t entries = NumEntries();
  615|  9.02k|    return (entries > 0) && ((entries == wal_additions_.size()) ||
  ------------------
  |  Branch (615:12): [True: 0, False: 9.02k]
  |  Branch (615:30): [True: 0, False: 0]
  ------------------
  616|      0|                             (entries == !wal_deletion_.IsEmpty()));
  ------------------
  |  Branch (616:30): [True: 0, False: 0]
  ------------------
  617|  9.02k|  }
_ZNK7rocksdb11VersionEdit10NumEntriesEv:
  620|  9.02k|  size_t NumEntries() const {
  621|  9.02k|    return new_files_.size() + deleted_files_.size() +
  622|  9.02k|           blob_file_additions_.size() + blob_file_garbages_.size() +
  623|  9.02k|           wal_additions_.size() + !wal_deletion_.IsEmpty();
  624|  9.02k|  }
_ZNK7rocksdb11VersionEdit15GetColumnFamilyEv:
  629|   103k|  uint32_t GetColumnFamily() const { return column_family_; }
_ZNK7rocksdb11VersionEdit19GetColumnFamilyNameEv:
  631|  9.02k|  const std::string& GetColumnFamilyName() const { return column_family_name_; }
_ZNK7rocksdb11VersionEdit26IsColumnFamilyManipulationEv:
  650|  54.1k|  bool IsColumnFamilyManipulation() const {
  651|  54.1k|    return is_column_family_add_ || is_column_family_drop_;
  ------------------
  |  Branch (651:12): [True: 0, False: 54.1k]
  |  Branch (651:37): [True: 0, False: 54.1k]
  ------------------
  652|  54.1k|  }
_ZNK7rocksdb11VersionEdit17IsColumnFamilyAddEv:
  654|  31.5k|  bool IsColumnFamilyAdd() const { return is_column_family_add_; }
_ZNK7rocksdb11VersionEdit18IsColumnFamilyDropEv:
  656|  40.6k|  bool IsColumnFamilyDrop() const { return is_column_family_drop_; }
_ZNK7rocksdb11VersionEdit15IsInAtomicGroupEv:
  662|  63.1k|  bool IsInAtomicGroup() const { return is_in_atomic_group_; }
_ZNK7rocksdb11VersionEdit19HasFullHistoryTsLowEv:
  668|  90.2k|  bool HasFullHistoryTsLow() const { return !full_history_ts_low_.empty(); }
_ZNK7rocksdb11VersionEdit32GetFilesToQuarantineIfCommitFailEv:
  692|  18.0k|  const autovector<uint64_t>* GetFilesToQuarantineIfCommitFail() const {
  693|  18.0k|    return &files_to_quarantine_;
  694|  18.0k|  }
_ZN7rocksdb12FileMetaDataC2Ev:
  261|  27.0k|  FileMetaData() = default;

_ZN7rocksdb22VersionEditHandlerBase7IterateERNS_3log6ReaderEPNS_6StatusE:
   25|  9.02k|                                     Status* log_read_status) {
   26|  9.02k|  Slice record;
   27|  9.02k|  std::string scratch;
   28|  9.02k|  assert(log_read_status);
   29|  9.02k|  assert(log_read_status->ok());
   30|       |
   31|  9.02k|  [[maybe_unused]] size_t recovered_edits = 0;
   32|  9.02k|  Status s = Initialize();
   33|  31.5k|  while (reader.LastRecordEnd() < max_manifest_read_size_ && s.ok() &&
  ------------------
  |  Branch (33:10): [True: 31.5k, False: 0]
  |  Branch (33:62): [True: 31.5k, False: 0]
  ------------------
   34|  31.5k|         reader.ReadRecord(&record, &scratch) && log_read_status->ok()) {
  ------------------
  |  Branch (34:10): [True: 22.5k, False: 9.02k]
  |  Branch (34:50): [True: 22.5k, False: 0]
  ------------------
   35|  22.5k|    VersionEdit edit;
   36|  22.5k|    s = edit.DecodeFrom(record);
   37|  22.5k|    if (s.ok()) {
  ------------------
  |  Branch (37:9): [True: 22.5k, False: 0]
  ------------------
   38|  22.5k|      s = read_buffer_.AddEdit(&edit);
   39|  22.5k|    }
   40|  22.5k|    if (s.ok()) {
  ------------------
  |  Branch (40:9): [True: 22.5k, False: 0]
  ------------------
   41|  22.5k|      ColumnFamilyData* cfd = nullptr;
   42|  22.5k|      if (edit.IsInAtomicGroup()) {
  ------------------
  |  Branch (42:11): [True: 0, False: 22.5k]
  ------------------
   43|      0|        if (read_buffer_.IsFull()) {
  ------------------
  |  Branch (43:13): [True: 0, False: 0]
  ------------------
   44|      0|          s = OnAtomicGroupReplayBegin();
   45|      0|          for (size_t i = 0; s.ok() && i < read_buffer_.replay_buffer().size();
  ------------------
  |  Branch (45:30): [True: 0, False: 0]
  |  Branch (45:40): [True: 0, False: 0]
  ------------------
   46|      0|               i++) {
   47|      0|            auto& e = read_buffer_.replay_buffer()[i];
   48|      0|            s = ApplyVersionEdit(e, &cfd);
   49|      0|            if (s.ok()) {
  ------------------
  |  Branch (49:17): [True: 0, False: 0]
  ------------------
   50|      0|              recovered_edits++;
   51|      0|            }
   52|      0|          }
   53|      0|          if (s.ok()) {
  ------------------
  |  Branch (53:15): [True: 0, False: 0]
  ------------------
   54|      0|            read_buffer_.Clear();
   55|      0|            s = OnAtomicGroupReplayEnd();
   56|      0|          }
   57|      0|        }
   58|  22.5k|      } else {
   59|  22.5k|        s = ApplyVersionEdit(edit, &cfd);
   60|  22.5k|        if (s.ok()) {
  ------------------
  |  Branch (60:13): [True: 22.5k, False: 0]
  ------------------
   61|  22.5k|          recovered_edits++;
   62|  22.5k|        }
   63|  22.5k|      }
   64|  22.5k|    }
   65|  22.5k|  }
   66|  9.02k|  if (s.ok() && !log_read_status->ok()) {
  ------------------
  |  Branch (66:7): [True: 9.02k, False: 0]
  |  Branch (66:17): [True: 0, False: 9.02k]
  ------------------
   67|      0|    s = *log_read_status;
   68|      0|  }
   69|       |
   70|  9.02k|  CheckIterationResult(reader, &s);
   71|       |
   72|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (72:7): [True: 0, False: 9.02k]
  ------------------
   73|      0|    if (s.IsCorruption()) {
  ------------------
  |  Branch (73:9): [True: 0, False: 0]
  ------------------
   74|       |      // when we find a Corruption error, something is
   75|       |      // wrong with the underlying file. in this case we
   76|       |      // want to report the filename, so in here we append
   77|       |      // the filename to the Corruption message
   78|      0|      assert(reader.file());
   79|       |
   80|       |      // build a new error message
   81|      0|      std::stringstream message;
   82|       |      // append previous dynamic state message
   83|      0|      const char* state = s.getState();
   84|      0|      if (state != nullptr) {
  ------------------
  |  Branch (84:11): [True: 0, False: 0]
  ------------------
   85|      0|        message << state;
   86|      0|        message << ' ';
   87|      0|      }
   88|       |      // append the filename to the corruption message
   89|      0|      message << " The file " << reader.file()->file_name()
   90|      0|              << " may be corrupted.";
   91|       |      // overwrite the status with the extended status
   92|      0|      s = Status(s.code(), s.subcode(), s.severity(), message.str());
   93|      0|    }
   94|      0|    status_ = s;
   95|      0|  }
   96|  9.02k|  TEST_SYNC_POINT_CALLBACK("VersionEditHandlerBase::Iterate:Finish",
   97|  9.02k|                           &recovered_edits);
   98|  9.02k|}
_ZN7rocksdb18VersionEditHandlerC2EbNSt3__16vectorINS_22ColumnFamilyDescriptorENS1_9allocatorIS3_EEEEPNS_10VersionSetEbbRKNS1_10shared_ptrINS_8IOTracerEEERKNS_11ReadOptionsEbNS_22EpochNumberRequirementE:
  168|  9.02k|      epoch_number_requirement_(epoch_number_requirement) {
  169|  9.02k|  assert(version_set_ != nullptr);
  170|  9.02k|}
_ZN7rocksdb18VersionEditHandler10InitializeEv:
  172|  9.02k|Status VersionEditHandler::Initialize() {
  173|  9.02k|  Status s;
  174|  9.02k|  if (!initialized_) {
  ------------------
  |  Branch (174:7): [True: 9.02k, False: 0]
  ------------------
  175|  9.02k|    for (const auto& cf_desc : column_families_) {
  ------------------
  |  Branch (175:30): [True: 9.02k, False: 9.02k]
  ------------------
  176|  9.02k|      name_to_options_.emplace(cf_desc.name, cf_desc.options);
  177|  9.02k|    }
  178|  9.02k|    auto default_cf_iter = name_to_options_.find(kDefaultColumnFamilyName);
  179|  9.02k|    if (default_cf_iter == name_to_options_.end()) {
  ------------------
  |  Branch (179:9): [True: 0, False: 9.02k]
  ------------------
  180|      0|      s = Status::InvalidArgument("Default column family not specified");
  181|      0|    }
  182|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (182:9): [True: 9.02k, False: 0]
  ------------------
  183|  9.02k|      VersionEdit default_cf_edit;
  184|  9.02k|      default_cf_edit.AddColumnFamily(kDefaultColumnFamilyName);
  185|  9.02k|      default_cf_edit.SetColumnFamily(0);
  186|  9.02k|      ColumnFamilyData* cfd =
  187|  9.02k|          CreateCfAndInit(default_cf_iter->second, default_cf_edit);
  188|  9.02k|      assert(cfd != nullptr);
  189|  9.02k|#ifdef NDEBUG
  190|  9.02k|      (void)cfd;
  191|  9.02k|#endif
  192|  9.02k|      initialized_ = true;
  193|  9.02k|    }
  194|  9.02k|  }
  195|  9.02k|  return s;
  196|  9.02k|}
_ZN7rocksdb18VersionEditHandler16ApplyVersionEditERNS_11VersionEditEPPNS_16ColumnFamilyDataE:
  199|  22.5k|                                            ColumnFamilyData** cfd) {
  200|  22.5k|  Status s;
  201|  22.5k|  if (edit.IsColumnFamilyAdd()) {
  ------------------
  |  Branch (201:7): [True: 0, False: 22.5k]
  ------------------
  202|      0|    s = OnColumnFamilyAdd(edit, cfd);
  203|  22.5k|  } else if (edit.IsColumnFamilyDrop()) {
  ------------------
  |  Branch (203:14): [True: 0, False: 22.5k]
  ------------------
  204|      0|    s = OnColumnFamilyDrop(edit, cfd);
  205|  22.5k|  } else if (edit.IsWalAddition()) {
  ------------------
  |  Branch (205:14): [True: 0, False: 22.5k]
  ------------------
  206|      0|    s = OnWalAddition(edit);
  207|  22.5k|  } else if (edit.IsWalDeletion()) {
  ------------------
  |  Branch (207:14): [True: 0, False: 22.5k]
  ------------------
  208|      0|    s = OnWalDeletion(edit);
  209|  22.5k|  } else {
  210|  22.5k|    s = OnNonCfOperation(edit, cfd);
  211|  22.5k|  }
  212|  22.5k|  if (s.ok()) {
  ------------------
  |  Branch (212:7): [True: 22.5k, False: 0]
  ------------------
  213|  22.5k|    assert(cfd != nullptr);
  214|  22.5k|    s = ExtractInfoFromVersionEdit(*cfd, edit);
  215|  22.5k|  }
  216|  22.5k|  return s;
  217|  22.5k|}
_ZN7rocksdb18VersionEditHandler16OnNonCfOperationERNS_11VersionEditEPPNS_16ColumnFamilyDataE:
  290|  22.5k|                                            ColumnFamilyData** cfd) {
  291|  22.5k|  bool cf_in_not_found = false;
  292|  22.5k|  bool cf_in_builders = false;
  293|  22.5k|  CheckColumnFamilyId(edit, &cf_in_not_found, &cf_in_builders);
  294|       |
  295|  22.5k|  assert(cfd != nullptr);
  296|  22.5k|  *cfd = nullptr;
  297|  22.5k|  Status s;
  298|  22.5k|  if (!cf_in_not_found) {
  ------------------
  |  Branch (298:7): [True: 22.5k, False: 0]
  ------------------
  299|  22.5k|    if (!cf_in_builders) {
  ------------------
  |  Branch (299:9): [True: 0, False: 22.5k]
  ------------------
  300|      0|      s = Status::Corruption(
  301|      0|          "MANIFEST record referencing unknown column family");
  302|      0|    }
  303|  22.5k|    ColumnFamilyData* tmp_cfd = nullptr;
  304|  22.5k|    if (s.ok()) {
  ------------------
  |  Branch (304:9): [True: 22.5k, False: 0]
  ------------------
  305|  22.5k|      auto builder_iter = builders_.find(edit.GetColumnFamily());
  306|  22.5k|      assert(builder_iter != builders_.end());
  307|  22.5k|      tmp_cfd = version_set_->GetColumnFamilySet()->GetColumnFamily(
  308|  22.5k|          edit.GetColumnFamily());
  309|  22.5k|      assert(tmp_cfd != nullptr);
  310|       |      // It's important to handle file boundaries before `MaybeCreateVersion`
  311|       |      // because `VersionEditHandlerPointInTime::MaybeCreateVersion` does
  312|       |      // `FileMetaData` verification that involves the file boundaries.
  313|       |      // All `VersionEditHandlerBase` subclasses that need to deal with
  314|       |      // `FileMetaData` for new files are also subclasses of
  315|       |      // `VersionEditHandler`, so it's sufficient to do the file boundaries
  316|       |      // handling in this method.
  317|  22.5k|      s = MaybeHandleFileBoundariesForNewFiles(edit, tmp_cfd);
  318|  22.5k|      if (!s.ok()) {
  ------------------
  |  Branch (318:11): [True: 0, False: 22.5k]
  ------------------
  319|      0|        return s;
  320|      0|      }
  321|  22.5k|      s = MaybeCreateVersion(edit, tmp_cfd, /*force_create_version=*/false);
  322|  22.5k|      if (s.ok()) {
  ------------------
  |  Branch (322:11): [True: 22.5k, False: 0]
  ------------------
  323|  22.5k|        s = builder_iter->second->version_builder()->Apply(&edit);
  324|  22.5k|      }
  325|  22.5k|    }
  326|  22.5k|    *cfd = tmp_cfd;
  327|  22.5k|  }
  328|  22.5k|  return s;
  329|  22.5k|}
_ZNK7rocksdb18VersionEditHandler19CheckColumnFamilyIdERKNS_11VersionEditEPbS4_:
  354|  22.5k|                                             bool* cf_in_builders) const {
  355|  22.5k|  assert(cf_in_not_found != nullptr);
  356|  22.5k|  assert(cf_in_builders != nullptr);
  357|       |  // Not found means that user didn't supply that column
  358|       |  // family option AND we encountered column family add
  359|       |  // record. Once we encounter column family drop record,
  360|       |  // we will delete the column family from
  361|       |  // column_families_not_found.
  362|  22.5k|  uint32_t cf_id = edit.GetColumnFamily();
  363|  22.5k|  bool in_not_found = column_families_not_found_.find(cf_id) !=
  364|  22.5k|                      column_families_not_found_.end();
  365|       |  // in builders means that user supplied that column family
  366|       |  // option AND that we encountered column family add record
  367|  22.5k|  bool in_builders = builders_.find(cf_id) != builders_.end();
  368|       |  // They cannot both be true
  369|  22.5k|  assert(!(in_not_found && in_builders));
  370|  22.5k|  *cf_in_not_found = in_not_found;
  371|  22.5k|  *cf_in_builders = in_builders;
  372|  22.5k|}
_ZN7rocksdb18VersionEditHandler20CheckIterationResultERKNS_3log6ReaderEPNS_6StatusE:
  375|  9.02k|                                              Status* s) {
  376|  9.02k|  assert(s != nullptr);
  377|  9.02k|  if (!s->ok()) {
  ------------------
  |  Branch (377:7): [True: 0, False: 9.02k]
  ------------------
  378|       |    // Do nothing here.
  379|  9.02k|  } else if (!version_edit_params_.HasLogNumber() ||
  ------------------
  |  Branch (379:14): [True: 0, False: 9.02k]
  ------------------
  380|  9.02k|             !version_edit_params_.HasNextFile() ||
  ------------------
  |  Branch (380:14): [True: 0, False: 9.02k]
  ------------------
  381|  9.02k|             !version_edit_params_.HasLastSequence()) {
  ------------------
  |  Branch (381:14): [True: 0, False: 9.02k]
  ------------------
  382|      0|    std::string msg("no ");
  383|      0|    if (!version_edit_params_.HasLogNumber()) {
  ------------------
  |  Branch (383:9): [True: 0, False: 0]
  ------------------
  384|      0|      msg.append("log_file_number, ");
  385|      0|    }
  386|      0|    if (!version_edit_params_.HasNextFile()) {
  ------------------
  |  Branch (386:9): [True: 0, False: 0]
  ------------------
  387|      0|      msg.append("next_file_number, ");
  388|      0|    }
  389|      0|    if (!version_edit_params_.HasLastSequence()) {
  ------------------
  |  Branch (389:9): [True: 0, False: 0]
  ------------------
  390|      0|      msg.append("last_sequence, ");
  391|      0|    }
  392|      0|    msg = msg.substr(0, msg.size() - 2);
  393|      0|    msg.append(" entry in MANIFEST");
  394|      0|    *s = Status::Corruption(msg);
  395|      0|  }
  396|       |  // There were some column families in the MANIFEST that weren't specified
  397|       |  // in the argument. This is OK in read_only mode
  398|  9.02k|  if (s->ok() && MustOpenAllColumnFamilies() &&
  ------------------
  |  Branch (398:7): [True: 9.02k, False: 0]
  |  Branch (398:18): [True: 9.02k, False: 0]
  ------------------
  399|  9.02k|      !column_families_not_found_.empty()) {
  ------------------
  |  Branch (399:7): [True: 0, False: 9.02k]
  ------------------
  400|      0|    std::string msg;
  401|      0|    for (const auto& cf : column_families_not_found_) {
  ------------------
  |  Branch (401:25): [True: 0, False: 0]
  ------------------
  402|      0|      msg.append(", ");
  403|      0|      msg.append(cf.second);
  404|      0|    }
  405|      0|    msg = msg.substr(2);
  406|      0|    *s = Status::InvalidArgument("Column families not opened: " + msg);
  407|      0|  }
  408|  9.02k|  if (s->ok()) {
  ------------------
  |  Branch (408:7): [True: 9.02k, False: 0]
  ------------------
  409|  9.02k|    version_set_->GetColumnFamilySet()->UpdateMaxColumnFamily(
  410|  9.02k|        version_edit_params_.GetMaxColumnFamily());
  411|  9.02k|    version_set_->MarkMinLogNumberToKeep(
  412|  9.02k|        version_edit_params_.GetMinLogNumberToKeep());
  413|  9.02k|    version_set_->MarkFileNumberUsed(version_edit_params_.GetPrevLogNumber());
  414|  9.02k|    version_set_->MarkFileNumberUsed(version_edit_params_.GetLogNumber());
  415|  9.02k|    for (auto* cfd : *(version_set_->GetColumnFamilySet())) {
  ------------------
  |  Branch (415:20): [True: 9.02k, False: 9.02k]
  ------------------
  416|  9.02k|      if (cfd->IsDropped()) {
  ------------------
  |  Branch (416:11): [True: 0, False: 9.02k]
  ------------------
  417|      0|        continue;
  418|      0|      }
  419|  9.02k|      auto builder_iter = builders_.find(cfd->GetID());
  420|  9.02k|      assert(builder_iter != builders_.end());
  421|  9.02k|      auto* builder = builder_iter->second->version_builder();
  422|  9.02k|      if (!builder->CheckConsistencyForNumLevels()) {
  ------------------
  |  Branch (422:11): [True: 0, False: 9.02k]
  ------------------
  423|      0|        *s = Status::InvalidArgument(
  424|      0|            "db has more levels than options.num_levels");
  425|      0|        break;
  426|      0|      }
  427|  9.02k|    }
  428|  9.02k|  }
  429|  9.02k|  if (s->ok()) {
  ------------------
  |  Branch (429:7): [True: 9.02k, False: 0]
  ------------------
  430|  9.02k|    for (auto* cfd : *(version_set_->GetColumnFamilySet())) {
  ------------------
  |  Branch (430:20): [True: 9.02k, False: 9.02k]
  ------------------
  431|  9.02k|      if (cfd->IsDropped()) {
  ------------------
  |  Branch (431:11): [True: 0, False: 9.02k]
  ------------------
  432|      0|        continue;
  433|      0|      }
  434|  9.02k|      if (read_only_) {
  ------------------
  |  Branch (434:11): [True: 0, False: 9.02k]
  ------------------
  435|      0|        cfd->table_cache()->SetTablesAreImmortal();
  436|      0|      }
  437|  9.02k|      *s = LoadTables(cfd, /*prefetch_index_and_filter_in_cache=*/false,
  438|  9.02k|                      /*is_initial_load=*/true);
  439|  9.02k|      if (!s->ok()) {
  ------------------
  |  Branch (439:11): [True: 0, False: 9.02k]
  ------------------
  440|       |        // If s is IOError::PathNotFound, then we mark the db as corrupted.
  441|      0|        if (s->IsPathNotFound()) {
  ------------------
  |  Branch (441:13): [True: 0, False: 0]
  ------------------
  442|      0|          *s = Status::Corruption("Corruption: " + s->ToString());
  443|      0|        }
  444|      0|        break;
  445|      0|      }
  446|  9.02k|    }
  447|  9.02k|  }
  448|       |
  449|  9.02k|  if (s->ok()) {
  ------------------
  |  Branch (449:7): [True: 9.02k, False: 0]
  ------------------
  450|  9.02k|    for (auto* cfd : *(version_set_->column_family_set_)) {
  ------------------
  |  Branch (450:20): [True: 9.02k, False: 9.02k]
  ------------------
  451|  9.02k|      if (cfd->IsDropped()) {
  ------------------
  |  Branch (451:11): [True: 0, False: 9.02k]
  ------------------
  452|      0|        continue;
  453|      0|      }
  454|  9.02k|      assert(cfd->initialized());
  455|  9.02k|      VersionEdit edit;
  456|  9.02k|      *s = MaybeCreateVersion(edit, cfd, /*force_create_version=*/true);
  457|  9.02k|      if (!s->ok()) {
  ------------------
  |  Branch (457:11): [True: 0, False: 9.02k]
  ------------------
  458|      0|        break;
  459|      0|      }
  460|  9.02k|    }
  461|  9.02k|  }
  462|  9.02k|  if (s->ok()) {
  ------------------
  |  Branch (462:7): [True: 9.02k, False: 0]
  ------------------
  463|  9.02k|    version_set_->manifest_file_size_ = reader.GetReadOffset();
  464|  9.02k|    assert(version_set_->manifest_file_size_ > 0);
  465|  9.02k|    version_set_->next_file_number_.store(version_edit_params_.GetNextFile() +
  466|  9.02k|                                          1);
  467|  9.02k|    SequenceNumber last_seq = version_edit_params_.GetLastSequence();
  468|  9.02k|    assert(last_seq != kMaxSequenceNumber);
  469|  9.02k|    if (last_seq != kMaxSequenceNumber &&
  ------------------
  |  Branch (469:9): [True: 9.02k, False: 0]
  ------------------
  470|  9.02k|        last_seq > version_set_->last_allocated_sequence_.load()) {
  ------------------
  |  Branch (470:9): [True: 0, False: 9.02k]
  ------------------
  471|      0|      version_set_->last_allocated_sequence_.store(last_seq);
  472|      0|    }
  473|  9.02k|    if (last_seq != kMaxSequenceNumber &&
  ------------------
  |  Branch (473:9): [True: 9.02k, False: 0]
  ------------------
  474|  9.02k|        last_seq > version_set_->last_published_sequence_.load()) {
  ------------------
  |  Branch (474:9): [True: 0, False: 9.02k]
  ------------------
  475|      0|      version_set_->last_published_sequence_.store(last_seq);
  476|      0|    }
  477|  9.02k|    if (last_seq != kMaxSequenceNumber &&
  ------------------
  |  Branch (477:9): [True: 9.02k, False: 0]
  ------------------
  478|  9.02k|        last_seq > version_set_->last_sequence_.load()) {
  ------------------
  |  Branch (478:9): [True: 0, False: 9.02k]
  ------------------
  479|      0|      version_set_->last_sequence_.store(last_seq);
  480|      0|    }
  481|  9.02k|    if (last_seq != kMaxSequenceNumber &&
  ------------------
  |  Branch (481:9): [True: 9.02k, False: 0]
  ------------------
  482|  9.02k|        last_seq > version_set_->descriptor_last_sequence_) {
  ------------------
  |  Branch (482:9): [True: 0, False: 9.02k]
  ------------------
  483|       |      // This is the maximum last sequence of all `VersionEdit`s iterated. It
  484|       |      // may be greater than the maximum `largest_seqno` of all files in case
  485|       |      // the newest data referred to by the MANIFEST has been dropped or had its
  486|       |      // sequence number zeroed through compaction.
  487|      0|      version_set_->descriptor_last_sequence_ = last_seq;
  488|      0|    }
  489|  9.02k|    version_set_->prev_log_number_ = version_edit_params_.GetPrevLogNumber();
  490|  9.02k|  }
  491|  9.02k|}
_ZN7rocksdb18VersionEditHandler15CreateCfAndInitERKNS_19ColumnFamilyOptionsERKNS_11VersionEditE:
  494|  9.02k|    const ColumnFamilyOptions& cf_options, const VersionEdit& edit) {
  495|  9.02k|  uint32_t cf_id = edit.GetColumnFamily();
  496|  9.02k|  ColumnFamilyData* cfd =
  497|  9.02k|      version_set_->CreateColumnFamily(cf_options, read_options_, &edit);
  498|  9.02k|  assert(cfd != nullptr);
  499|  9.02k|  cfd->set_initialized();
  500|  9.02k|  assert(builders_.find(cf_id) == builders_.end());
  501|  9.02k|  builders_.emplace(cf_id,
  502|  9.02k|                    VersionBuilderUPtr(new BaseReferencedVersionBuilder(cfd)));
  503|  9.02k|  if (track_found_and_missing_files_) {
  ------------------
  |  Branch (503:7): [True: 0, False: 9.02k]
  ------------------
  504|      0|    cf_to_found_files_.emplace(cf_id, std::unordered_set<uint64_t>());
  505|      0|    cf_to_missing_files_.emplace(cf_id, std::unordered_set<uint64_t>());
  506|      0|    cf_to_missing_blob_files_high_.emplace(cf_id, kInvalidBlobFileNumber);
  507|      0|  }
  508|  9.02k|  return cfd;
  509|  9.02k|}
_ZN7rocksdb18VersionEditHandler18MaybeCreateVersionERKNS_11VersionEditEPNS_16ColumnFamilyDataEb:
  543|  31.5k|                                              bool force_create_version) {
  544|  31.5k|  assert(cfd->initialized());
  545|  31.5k|  Status s;
  546|  31.5k|  if (force_create_version) {
  ------------------
  |  Branch (546:7): [True: 9.02k, False: 22.5k]
  ------------------
  547|  9.02k|    auto builder_iter = builders_.find(cfd->GetID());
  548|  9.02k|    assert(builder_iter != builders_.end());
  549|  9.02k|    auto* builder = builder_iter->second->version_builder();
  550|  9.02k|    auto* v = new Version(cfd, version_set_, version_set_->file_options_,
  551|  9.02k|                          *cfd->GetLatestMutableCFOptions(), io_tracer_,
  552|  9.02k|                          version_set_->current_version_number_++,
  553|  9.02k|                          epoch_number_requirement_);
  554|  9.02k|    s = builder->SaveTo(v->storage_info());
  555|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (555:9): [True: 9.02k, False: 0]
  ------------------
  556|       |      // Install new version
  557|  9.02k|      v->PrepareAppend(
  558|  9.02k|          *cfd->GetLatestMutableCFOptions(), read_options_,
  559|  9.02k|          !(version_set_->db_options_->skip_stats_update_on_db_open));
  560|  9.02k|      version_set_->AppendVersion(cfd, v);
  561|  9.02k|    } else {
  562|      0|      delete v;
  563|      0|    }
  564|  9.02k|  }
  565|  31.5k|  return s;
  566|  31.5k|}
_ZN7rocksdb18VersionEditHandler10LoadTablesEPNS_16ColumnFamilyDataEbb:
  570|  9.02k|                                      bool is_initial_load) {
  571|  9.02k|  bool skip_load_table_files = skip_load_table_files_;
  572|  9.02k|  TEST_SYNC_POINT_CALLBACK(
  573|  9.02k|      "VersionEditHandler::LoadTables:skip_load_table_files",
  574|  9.02k|      &skip_load_table_files);
  575|  9.02k|  if (skip_load_table_files) {
  ------------------
  |  Branch (575:7): [True: 0, False: 9.02k]
  ------------------
  576|      0|    return Status::OK();
  577|      0|  }
  578|  9.02k|  assert(cfd != nullptr);
  579|  9.02k|  assert(!cfd->IsDropped());
  580|  9.02k|  auto builder_iter = builders_.find(cfd->GetID());
  581|  9.02k|  assert(builder_iter != builders_.end());
  582|  9.02k|  assert(builder_iter->second != nullptr);
  583|  9.02k|  VersionBuilder* builder = builder_iter->second->version_builder();
  584|  9.02k|  assert(builder);
  585|  9.02k|  const MutableCFOptions* moptions = cfd->GetLatestMutableCFOptions();
  586|  9.02k|  Status s = builder->LoadTableHandlers(
  587|  9.02k|      cfd->internal_stats(),
  588|  9.02k|      version_set_->db_options_->max_file_opening_threads,
  589|  9.02k|      prefetch_index_and_filter_in_cache, is_initial_load,
  590|  9.02k|      moptions->prefix_extractor, MaxFileSizeForL0MetaPin(*moptions),
  591|  9.02k|      read_options_, moptions->block_protection_bytes_per_key);
  592|  9.02k|  if ((s.IsPathNotFound() || s.IsCorruption()) && no_error_if_files_missing_) {
  ------------------
  |  Branch (592:8): [True: 0, False: 9.02k]
  |  Branch (592:30): [True: 0, False: 9.02k]
  |  Branch (592:51): [True: 0, False: 0]
  ------------------
  593|      0|    s = Status::OK();
  594|      0|  }
  595|  9.02k|  if (!s.ok() && !version_set_->db_options_->paranoid_checks) {
  ------------------
  |  Branch (595:7): [True: 0, False: 9.02k]
  |  Branch (595:18): [True: 0, False: 0]
  ------------------
  596|      0|    s = Status::OK();
  597|      0|  }
  598|  9.02k|  return s;
  599|  9.02k|}
_ZN7rocksdb18VersionEditHandler26ExtractInfoFromVersionEditEPNS_16ColumnFamilyDataERKNS_11VersionEditE:
  602|  22.5k|                                                      const VersionEdit& edit) {
  603|  22.5k|  Status s;
  604|  22.5k|  if (edit.HasDbId()) {
  ------------------
  |  Branch (604:7): [True: 0, False: 22.5k]
  ------------------
  605|      0|    version_set_->db_id_ = edit.GetDbId();
  606|      0|    version_edit_params_.SetDBId(edit.GetDbId());
  607|      0|  }
  608|  22.5k|  if (cfd != nullptr) {
  ------------------
  |  Branch (608:7): [True: 22.5k, False: 0]
  ------------------
  609|  22.5k|    if (edit.HasLogNumber()) {
  ------------------
  |  Branch (609:9): [True: 9.02k, False: 13.5k]
  ------------------
  610|  9.02k|      if (cfd->GetLogNumber() > edit.GetLogNumber()) {
  ------------------
  |  Branch (610:11): [True: 0, False: 9.02k]
  ------------------
  611|      0|        ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  612|      0|            version_set_->db_options()->info_log,
  613|      0|            "MANIFEST corruption detected, but ignored - Log numbers in "
  614|      0|            "records NOT monotonically increasing");
  615|  9.02k|      } else {
  616|  9.02k|        cfd->SetLogNumber(edit.GetLogNumber());
  617|  9.02k|        version_edit_params_.SetLogNumber(edit.GetLogNumber());
  618|  9.02k|      }
  619|  9.02k|    }
  620|  22.5k|    if (edit.HasComparatorName()) {
  ------------------
  |  Branch (620:9): [True: 4.51k, False: 18.0k]
  ------------------
  621|  4.51k|      bool mark_sst_files_has_no_udt = false;
  622|       |      // If `persist_user_defined_timestamps` flag is recorded in manifest, it
  623|       |      // is guaranteed to be in the same VersionEdit as comparator. Otherwise,
  624|       |      // it's not recorded and it should have default value true.
  625|  4.51k|      s = ValidateUserDefinedTimestampsOptions(
  626|  4.51k|          cfd->user_comparator(), edit.GetComparatorName(),
  627|  4.51k|          cfd->ioptions()->persist_user_defined_timestamps,
  628|  4.51k|          edit.GetPersistUserDefinedTimestamps(), &mark_sst_files_has_no_udt);
  629|  4.51k|      if (!s.ok() && cf_to_cmp_names_) {
  ------------------
  |  Branch (629:11): [True: 0, False: 4.51k]
  |  Branch (629:22): [True: 0, False: 0]
  ------------------
  630|      0|        cf_to_cmp_names_->emplace(cfd->GetID(), edit.GetComparatorName());
  631|      0|      }
  632|  4.51k|      if (mark_sst_files_has_no_udt) {
  ------------------
  |  Branch (632:11): [True: 0, False: 4.51k]
  ------------------
  633|      0|        cfds_to_mark_no_udt_.insert(cfd->GetID());
  634|      0|      }
  635|  4.51k|    }
  636|  22.5k|    if (edit.HasFullHistoryTsLow()) {
  ------------------
  |  Branch (636:9): [True: 0, False: 22.5k]
  ------------------
  637|      0|      const std::string& new_ts = edit.GetFullHistoryTsLow();
  638|      0|      cfd->SetFullHistoryTsLow(new_ts);
  639|      0|    }
  640|  22.5k|  }
  641|       |
  642|  22.5k|  if (s.ok()) {
  ------------------
  |  Branch (642:7): [True: 22.5k, False: 0]
  ------------------
  643|  22.5k|    if (edit.HasPrevLogNumber()) {
  ------------------
  |  Branch (643:9): [True: 4.51k, False: 18.0k]
  ------------------
  644|  4.51k|      version_edit_params_.SetPrevLogNumber(edit.GetPrevLogNumber());
  645|  4.51k|    }
  646|  22.5k|    if (edit.HasNextFile()) {
  ------------------
  |  Branch (646:9): [True: 9.02k, False: 13.5k]
  ------------------
  647|  9.02k|      version_edit_params_.SetNextFile(edit.GetNextFile());
  648|  9.02k|    }
  649|  22.5k|    if (edit.HasMaxColumnFamily()) {
  ------------------
  |  Branch (649:9): [True: 0, False: 22.5k]
  ------------------
  650|      0|      version_edit_params_.SetMaxColumnFamily(edit.GetMaxColumnFamily());
  651|      0|    }
  652|  22.5k|    if (edit.HasMinLogNumberToKeep()) {
  ------------------
  |  Branch (652:9): [True: 0, False: 22.5k]
  ------------------
  653|      0|      version_edit_params_.SetMinLogNumberToKeep(
  654|      0|          std::max(version_edit_params_.GetMinLogNumberToKeep(),
  655|      0|                   edit.GetMinLogNumberToKeep()));
  656|      0|    }
  657|  22.5k|    if (edit.HasLastSequence()) {
  ------------------
  |  Branch (657:9): [True: 13.5k, False: 9.02k]
  ------------------
  658|       |      // `VersionEdit::last_sequence_`s are assumed to be non-decreasing. This
  659|       |      // is legacy behavior that cannot change without breaking downgrade
  660|       |      // compatibility.
  661|  13.5k|      assert(!version_edit_params_.HasLastSequence() ||
  662|  13.5k|             version_edit_params_.GetLastSequence() <= edit.GetLastSequence());
  663|  13.5k|      version_edit_params_.SetLastSequence(edit.GetLastSequence());
  664|  13.5k|    }
  665|  22.5k|    if (!version_edit_params_.HasPrevLogNumber()) {
  ------------------
  |  Branch (665:9): [True: 9.02k, False: 13.5k]
  ------------------
  666|  9.02k|      version_edit_params_.SetPrevLogNumber(0);
  667|  9.02k|    }
  668|  22.5k|  }
  669|  22.5k|  return s;
  670|  22.5k|}
_ZN7rocksdb18VersionEditHandler36MaybeHandleFileBoundariesForNewFilesERNS_11VersionEditEPKNS_16ColumnFamilyDataE:
  673|  22.5k|    VersionEdit& edit, const ColumnFamilyData* cfd) {
  674|  22.5k|  if (edit.GetNewFiles().empty()) {
  ------------------
  |  Branch (674:7): [True: 22.5k, False: 0]
  ------------------
  675|  22.5k|    return Status::OK();
  676|  22.5k|  }
  677|      0|  auto ucmp = cfd->user_comparator();
  678|      0|  assert(ucmp);
  679|      0|  size_t ts_sz = ucmp->timestamp_size();
  680|      0|  if (ts_sz == 0) {
  ------------------
  |  Branch (680:7): [True: 0, False: 0]
  ------------------
  681|      0|    return Status::OK();
  682|      0|  }
  683|       |
  684|      0|  VersionEdit::NewFiles& new_files = edit.GetMutableNewFiles();
  685|      0|  assert(!new_files.empty());
  686|       |  // If true, enabling user-defined timestamp is detected for this column
  687|       |  // family. All its existing SST files need to have the file boundaries handled
  688|       |  // and their `persist_user_defined_timestamps` flag set to false regardless of
  689|       |  // its existing value.
  690|      0|  bool mark_existing_ssts_with_no_udt =
  691|      0|      cfds_to_mark_no_udt_.find(cfd->GetID()) != cfds_to_mark_no_udt_.end();
  692|      0|  bool file_boundaries_need_handling = false;
  693|      0|  for (auto& new_file : new_files) {
  ------------------
  |  Branch (693:23): [True: 0, False: 0]
  ------------------
  694|      0|    FileMetaData& meta = new_file.second;
  695|      0|    if (meta.user_defined_timestamps_persisted &&
  ------------------
  |  Branch (695:9): [True: 0, False: 0]
  ------------------
  696|      0|        !mark_existing_ssts_with_no_udt) {
  ------------------
  |  Branch (696:9): [True: 0, False: 0]
  ------------------
  697|       |      // `FileMetaData.user_defined_timestamps_persisted` field is the value of
  698|       |      // the flag `AdvancedColumnFamilyOptions.persist_user_defined_timestamps`
  699|       |      // at the time when the SST file was created. As a result, all added SST
  700|       |      // files in one `VersionEdit` should have the same value for it.
  701|      0|      if (file_boundaries_need_handling) {
  ------------------
  |  Branch (701:11): [True: 0, False: 0]
  ------------------
  702|      0|        return Status::Corruption(
  703|      0|            "New files in one VersionEdit has different "
  704|      0|            "user_defined_timestamps_persisted value.");
  705|      0|      }
  706|      0|      break;
  707|      0|    }
  708|      0|    file_boundaries_need_handling = true;
  709|      0|    assert(!meta.user_defined_timestamps_persisted ||
  710|      0|           mark_existing_ssts_with_no_udt);
  711|      0|    if (mark_existing_ssts_with_no_udt) {
  ------------------
  |  Branch (711:9): [True: 0, False: 0]
  ------------------
  712|      0|      meta.user_defined_timestamps_persisted = false;
  713|      0|    }
  714|      0|    std::string smallest_buf;
  715|      0|    std::string largest_buf;
  716|      0|    Slice largest_slice = meta.largest.Encode();
  717|      0|    PadInternalKeyWithMinTimestamp(&smallest_buf, meta.smallest.Encode(),
  718|      0|                                   ts_sz);
  719|      0|    auto largest_footer = ExtractInternalKeyFooter(largest_slice);
  720|      0|    if (largest_footer == kRangeTombstoneSentinel) {
  ------------------
  |  Branch (720:9): [True: 0, False: 0]
  ------------------
  721|      0|      PadInternalKeyWithMaxTimestamp(&largest_buf, largest_slice, ts_sz);
  722|      0|    } else {
  723|      0|      PadInternalKeyWithMinTimestamp(&largest_buf, largest_slice, ts_sz);
  724|      0|    }
  725|      0|    meta.smallest.DecodeFrom(smallest_buf);
  726|      0|    meta.largest.DecodeFrom(largest_buf);
  727|      0|  }
  728|      0|  return Status::OK();
  729|      0|}

_ZN7rocksdb18VersionEditHandlerC2EbRKNSt3__16vectorINS_22ColumnFamilyDescriptorENS1_9allocatorIS3_EEEEPNS_10VersionSetEbbRKNS1_10shared_ptrINS_8IOTracerEEERKNS_11ReadOptionsENS_22EpochNumberRequirementE:
  129|  9.02k|                           epoch_number_requirement) {}
_ZNK7rocksdb22VersionEditHandlerBase6statusEv:
   30|  9.02k|  const Status& status() const { return status_; }
_ZNK7rocksdb18VersionEditHandler20GetVersionEditParamsEv:
  133|  9.02k|  const VersionEditParams& GetVersionEditParams() const {
  134|  9.02k|    return version_edit_params_;
  135|  9.02k|  }
_ZNK7rocksdb18VersionEditHandler7GetDbIdEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  139|  9.02k|  void GetDbId(std::string* db_id) const {
  140|  9.02k|    if (db_id && version_edit_params_.HasDbId()) {
  ------------------
  |  Branch (140:9): [True: 9.02k, False: 0]
  |  Branch (140:18): [True: 0, False: 9.02k]
  ------------------
  141|      0|      *db_id = version_edit_params_.GetDbId();
  142|      0|    }
  143|  9.02k|  }
_ZN7rocksdb18VersionEditHandlerD2Ev:
  131|  9.02k|  ~VersionEditHandler() override {}
_ZN7rocksdb22VersionEditHandlerBaseD2Ev:
   26|  9.02k|  virtual ~VersionEditHandlerBase() {}
_ZN7rocksdb22VersionEditHandlerBaseC2ERKNS_11ReadOptionsE:
   24|  9.02k|        max_manifest_read_size_(std::numeric_limits<uint64_t>::max()) {}
_ZNK7rocksdb18VersionEditHandler25MustOpenAllColumnFamiliesEv:
  187|  9.02k|  virtual bool MustOpenAllColumnFamilies() const { return !read_only_; }

_ZN7rocksdb18VersionStorageInfoD2Ev:
  843|  36.1k|VersionStorageInfo::~VersionStorageInfo() { delete[] files_; }
_ZN7rocksdb7VersionD2Ev:
  845|  36.1k|Version::~Version() {
  846|  36.1k|  assert(refs_ == 0);
  847|       |
  848|       |  // Remove from linked list
  849|  36.1k|  prev_->next_ = next_;
  850|  36.1k|  next_->prev_ = prev_;
  851|       |
  852|       |  // Drop references to files
  853|   225k|  for (int level = 0; level < storage_info_.num_levels_; level++) {
  ------------------
  |  Branch (853:23): [True: 189k, False: 36.1k]
  ------------------
  854|   194k|    for (size_t i = 0; i < storage_info_.files_[level].size(); i++) {
  ------------------
  |  Branch (854:24): [True: 4.48k, False: 189k]
  ------------------
  855|  4.48k|      FileMetaData* f = storage_info_.files_[level][i];
  856|  4.48k|      assert(f->refs > 0);
  857|  4.48k|      f->refs--;
  858|  4.48k|      if (f->refs <= 0) {
  ------------------
  |  Branch (858:11): [True: 4.48k, False: 0]
  ------------------
  859|  4.48k|        assert(cfd_ != nullptr);
  860|       |        // When not in the process of closing the DB, we'll have a superversion
  861|       |        // to get current mutable options from
  862|  4.48k|        auto* sv = cfd_->GetSuperVersion();
  863|  4.48k|        uint32_t path_id = f->fd.GetPathId();
  864|  4.48k|        assert(path_id < cfd_->ioptions()->cf_paths.size());
  865|  4.48k|        vset_->obsolete_files_.emplace_back(
  866|  4.48k|            f, cfd_->ioptions()->cf_paths[path_id].path,
  867|  4.48k|            sv ? sv->mutable_cf_options.uncache_aggressiveness : 0,
  ------------------
  |  Branch (867:13): [True: 0, False: 4.48k]
  ------------------
  868|  4.48k|            cfd_->GetFileMetadataCacheReservationManager());
  869|  4.48k|      }
  870|  4.48k|    }
  871|   189k|  }
  872|  36.1k|}
_ZN7rocksdb25DoGenerateLevelFilesBriefEPNS_15LevelFilesBriefERKNSt3__16vectorIPNS_12FileMetaDataENS2_9allocatorIS5_EEEEPNS_5ArenaE:
  882|  4.48k|                               Arena* arena) {
  883|  4.48k|  assert(file_level);
  884|  4.48k|  assert(arena);
  885|       |
  886|  4.48k|  size_t num = files.size();
  887|  4.48k|  file_level->num_files = num;
  888|  4.48k|  char* mem = arena->AllocateAligned(num * sizeof(FdWithKeyRange));
  889|  4.48k|  file_level->files = new (mem) FdWithKeyRange[num];
  890|       |
  891|  8.96k|  for (size_t i = 0; i < num; i++) {
  ------------------
  |  Branch (891:22): [True: 4.48k, False: 4.48k]
  ------------------
  892|  4.48k|    Slice smallest_key = files[i]->smallest.Encode();
  893|  4.48k|    Slice largest_key = files[i]->largest.Encode();
  894|       |
  895|       |    // Copy key slice to sequential memory
  896|  4.48k|    size_t smallest_size = smallest_key.size();
  897|  4.48k|    size_t largest_size = largest_key.size();
  898|  4.48k|    mem = arena->AllocateAligned(smallest_size + largest_size);
  899|  4.48k|    memcpy(mem, smallest_key.data(), smallest_size);
  900|  4.48k|    memcpy(mem + smallest_size, largest_key.data(), largest_size);
  901|       |
  902|  4.48k|    FdWithKeyRange& f = file_level->files[i];
  903|  4.48k|    f.fd = files[i]->fd;
  904|  4.48k|    f.file_metadata = files[i];
  905|  4.48k|    f.smallest_key = Slice(mem, smallest_size);
  906|  4.48k|    f.largest_key = Slice(mem + smallest_size, largest_size);
  907|  4.48k|  }
  908|  4.48k|}
_ZNK7rocksdb7Version18GetTablePropertiesERKNS_11ReadOptionsEPNSt3__110shared_ptrIKNS_15TablePropertiesEEEPKNS_12FileMetaDataEPKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
 1573|  4.48k|                                   const std::string* fname) const {
 1574|  4.48k|  auto table_cache = cfd_->table_cache();
 1575|  4.48k|  auto ioptions = cfd_->ioptions();
 1576|  4.48k|  Status s = table_cache->GetTableProperties(
 1577|  4.48k|      file_options_, read_options, cfd_->internal_comparator(), *file_meta, tp,
 1578|  4.48k|      mutable_cf_options_.block_protection_bytes_per_key,
 1579|  4.48k|      mutable_cf_options_.prefix_extractor, true /* no io */);
 1580|  4.48k|  if (s.ok()) {
  ------------------
  |  Branch (1580:7): [True: 4.48k, False: 0]
  ------------------
 1581|  4.48k|    return s;
 1582|  4.48k|  }
 1583|       |
 1584|       |  // We only ignore error type `Incomplete` since it's by design that we
 1585|       |  // disallow table when it's not in table cache.
 1586|      0|  if (!s.IsIncomplete()) {
  ------------------
  |  Branch (1586:7): [True: 0, False: 0]
  ------------------
 1587|      0|    return s;
 1588|      0|  }
 1589|       |
 1590|       |  // 2. Table is not present in table cache, we'll read the table properties
 1591|       |  // directly from the properties block in the file.
 1592|      0|  std::unique_ptr<FSRandomAccessFile> file;
 1593|      0|  std::string file_name;
 1594|      0|  if (fname != nullptr) {
  ------------------
  |  Branch (1594:7): [True: 0, False: 0]
  ------------------
 1595|      0|    file_name = *fname;
 1596|      0|  } else {
 1597|      0|    file_name = TableFileName(ioptions->cf_paths, file_meta->fd.GetNumber(),
 1598|      0|                              file_meta->fd.GetPathId());
 1599|      0|  }
 1600|      0|  s = ioptions->fs->NewRandomAccessFile(file_name, file_options_, &file,
 1601|      0|                                        nullptr);
 1602|      0|  if (!s.ok()) {
  ------------------
  |  Branch (1602:7): [True: 0, False: 0]
  ------------------
 1603|      0|    return s;
 1604|      0|  }
 1605|       |
 1606|       |  // By setting the magic number to kNullTableMagicNumber, we can bypass
 1607|       |  // the magic number check in the footer.
 1608|      0|  std::unique_ptr<RandomAccessFileReader> file_reader(
 1609|      0|      new RandomAccessFileReader(
 1610|      0|          std::move(file), file_name, ioptions->clock /* clock */, io_tracer_,
 1611|      0|          ioptions->stats /* stats */,
 1612|      0|          Histograms::SST_READ_MICROS /* hist_type */,
 1613|      0|          nullptr /* file_read_hist */, nullptr /* rate_limiter */,
 1614|      0|          ioptions->listeners));
 1615|      0|  std::unique_ptr<TableProperties> props;
 1616|      0|  s = ReadTableProperties(
 1617|      0|      file_reader.get(), file_meta->fd.GetFileSize(),
 1618|      0|      Footer::kNullTableMagicNumber /* table's magic number */, *ioptions,
 1619|      0|      read_options, &props);
 1620|      0|  if (!s.ok()) {
  ------------------
  |  Branch (1620:7): [True: 0, False: 0]
  ------------------
 1621|      0|    return s;
 1622|      0|  }
 1623|      0|  *tp = std::move(props);
 1624|      0|  RecordTick(ioptions->stats, NUMBER_DIRECT_LOAD_TABLE_PROPERTIES);
 1625|      0|  return s;
 1626|      0|}
_ZN7rocksdb7Version23GetColumnFamilyMetaDataEPNS_20ColumnFamilyMetaDataE:
 1791|  9.02k|void Version::GetColumnFamilyMetaData(ColumnFamilyMetaData* cf_meta) {
 1792|  9.02k|  assert(cf_meta);
 1793|  9.02k|  assert(cfd_);
 1794|       |
 1795|  9.02k|  cf_meta->name = cfd_->GetName();
 1796|  9.02k|  cf_meta->size = 0;
 1797|  9.02k|  cf_meta->file_count = 0;
 1798|  9.02k|  cf_meta->levels.clear();
 1799|       |
 1800|  9.02k|  cf_meta->blob_file_size = 0;
 1801|  9.02k|  cf_meta->blob_file_count = 0;
 1802|  9.02k|  cf_meta->blob_files.clear();
 1803|       |
 1804|  9.02k|  auto* ioptions = cfd_->ioptions();
 1805|  9.02k|  auto* vstorage = storage_info();
 1806|       |
 1807|  72.2k|  for (int level = 0; level < cfd_->NumberLevels(); level++) {
  ------------------
  |  Branch (1807:23): [True: 63.1k, False: 9.02k]
  ------------------
 1808|  63.1k|    uint64_t level_size = 0;
 1809|  63.1k|    cf_meta->file_count += vstorage->LevelFiles(level).size();
 1810|  63.1k|    std::vector<SstFileMetaData> files;
 1811|  63.1k|    for (const auto& file : vstorage->LevelFiles(level)) {
  ------------------
  |  Branch (1811:27): [True: 4.48k, False: 63.1k]
  ------------------
 1812|  4.48k|      uint32_t path_id = file->fd.GetPathId();
 1813|  4.48k|      std::string file_path;
 1814|  4.48k|      if (path_id < ioptions->cf_paths.size()) {
  ------------------
  |  Branch (1814:11): [True: 4.48k, False: 0]
  ------------------
 1815|  4.48k|        file_path = ioptions->cf_paths[path_id].path;
 1816|  4.48k|      } else {
 1817|      0|        assert(!ioptions->cf_paths.empty());
 1818|      0|        file_path = ioptions->cf_paths.back().path;
 1819|      0|      }
 1820|  4.48k|      const uint64_t file_number = file->fd.GetNumber();
 1821|  4.48k|      files.emplace_back(
 1822|  4.48k|          MakeTableFileName("", file_number), file_number, file_path,
 1823|  4.48k|          file->fd.GetFileSize(), file->fd.smallest_seqno,
 1824|  4.48k|          file->fd.largest_seqno, file->smallest.user_key().ToString(),
 1825|  4.48k|          file->largest.user_key().ToString(),
 1826|  4.48k|          file->stats.num_reads_sampled.load(std::memory_order_relaxed),
 1827|  4.48k|          file->being_compacted, file->temperature,
 1828|  4.48k|          file->oldest_blob_file_number, file->TryGetOldestAncesterTime(),
 1829|  4.48k|          file->TryGetFileCreationTime(), file->epoch_number,
 1830|  4.48k|          file->file_checksum, file->file_checksum_func_name);
 1831|  4.48k|      files.back().num_entries = file->num_entries;
 1832|  4.48k|      files.back().num_deletions = file->num_deletions;
 1833|  4.48k|      files.back().smallest = file->smallest.Encode().ToString();
 1834|  4.48k|      files.back().largest = file->largest.Encode().ToString();
 1835|  4.48k|      level_size += file->fd.GetFileSize();
 1836|  4.48k|    }
 1837|  63.1k|    cf_meta->levels.emplace_back(level, level_size, std::move(files));
 1838|  63.1k|    cf_meta->size += level_size;
 1839|  63.1k|  }
 1840|  9.02k|  for (const auto& meta : vstorage->GetBlobFiles()) {
  ------------------
  |  Branch (1840:25): [True: 0, False: 9.02k]
  ------------------
 1841|      0|    assert(meta);
 1842|       |
 1843|      0|    cf_meta->blob_files.emplace_back(
 1844|      0|        meta->GetBlobFileNumber(), BlobFileName("", meta->GetBlobFileNumber()),
 1845|      0|        ioptions->cf_paths.front().path, meta->GetBlobFileSize(),
 1846|      0|        meta->GetTotalBlobCount(), meta->GetTotalBlobBytes(),
 1847|      0|        meta->GetGarbageBlobCount(), meta->GetGarbageBlobBytes(),
 1848|      0|        meta->GetChecksumMethod(), meta->GetChecksumValue());
 1849|      0|    ++cf_meta->blob_file_count;
 1850|      0|    cf_meta->blob_file_size += meta->GetBlobFileSize();
 1851|      0|  }
 1852|  9.02k|}
_ZN7rocksdb7Version12AddIteratorsERKNS_11ReadOptionsERKNS_11FileOptionsEPNS_20MergeIteratorBuilderEb:
 2003|  4.51k|                           bool allow_unprepared_value) {
 2004|  4.51k|  assert(storage_info_.finalized_);
 2005|       |
 2006|  8.99k|  for (int level = 0; level < storage_info_.num_non_empty_levels(); level++) {
  ------------------
  |  Branch (2006:23): [True: 4.48k, False: 4.51k]
  ------------------
 2007|  4.48k|    AddIteratorsForLevel(read_options, soptions, merge_iter_builder, level,
 2008|  4.48k|                         allow_unprepared_value);
 2009|  4.48k|  }
 2010|  4.51k|}
_ZN7rocksdb7Version20AddIteratorsForLevelERKNS_11ReadOptionsERKNS_11FileOptionsEPNS_20MergeIteratorBuilderEib:
 2015|  4.48k|                                   int level, bool allow_unprepared_value) {
 2016|  4.48k|  assert(storage_info_.finalized_);
 2017|  4.48k|  if (level >= storage_info_.num_non_empty_levels()) {
  ------------------
  |  Branch (2017:7): [True: 0, False: 4.48k]
  ------------------
 2018|       |    // This is an empty level
 2019|      0|    return;
 2020|  4.48k|  } else if (storage_info_.LevelFilesBrief(level).num_files == 0) {
  ------------------
  |  Branch (2020:14): [True: 0, False: 4.48k]
  ------------------
 2021|       |    // No files in this level
 2022|      0|    return;
 2023|      0|  }
 2024|       |
 2025|  4.48k|  bool should_sample = should_sample_file_read();
 2026|       |
 2027|  4.48k|  auto* arena = merge_iter_builder->GetArena();
 2028|  4.48k|  if (level == 0) {
  ------------------
  |  Branch (2028:7): [True: 4.48k, False: 0]
  ------------------
 2029|       |    // Merge all level zero files together since they may overlap
 2030|  4.48k|    std::unique_ptr<TruncatedRangeDelIterator> tombstone_iter = nullptr;
 2031|  8.96k|    for (size_t i = 0; i < storage_info_.LevelFilesBrief(0).num_files; i++) {
  ------------------
  |  Branch (2031:24): [True: 4.48k, False: 4.48k]
  ------------------
 2032|  4.48k|      const auto& file = storage_info_.LevelFilesBrief(0).files[i];
 2033|  4.48k|      auto table_iter = cfd_->table_cache()->NewIterator(
 2034|  4.48k|          read_options, soptions, cfd_->internal_comparator(),
 2035|  4.48k|          *file.file_metadata, /*range_del_agg=*/nullptr,
 2036|  4.48k|          mutable_cf_options_.prefix_extractor, nullptr,
 2037|  4.48k|          cfd_->internal_stats()->GetFileReadHist(0),
 2038|  4.48k|          TableReaderCaller::kUserIterator, arena,
 2039|  4.48k|          /*skip_filters=*/false, /*level=*/0, max_file_size_for_l0_meta_pin_,
 2040|  4.48k|          /*smallest_compaction_key=*/nullptr,
 2041|  4.48k|          /*largest_compaction_key=*/nullptr, allow_unprepared_value,
 2042|  4.48k|          mutable_cf_options_.block_protection_bytes_per_key,
 2043|  4.48k|          /*range_del_read_seqno=*/nullptr, &tombstone_iter);
 2044|  4.48k|      if (read_options.ignore_range_deletions) {
  ------------------
  |  Branch (2044:11): [True: 0, False: 4.48k]
  ------------------
 2045|      0|        merge_iter_builder->AddIterator(table_iter);
 2046|  4.48k|      } else {
 2047|  4.48k|        merge_iter_builder->AddPointAndTombstoneIterator(
 2048|  4.48k|            table_iter, std::move(tombstone_iter));
 2049|  4.48k|      }
 2050|  4.48k|    }
 2051|  4.48k|    if (should_sample) {
  ------------------
  |  Branch (2051:9): [True: 7, False: 4.47k]
  ------------------
 2052|       |      // Count ones for every L0 files. This is done per iterator creation
 2053|       |      // rather than Seek(), while files in other levels are recored per seek.
 2054|       |      // If users execute one range query per iterator, there may be some
 2055|       |      // discrepancy here.
 2056|      7|      for (FileMetaData* meta : storage_info_.LevelFiles(0)) {
  ------------------
  |  Branch (2056:31): [True: 7, False: 7]
  ------------------
 2057|      7|        sample_file_read_inc(meta);
 2058|      7|      }
 2059|      7|    }
 2060|  4.48k|  } else if (storage_info_.LevelFilesBrief(level).num_files > 0) {
  ------------------
  |  Branch (2060:14): [True: 0, False: 0]
  ------------------
 2061|       |    // For levels > 0, we can use a concatenating iterator that sequentially
 2062|       |    // walks through the non-overlapping files in the level, opening them
 2063|       |    // lazily.
 2064|      0|    auto* mem = arena->AllocateAligned(sizeof(LevelIterator));
 2065|      0|    std::unique_ptr<TruncatedRangeDelIterator>** tombstone_iter_ptr = nullptr;
 2066|      0|    auto level_iter = new (mem) LevelIterator(
 2067|      0|        cfd_->table_cache(), read_options, soptions,
 2068|      0|        cfd_->internal_comparator(), &storage_info_.LevelFilesBrief(level),
 2069|      0|        mutable_cf_options_.prefix_extractor, should_sample_file_read(),
 2070|      0|        cfd_->internal_stats()->GetFileReadHist(level),
 2071|      0|        TableReaderCaller::kUserIterator, IsFilterSkipped(level), level,
 2072|      0|        mutable_cf_options_.block_protection_bytes_per_key,
 2073|      0|        /*range_del_agg=*/nullptr,
 2074|      0|        /*compaction_boundaries=*/nullptr, allow_unprepared_value,
 2075|      0|        &tombstone_iter_ptr);
 2076|      0|    if (read_options.ignore_range_deletions) {
  ------------------
  |  Branch (2076:9): [True: 0, False: 0]
  ------------------
 2077|      0|      merge_iter_builder->AddIterator(level_iter);
 2078|      0|    } else {
 2079|      0|      merge_iter_builder->AddPointAndTombstoneIterator(
 2080|      0|          level_iter, nullptr /* tombstone_iter */, tombstone_iter_ptr);
 2081|      0|    }
 2082|      0|  }
 2083|  4.48k|}
_ZN7rocksdb18VersionStorageInfoC2EPKNS_21InternalKeyComparatorEPKNS_10ComparatorEiNS_15CompactionStyleEPS0_bNS_22EpochNumberRequirementEPNS_11SystemClockEjNS_17OffpeakTimeOptionE:
 2187|  36.1k|      offpeak_time_option_(std::move(offpeak_time_option)) {
 2188|  36.1k|  if (ref_vstorage != nullptr) {
  ------------------
  |  Branch (2188:7): [True: 18.0k, False: 18.0k]
  ------------------
 2189|  18.0k|    accumulated_file_size_ = ref_vstorage->accumulated_file_size_;
 2190|  18.0k|    accumulated_raw_key_size_ = ref_vstorage->accumulated_raw_key_size_;
 2191|  18.0k|    accumulated_raw_value_size_ = ref_vstorage->accumulated_raw_value_size_;
 2192|  18.0k|    accumulated_num_non_deletions_ =
 2193|  18.0k|        ref_vstorage->accumulated_num_non_deletions_;
 2194|  18.0k|    accumulated_num_deletions_ = ref_vstorage->accumulated_num_deletions_;
 2195|  18.0k|    current_num_non_deletions_ = ref_vstorage->current_num_non_deletions_;
 2196|  18.0k|    current_num_deletions_ = ref_vstorage->current_num_deletions_;
 2197|  18.0k|    current_num_samples_ = ref_vstorage->current_num_samples_;
 2198|  18.0k|    oldest_snapshot_seqnum_ = ref_vstorage->oldest_snapshot_seqnum_;
 2199|  18.0k|    compact_cursor_ = ref_vstorage->compact_cursor_;
 2200|  18.0k|    compact_cursor_.resize(num_levels_);
 2201|  18.0k|  }
 2202|  36.1k|}
_ZN7rocksdb7VersionC2EPNS_16ColumnFamilyDataEPNS_10VersionSetERKNS_11FileOptionsENS_16MutableCFOptionsERKNSt3__110shared_ptrINS_8IOTracerEEEmNS_22EpochNumberRequirementE:
 2244|  36.1k|      use_async_io_(false) {
 2245|  36.1k|  if (CheckFSFeatureSupport(env_->GetFileSystem().get(),
  ------------------
  |  Branch (2245:7): [True: 0, False: 36.1k]
  ------------------
 2246|  36.1k|                            FSSupportedOps::kAsyncIO)) {
 2247|      0|    use_async_io_ = true;
 2248|      0|  }
 2249|  36.1k|}
_ZN7rocksdb18VersionStorageInfo23GenerateLevelFilesBriefEv:
 3076|  27.0k|void VersionStorageInfo::GenerateLevelFilesBrief() {
 3077|  27.0k|  level_files_brief_.resize(num_non_empty_levels_);
 3078|  31.5k|  for (int level = 0; level < num_non_empty_levels_; level++) {
  ------------------
  |  Branch (3078:23): [True: 4.48k, False: 27.0k]
  ------------------
 3079|  4.48k|    DoGenerateLevelFilesBrief(&level_files_brief_[level], files_[level],
 3080|  4.48k|                              &arena_);
 3081|  4.48k|  }
 3082|  27.0k|}
_ZN7rocksdb18VersionStorageInfo23PrepareForVersionAppendERKNS_16ImmutableOptionsERKNS_16MutableCFOptionsE:
 3086|  27.0k|    const MutableCFOptions& mutable_cf_options) {
 3087|  27.0k|  ComputeCompensatedSizes();
 3088|  27.0k|  UpdateNumNonEmptyLevels();
 3089|  27.0k|  CalculateBaseBytes(immutable_options, mutable_cf_options);
 3090|  27.0k|  UpdateFilesByCompactionPri(immutable_options, mutable_cf_options);
 3091|  27.0k|  GenerateFileIndexer();
 3092|  27.0k|  GenerateLevelFilesBrief();
 3093|  27.0k|  GenerateLevel0NonOverlapping();
 3094|  27.0k|  GenerateBottommostFiles();
 3095|  27.0k|  GenerateFileLocationIndex();
 3096|  27.0k|}
_ZN7rocksdb7Version13PrepareAppendERKNS_16MutableCFOptionsERKNS_11ReadOptionsEb:
 3100|  27.0k|                            bool update_stats) {
 3101|  27.0k|  TEST_SYNC_POINT_CALLBACK(
 3102|  27.0k|      "Version::PrepareAppend:forced_check",
 3103|  27.0k|      static_cast<void*>(&storage_info_.force_consistency_checks_));
 3104|       |
 3105|  27.0k|  if (update_stats) {
  ------------------
  |  Branch (3105:7): [True: 18.0k, False: 9.02k]
  ------------------
 3106|  18.0k|    UpdateAccumulatedStats(read_options);
 3107|  18.0k|  }
 3108|       |
 3109|  27.0k|  storage_info_.PrepareForVersionAppend(*cfd_->ioptions(), mutable_cf_options);
 3110|  27.0k|}
_ZN7rocksdb7Version27MaybeInitializeFileMetaDataERKNS_11ReadOptionsEPNS_12FileMetaDataE:
 3113|  5.25k|                                          FileMetaData* file_meta) {
 3114|  5.25k|  if (file_meta->init_stats_from_file || file_meta->compensated_file_size > 0) {
  ------------------
  |  Branch (3114:7): [True: 774, False: 4.48k]
  |  Branch (3114:42): [True: 0, False: 4.48k]
  ------------------
 3115|    774|    return false;
 3116|    774|  }
 3117|  4.48k|  std::shared_ptr<const TableProperties> tp;
 3118|  4.48k|  Status s = GetTableProperties(read_options, &tp, file_meta);
 3119|  4.48k|  file_meta->init_stats_from_file = true;
 3120|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (3120:7): [True: 0, False: 4.48k]
  ------------------
 3121|      0|    ROCKS_LOG_ERROR(vset_->db_options_->info_log,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 3122|      0|                    "Unable to load table properties for file %" PRIu64
 3123|      0|                    " --- %s\n",
 3124|      0|                    file_meta->fd.GetNumber(), s.ToString().c_str());
 3125|      0|    return false;
 3126|      0|  }
 3127|  4.48k|  if (tp.get() == nullptr) {
  ------------------
  |  Branch (3127:7): [True: 0, False: 4.48k]
  ------------------
 3128|      0|    return false;
 3129|      0|  }
 3130|  4.48k|  file_meta->num_entries = tp->num_entries;
 3131|  4.48k|  file_meta->num_deletions = tp->num_deletions;
 3132|  4.48k|  file_meta->raw_value_size = tp->raw_value_size;
 3133|  4.48k|  file_meta->raw_key_size = tp->raw_key_size;
 3134|  4.48k|  file_meta->num_range_deletions = tp->num_range_deletions;
 3135|       |  // Ensure new invariants on old files
 3136|  4.48k|  file_meta->num_deletions =
 3137|  4.48k|      std::max(tp->num_deletions, tp->num_range_deletions);
 3138|  4.48k|  file_meta->num_entries = std::max(tp->num_entries, tp->num_deletions);
 3139|  4.48k|  return true;
 3140|  4.48k|}
_ZN7rocksdb18VersionStorageInfo22UpdateAccumulatedStatsEPNS_12FileMetaDataE:
 3142|  4.48k|void VersionStorageInfo::UpdateAccumulatedStats(FileMetaData* file_meta) {
 3143|  4.48k|  TEST_SYNC_POINT_CALLBACK("VersionStorageInfo::UpdateAccumulatedStats",
 3144|  4.48k|                           nullptr);
 3145|       |
 3146|  4.48k|  assert(file_meta->init_stats_from_file);
 3147|  4.48k|  accumulated_file_size_ += file_meta->fd.GetFileSize();
 3148|  4.48k|  accumulated_raw_key_size_ += file_meta->raw_key_size;
 3149|  4.48k|  accumulated_raw_value_size_ += file_meta->raw_value_size;
 3150|  4.48k|  assert(file_meta->num_entries >= file_meta->num_deletions);
 3151|  4.48k|  accumulated_num_non_deletions_ +=
 3152|  4.48k|      file_meta->num_entries - file_meta->num_deletions;
 3153|  4.48k|  accumulated_num_deletions_ += file_meta->num_deletions;
 3154|       |
 3155|  4.48k|  current_num_non_deletions_ +=
 3156|  4.48k|      file_meta->num_entries - file_meta->num_deletions;
 3157|  4.48k|  current_num_deletions_ += file_meta->num_deletions;
 3158|  4.48k|  current_num_samples_++;
 3159|  4.48k|}
_ZN7rocksdb7Version22UpdateAccumulatedStatsERKNS_11ReadOptionsE:
 3170|  18.0k|void Version::UpdateAccumulatedStats(const ReadOptions& read_options) {
 3171|       |  // maximum number of table properties loaded from files.
 3172|  18.0k|  const int kMaxInitCount = 20;
 3173|  18.0k|  int init_count = 0;
 3174|       |  // here only the first kMaxInitCount files which haven't been
 3175|       |  // initialized from file will be updated with num_deletions.
 3176|       |  // The motivation here is to cap the maximum I/O per Version creation.
 3177|       |  // The reason for choosing files from lower-level instead of higher-level
 3178|       |  // is that such design is able to propagate the initialization from
 3179|       |  // lower-level to higher-level:  When the num_deletions of lower-level
 3180|       |  // files are updated, it will make the lower-level files have accurate
 3181|       |  // compensated_file_size, making lower-level to higher-level compaction
 3182|       |  // will be triggered, which creates higher-level files whose num_deletions
 3183|       |  // will be updated here.
 3184|  18.0k|  for (int level = 0;
 3185|   144k|       level < storage_info_.num_levels_ && init_count < kMaxInitCount;
  ------------------
  |  Branch (3185:8): [True: 126k, False: 18.0k]
  |  Branch (3185:45): [True: 126k, False: 0]
  ------------------
 3186|   126k|       ++level) {
 3187|   126k|    for (auto* file_meta : storage_info_.files_[level]) {
  ------------------
  |  Branch (3187:26): [True: 4.48k, False: 126k]
  ------------------
 3188|  4.48k|      if (MaybeInitializeFileMetaData(read_options, file_meta)) {
  ------------------
  |  Branch (3188:11): [True: 4.48k, False: 0]
  ------------------
 3189|       |        // each FileMeta will be initialized only once.
 3190|  4.48k|        storage_info_.UpdateAccumulatedStats(file_meta);
 3191|       |        // when option "max_open_files" is -1, all the file metadata has
 3192|       |        // already been read, so MaybeInitializeFileMetaData() won't incur
 3193|       |        // any I/O cost. "max_open_files=-1" means that the table cache passed
 3194|       |        // to the VersionSet and then to the ColumnFamilySet has a size of
 3195|       |        // TableCache::kInfiniteCapacity
 3196|  4.48k|        if (vset_->GetColumnFamilySet()->get_table_cache()->GetCapacity() ==
  ------------------
  |  Branch (3196:13): [True: 4.48k, False: 0]
  ------------------
 3197|  4.48k|            TableCache::kInfiniteCapacity) {
 3198|  4.48k|          continue;
 3199|  4.48k|        }
 3200|      0|        if (++init_count >= kMaxInitCount) {
  ------------------
  |  Branch (3200:13): [True: 0, False: 0]
  ------------------
 3201|      0|          break;
 3202|      0|        }
 3203|      0|      }
 3204|  4.48k|    }
 3205|   126k|  }
 3206|       |  // In case all sampled-files contain only deletion entries, then we
 3207|       |  // load the table-property of a file in higher-level to initialize
 3208|       |  // that value.
 3209|  18.0k|  for (int level = storage_info_.num_levels_ - 1;
 3210|   118k|       storage_info_.accumulated_raw_value_size_ == 0 && level >= 0; --level) {
  ------------------
  |  Branch (3210:8): [True: 114k, False: 3.71k]
  |  Branch (3210:58): [True: 100k, False: 14.3k]
  ------------------
 3211|   100k|    for (int i = static_cast<int>(storage_info_.files_[level].size()) - 1;
 3212|   101k|         storage_info_.accumulated_raw_value_size_ == 0 && i >= 0; --i) {
  ------------------
  |  Branch (3212:10): [True: 101k, False: 0]
  |  Branch (3212:60): [True: 774, False: 100k]
  ------------------
 3213|    774|      if (MaybeInitializeFileMetaData(read_options,
  ------------------
  |  Branch (3213:11): [True: 0, False: 774]
  ------------------
 3214|    774|                                      storage_info_.files_[level][i])) {
 3215|      0|        storage_info_.UpdateAccumulatedStats(storage_info_.files_[level][i]);
 3216|      0|      }
 3217|    774|    }
 3218|   100k|  }
 3219|  18.0k|}
_ZN7rocksdb18VersionStorageInfo23ComputeCompensatedSizesEv:
 3221|  27.0k|void VersionStorageInfo::ComputeCompensatedSizes() {
 3222|  27.0k|  static const int kDeletionWeightOnCompaction = 2;
 3223|  27.0k|  uint64_t average_value_size = GetAverageValueSize();
 3224|       |
 3225|       |  // compute the compensated size
 3226|   216k|  for (int level = 0; level < num_levels_; level++) {
  ------------------
  |  Branch (3226:23): [True: 189k, False: 27.0k]
  ------------------
 3227|   189k|    for (auto* file_meta : files_[level]) {
  ------------------
  |  Branch (3227:26): [True: 4.48k, False: 189k]
  ------------------
 3228|       |      // Here we only compute compensated_file_size for those file_meta
 3229|       |      // which compensated_file_size is uninitialized (== 0). This is true only
 3230|       |      // for files that have been created right now and no other thread has
 3231|       |      // access to them. That's why we can safely mutate compensated_file_size.
 3232|  4.48k|      if (file_meta->compensated_file_size == 0) {
  ------------------
  |  Branch (3232:11): [True: 4.48k, False: 0]
  ------------------
 3233|  4.48k|        file_meta->compensated_file_size = file_meta->fd.GetFileSize();
 3234|       |        // Here we only boost the size of deletion entries of a file only
 3235|       |        // when the number of deletion entries is greater than the number of
 3236|       |        // non-deletion entries in the file.  The motivation here is that in
 3237|       |        // a stable workload, the number of deletion entries should be roughly
 3238|       |        // equal to the number of non-deletion entries.  If we compensate the
 3239|       |        // size of deletion entries in a stable workload, the deletion
 3240|       |        // compensation logic might introduce unwanted effet which changes the
 3241|       |        // shape of LSM tree.
 3242|  4.48k|        if ((file_meta->num_deletions - file_meta->num_range_deletions) * 2 >=
  ------------------
  |  Branch (3242:13): [True: 303, False: 4.18k]
  ------------------
 3243|  4.48k|            file_meta->num_entries) {
 3244|    303|          file_meta->compensated_file_size +=
 3245|    303|              ((file_meta->num_deletions - file_meta->num_range_deletions) * 2 -
 3246|    303|               file_meta->num_entries) *
 3247|    303|              average_value_size * kDeletionWeightOnCompaction;
 3248|    303|        }
 3249|  4.48k|        file_meta->compensated_file_size +=
 3250|  4.48k|            file_meta->compensated_range_deletion_size;
 3251|  4.48k|      }
 3252|  4.48k|    }
 3253|   189k|  }
 3254|  27.0k|}
_ZNK7rocksdb18VersionStorageInfo13MaxInputLevelEv:
 3256|   279k|int VersionStorageInfo::MaxInputLevel() const {
 3257|   279k|  if (compaction_style_ == kCompactionStyleLevel) {
  ------------------
  |  Branch (3257:7): [True: 279k, False: 0]
  ------------------
 3258|   279k|    return num_levels() - 2;
 3259|   279k|  }
 3260|      0|  return 0;
 3261|   279k|}
_ZNK7rocksdb18VersionStorageInfo14MaxOutputLevelEb:
 3263|  27.0k|int VersionStorageInfo::MaxOutputLevel(bool allow_ingest_behind) const {
 3264|  27.0k|  if (allow_ingest_behind) {
  ------------------
  |  Branch (3264:7): [True: 0, False: 27.0k]
  ------------------
 3265|      0|    assert(num_levels() > 1);
 3266|      0|    return num_levels() - 2;
 3267|      0|  }
 3268|  27.0k|  return num_levels() - 1;
 3269|  27.0k|}
_ZN7rocksdb18VersionStorageInfo29EstimateCompactionBytesNeededERKNS_16MutableCFOptionsE:
 3272|  27.0k|    const MutableCFOptions& mutable_cf_options) {
 3273|       |  // Only implemented for level-based compaction
 3274|  27.0k|  if (compaction_style_ != kCompactionStyleLevel) {
  ------------------
  |  Branch (3274:7): [True: 0, False: 27.0k]
  ------------------
 3275|      0|    estimated_compaction_needed_bytes_ = 0;
 3276|      0|    return;
 3277|      0|  }
 3278|       |
 3279|       |  // Start from Level 0, if level 0 qualifies compaction to level 1,
 3280|       |  // we estimate the size of compaction.
 3281|       |  // Then we move on to the next level and see whether it qualifies compaction
 3282|       |  // to the next level. The size of the level is estimated as the actual size
 3283|       |  // on the level plus the input bytes from the previous level if there is any.
 3284|       |  // If it exceeds, take the exceeded bytes as compaction input and add the size
 3285|       |  // of the compaction size to tatal size.
 3286|       |  // We keep doing it to Level 2, 3, etc, until the last level and return the
 3287|       |  // accumulated bytes.
 3288|       |
 3289|  27.0k|  uint64_t bytes_compact_to_next_level = 0;
 3290|  27.0k|  uint64_t level_size = 0;
 3291|  27.0k|  for (auto* f : files_[0]) {
  ------------------
  |  Branch (3291:16): [True: 4.48k, False: 27.0k]
  ------------------
 3292|  4.48k|    level_size += f->fd.GetFileSize();
 3293|  4.48k|  }
 3294|       |  // Level 0
 3295|  27.0k|  bool level0_compact_triggered = false;
 3296|  27.0k|  if (static_cast<int>(files_[0].size()) >=
  ------------------
  |  Branch (3296:7): [True: 0, False: 27.0k]
  ------------------
 3297|  27.0k|          mutable_cf_options.level0_file_num_compaction_trigger ||
 3298|  27.0k|      level_size >= mutable_cf_options.max_bytes_for_level_base) {
  ------------------
  |  Branch (3298:7): [True: 0, False: 27.0k]
  ------------------
 3299|      0|    level0_compact_triggered = true;
 3300|      0|    estimated_compaction_needed_bytes_ = level_size;
 3301|      0|    bytes_compact_to_next_level = level_size;
 3302|  27.0k|  } else {
 3303|  27.0k|    estimated_compaction_needed_bytes_ = 0;
 3304|  27.0k|  }
 3305|       |
 3306|       |  // Level 1 and up.
 3307|  27.0k|  uint64_t bytes_next_level = 0;
 3308|  27.0k|  for (int level = base_level(); level <= MaxInputLevel(); level++) {
  ------------------
  |  Branch (3308:34): [True: 0, False: 27.0k]
  ------------------
 3309|      0|    level_size = 0;
 3310|      0|    if (bytes_next_level > 0) {
  ------------------
  |  Branch (3310:9): [True: 0, False: 0]
  ------------------
 3311|       |#ifndef NDEBUG
 3312|       |      uint64_t level_size2 = 0;
 3313|       |      for (auto* f : files_[level]) {
 3314|       |        level_size2 += f->fd.GetFileSize();
 3315|       |      }
 3316|       |      assert(level_size2 == bytes_next_level);
 3317|       |#endif
 3318|      0|      level_size = bytes_next_level;
 3319|      0|      bytes_next_level = 0;
 3320|      0|    } else {
 3321|      0|      for (auto* f : files_[level]) {
  ------------------
  |  Branch (3321:20): [True: 0, False: 0]
  ------------------
 3322|      0|        level_size += f->fd.GetFileSize();
 3323|      0|      }
 3324|      0|    }
 3325|      0|    if (level == base_level() && level0_compact_triggered) {
  ------------------
  |  Branch (3325:9): [True: 0, False: 0]
  |  Branch (3325:34): [True: 0, False: 0]
  ------------------
 3326|       |      // Add base level size to compaction if level0 compaction triggered.
 3327|      0|      estimated_compaction_needed_bytes_ += level_size;
 3328|      0|    }
 3329|       |    // Add size added by previous compaction
 3330|      0|    level_size += bytes_compact_to_next_level;
 3331|      0|    bytes_compact_to_next_level = 0;
 3332|      0|    uint64_t level_target = MaxBytesForLevel(level);
 3333|      0|    if (level_size > level_target) {
  ------------------
  |  Branch (3333:9): [True: 0, False: 0]
  ------------------
 3334|      0|      bytes_compact_to_next_level = level_size - level_target;
 3335|       |      // Estimate the actual compaction fan-out ratio as size ratio between
 3336|       |      // the two levels.
 3337|       |
 3338|      0|      assert(bytes_next_level == 0);
 3339|      0|      if (level + 1 < num_levels_) {
  ------------------
  |  Branch (3339:11): [True: 0, False: 0]
  ------------------
 3340|      0|        for (auto* f : files_[level + 1]) {
  ------------------
  |  Branch (3340:22): [True: 0, False: 0]
  ------------------
 3341|      0|          bytes_next_level += f->fd.GetFileSize();
 3342|      0|        }
 3343|      0|      }
 3344|      0|      if (bytes_next_level > 0) {
  ------------------
  |  Branch (3344:11): [True: 0, False: 0]
  ------------------
 3345|      0|        assert(level_size > 0);
 3346|      0|        estimated_compaction_needed_bytes_ += static_cast<uint64_t>(
 3347|      0|            static_cast<double>(bytes_compact_to_next_level) *
 3348|      0|            (static_cast<double>(bytes_next_level) /
 3349|      0|                 static_cast<double>(level_size) +
 3350|      0|             1));
 3351|      0|      }
 3352|      0|    }
 3353|      0|  }
 3354|  27.0k|}
_ZN7rocksdb18VersionStorageInfo22ComputeCompactionScoreERKNS_16ImmutableOptionsERKNS_16MutableCFOptionsE:
 3431|  27.0k|    const MutableCFOptions& mutable_cf_options) {
 3432|  27.0k|  double total_downcompact_bytes = 0.0;
 3433|       |  // Historically, score is defined as actual bytes in a level divided by
 3434|       |  // the level's target size, and 1.0 is the threshold for triggering
 3435|       |  // compaction. Higher score means higher prioritization.
 3436|       |  // Now we keep the compaction triggering condition, but consider more
 3437|       |  // factors for prioritization, while still keeping the 1.0 threshold.
 3438|       |  // In order to provide flexibility for reducing score while still
 3439|       |  // maintaining it to be over 1.0, we scale the original score by 10x
 3440|       |  // if it is larger than 1.0.
 3441|  27.0k|  const double kScoreScale = 10.0;
 3442|  27.0k|  int max_output_level = MaxOutputLevel(immutable_options.allow_ingest_behind);
 3443|   189k|  for (int level = 0; level <= MaxInputLevel(); level++) {
  ------------------
  |  Branch (3443:23): [True: 162k, False: 27.0k]
  ------------------
 3444|   162k|    double score;
 3445|   162k|    if (level == 0) {
  ------------------
  |  Branch (3445:9): [True: 27.0k, False: 135k]
  ------------------
 3446|       |      // We treat level-0 specially by bounding the number of files
 3447|       |      // instead of number of bytes for two reasons:
 3448|       |      //
 3449|       |      // (1) With larger write-buffer sizes, it is nice not to do too
 3450|       |      // many level-0 compactions.
 3451|       |      //
 3452|       |      // (2) The files in level-0 are merged on every read and
 3453|       |      // therefore we wish to avoid too many files when the individual
 3454|       |      // file size is small (perhaps because of a small write-buffer
 3455|       |      // setting, or very high compression ratios, or lots of
 3456|       |      // overwrites/deletions).
 3457|  27.0k|      int num_sorted_runs = 0;
 3458|  27.0k|      uint64_t total_size = 0;
 3459|  27.0k|      for (auto* f : files_[level]) {
  ------------------
  |  Branch (3459:20): [True: 4.48k, False: 27.0k]
  ------------------
 3460|  4.48k|        total_downcompact_bytes += static_cast<double>(f->fd.GetFileSize());
 3461|  4.48k|        if (!f->being_compacted) {
  ------------------
  |  Branch (3461:13): [True: 4.48k, False: 0]
  ------------------
 3462|  4.48k|          total_size += f->compensated_file_size;
 3463|  4.48k|          num_sorted_runs++;
 3464|  4.48k|        }
 3465|  4.48k|      }
 3466|  27.0k|      if (compaction_style_ == kCompactionStyleUniversal) {
  ------------------
  |  Branch (3466:11): [True: 0, False: 27.0k]
  ------------------
 3467|       |        // For universal compaction, we use level0 score to indicate
 3468|       |        // compaction score for the whole DB. Adding other levels as if
 3469|       |        // they are L0 files.
 3470|      0|        for (int i = 1; i <= max_output_level; i++) {
  ------------------
  |  Branch (3470:25): [True: 0, False: 0]
  ------------------
 3471|       |          // It's possible that a subset of the files in a level may be in a
 3472|       |          // compaction, due to delete triggered compaction or trivial move.
 3473|       |          // In that case, the below check may not catch a level being
 3474|       |          // compacted as it only checks the first file. The worst that can
 3475|       |          // happen is a scheduled compaction thread will find nothing to do.
 3476|      0|          if (!files_[i].empty() && !files_[i][0]->being_compacted) {
  ------------------
  |  Branch (3476:15): [True: 0, False: 0]
  |  Branch (3476:37): [True: 0, False: 0]
  ------------------
 3477|      0|            num_sorted_runs++;
 3478|      0|          }
 3479|      0|        }
 3480|      0|      }
 3481|       |
 3482|  27.0k|      if (compaction_style_ == kCompactionStyleFIFO) {
  ------------------
  |  Branch (3482:11): [True: 0, False: 27.0k]
  ------------------
 3483|      0|        score = static_cast<double>(total_size) /
 3484|      0|                mutable_cf_options.compaction_options_fifo.max_table_files_size;
 3485|      0|        if (score < 1 &&
  ------------------
  |  Branch (3485:13): [True: 0, False: 0]
  ------------------
 3486|      0|            mutable_cf_options.compaction_options_fifo.allow_compaction) {
  ------------------
  |  Branch (3486:13): [True: 0, False: 0]
  ------------------
 3487|      0|          score = std::max(
 3488|      0|              static_cast<double>(num_sorted_runs) /
 3489|      0|                  mutable_cf_options.level0_file_num_compaction_trigger,
 3490|      0|              score);
 3491|      0|        }
 3492|      0|        if (score < 1 && mutable_cf_options.ttl > 0) {
  ------------------
  |  Branch (3492:13): [True: 0, False: 0]
  |  Branch (3492:26): [True: 0, False: 0]
  ------------------
 3493|      0|          score =
 3494|      0|              std::max(static_cast<double>(GetExpiredTtlFilesCount(
 3495|      0|                           immutable_options, mutable_cf_options, files_[0])),
 3496|      0|                       score);
 3497|      0|        }
 3498|      0|        if (score < 1 &&
  ------------------
  |  Branch (3498:13): [True: 0, False: 0]
  ------------------
 3499|      0|            ShouldChangeFileTemperature(immutable_options, mutable_cf_options,
  ------------------
  |  Branch (3499:13): [True: 0, False: 0]
  ------------------
 3500|      0|                                        files_[0])) {
 3501|       |          // For FIFO, just need a large enough score to trigger compaction.
 3502|      0|          const double kScoreForNeedCompaction = 1.1;
 3503|      0|          score = kScoreForNeedCompaction;
 3504|      0|        }
 3505|  27.0k|      } else {
 3506|       |        // For universal compaction, if a user configures `max_read_amp`, then
 3507|       |        // the score may be a false positive signal.
 3508|       |        // `level0_file_num_compaction_trigger` is used as a trigger to check
 3509|       |        // if there is any compaction work to do.
 3510|  27.0k|        score = static_cast<double>(num_sorted_runs) /
 3511|  27.0k|                mutable_cf_options.level0_file_num_compaction_trigger;
 3512|  27.0k|        if (compaction_style_ == kCompactionStyleLevel && num_levels() > 1) {
  ------------------
  |  Branch (3512:13): [True: 27.0k, False: 0]
  |  Branch (3512:59): [True: 27.0k, False: 0]
  ------------------
 3513|       |          // Level-based involves L0->L0 compactions that can lead to oversized
 3514|       |          // L0 files. Take into account size as well to avoid later giant
 3515|       |          // compactions to the base level.
 3516|       |          // If score in L0 is always too high, L0->LBase will always be
 3517|       |          // prioritized over LBase->LBase+1 compaction and LBase will
 3518|       |          // accumulate to too large. But if L0 score isn't high enough, L0 will
 3519|       |          // accumulate and data is not moved to LBase fast enough. The score
 3520|       |          // calculation below takes into account L0 size vs LBase size.
 3521|  27.0k|          if (immutable_options.level_compaction_dynamic_level_bytes) {
  ------------------
  |  Branch (3521:15): [True: 27.0k, False: 0]
  ------------------
 3522|  27.0k|            if (total_size >= mutable_cf_options.max_bytes_for_level_base) {
  ------------------
  |  Branch (3522:17): [True: 0, False: 27.0k]
  ------------------
 3523|       |              // When calculating estimated_compaction_needed_bytes, we assume
 3524|       |              // L0 is qualified as pending compactions. We will need to make
 3525|       |              // sure that it qualifies for compaction.
 3526|       |              // It might be guaranteed by logic below anyway, but we are
 3527|       |              // explicit here to make sure we don't stop writes with no
 3528|       |              // compaction scheduled.
 3529|      0|              score = std::max(score, 1.01);
 3530|      0|            }
 3531|  27.0k|            if (total_size > level_max_bytes_[base_level_]) {
  ------------------
  |  Branch (3531:17): [True: 0, False: 27.0k]
  ------------------
 3532|       |              // In this case, we compare L0 size with actual LBase size and
 3533|       |              // make sure score is more than 1.0 (10.0 after scaled) if L0 is
 3534|       |              // larger than LBase. Since LBase score = LBase size /
 3535|       |              // (target size + total_downcompact_bytes) where
 3536|       |              // total_downcompact_bytes = total_size > LBase size,
 3537|       |              // LBase score is lower than 10.0. So L0->LBase is prioritized
 3538|       |              // over LBase -> LBase+1.
 3539|      0|              uint64_t base_level_size = 0;
 3540|      0|              for (auto f : files_[base_level_]) {
  ------------------
  |  Branch (3540:27): [True: 0, False: 0]
  ------------------
 3541|      0|                base_level_size += f->compensated_file_size;
 3542|      0|              }
 3543|      0|              score = std::max(score, static_cast<double>(total_size) /
 3544|      0|                                          static_cast<double>(std::max(
 3545|      0|                                              base_level_size,
 3546|      0|                                              level_max_bytes_[base_level_])));
 3547|      0|            }
 3548|  27.0k|            if (score > 1.0) {
  ------------------
  |  Branch (3548:17): [True: 0, False: 27.0k]
  ------------------
 3549|      0|              score *= kScoreScale;
 3550|      0|            }
 3551|  27.0k|          } else {
 3552|      0|            score = std::max(score,
 3553|      0|                             static_cast<double>(total_size) /
 3554|      0|                                 mutable_cf_options.max_bytes_for_level_base);
 3555|      0|          }
 3556|  27.0k|        }
 3557|  27.0k|      }
 3558|   135k|    } else {  // level > 0
 3559|       |      // Compute the ratio of current size to size limit.
 3560|   135k|      uint64_t level_bytes_no_compacting = 0;
 3561|   135k|      uint64_t level_total_bytes = 0;
 3562|   135k|      for (auto f : files_[level]) {
  ------------------
  |  Branch (3562:19): [True: 0, False: 135k]
  ------------------
 3563|      0|        level_total_bytes += f->fd.GetFileSize();
 3564|      0|        if (!f->being_compacted) {
  ------------------
  |  Branch (3564:13): [True: 0, False: 0]
  ------------------
 3565|      0|          level_bytes_no_compacting += f->compensated_file_size;
 3566|      0|        }
 3567|      0|      }
 3568|   135k|      if (!immutable_options.level_compaction_dynamic_level_bytes) {
  ------------------
  |  Branch (3568:11): [True: 0, False: 135k]
  ------------------
 3569|      0|        score = static_cast<double>(level_bytes_no_compacting) /
 3570|      0|                MaxBytesForLevel(level);
 3571|   135k|      } else {
 3572|   135k|        if (level_bytes_no_compacting < MaxBytesForLevel(level)) {
  ------------------
  |  Branch (3572:13): [True: 135k, False: 0]
  ------------------
 3573|   135k|          score = static_cast<double>(level_bytes_no_compacting) /
 3574|   135k|                  MaxBytesForLevel(level);
 3575|   135k|        } else {
 3576|       |          // If there are a large mount of data being compacted down to the
 3577|       |          // current level soon, we would de-prioritize compaction from
 3578|       |          // a level where the incoming data would be a large ratio. We do
 3579|       |          // it by dividing level size not by target level size, but
 3580|       |          // the target size and the incoming compaction bytes.
 3581|      0|          score = static_cast<double>(level_bytes_no_compacting) /
 3582|      0|                  (MaxBytesForLevel(level) + total_downcompact_bytes) *
 3583|      0|                  kScoreScale;
 3584|      0|        }
 3585|       |        // Drain unnecessary levels, but with lower priority compared to
 3586|       |        // when L0 is eligible. Only non-empty levels can be unnecessary.
 3587|       |        // If there is no unnecessary levels, lowest_unnecessary_level_ = -1.
 3588|   135k|        if (level_bytes_no_compacting > 0 &&
  ------------------
  |  Branch (3588:13): [True: 0, False: 135k]
  ------------------
 3589|   135k|            level <= lowest_unnecessary_level_) {
  ------------------
  |  Branch (3589:13): [True: 0, False: 0]
  ------------------
 3590|      0|          score = std::max(
 3591|      0|              score, kScoreScale *
 3592|      0|                         (1.001 + 0.001 * (lowest_unnecessary_level_ - level)));
 3593|      0|        }
 3594|   135k|      }
 3595|   135k|      if (level <= lowest_unnecessary_level_) {
  ------------------
  |  Branch (3595:11): [True: 0, False: 135k]
  ------------------
 3596|      0|        total_downcompact_bytes += level_total_bytes;
 3597|   135k|      } else if (level_total_bytes > MaxBytesForLevel(level)) {
  ------------------
  |  Branch (3597:18): [True: 0, False: 135k]
  ------------------
 3598|      0|        total_downcompact_bytes +=
 3599|      0|            static_cast<double>(level_total_bytes - MaxBytesForLevel(level));
 3600|      0|      }
 3601|   135k|    }
 3602|   162k|    compaction_level_[level] = level;
 3603|   162k|    compaction_score_[level] = score;
 3604|   162k|  }
 3605|       |
 3606|       |  // sort all the levels based on their score. Higher scores get listed
 3607|       |  // first. Use bubble sort because the number of entries are small.
 3608|   162k|  for (int i = 0; i < num_levels() - 2; i++) {
  ------------------
  |  Branch (3608:19): [True: 135k, False: 27.0k]
  ------------------
 3609|   541k|    for (int j = i + 1; j < num_levels() - 1; j++) {
  ------------------
  |  Branch (3609:25): [True: 406k, False: 135k]
  ------------------
 3610|   406k|      if (compaction_score_[i] < compaction_score_[j]) {
  ------------------
  |  Branch (3610:11): [True: 0, False: 406k]
  ------------------
 3611|      0|        double score = compaction_score_[i];
 3612|      0|        int level = compaction_level_[i];
 3613|      0|        compaction_score_[i] = compaction_score_[j];
 3614|      0|        compaction_level_[i] = compaction_level_[j];
 3615|      0|        compaction_score_[j] = score;
 3616|      0|        compaction_level_[j] = level;
 3617|      0|      }
 3618|   406k|    }
 3619|   135k|  }
 3620|  27.0k|  ComputeFilesMarkedForCompaction(max_output_level);
 3621|  27.0k|  ComputeBottommostFilesMarkedForCompaction(
 3622|  27.0k|      immutable_options.allow_ingest_behind);
 3623|  27.0k|  ComputeExpiredTtlFiles(immutable_options, mutable_cf_options.ttl);
 3624|  27.0k|  ComputeFilesMarkedForPeriodicCompaction(
 3625|  27.0k|      immutable_options, mutable_cf_options.periodic_compaction_seconds,
 3626|  27.0k|      max_output_level);
 3627|  27.0k|  ComputeFilesMarkedForForcedBlobGC(
 3628|  27.0k|      mutable_cf_options.blob_garbage_collection_age_cutoff,
 3629|  27.0k|      mutable_cf_options.blob_garbage_collection_force_threshold,
 3630|  27.0k|      mutable_cf_options.enable_blob_garbage_collection);
 3631|       |
 3632|  27.0k|  EstimateCompactionBytesNeeded(mutable_cf_options);
 3633|  27.0k|}
_ZN7rocksdb18VersionStorageInfo31ComputeFilesMarkedForCompactionEi:
 3635|  27.0k|void VersionStorageInfo::ComputeFilesMarkedForCompaction(int last_level) {
 3636|  27.0k|  files_marked_for_compaction_.clear();
 3637|  27.0k|  int last_qualify_level = 0;
 3638|       |
 3639|       |  // Do not include files from the last level with data
 3640|       |  // If table properties collector suggests a file on the last level,
 3641|       |  // we should not move it to a new level.
 3642|   189k|  for (int level = last_level; level >= 1; level--) {
  ------------------
  |  Branch (3642:32): [True: 162k, False: 27.0k]
  ------------------
 3643|   162k|    if (!files_[level].empty()) {
  ------------------
  |  Branch (3643:9): [True: 0, False: 162k]
  ------------------
 3644|      0|      last_qualify_level = level - 1;
 3645|      0|      break;
 3646|      0|    }
 3647|   162k|  }
 3648|       |
 3649|  54.1k|  for (int level = 0; level <= last_qualify_level; level++) {
  ------------------
  |  Branch (3649:23): [True: 27.0k, False: 27.0k]
  ------------------
 3650|  27.0k|    for (auto* f : files_[level]) {
  ------------------
  |  Branch (3650:18): [True: 4.48k, False: 27.0k]
  ------------------
 3651|  4.48k|      if (!f->being_compacted && f->marked_for_compaction) {
  ------------------
  |  Branch (3651:11): [True: 4.48k, False: 0]
  |  Branch (3651:34): [True: 0, False: 4.48k]
  ------------------
 3652|      0|        files_marked_for_compaction_.emplace_back(level, f);
 3653|      0|      }
 3654|  4.48k|    }
 3655|  27.0k|  }
 3656|  27.0k|}
_ZN7rocksdb18VersionStorageInfo22ComputeExpiredTtlFilesERKNS_16ImmutableOptionsEm:
 3659|  27.0k|    const ImmutableOptions& ioptions, const uint64_t ttl) {
 3660|  27.0k|  expired_ttl_files_.clear();
 3661|  27.0k|  if (ttl == 0 || compaction_style_ != CompactionStyle::kCompactionStyleLevel) {
  ------------------
  |  Branch (3661:7): [True: 0, False: 27.0k]
  |  Branch (3661:19): [True: 0, False: 27.0k]
  ------------------
 3662|      0|    return;
 3663|      0|  }
 3664|       |
 3665|  27.0k|  int64_t _current_time;
 3666|  27.0k|  auto status = ioptions.clock->GetCurrentTime(&_current_time);
 3667|  27.0k|  if (!status.ok()) {
  ------------------
  |  Branch (3667:7): [True: 0, False: 27.0k]
  ------------------
 3668|      0|    return;
 3669|      0|  }
 3670|  27.0k|  const uint64_t current_time = static_cast<uint64_t>(_current_time);
 3671|       |
 3672|   189k|  for (int level = 0; level < num_levels() - 1; level++) {
  ------------------
  |  Branch (3672:23): [True: 162k, False: 27.0k]
  ------------------
 3673|   162k|    for (FileMetaData* f : files_[level]) {
  ------------------
  |  Branch (3673:26): [True: 4.48k, False: 162k]
  ------------------
 3674|  4.48k|      if (!f->being_compacted) {
  ------------------
  |  Branch (3674:11): [True: 4.48k, False: 0]
  ------------------
 3675|  4.48k|        uint64_t oldest_ancester_time = f->TryGetOldestAncesterTime();
 3676|  4.48k|        if (oldest_ancester_time > 0 &&
  ------------------
  |  Branch (3676:13): [True: 4.48k, False: 0]
  ------------------
 3677|  4.48k|            oldest_ancester_time < (current_time - ttl)) {
  ------------------
  |  Branch (3677:13): [True: 0, False: 4.48k]
  ------------------
 3678|      0|          expired_ttl_files_.emplace_back(level, f);
 3679|      0|        }
 3680|  4.48k|      }
 3681|  4.48k|    }
 3682|   162k|  }
 3683|  27.0k|}
_ZN7rocksdb18VersionStorageInfo39ComputeFilesMarkedForPeriodicCompactionERKNS_16ImmutableOptionsEmi:
 3687|  27.0k|    const uint64_t periodic_compaction_seconds, int last_level) {
 3688|  27.0k|  files_marked_for_periodic_compaction_.clear();
 3689|  27.0k|  if (periodic_compaction_seconds == 0) {
  ------------------
  |  Branch (3689:7): [True: 27.0k, False: 0]
  ------------------
 3690|  27.0k|    return;
 3691|  27.0k|  }
 3692|       |
 3693|      0|  int64_t temp_current_time;
 3694|      0|  auto status = ioptions.clock->GetCurrentTime(&temp_current_time);
 3695|      0|  if (!status.ok()) {
  ------------------
  |  Branch (3695:7): [True: 0, False: 0]
  ------------------
 3696|      0|    return;
 3697|      0|  }
 3698|      0|  const uint64_t current_time = static_cast<uint64_t>(temp_current_time);
 3699|       |
 3700|       |  // If periodic_compaction_seconds is larger than current time, periodic
 3701|       |  // compaction can't possibly be triggered.
 3702|      0|  if (periodic_compaction_seconds > current_time) {
  ------------------
  |  Branch (3702:7): [True: 0, False: 0]
  ------------------
 3703|      0|    return;
 3704|      0|  }
 3705|       |
 3706|      0|  const uint64_t allowed_time_limit =
 3707|      0|      current_time - periodic_compaction_seconds;
 3708|       |
 3709|       |  // Find the adjust_allowed_time_limit such that it includes files that are
 3710|       |  // going to expire by the time next daily offpeak starts.
 3711|      0|  const OffpeakTimeInfo offpeak_time_info =
 3712|      0|      offpeak_time_option_.GetOffpeakTimeInfo(current_time);
 3713|      0|  const uint64_t adjusted_allowed_time_limit =
 3714|      0|      allowed_time_limit +
 3715|      0|      (offpeak_time_info.is_now_offpeak
  ------------------
  |  Branch (3715:8): [True: 0, False: 0]
  ------------------
 3716|      0|           ? offpeak_time_info.seconds_till_next_offpeak_start
 3717|      0|           : 0);
 3718|       |
 3719|      0|  for (int level = 0; level <= last_level; level++) {
  ------------------
  |  Branch (3719:23): [True: 0, False: 0]
  ------------------
 3720|      0|    for (auto f : files_[level]) {
  ------------------
  |  Branch (3720:17): [True: 0, False: 0]
  ------------------
 3721|      0|      if (!f->being_compacted) {
  ------------------
  |  Branch (3721:11): [True: 0, False: 0]
  ------------------
 3722|       |        // Compute a file's modification time in the following order:
 3723|       |        // 1. Use file_creation_time table property if it is > 0.
 3724|       |        // 2. Use creation_time table property if it is > 0.
 3725|       |        // 3. Use file's mtime metadata if the above two table properties are 0.
 3726|       |        // Don't consider the file at all if the modification time cannot be
 3727|       |        // correctly determined based on the above conditions.
 3728|      0|        uint64_t file_modification_time = f->TryGetFileCreationTime();
 3729|      0|        if (file_modification_time == kUnknownFileCreationTime) {
  ------------------
  |  Branch (3729:13): [True: 0, False: 0]
  ------------------
 3730|      0|          file_modification_time = f->TryGetOldestAncesterTime();
 3731|      0|        }
 3732|      0|        if (file_modification_time == kUnknownOldestAncesterTime) {
  ------------------
  |  Branch (3732:13): [True: 0, False: 0]
  ------------------
 3733|      0|          auto file_path = TableFileName(ioptions.cf_paths, f->fd.GetNumber(),
 3734|      0|                                         f->fd.GetPathId());
 3735|      0|          status = ioptions.env->GetFileModificationTime(
 3736|      0|              file_path, &file_modification_time);
 3737|      0|          if (!status.ok()) {
  ------------------
  |  Branch (3737:15): [True: 0, False: 0]
  ------------------
 3738|      0|            ROCKS_LOG_WARN(ioptions.logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 3739|      0|                           "Can't get file modification time: %s: %s",
 3740|      0|                           file_path.c_str(), status.ToString().c_str());
 3741|      0|            continue;
 3742|      0|          }
 3743|      0|        }
 3744|      0|        if (file_modification_time > 0 &&
  ------------------
  |  Branch (3744:13): [True: 0, False: 0]
  ------------------
 3745|      0|            file_modification_time < adjusted_allowed_time_limit) {
  ------------------
  |  Branch (3745:13): [True: 0, False: 0]
  ------------------
 3746|      0|          files_marked_for_periodic_compaction_.emplace_back(level, f);
 3747|      0|        }
 3748|      0|      }
 3749|      0|    }
 3750|      0|  }
 3751|      0|}
_ZN7rocksdb18VersionStorageInfo33ComputeFilesMarkedForForcedBlobGCEddb:
 3756|  27.0k|    bool enable_blob_garbage_collection) {
 3757|  27.0k|  files_marked_for_forced_blob_gc_.clear();
 3758|  27.0k|  if (!(enable_blob_garbage_collection &&
  ------------------
  |  Branch (3758:9): [True: 0, False: 27.0k]
  ------------------
 3759|  27.0k|        blob_garbage_collection_age_cutoff > 0.0 &&
  ------------------
  |  Branch (3759:9): [True: 0, False: 0]
  ------------------
 3760|  27.0k|        blob_garbage_collection_force_threshold < 1.0)) {
  ------------------
  |  Branch (3760:9): [True: 0, False: 0]
  ------------------
 3761|  27.0k|    return;
 3762|  27.0k|  }
 3763|       |
 3764|      0|  if (blob_files_.empty()) {
  ------------------
  |  Branch (3764:7): [True: 0, False: 0]
  ------------------
 3765|      0|    return;
 3766|      0|  }
 3767|       |
 3768|       |  // Number of blob files eligible for GC based on age
 3769|      0|  const size_t cutoff_count = static_cast<size_t>(
 3770|      0|      blob_garbage_collection_age_cutoff * blob_files_.size());
 3771|      0|  if (!cutoff_count) {
  ------------------
  |  Branch (3771:7): [True: 0, False: 0]
  ------------------
 3772|      0|    return;
 3773|      0|  }
 3774|       |
 3775|       |  // Compute the sum of total and garbage bytes over the oldest batch of blob
 3776|       |  // files. The oldest batch is defined as the set of blob files which are
 3777|       |  // kept alive by the same SSTs as the very oldest one. Here is a toy example.
 3778|       |  // Let's assume we have three SSTs 1, 2, and 3, and four blob files 10, 11,
 3779|       |  // 12, and 13. Also, let's say SSTs 1 and 2 both rely on blob file 10 and
 3780|       |  // potentially some higher-numbered ones, while SST 3 relies on blob file 12
 3781|       |  // and potentially some higher-numbered ones. Then, the SST to oldest blob
 3782|       |  // file mapping is as follows:
 3783|       |  //
 3784|       |  // SST file number               Oldest blob file number
 3785|       |  // 1                             10
 3786|       |  // 2                             10
 3787|       |  // 3                             12
 3788|       |  //
 3789|       |  // This is what the same thing looks like from the blob files' POV. (Note that
 3790|       |  // the linked SSTs simply denote the inverse mapping of the above.)
 3791|       |  //
 3792|       |  // Blob file number              Linked SST set
 3793|       |  // 10                            {1, 2}
 3794|       |  // 11                            {}
 3795|       |  // 12                            {3}
 3796|       |  // 13                            {}
 3797|       |  //
 3798|       |  // Then, the oldest batch of blob files consists of blob files 10 and 11,
 3799|       |  // and we can get rid of them by forcing the compaction of SSTs 1 and 2.
 3800|       |  //
 3801|       |  // Note that the overall ratio of garbage computed for the batch has to exceed
 3802|       |  // blob_garbage_collection_force_threshold and the entire batch has to be
 3803|       |  // eligible for GC according to blob_garbage_collection_age_cutoff in order
 3804|       |  // for us to schedule any compactions.
 3805|      0|  const auto& oldest_meta = blob_files_.front();
 3806|      0|  assert(oldest_meta);
 3807|       |
 3808|      0|  const auto& linked_ssts = oldest_meta->GetLinkedSsts();
 3809|      0|  assert(!linked_ssts.empty());
 3810|       |
 3811|      0|  size_t count = 1;
 3812|      0|  uint64_t sum_total_blob_bytes = oldest_meta->GetTotalBlobBytes();
 3813|      0|  uint64_t sum_garbage_blob_bytes = oldest_meta->GetGarbageBlobBytes();
 3814|       |
 3815|      0|  assert(cutoff_count <= blob_files_.size());
 3816|       |
 3817|      0|  for (; count < cutoff_count; ++count) {
  ------------------
  |  Branch (3817:10): [True: 0, False: 0]
  ------------------
 3818|      0|    const auto& meta = blob_files_[count];
 3819|      0|    assert(meta);
 3820|       |
 3821|      0|    if (!meta->GetLinkedSsts().empty()) {
  ------------------
  |  Branch (3821:9): [True: 0, False: 0]
  ------------------
 3822|       |      // Found the beginning of the next batch of blob files
 3823|      0|      break;
 3824|      0|    }
 3825|       |
 3826|      0|    sum_total_blob_bytes += meta->GetTotalBlobBytes();
 3827|      0|    sum_garbage_blob_bytes += meta->GetGarbageBlobBytes();
 3828|      0|  }
 3829|       |
 3830|      0|  if (count < blob_files_.size()) {
  ------------------
  |  Branch (3830:7): [True: 0, False: 0]
  ------------------
 3831|      0|    const auto& meta = blob_files_[count];
 3832|      0|    assert(meta);
 3833|       |
 3834|      0|    if (meta->GetLinkedSsts().empty()) {
  ------------------
  |  Branch (3834:9): [True: 0, False: 0]
  ------------------
 3835|       |      // Some files in the oldest batch are not eligible for GC
 3836|      0|      return;
 3837|      0|    }
 3838|      0|  }
 3839|       |
 3840|      0|  if (sum_garbage_blob_bytes <
  ------------------
  |  Branch (3840:7): [True: 0, False: 0]
  ------------------
 3841|      0|      blob_garbage_collection_force_threshold * sum_total_blob_bytes) {
 3842|      0|    return;
 3843|      0|  }
 3844|       |
 3845|      0|  for (uint64_t sst_file_number : linked_ssts) {
  ------------------
  |  Branch (3845:33): [True: 0, False: 0]
  ------------------
 3846|      0|    const FileLocation location = GetFileLocation(sst_file_number);
 3847|      0|    assert(location.IsValid());
 3848|       |
 3849|      0|    const int level = location.GetLevel();
 3850|      0|    assert(level >= 0);
 3851|       |
 3852|      0|    const size_t pos = location.GetPosition();
 3853|       |
 3854|      0|    FileMetaData* const sst_meta = files_[level][pos];
 3855|      0|    assert(sst_meta);
 3856|       |
 3857|      0|    if (sst_meta->being_compacted) {
  ------------------
  |  Branch (3857:9): [True: 0, False: 0]
  ------------------
 3858|      0|      continue;
 3859|      0|    }
 3860|       |
 3861|      0|    files_marked_for_forced_blob_gc_.emplace_back(level, sst_meta);
 3862|      0|  }
 3863|      0|}
_ZN7rocksdb18VersionStorageInfo7AddFileEiPNS_12FileMetaDataE:
 3881|  4.48k|void VersionStorageInfo::AddFile(int level, FileMetaData* f) {
 3882|  4.48k|  auto& level_files = files_[level];
 3883|  4.48k|  level_files.push_back(f);
 3884|       |
 3885|  4.48k|  f->refs++;
 3886|  4.48k|}
_ZNK7rocksdb18VersionStorageInfo21GetBlobFileMetaDataLBEm:
 3900|  18.0k|VersionStorageInfo::GetBlobFileMetaDataLB(uint64_t blob_file_number) const {
 3901|  18.0k|  return std::lower_bound(
 3902|  18.0k|      blob_files_.begin(), blob_files_.end(), blob_file_number,
 3903|  18.0k|      [](const std::shared_ptr<BlobFileMetaData>& lhs, uint64_t rhs) {
 3904|  18.0k|        assert(lhs);
 3905|  18.0k|        return lhs->GetBlobFileNumber() < rhs;
 3906|  18.0k|      });
 3907|  18.0k|}
_ZN7rocksdb18VersionStorageInfo12SetFinalizedEv:
 3909|  27.0k|void VersionStorageInfo::SetFinalized() {
 3910|  27.0k|  finalized_ = true;
 3911|       |
 3912|       |#ifndef NDEBUG
 3913|       |  if (compaction_style_ != kCompactionStyleLevel) {
 3914|       |    // Not level based compaction.
 3915|       |    return;
 3916|       |  }
 3917|       |  assert(base_level_ < 0 || num_levels() == 1 ||
 3918|       |         (base_level_ >= 1 && base_level_ < num_levels()));
 3919|       |  // Verify all levels newer than base_level are empty except L0
 3920|       |  for (int level = 1; level < base_level(); level++) {
 3921|       |    assert(NumLevelBytes(level) == 0);
 3922|       |  }
 3923|       |  uint64_t max_bytes_prev_level = 0;
 3924|       |  for (int level = base_level(); level < num_levels() - 1; level++) {
 3925|       |    if (LevelFiles(level).size() == 0) {
 3926|       |      continue;
 3927|       |    }
 3928|       |    assert(MaxBytesForLevel(level) >= max_bytes_prev_level);
 3929|       |    max_bytes_prev_level = MaxBytesForLevel(level);
 3930|       |  }
 3931|       |  for (int level = 0; level < num_levels(); level++) {
 3932|       |    assert(LevelFiles(level).size() == 0 ||
 3933|       |           LevelFiles(level).size() == LevelFilesBrief(level).num_files);
 3934|       |    if (LevelFiles(level).size() > 0) {
 3935|       |      assert(level < num_non_empty_levels());
 3936|       |    }
 3937|       |  }
 3938|       |  assert(compaction_level_.size() > 0);
 3939|       |  assert(compaction_level_.size() == compaction_score_.size());
 3940|       |#endif
 3941|  27.0k|}
_ZN7rocksdb18VersionStorageInfo23UpdateNumNonEmptyLevelsEv:
 3943|  27.0k|void VersionStorageInfo::UpdateNumNonEmptyLevels() {
 3944|  27.0k|  num_non_empty_levels_ = num_levels_;
 3945|   212k|  for (int i = num_levels_ - 1; i >= 0; i--) {
  ------------------
  |  Branch (3945:33): [True: 189k, False: 22.6k]
  ------------------
 3946|   189k|    if (files_[i].size() != 0) {
  ------------------
  |  Branch (3946:9): [True: 4.48k, False: 185k]
  ------------------
 3947|  4.48k|      return;
 3948|   185k|    } else {
 3949|   185k|      num_non_empty_levels_ = i;
 3950|   185k|    }
 3951|   189k|  }
 3952|  27.0k|}
_ZN7rocksdb18VersionStorageInfo26UpdateFilesByCompactionPriERKNS_16ImmutableOptionsERKNS_16MutableCFOptionsE:
 4084|  27.0k|    const ImmutableOptions& ioptions, const MutableCFOptions& options) {
 4085|  27.0k|  if (compaction_style_ == kCompactionStyleNone ||
  ------------------
  |  Branch (4085:7): [True: 0, False: 27.0k]
  ------------------
 4086|  27.0k|      compaction_style_ == kCompactionStyleFIFO ||
  ------------------
  |  Branch (4086:7): [True: 0, False: 27.0k]
  ------------------
 4087|  27.0k|      compaction_style_ == kCompactionStyleUniversal) {
  ------------------
  |  Branch (4087:7): [True: 0, False: 27.0k]
  ------------------
 4088|       |    // don't need this
 4089|      0|    return;
 4090|      0|  }
 4091|       |  // No need to sort the highest level because it is never compacted.
 4092|   189k|  for (int level = 0; level < num_levels() - 1; level++) {
  ------------------
  |  Branch (4092:23): [True: 162k, False: 27.0k]
  ------------------
 4093|   162k|    const std::vector<FileMetaData*>& files = files_[level];
 4094|   162k|    auto& files_by_compaction_pri = files_by_compaction_pri_[level];
 4095|   162k|    assert(files_by_compaction_pri.size() == 0);
 4096|       |
 4097|       |    // populate a temp vector for sorting based on size
 4098|   162k|    std::vector<Fsize> temp(files.size());
 4099|   166k|    for (size_t i = 0; i < files.size(); i++) {
  ------------------
  |  Branch (4099:24): [True: 4.48k, False: 162k]
  ------------------
 4100|  4.48k|      temp[i].index = i;
 4101|  4.48k|      temp[i].file = files[i];
 4102|  4.48k|    }
 4103|       |
 4104|       |    // sort the top number_of_files_to_sort_ based on file size
 4105|   162k|    size_t num = VersionStorageInfo::kNumberFilesToSort;
 4106|   162k|    if (num > temp.size()) {
  ------------------
  |  Branch (4106:9): [True: 162k, False: 0]
  ------------------
 4107|   162k|      num = temp.size();
 4108|   162k|    }
 4109|   162k|    switch (ioptions.compaction_pri) {
 4110|      0|      case kByCompensatedSize:
  ------------------
  |  Branch (4110:7): [True: 0, False: 162k]
  ------------------
 4111|      0|        std::partial_sort(temp.begin(), temp.begin() + num, temp.end(),
 4112|      0|                          CompareCompensatedSizeDescending);
 4113|      0|        break;
 4114|      0|      case kOldestLargestSeqFirst:
  ------------------
  |  Branch (4114:7): [True: 0, False: 162k]
  ------------------
 4115|      0|        std::sort(temp.begin(), temp.end(),
 4116|      0|                  [](const Fsize& f1, const Fsize& f2) -> bool {
 4117|      0|                    return f1.file->fd.largest_seqno <
 4118|      0|                           f2.file->fd.largest_seqno;
 4119|      0|                  });
 4120|      0|        break;
 4121|      0|      case kOldestSmallestSeqFirst:
  ------------------
  |  Branch (4121:7): [True: 0, False: 162k]
  ------------------
 4122|      0|        std::sort(temp.begin(), temp.end(),
 4123|      0|                  [](const Fsize& f1, const Fsize& f2) -> bool {
 4124|      0|                    return f1.file->fd.smallest_seqno <
 4125|      0|                           f2.file->fd.smallest_seqno;
 4126|      0|                  });
 4127|      0|        break;
 4128|   162k|      case kMinOverlappingRatio:
  ------------------
  |  Branch (4128:7): [True: 162k, False: 0]
  ------------------
 4129|   162k|        SortFileByOverlappingRatio(*internal_comparator_, files_[level],
 4130|   162k|                                   files_[level + 1], ioptions.clock, level,
 4131|   162k|                                   num_non_empty_levels_, options.ttl, &temp);
 4132|   162k|        break;
 4133|      0|      case kRoundRobin:
  ------------------
  |  Branch (4133:7): [True: 0, False: 162k]
  ------------------
 4134|      0|        SortFileByRoundRobin(*internal_comparator_, &compact_cursor_,
 4135|      0|                             level0_non_overlapping_, level, &temp);
 4136|      0|        break;
 4137|      0|      default:
  ------------------
  |  Branch (4137:7): [True: 0, False: 162k]
  ------------------
 4138|      0|        assert(false);
 4139|   162k|    }
 4140|   162k|    assert(temp.size() == files.size());
 4141|       |
 4142|       |    // initialize files_by_compaction_pri_
 4143|   166k|    for (size_t i = 0; i < temp.size(); i++) {
  ------------------
  |  Branch (4143:24): [True: 4.48k, False: 162k]
  ------------------
 4144|  4.48k|      files_by_compaction_pri.push_back(static_cast<int>(temp[i].index));
 4145|  4.48k|    }
 4146|   162k|    next_file_to_compact_by_size_[level] = 0;
 4147|   162k|    assert(files_[level].size() == files_by_compaction_pri_[level].size());
 4148|   162k|  }
 4149|  27.0k|}
_ZN7rocksdb18VersionStorageInfo28GenerateLevel0NonOverlappingEv:
 4151|  27.0k|void VersionStorageInfo::GenerateLevel0NonOverlapping() {
 4152|  27.0k|  assert(!finalized_);
 4153|  27.0k|  level0_non_overlapping_ = true;
 4154|  27.0k|  if (level_files_brief_.size() == 0) {
  ------------------
  |  Branch (4154:7): [True: 22.6k, False: 4.48k]
  ------------------
 4155|  22.6k|    return;
 4156|  22.6k|  }
 4157|       |
 4158|       |  // A copy of L0 files sorted by smallest key
 4159|  4.48k|  std::vector<FdWithKeyRange> level0_sorted_file(
 4160|  4.48k|      level_files_brief_[0].files,
 4161|  4.48k|      level_files_brief_[0].files + level_files_brief_[0].num_files);
 4162|  4.48k|  std::sort(level0_sorted_file.begin(), level0_sorted_file.end(),
 4163|  4.48k|            [this](const FdWithKeyRange& f1, const FdWithKeyRange& f2) -> bool {
 4164|  4.48k|              return (internal_comparator_->Compare(f1.smallest_key,
 4165|  4.48k|                                                    f2.smallest_key) < 0);
 4166|  4.48k|            });
 4167|       |
 4168|  4.48k|  for (size_t i = 1; i < level0_sorted_file.size(); ++i) {
  ------------------
  |  Branch (4168:22): [True: 0, False: 4.48k]
  ------------------
 4169|      0|    FdWithKeyRange& f = level0_sorted_file[i];
 4170|      0|    FdWithKeyRange& prev = level0_sorted_file[i - 1];
 4171|      0|    if (internal_comparator_->Compare(prev.largest_key, f.smallest_key) >= 0) {
  ------------------
  |  Branch (4171:9): [True: 0, False: 0]
  ------------------
 4172|      0|      level0_non_overlapping_ = false;
 4173|      0|      break;
 4174|      0|    }
 4175|      0|  }
 4176|  4.48k|}
_ZN7rocksdb18VersionStorageInfo23GenerateBottommostFilesEv:
 4178|  27.0k|void VersionStorageInfo::GenerateBottommostFiles() {
 4179|  27.0k|  assert(!finalized_);
 4180|  27.0k|  assert(bottommost_files_.empty());
 4181|  31.5k|  for (size_t level = 0; level < level_files_brief_.size(); ++level) {
  ------------------
  |  Branch (4181:26): [True: 4.48k, False: 27.0k]
  ------------------
 4182|  8.96k|    for (size_t file_idx = 0; file_idx < level_files_brief_[level].num_files;
  ------------------
  |  Branch (4182:31): [True: 4.48k, False: 4.48k]
  ------------------
 4183|  4.48k|         ++file_idx) {
 4184|  4.48k|      const FdWithKeyRange& f = level_files_brief_[level].files[file_idx];
 4185|  4.48k|      int l0_file_idx;
 4186|  4.48k|      if (level == 0) {
  ------------------
  |  Branch (4186:11): [True: 4.48k, False: 0]
  ------------------
 4187|  4.48k|        l0_file_idx = static_cast<int>(file_idx);
 4188|  4.48k|      } else {
 4189|      0|        l0_file_idx = -1;
 4190|      0|      }
 4191|  4.48k|      Slice smallest_user_key = ExtractUserKey(f.smallest_key);
 4192|  4.48k|      Slice largest_user_key = ExtractUserKey(f.largest_key);
 4193|  4.48k|      if (!RangeMightExistAfterSortedRun(smallest_user_key, largest_user_key,
  ------------------
  |  Branch (4193:11): [True: 4.48k, False: 0]
  ------------------
 4194|  4.48k|                                         static_cast<int>(level),
 4195|  4.48k|                                         l0_file_idx)) {
 4196|  4.48k|        bottommost_files_.emplace_back(static_cast<int>(level),
 4197|  4.48k|                                       f.file_metadata);
 4198|  4.48k|      }
 4199|  4.48k|    }
 4200|  4.48k|  }
 4201|  27.0k|}
_ZN7rocksdb18VersionStorageInfo25GenerateFileLocationIndexEv:
 4203|  27.0k|void VersionStorageInfo::GenerateFileLocationIndex() {
 4204|  27.0k|  size_t num_files = 0;
 4205|       |
 4206|   216k|  for (int level = 0; level < num_levels_; ++level) {
  ------------------
  |  Branch (4206:23): [True: 189k, False: 27.0k]
  ------------------
 4207|   189k|    num_files += files_[level].size();
 4208|   189k|  }
 4209|       |
 4210|  27.0k|  file_locations_.reserve(num_files);
 4211|       |
 4212|   216k|  for (int level = 0; level < num_levels_; ++level) {
  ------------------
  |  Branch (4212:23): [True: 189k, False: 27.0k]
  ------------------
 4213|   194k|    for (size_t pos = 0; pos < files_[level].size(); ++pos) {
  ------------------
  |  Branch (4213:26): [True: 4.48k, False: 189k]
  ------------------
 4214|  4.48k|      const FileMetaData* const meta = files_[level][pos];
 4215|  4.48k|      assert(meta);
 4216|       |
 4217|  4.48k|      const uint64_t file_number = meta->fd.GetNumber();
 4218|       |
 4219|  4.48k|      assert(file_locations_.find(file_number) == file_locations_.end());
 4220|  4.48k|      file_locations_.emplace(file_number, FileLocation(level, pos));
 4221|  4.48k|    }
 4222|   189k|  }
 4223|  27.0k|}
_ZN7rocksdb18VersionStorageInfo41ComputeBottommostFilesMarkedForCompactionEb:
 4235|  27.0k|    bool allow_ingest_behind) {
 4236|  27.0k|  bottommost_files_marked_for_compaction_.clear();
 4237|  27.0k|  bottommost_files_mark_threshold_ = kMaxSequenceNumber;
 4238|  27.0k|  if (allow_ingest_behind) {
  ------------------
  |  Branch (4238:7): [True: 0, False: 27.0k]
  ------------------
 4239|      0|    return;
 4240|      0|  }
 4241|       |  // If a file's creation time is larger than creation_time_ub,
 4242|       |  // it is too new to be marked for compaction.
 4243|  27.0k|  int64_t creation_time_ub = 0;
 4244|  27.0k|  bool needs_delay = bottommost_file_compaction_delay_ > 0;
 4245|  27.0k|  if (needs_delay) {
  ------------------
  |  Branch (4245:7): [True: 0, False: 27.0k]
  ------------------
 4246|      0|    int64_t current_time = 0;
 4247|      0|    clock_->GetCurrentTime(&current_time).PermitUncheckedError();
 4248|       |    // Note that if GetCurrentTime() fails, current_time will be 0.
 4249|       |    // We will treat it as is and treat all files as too new.
 4250|       |    // The subtraction will not underflow since
 4251|       |    // bottommost_file_compaction_delay_ is of type uint32_t.
 4252|      0|    creation_time_ub =
 4253|      0|        current_time - static_cast<int64_t>(bottommost_file_compaction_delay_);
 4254|      0|  }
 4255|       |
 4256|  27.0k|  for (auto& level_and_file : bottommost_files_) {
  ------------------
  |  Branch (4256:29): [True: 4.48k, False: 27.0k]
  ------------------
 4257|  4.48k|    if (!level_and_file.second->being_compacted &&
  ------------------
  |  Branch (4257:9): [True: 4.48k, False: 0]
  ------------------
 4258|  4.48k|        level_and_file.second->fd.largest_seqno != 0) {
  ------------------
  |  Branch (4258:9): [True: 4.48k, False: 0]
  ------------------
 4259|       |      // largest_seqno might be nonzero due to containing the final key in an
 4260|       |      // earlier compaction, whose seqnum we didn't zero out.
 4261|  4.48k|      if (level_and_file.second->fd.largest_seqno < oldest_snapshot_seqnum_) {
  ------------------
  |  Branch (4261:11): [True: 0, False: 4.48k]
  ------------------
 4262|      0|        if (!needs_delay) {
  ------------------
  |  Branch (4262:13): [True: 0, False: 0]
  ------------------
 4263|      0|          bottommost_files_marked_for_compaction_.push_back(level_and_file);
 4264|      0|        } else if (creation_time_ub > 0) {
  ------------------
  |  Branch (4264:20): [True: 0, False: 0]
  ------------------
 4265|      0|          int64_t creation_time = static_cast<int64_t>(
 4266|      0|              level_and_file.second->TryGetFileCreationTime());
 4267|      0|          if (creation_time == kUnknownFileCreationTime ||
  ------------------
  |  Branch (4267:15): [True: 0, False: 0]
  ------------------
 4268|      0|              creation_time <= creation_time_ub) {
  ------------------
  |  Branch (4268:15): [True: 0, False: 0]
  ------------------
 4269|      0|            bottommost_files_marked_for_compaction_.push_back(level_and_file);
 4270|      0|          } else {
 4271|       |            // Just ignore this file for both
 4272|       |            // bottommost_files_marked_for_compaction_ and
 4273|       |            // bottommost_files_mark_threshold_. The next time
 4274|       |            // this method is called, it will try this file again. The method
 4275|       |            // is called after a new Version creation (compaction, flush, etc.),
 4276|       |            // after a compaction is picked, and after a snapshot newer than
 4277|       |            // bottommost_files_mark_threshold_ is released.
 4278|      0|          }
 4279|      0|        } else {
 4280|       |          // creation_time_ub <= 0, all files are too new to be marked for
 4281|       |          // compaction.
 4282|      0|        }
 4283|  4.48k|      } else {
 4284|  4.48k|        bottommost_files_mark_threshold_ =
 4285|  4.48k|            std::min(bottommost_files_mark_threshold_,
 4286|  4.48k|                     level_and_file.second->fd.largest_seqno);
 4287|  4.48k|      }
 4288|  4.48k|    }
 4289|  4.48k|  }
 4290|  27.0k|}
_ZN7rocksdb7Version3RefEv:
 4292|  67.6k|void Version::Ref() { ++refs_; }
_ZN7rocksdb7Version5UnrefEv:
 4294|  67.6k|bool Version::Unref() {
 4295|  67.6k|  assert(refs_ >= 1);
 4296|  67.6k|  --refs_;
 4297|  67.6k|  if (refs_ == 0) {
  ------------------
  |  Branch (4297:7): [True: 36.1k, False: 31.5k]
  ------------------
 4298|  36.1k|    delete this;
 4299|  36.1k|    return true;
 4300|  36.1k|  }
 4301|  31.5k|  return false;
 4302|  67.6k|}
_ZNK7rocksdb18VersionStorageInfo21HasMissingEpochNumberEv:
 4605|  18.0k|bool VersionStorageInfo::HasMissingEpochNumber() const {
 4606|   144k|  for (int level = 0; level < num_levels_; ++level) {
  ------------------
  |  Branch (4606:23): [True: 126k, False: 18.0k]
  ------------------
 4607|   126k|    for (const FileMetaData* f : files_[level]) {
  ------------------
  |  Branch (4607:32): [True: 0, False: 126k]
  ------------------
 4608|      0|      if (f->epoch_number == kUnknownEpochNumber) {
  ------------------
  |  Branch (4608:11): [True: 0, False: 0]
  ------------------
 4609|      0|        return true;
 4610|      0|      }
 4611|      0|    }
 4612|   126k|  }
 4613|  18.0k|  return false;
 4614|  18.0k|}
_ZNK7rocksdb18VersionStorageInfo24GetMaxEpochNumberOfFilesEv:
 4616|  9.02k|uint64_t VersionStorageInfo::GetMaxEpochNumberOfFiles() const {
 4617|  9.02k|  uint64_t max_epoch_number = kUnknownEpochNumber;
 4618|  72.2k|  for (int level = 0; level < num_levels_; ++level) {
  ------------------
  |  Branch (4618:23): [True: 63.1k, False: 9.02k]
  ------------------
 4619|  63.1k|    for (const FileMetaData* f : files_[level]) {
  ------------------
  |  Branch (4619:32): [True: 0, False: 63.1k]
  ------------------
 4620|      0|      max_epoch_number = std::max(max_epoch_number, f->epoch_number);
 4621|      0|    }
 4622|  63.1k|  }
 4623|  9.02k|  return max_epoch_number;
 4624|  9.02k|}
_ZN7rocksdb18VersionStorageInfo19RecoverEpochNumbersEPNS_16ColumnFamilyDataEbb:
 4627|  9.02k|                                             bool restart_epoch, bool force) {
 4628|  9.02k|  if (restart_epoch) {
  ------------------
  |  Branch (4628:7): [True: 9.02k, False: 0]
  ------------------
 4629|  9.02k|    cfd->ResetNextEpochNumber();
 4630|       |
 4631|  9.02k|    bool reserve_epoch_num_for_file_ingested_behind =
 4632|  9.02k|        cfd->ioptions()->allow_ingest_behind;
 4633|  9.02k|    if (reserve_epoch_num_for_file_ingested_behind) {
  ------------------
  |  Branch (4633:9): [True: 0, False: 9.02k]
  ------------------
 4634|      0|      uint64_t reserved_epoch_number = cfd->NewEpochNumber();
 4635|      0|      assert(reserved_epoch_number ==
 4636|      0|             kReservedEpochNumberForFileIngestedBehind);
 4637|      0|      ROCKS_LOG_INFO(cfd->ioptions()->info_log.get(),
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 4638|      0|                     "[%s]CF has reserved epoch number %" PRIu64
 4639|      0|                     " for files ingested "
 4640|      0|                     "behind since `Options::allow_ingest_behind` is true",
 4641|      0|                     cfd->GetName().c_str(), reserved_epoch_number);
 4642|      0|    }
 4643|  9.02k|  }
 4644|       |
 4645|  9.02k|  bool missing_epoch_number = HasMissingEpochNumber();
 4646|  9.02k|  if (missing_epoch_number || force) {
  ------------------
  |  Branch (4646:7): [True: 0, False: 9.02k]
  |  Branch (4646:31): [True: 0, False: 9.02k]
  ------------------
 4647|      0|    for (int level = num_levels_ - 1; level >= 1; --level) {
  ------------------
  |  Branch (4647:39): [True: 0, False: 0]
  ------------------
 4648|      0|      auto& files_at_level = files_[level];
 4649|      0|      if (files_at_level.empty()) {
  ------------------
  |  Branch (4649:11): [True: 0, False: 0]
  ------------------
 4650|      0|        continue;
 4651|      0|      }
 4652|      0|      uint64_t next_epoch_number = cfd->NewEpochNumber();
 4653|      0|      for (FileMetaData* f : files_at_level) {
  ------------------
  |  Branch (4653:28): [True: 0, False: 0]
  ------------------
 4654|      0|        f->epoch_number = next_epoch_number;
 4655|      0|      }
 4656|      0|    }
 4657|      0|    for (auto file_meta_iter = files_[0].rbegin();
 4658|      0|         file_meta_iter != files_[0].rend(); file_meta_iter++) {
  ------------------
  |  Branch (4658:10): [True: 0, False: 0]
  ------------------
 4659|      0|      FileMetaData* f = *file_meta_iter;
 4660|      0|      f->epoch_number = cfd->NewEpochNumber();
 4661|      0|    }
 4662|      0|    if (missing_epoch_number) {
  ------------------
  |  Branch (4662:9): [True: 0, False: 0]
  ------------------
 4663|      0|      assert(epoch_number_requirement_ ==
 4664|      0|             EpochNumberRequirement::kMightMissing);
 4665|      0|      ROCKS_LOG_WARN(cfd->ioptions()->info_log.get(),
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 4666|      0|                     "[%s]CF's epoch numbers are inferred based on seqno",
 4667|      0|                     cfd->GetName().c_str());
 4668|      0|      epoch_number_requirement_ = EpochNumberRequirement::kMustPresent;
 4669|      0|    }
 4670|  9.02k|  } else {
 4671|  9.02k|    assert(epoch_number_requirement_ == EpochNumberRequirement::kMustPresent);
 4672|  9.02k|    cfd->SetNextEpochNumber(
 4673|  9.02k|        std::max(GetMaxEpochNumberOfFiles() + 1, cfd->GetNextEpochNumber()));
 4674|  9.02k|  }
 4675|  9.02k|}
_ZNK7rocksdb18VersionStorageInfo16MaxBytesForLevelEi:
 4692|   406k|uint64_t VersionStorageInfo::MaxBytesForLevel(int level) const {
 4693|       |  // Note: the result for level zero is not really used since we set
 4694|       |  // the level-0 compaction threshold based on number of files.
 4695|   406k|  assert(level >= 0);
 4696|   406k|  assert(level < static_cast<int>(level_max_bytes_.size()));
 4697|   406k|  return level_max_bytes_[level];
 4698|   406k|}
_ZN7rocksdb18VersionStorageInfo18CalculateBaseBytesERKNS_16ImmutableOptionsERKNS_16MutableCFOptionsE:
 4701|  27.0k|                                            const MutableCFOptions& options) {
 4702|       |  // Special logic to set number of sorted runs.
 4703|       |  // It is to match the previous behavior when all files are in L0.
 4704|  27.0k|  int num_l0_count = static_cast<int>(files_[0].size());
 4705|  27.0k|  if (compaction_style_ == kCompactionStyleUniversal) {
  ------------------
  |  Branch (4705:7): [True: 0, False: 27.0k]
  ------------------
 4706|       |    // For universal compaction, we use level0 score to indicate
 4707|       |    // compaction score for the whole DB. Adding other levels as if
 4708|       |    // they are L0 files.
 4709|      0|    for (int i = 1; i < num_levels(); i++) {
  ------------------
  |  Branch (4709:21): [True: 0, False: 0]
  ------------------
 4710|      0|      if (!files_[i].empty()) {
  ------------------
  |  Branch (4710:11): [True: 0, False: 0]
  ------------------
 4711|      0|        num_l0_count++;
 4712|      0|      }
 4713|      0|    }
 4714|      0|  }
 4715|  27.0k|  set_l0_delay_trigger_count(num_l0_count);
 4716|       |
 4717|  27.0k|  level_max_bytes_.resize(ioptions.num_levels);
 4718|  27.0k|  if (!ioptions.level_compaction_dynamic_level_bytes) {
  ------------------
  |  Branch (4718:7): [True: 0, False: 27.0k]
  ------------------
 4719|      0|    base_level_ = (ioptions.compaction_style == kCompactionStyleLevel) ? 1 : -1;
  ------------------
  |  Branch (4719:19): [True: 0, False: 0]
  ------------------
 4720|       |
 4721|       |    // Calculate for static bytes base case
 4722|      0|    for (int i = 0; i < ioptions.num_levels; ++i) {
  ------------------
  |  Branch (4722:21): [True: 0, False: 0]
  ------------------
 4723|      0|      if (i == 0 && ioptions.compaction_style == kCompactionStyleUniversal) {
  ------------------
  |  Branch (4723:11): [True: 0, False: 0]
  |  Branch (4723:21): [True: 0, False: 0]
  ------------------
 4724|      0|        level_max_bytes_[i] = options.max_bytes_for_level_base;
 4725|      0|      } else if (i > 1) {
  ------------------
  |  Branch (4725:18): [True: 0, False: 0]
  ------------------
 4726|      0|        level_max_bytes_[i] = MultiplyCheckOverflow(
 4727|      0|            MultiplyCheckOverflow(level_max_bytes_[i - 1],
 4728|      0|                                  options.max_bytes_for_level_multiplier),
 4729|      0|            options.MaxBytesMultiplerAdditional(i - 1));
 4730|      0|      } else {
 4731|      0|        level_max_bytes_[i] = options.max_bytes_for_level_base;
 4732|      0|      }
 4733|      0|    }
 4734|  27.0k|  } else {
 4735|  27.0k|    assert(ioptions.compaction_style == kCompactionStyleLevel);
 4736|  27.0k|    uint64_t max_level_size = 0;
 4737|       |
 4738|  27.0k|    int first_non_empty_level = -1;
 4739|       |    // Find size of non-L0 level of most data.
 4740|       |    // Cannot use the size of the last level because it can be empty or less
 4741|       |    // than previous levels after compaction.
 4742|   189k|    for (int i = 1; i < num_levels_; i++) {
  ------------------
  |  Branch (4742:21): [True: 162k, False: 27.0k]
  ------------------
 4743|   162k|      uint64_t total_size = 0;
 4744|   162k|      for (const auto& f : files_[i]) {
  ------------------
  |  Branch (4744:26): [True: 0, False: 162k]
  ------------------
 4745|      0|        total_size += f->fd.GetFileSize();
 4746|      0|      }
 4747|   162k|      if (total_size > 0 && first_non_empty_level == -1) {
  ------------------
  |  Branch (4747:11): [True: 0, False: 162k]
  |  Branch (4747:29): [True: 0, False: 0]
  ------------------
 4748|      0|        first_non_empty_level = i;
 4749|      0|      }
 4750|   162k|      if (total_size > max_level_size) {
  ------------------
  |  Branch (4750:11): [True: 0, False: 162k]
  ------------------
 4751|      0|        max_level_size = total_size;
 4752|      0|      }
 4753|   162k|    }
 4754|       |
 4755|       |    // Prefill every level's max bytes to disallow compaction from there.
 4756|   216k|    for (int i = 0; i < num_levels_; i++) {
  ------------------
  |  Branch (4756:21): [True: 189k, False: 27.0k]
  ------------------
 4757|   189k|      level_max_bytes_[i] = std::numeric_limits<uint64_t>::max();
 4758|   189k|    }
 4759|       |
 4760|  27.0k|    lowest_unnecessary_level_ = -1;
 4761|  27.0k|    if (max_level_size == 0) {
  ------------------
  |  Branch (4761:9): [True: 27.0k, False: 0]
  ------------------
 4762|       |      // No data for L1 and up. L0 compacts to last level directly.
 4763|       |      // No compaction from L1+ needs to be scheduled.
 4764|  27.0k|      base_level_ = num_levels_ - 1;
 4765|  27.0k|    } else {
 4766|      0|      assert(first_non_empty_level >= 1);
 4767|      0|      uint64_t base_bytes_max = options.max_bytes_for_level_base;
 4768|      0|      uint64_t base_bytes_min = static_cast<uint64_t>(
 4769|      0|          base_bytes_max / options.max_bytes_for_level_multiplier);
 4770|       |
 4771|       |      // Try whether we can make last level's target size to be max_level_size
 4772|      0|      uint64_t cur_level_size = max_level_size;
 4773|      0|      for (int i = num_levels_ - 2; i >= first_non_empty_level; i--) {
  ------------------
  |  Branch (4773:37): [True: 0, False: 0]
  ------------------
 4774|       |        // Round up after dividing
 4775|      0|        cur_level_size = static_cast<uint64_t>(
 4776|      0|            cur_level_size / options.max_bytes_for_level_multiplier);
 4777|      0|        if (lowest_unnecessary_level_ == -1 &&
  ------------------
  |  Branch (4777:13): [True: 0, False: 0]
  ------------------
 4778|      0|            cur_level_size <= base_bytes_min &&
  ------------------
  |  Branch (4778:13): [True: 0, False: 0]
  ------------------
 4779|      0|            (ioptions.preclude_last_level_data_seconds == 0 ||
  ------------------
  |  Branch (4779:14): [True: 0, False: 0]
  ------------------
 4780|      0|             i < num_levels_ - 2)) {
  ------------------
  |  Branch (4780:14): [True: 0, False: 0]
  ------------------
 4781|       |          // When per_key_placement is enabled, the penultimate level is
 4782|       |          // necessary.
 4783|      0|          lowest_unnecessary_level_ = i;
 4784|      0|        }
 4785|      0|      }
 4786|       |
 4787|       |      // Calculate base level and its size.
 4788|      0|      uint64_t base_level_size;
 4789|      0|      if (cur_level_size <= base_bytes_min) {
  ------------------
  |  Branch (4789:11): [True: 0, False: 0]
  ------------------
 4790|       |        // If per_key_placement is not enabled,
 4791|       |        // either there is only one non-empty level after level 0,
 4792|       |        // which can less than base_bytes_min AND necessary,
 4793|       |        // or there is some unnecessary level.
 4794|      0|        assert(first_non_empty_level == num_levels_ - 1 ||
 4795|      0|               ioptions.preclude_last_level_data_seconds > 0 ||
 4796|      0|               lowest_unnecessary_level_ != -1);
 4797|       |        // Case 1. If we make target size of last level to be max_level_size,
 4798|       |        // target size of the first non-empty level would be smaller than
 4799|       |        // base_bytes_min. We set it be base_bytes_min.
 4800|      0|        base_level_size = base_bytes_min + 1U;
 4801|      0|        base_level_ = first_non_empty_level;
 4802|      0|        if (base_level_ < num_levels_ - 1) {
  ------------------
  |  Branch (4802:13): [True: 0, False: 0]
  ------------------
 4803|      0|          ROCKS_LOG_INFO(
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 4804|      0|              ioptions.logger,
 4805|      0|              "More existing levels in DB than needed: all non-zero "
 4806|      0|              "levels <= level %d are unnecessary.  "
 4807|      0|              "max_bytes_for_level_multiplier may not be guaranteed.",
 4808|      0|              lowest_unnecessary_level_);
 4809|      0|        }
 4810|      0|      } else {
 4811|      0|        assert(lowest_unnecessary_level_ == -1);
 4812|       |        // Find base level (where L0 data is compacted to).
 4813|      0|        base_level_ = first_non_empty_level;
 4814|      0|        while (base_level_ > 1 && cur_level_size > base_bytes_max) {
  ------------------
  |  Branch (4814:16): [True: 0, False: 0]
  |  Branch (4814:35): [True: 0, False: 0]
  ------------------
 4815|      0|          --base_level_;
 4816|      0|          cur_level_size = static_cast<uint64_t>(
 4817|      0|              cur_level_size / options.max_bytes_for_level_multiplier);
 4818|      0|        }
 4819|      0|        if (cur_level_size > base_bytes_max) {
  ------------------
  |  Branch (4819:13): [True: 0, False: 0]
  ------------------
 4820|       |          // Even L1 will be too large
 4821|      0|          assert(base_level_ == 1);
 4822|      0|          base_level_size = base_bytes_max;
 4823|      0|        } else {
 4824|      0|          base_level_size = std::max(static_cast<uint64_t>(1), cur_level_size);
 4825|      0|        }
 4826|      0|      }
 4827|       |
 4828|      0|      level_multiplier_ = options.max_bytes_for_level_multiplier;
 4829|      0|      assert(base_level_size > 0);
 4830|       |
 4831|      0|      uint64_t level_size = base_level_size;
 4832|      0|      for (int i = base_level_; i < num_levels_; i++) {
  ------------------
  |  Branch (4832:33): [True: 0, False: 0]
  ------------------
 4833|      0|        if (i > base_level_) {
  ------------------
  |  Branch (4833:13): [True: 0, False: 0]
  ------------------
 4834|      0|          level_size = MultiplyCheckOverflow(level_size, level_multiplier_);
 4835|      0|        }
 4836|       |        // Don't set any level below base_bytes_max. Otherwise, the LSM can
 4837|       |        // assume an hourglass shape where L1+ sizes are smaller than L0. This
 4838|       |        // causes compaction scoring, which depends on level sizes, to favor L1+
 4839|       |        // at the expense of L0, which may fill up and stall.
 4840|      0|        level_max_bytes_[i] = std::max(level_size, base_bytes_max);
 4841|      0|      }
 4842|      0|    }
 4843|  27.0k|  }
 4844|  27.0k|}
_ZN7rocksdb18VersionStorageInfo29RangeMightExistAfterSortedRunERKNS_5SliceES3_ii:
 4893|  4.48k|    int last_level, int last_l0_idx) {
 4894|  4.48k|  assert((last_l0_idx != -1) == (last_level == 0));
 4895|       |  // TODO(ajkr): this preserves earlier behavior where we considered an L0 file
 4896|       |  // bottommost only if it's the oldest L0 file and there are no files on older
 4897|       |  // levels. It'd be better to consider it bottommost if there's no overlap in
 4898|       |  // older levels/files.
 4899|  4.48k|  if (last_level == 0 &&
  ------------------
  |  Branch (4899:7): [True: 4.48k, False: 0]
  ------------------
 4900|  4.48k|      last_l0_idx != static_cast<int>(LevelFiles(0).size() - 1)) {
  ------------------
  |  Branch (4900:7): [True: 0, False: 4.48k]
  ------------------
 4901|      0|    return true;
 4902|      0|  }
 4903|       |
 4904|       |  // Checks whether there are files living beyond the `last_level`. If lower
 4905|       |  // levels have files, it checks for overlap between [`smallest_key`,
 4906|       |  // `largest_key`] and those files. Bottomlevel optimizations can be made if
 4907|       |  // there are no files in lower levels or if there is no overlap with the files
 4908|       |  // in the lower levels.
 4909|  31.3k|  for (int level = last_level + 1; level < num_levels(); level++) {
  ------------------
  |  Branch (4909:36): [True: 26.9k, False: 4.48k]
  ------------------
 4910|       |    // The range is not in the bottommost level if there are files in lower
 4911|       |    // levels when the `last_level` is 0 or if there are files in lower levels
 4912|       |    // which overlap with [`smallest_key`, `largest_key`].
 4913|  26.9k|    if (files_[level].size() > 0 &&
  ------------------
  |  Branch (4913:9): [True: 0, False: 26.9k]
  ------------------
 4914|  26.9k|        (last_level == 0 ||
  ------------------
  |  Branch (4914:10): [True: 0, False: 0]
  ------------------
 4915|      0|         OverlapInLevel(level, &smallest_user_key, &largest_user_key))) {
  ------------------
  |  Branch (4915:10): [True: 0, False: 0]
  ------------------
 4916|      0|      return true;
 4917|      0|    }
 4918|  26.9k|  }
 4919|  4.48k|  return false;
 4920|  4.48k|}
_ZNK7rocksdb7Version12AddLiveFilesEPNSt3__16vectorImNS1_9allocatorImEEEES6_:
 4923|  18.0k|                           std::vector<uint64_t>* live_blob_files) const {
 4924|  18.0k|  assert(live_table_files);
 4925|  18.0k|  assert(live_blob_files);
 4926|       |
 4927|   144k|  for (int level = 0; level < storage_info_.num_levels(); ++level) {
  ------------------
  |  Branch (4927:23): [True: 126k, False: 18.0k]
  ------------------
 4928|   126k|    const auto& level_files = storage_info_.LevelFiles(level);
 4929|   126k|    for (const auto& meta : level_files) {
  ------------------
  |  Branch (4929:27): [True: 8.96k, False: 126k]
  ------------------
 4930|  8.96k|      assert(meta);
 4931|       |
 4932|  8.96k|      live_table_files->emplace_back(meta->fd.GetNumber());
 4933|  8.96k|    }
 4934|   126k|  }
 4935|       |
 4936|  18.0k|  const auto& blob_files = storage_info_.GetBlobFiles();
 4937|  18.0k|  for (const auto& meta : blob_files) {
  ------------------
  |  Branch (4937:25): [True: 0, False: 18.0k]
  ------------------
 4938|      0|    assert(meta);
 4939|       |
 4940|      0|    live_blob_files->emplace_back(meta->GetBlobFileNumber());
 4941|      0|  }
 4942|  18.0k|}
_ZN7rocksdb21AtomicGroupReadBuffer7AddEditEPNS_11VersionEditE:
 5063|  22.5k|Status AtomicGroupReadBuffer::AddEdit(VersionEdit* edit) {
 5064|  22.5k|  assert(edit);
 5065|  22.5k|  if (edit->IsInAtomicGroup()) {
  ------------------
  |  Branch (5065:7): [True: 0, False: 22.5k]
  ------------------
 5066|      0|    TEST_SYNC_POINT("AtomicGroupReadBuffer::AddEdit:AtomicGroup");
 5067|      0|    if (replay_buffer_.empty()) {
  ------------------
  |  Branch (5067:9): [True: 0, False: 0]
  ------------------
 5068|      0|      replay_buffer_.resize(edit->GetRemainingEntries() + 1);
 5069|      0|      TEST_SYNC_POINT_CALLBACK(
 5070|      0|          "AtomicGroupReadBuffer::AddEdit:FirstInAtomicGroup", edit);
 5071|      0|    }
 5072|      0|    read_edits_in_atomic_group_++;
 5073|      0|    if (read_edits_in_atomic_group_ + edit->GetRemainingEntries() !=
  ------------------
  |  Branch (5073:9): [True: 0, False: 0]
  ------------------
 5074|      0|        static_cast<uint32_t>(replay_buffer_.size())) {
 5075|      0|      TEST_SYNC_POINT_CALLBACK(
 5076|      0|          "AtomicGroupReadBuffer::AddEdit:IncorrectAtomicGroupSize", edit);
 5077|      0|      return Status::Corruption("corrupted atomic group");
 5078|      0|    }
 5079|      0|    replay_buffer_[read_edits_in_atomic_group_ - 1] = *edit;
 5080|      0|    if (read_edits_in_atomic_group_ == replay_buffer_.size()) {
  ------------------
  |  Branch (5080:9): [True: 0, False: 0]
  ------------------
 5081|      0|      TEST_SYNC_POINT_CALLBACK(
 5082|      0|          "AtomicGroupReadBuffer::AddEdit:LastInAtomicGroup", edit);
 5083|      0|      return Status::OK();
 5084|      0|    }
 5085|      0|    return Status::OK();
 5086|      0|  }
 5087|       |
 5088|       |  // A normal edit.
 5089|  22.5k|  if (!replay_buffer().empty()) {
  ------------------
  |  Branch (5089:7): [True: 0, False: 22.5k]
  ------------------
 5090|      0|    TEST_SYNC_POINT_CALLBACK(
 5091|      0|        "AtomicGroupReadBuffer::AddEdit:AtomicGroupMixedWithNormalEdits", edit);
 5092|      0|    return Status::Corruption("corrupted atomic group");
 5093|      0|  }
 5094|  22.5k|  return Status::OK();
 5095|  22.5k|}
_ZN7rocksdb10VersionSetC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKNS_18ImmutableDBOptionsERKNS_11FileOptionsEPNS_5CacheEPNS_18WriteBufferManagerEPNS_15WriteControllerEPNS_16BlockCacheTracerERKNS1_10shared_ptrINS_8IOTracerEEES9_S9_S9_PNS_12ErrorHandlerEb:
 5144|  9.02k|      closed_(false) {}
_ZN7rocksdb10VersionSet5CloseEPNS_11FSDirectoryEPNS_17InstrumentedMutexE:
 5146|  9.02k|Status VersionSet::Close(FSDirectory* db_dir, InstrumentedMutex* mu) {
 5147|  9.02k|  Status s;
 5148|  9.02k|  if (closed_ || read_only_ || !manifest_file_number_ || !descriptor_log_) {
  ------------------
  |  Branch (5148:7): [True: 0, False: 9.02k]
  |  Branch (5148:18): [True: 0, False: 9.02k]
  |  Branch (5148:32): [True: 0, False: 9.02k]
  |  Branch (5148:58): [True: 0, False: 9.02k]
  ------------------
 5149|      0|    return s;
 5150|      0|  }
 5151|       |
 5152|  9.02k|  std::string manifest_file_name =
 5153|  9.02k|      DescriptorFileName(dbname_, manifest_file_number_);
 5154|  9.02k|  uint64_t size = 0;
 5155|  9.02k|  IOStatus io_s = descriptor_log_->Close(WriteOptions());
 5156|  9.02k|  descriptor_log_.reset();
 5157|  9.02k|  TEST_SYNC_POINT("VersionSet::Close:AfterClose");
 5158|  9.02k|  if (io_s.ok()) {
  ------------------
  |  Branch (5158:7): [True: 9.02k, False: 0]
  ------------------
 5159|  9.02k|    io_s = fs_->GetFileSize(manifest_file_name, IOOptions(), &size, nullptr);
 5160|  9.02k|  }
 5161|  9.02k|  if (!io_s.ok() || size != manifest_file_size_) {
  ------------------
  |  Branch (5161:7): [True: 0, False: 9.02k]
  |  Branch (5161:21): [True: 0, False: 9.02k]
  ------------------
 5162|      0|    if (io_s.ok()) {
  ------------------
  |  Branch (5162:9): [True: 0, False: 0]
  ------------------
 5163|       |      // This means the size is not as expected. So we treat it as a
 5164|       |      // corruption and set io_s appropriately
 5165|      0|      io_s = IOStatus::Corruption();
 5166|      0|    }
 5167|      0|    ColumnFamilyData* cfd = GetColumnFamilySet()->GetDefault();
 5168|      0|    const ImmutableOptions* ioptions = cfd->ioptions();
 5169|      0|    IOErrorInfo io_error_info(io_s, FileOperationType::kVerify,
 5170|      0|                              manifest_file_name, /*length=*/size,
 5171|      0|                              /*offset=*/0);
 5172|       |
 5173|      0|    for (auto& listener : ioptions->listeners) {
  ------------------
  |  Branch (5173:25): [True: 0, False: 0]
  ------------------
 5174|      0|      listener->OnIOError(io_error_info);
 5175|      0|    }
 5176|      0|    io_s.PermitUncheckedError();
 5177|      0|    io_error_info.io_status.PermitUncheckedError();
 5178|      0|    ROCKS_LOG_ERROR(db_options_->info_log,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 5179|      0|                    "MANIFEST verification on Close, "
 5180|      0|                    "filename %s, expected size %" PRIu64
 5181|      0|                    " failed with status %s and "
 5182|      0|                    "actual size %" PRIu64 "\n",
 5183|      0|                    manifest_file_name.c_str(), manifest_file_size_,
 5184|      0|                    io_s.ToString().c_str(), size);
 5185|      0|    VersionEdit edit;
 5186|      0|    assert(cfd);
 5187|      0|    const MutableCFOptions& cf_opts = *cfd->GetLatestMutableCFOptions();
 5188|      0|    s = LogAndApply(cfd, cf_opts, ReadOptions(), WriteOptions(), &edit, mu,
 5189|      0|                    db_dir);
 5190|      0|  }
 5191|       |
 5192|  9.02k|  closed_ = true;
 5193|  9.02k|  return s;
 5194|  9.02k|}
_ZN7rocksdb10VersionSetD2Ev:
 5196|  9.02k|VersionSet::~VersionSet() {
 5197|       |  // Must clean up column families to make all files "obsolete"
 5198|  9.02k|  column_family_set_.reset();
 5199|       |
 5200|  9.02k|  for (auto& file : obsolete_files_) {
  ------------------
  |  Branch (5200:19): [True: 4.48k, False: 9.02k]
  ------------------
 5201|  4.48k|    if (file.metadata->table_reader_handle) {
  ------------------
  |  Branch (5201:9): [True: 4.48k, False: 0]
  ------------------
 5202|       |      // NOTE: DB is shutting down, so file is probably not obsolete, just
 5203|       |      // no longer referenced by Versions in memory.
 5204|       |      // For more context, see comment on "table_cache_->EraseUnRefEntries()"
 5205|       |      // in DBImpl::CloseHelper().
 5206|       |      // Using uncache_aggressiveness=0 overrides any previous marking to
 5207|       |      // attempt to uncache the file's blocks (which after cleaning up
 5208|       |      // column families could cause use-after-free)
 5209|  4.48k|      TableCache::ReleaseObsolete(table_cache_,
 5210|  4.48k|                                  file.metadata->table_reader_handle,
 5211|  4.48k|                                  /*uncache_aggressiveness=*/0);
 5212|  4.48k|    }
 5213|  4.48k|    file.DeleteMetadata();
 5214|  4.48k|  }
 5215|  9.02k|  obsolete_files_.clear();
 5216|  9.02k|  io_status_.PermitUncheckedError();
 5217|  9.02k|}
_ZN7rocksdb10VersionSet13AppendVersionEPNS_16ColumnFamilyDataEPNS_7VersionE:
 5251|  27.0k|                               Version* v) {
 5252|       |  // compute new compaction score
 5253|  27.0k|  v->storage_info()->ComputeCompactionScore(
 5254|  27.0k|      *column_family_data->ioptions(),
 5255|  27.0k|      *column_family_data->GetLatestMutableCFOptions());
 5256|       |
 5257|       |  // Mark v finalized
 5258|  27.0k|  v->storage_info_.SetFinalized();
 5259|       |
 5260|       |  // Make "v" current
 5261|  27.0k|  assert(v->refs_ == 0);
 5262|  27.0k|  Version* current = column_family_data->current();
 5263|  27.0k|  assert(v != current);
 5264|  27.0k|  if (current != nullptr) {
  ------------------
  |  Branch (5264:7): [True: 18.0k, False: 9.02k]
  ------------------
 5265|  18.0k|    assert(current->refs_ > 0);
 5266|  18.0k|    current->Unref();
 5267|  18.0k|  }
 5268|  27.0k|  column_family_data->SetCurrent(v);
 5269|  27.0k|  v->Ref();
 5270|       |
 5271|       |  // Append to linked list
 5272|  27.0k|  v->prev_ = column_family_data->dummy_versions()->prev_;
 5273|  27.0k|  v->next_ = column_family_data->dummy_versions();
 5274|  27.0k|  v->prev_->next_ = v;
 5275|  27.0k|  v->next_->prev_ = v;
 5276|  27.0k|}
_ZN7rocksdb10VersionSet21ProcessManifestWritesERNSt3__15dequeINS0_14ManifestWriterENS1_9allocatorIS3_EEEEPNS_17InstrumentedMutexEPNS_11FSDirectoryEbPKNS_19ColumnFamilyOptionsERKNS_11ReadOptionsERKNS_12WriteOptionsE:
 5282|  9.02k|    const WriteOptions& write_options) {
 5283|  9.02k|  mu->AssertHeld();
 5284|  9.02k|  assert(!writers.empty());
 5285|  9.02k|  ManifestWriter& first_writer = writers.front();
 5286|  9.02k|  ManifestWriter* last_writer = &first_writer;
 5287|       |
 5288|  9.02k|  assert(!manifest_writers_.empty());
 5289|  9.02k|  assert(manifest_writers_.front() == &first_writer);
 5290|       |
 5291|  9.02k|  autovector<VersionEdit*> batch_edits;
 5292|       |  // This vector keeps track of the corresponding user-defined timestamp size
 5293|       |  // for `batch_edits` side by side, which is only needed for encoding a
 5294|       |  // `VersionEdit` that adds new SST files.
 5295|       |  // Note that anytime `batch_edits` has new element added or get existing
 5296|       |  // element removed, `batch_edits_ts_sz` should be updated too.
 5297|  9.02k|  autovector<std::optional<size_t>> batch_edits_ts_sz;
 5298|  9.02k|  autovector<Version*> versions;
 5299|  9.02k|  autovector<const MutableCFOptions*> mutable_cf_options_ptrs;
 5300|  9.02k|  std::vector<std::unique_ptr<BaseReferencedVersionBuilder>> builder_guards;
 5301|  9.02k|  autovector<const autovector<uint64_t>*> files_to_quarantine_if_commit_fail;
 5302|  9.02k|  autovector<uint64_t> limbo_descriptor_log_file_number;
 5303|       |
 5304|       |  // Tracking `max_last_sequence` is needed to ensure we write
 5305|       |  // `VersionEdit::last_sequence_`s in non-decreasing order according to the
 5306|       |  // recovery code's requirement. It also allows us to defer updating
 5307|       |  // `descriptor_last_sequence_` until the apply phase, after the log phase
 5308|       |  // succeeds.
 5309|  9.02k|  SequenceNumber max_last_sequence = descriptor_last_sequence_;
 5310|       |
 5311|  9.02k|  if (first_writer.edit_list.front()->IsColumnFamilyManipulation()) {
  ------------------
  |  Branch (5311:7): [True: 0, False: 9.02k]
  ------------------
 5312|       |    // No group commits for column family add or drop
 5313|      0|    LogAndApplyCFHelper(first_writer.edit_list.front(), &max_last_sequence);
 5314|      0|    batch_edits.push_back(first_writer.edit_list.front());
 5315|      0|    batch_edits_ts_sz.push_back(std::nullopt);
 5316|  9.02k|  } else {
 5317|  9.02k|    auto it = manifest_writers_.cbegin();
 5318|  9.02k|    size_t group_start = std::numeric_limits<size_t>::max();
 5319|  18.0k|    while (it != manifest_writers_.cend()) {
  ------------------
  |  Branch (5319:12): [True: 9.02k, False: 9.02k]
  ------------------
 5320|  9.02k|      if ((*it)->edit_list.front()->IsColumnFamilyManipulation()) {
  ------------------
  |  Branch (5320:11): [True: 0, False: 9.02k]
  ------------------
 5321|       |        // no group commits for column family add or drop
 5322|      0|        break;
 5323|      0|      }
 5324|  9.02k|      last_writer = *(it++);
 5325|  9.02k|      assert(last_writer != nullptr);
 5326|  9.02k|      assert(last_writer->cfd != nullptr);
 5327|  9.02k|      if (last_writer->cfd->IsDropped()) {
  ------------------
  |  Branch (5327:11): [True: 0, False: 9.02k]
  ------------------
 5328|       |        // If we detect a dropped CF at this point, and the corresponding
 5329|       |        // version edits belong to an atomic group, then we need to find out
 5330|       |        // the preceding version edits in the same atomic group, and update
 5331|       |        // their `remaining_entries_` member variable because we are NOT going
 5332|       |        // to write the version edits' of dropped CF to the MANIFEST. If we
 5333|       |        // don't update, then Recover can report corrupted atomic group because
 5334|       |        // the `remaining_entries_` do not match.
 5335|      0|        if (!batch_edits.empty()) {
  ------------------
  |  Branch (5335:13): [True: 0, False: 0]
  ------------------
 5336|      0|          if (batch_edits.back()->IsInAtomicGroup() &&
  ------------------
  |  Branch (5336:15): [True: 0, False: 0]
  ------------------
 5337|      0|              batch_edits.back()->GetRemainingEntries() > 0) {
  ------------------
  |  Branch (5337:15): [True: 0, False: 0]
  ------------------
 5338|      0|            assert(group_start < batch_edits.size());
 5339|      0|            const auto& edit_list = last_writer->edit_list;
 5340|      0|            size_t k = 0;
 5341|      0|            while (k < edit_list.size()) {
  ------------------
  |  Branch (5341:20): [True: 0, False: 0]
  ------------------
 5342|      0|              if (!edit_list[k]->IsInAtomicGroup()) {
  ------------------
  |  Branch (5342:19): [True: 0, False: 0]
  ------------------
 5343|      0|                break;
 5344|      0|              } else if (edit_list[k]->GetRemainingEntries() == 0) {
  ------------------
  |  Branch (5344:26): [True: 0, False: 0]
  ------------------
 5345|      0|                ++k;
 5346|      0|                break;
 5347|      0|              }
 5348|      0|              ++k;
 5349|      0|            }
 5350|      0|            for (auto i = group_start; i < batch_edits.size(); ++i) {
  ------------------
  |  Branch (5350:40): [True: 0, False: 0]
  ------------------
 5351|      0|              assert(static_cast<uint32_t>(k) <=
 5352|      0|                     batch_edits.back()->GetRemainingEntries());
 5353|      0|              batch_edits[i]->SetRemainingEntries(
 5354|      0|                  batch_edits[i]->GetRemainingEntries() -
 5355|      0|                  static_cast<uint32_t>(k));
 5356|      0|            }
 5357|      0|          }
 5358|      0|        }
 5359|      0|        continue;
 5360|      0|      }
 5361|       |      // We do a linear search on versions because versions is small.
 5362|       |      // TODO(yanqin) maybe consider unordered_map
 5363|  9.02k|      Version* version = nullptr;
 5364|  9.02k|      VersionBuilder* builder = nullptr;
 5365|  9.02k|      for (int i = 0; i != static_cast<int>(versions.size()); ++i) {
  ------------------
  |  Branch (5365:23): [True: 0, False: 9.02k]
  ------------------
 5366|      0|        uint32_t cf_id = last_writer->cfd->GetID();
 5367|      0|        if (versions[i]->cfd()->GetID() == cf_id) {
  ------------------
  |  Branch (5367:13): [True: 0, False: 0]
  ------------------
 5368|      0|          version = versions[i];
 5369|      0|          assert(!builder_guards.empty() &&
 5370|      0|                 builder_guards.size() == versions.size());
 5371|      0|          builder = builder_guards[i]->version_builder();
 5372|      0|          TEST_SYNC_POINT_CALLBACK(
 5373|      0|              "VersionSet::ProcessManifestWrites:SameColumnFamily", &cf_id);
 5374|      0|          break;
 5375|      0|        }
 5376|      0|      }
 5377|  9.02k|      if (version == nullptr) {
  ------------------
  |  Branch (5377:11): [True: 9.02k, False: 0]
  ------------------
 5378|       |        // WAL manipulations do not need to be applied to versions.
 5379|  9.02k|        if (!last_writer->IsAllWalEdits()) {
  ------------------
  |  Branch (5379:13): [True: 9.02k, False: 0]
  ------------------
 5380|  9.02k|          version = new Version(last_writer->cfd, this, file_options_,
 5381|  9.02k|                                last_writer->mutable_cf_options, io_tracer_,
 5382|  9.02k|                                current_version_number_++);
 5383|  9.02k|          versions.push_back(version);
 5384|  9.02k|          mutable_cf_options_ptrs.push_back(&last_writer->mutable_cf_options);
 5385|  9.02k|          builder_guards.emplace_back(
 5386|  9.02k|              new BaseReferencedVersionBuilder(last_writer->cfd));
 5387|  9.02k|          builder = builder_guards.back()->version_builder();
 5388|  9.02k|        }
 5389|  9.02k|        assert(last_writer->IsAllWalEdits() || builder);
 5390|  9.02k|        assert(last_writer->IsAllWalEdits() || version);
 5391|  9.02k|        TEST_SYNC_POINT_CALLBACK("VersionSet::ProcessManifestWrites:NewVersion",
 5392|  9.02k|                                 version);
 5393|  9.02k|      }
 5394|  9.02k|      const Comparator* ucmp = last_writer->cfd->user_comparator();
 5395|  9.02k|      assert(ucmp);
 5396|  9.02k|      std::optional<size_t> edit_ts_sz = ucmp->timestamp_size();
 5397|  18.0k|      for (const auto& e : last_writer->edit_list) {
  ------------------
  |  Branch (5397:26): [True: 18.0k, False: 9.02k]
  ------------------
 5398|  18.0k|        if (e->IsInAtomicGroup()) {
  ------------------
  |  Branch (5398:13): [True: 0, False: 18.0k]
  ------------------
 5399|      0|          if (batch_edits.empty() || !batch_edits.back()->IsInAtomicGroup() ||
  ------------------
  |  Branch (5399:15): [True: 0, False: 0]
  |  Branch (5399:38): [True: 0, False: 0]
  ------------------
 5400|      0|              (batch_edits.back()->IsInAtomicGroup() &&
  ------------------
  |  Branch (5400:16): [True: 0, False: 0]
  ------------------
 5401|      0|               batch_edits.back()->GetRemainingEntries() == 0)) {
  ------------------
  |  Branch (5401:16): [True: 0, False: 0]
  ------------------
 5402|      0|            group_start = batch_edits.size();
 5403|      0|          }
 5404|  18.0k|        } else if (group_start != std::numeric_limits<size_t>::max()) {
  ------------------
  |  Branch (5404:20): [True: 0, False: 18.0k]
  ------------------
 5405|      0|          group_start = std::numeric_limits<size_t>::max();
 5406|      0|        }
 5407|  18.0k|        Status s = LogAndApplyHelper(last_writer->cfd, builder, e,
 5408|  18.0k|                                     &max_last_sequence, mu);
 5409|  18.0k|        if (!s.ok()) {
  ------------------
  |  Branch (5409:13): [True: 0, False: 18.0k]
  ------------------
 5410|       |          // free up the allocated memory
 5411|      0|          for (auto v : versions) {
  ------------------
  |  Branch (5411:23): [True: 0, False: 0]
  ------------------
 5412|      0|            delete v;
 5413|      0|          }
 5414|      0|          return s;
 5415|      0|        }
 5416|  18.0k|        batch_edits.push_back(e);
 5417|  18.0k|        batch_edits_ts_sz.push_back(edit_ts_sz);
 5418|  18.0k|      }
 5419|  9.02k|    }
 5420|  18.0k|    for (int i = 0; i < static_cast<int>(versions.size()); ++i) {
  ------------------
  |  Branch (5420:21): [True: 9.02k, False: 9.02k]
  ------------------
 5421|  9.02k|      assert(!builder_guards.empty() &&
 5422|  9.02k|             builder_guards.size() == versions.size());
 5423|  9.02k|      auto* builder = builder_guards[i]->version_builder();
 5424|  9.02k|      Status s = builder->SaveTo(versions[i]->storage_info());
 5425|  9.02k|      if (!s.ok()) {
  ------------------
  |  Branch (5425:11): [True: 0, False: 9.02k]
  ------------------
 5426|       |        // free up the allocated memory
 5427|      0|        for (auto v : versions) {
  ------------------
  |  Branch (5427:21): [True: 0, False: 0]
  ------------------
 5428|      0|          delete v;
 5429|      0|        }
 5430|      0|        return s;
 5431|      0|      }
 5432|  9.02k|    }
 5433|  9.02k|  }
 5434|       |
 5435|       |#ifndef NDEBUG
 5436|       |  // Verify that version edits of atomic groups have correct
 5437|       |  // remaining_entries_.
 5438|       |  size_t k = 0;
 5439|       |  while (k < batch_edits.size()) {
 5440|       |    while (k < batch_edits.size() && !batch_edits[k]->IsInAtomicGroup()) {
 5441|       |      ++k;
 5442|       |    }
 5443|       |    if (k == batch_edits.size()) {
 5444|       |      break;
 5445|       |    }
 5446|       |    size_t i = k;
 5447|       |    while (i < batch_edits.size()) {
 5448|       |      if (!batch_edits[i]->IsInAtomicGroup()) {
 5449|       |        break;
 5450|       |      }
 5451|       |      assert(i - k + batch_edits[i]->GetRemainingEntries() ==
 5452|       |             batch_edits[k]->GetRemainingEntries());
 5453|       |      if (batch_edits[i]->GetRemainingEntries() == 0) {
 5454|       |        ++i;
 5455|       |        break;
 5456|       |      }
 5457|       |      ++i;
 5458|       |    }
 5459|       |    assert(batch_edits[i - 1]->IsInAtomicGroup());
 5460|       |    assert(0 == batch_edits[i - 1]->GetRemainingEntries());
 5461|       |    std::vector<VersionEdit*> tmp;
 5462|       |    for (size_t j = k; j != i; ++j) {
 5463|       |      tmp.emplace_back(batch_edits[j]);
 5464|       |    }
 5465|       |    TEST_SYNC_POINT_CALLBACK(
 5466|       |        "VersionSet::ProcessManifestWrites:CheckOneAtomicGroup", &tmp);
 5467|       |    k = i;
 5468|       |  }
 5469|       |#endif  // NDEBUG
 5470|       |
 5471|  9.02k|  assert(pending_manifest_file_number_ == 0);
 5472|  9.02k|  if (!descriptor_log_ ||
  ------------------
  |  Branch (5472:7): [True: 9.02k, False: 0]
  ------------------
 5473|  9.02k|      manifest_file_size_ > db_options_->max_manifest_file_size) {
  ------------------
  |  Branch (5473:7): [True: 0, False: 0]
  ------------------
 5474|  9.02k|    TEST_SYNC_POINT("VersionSet::ProcessManifestWrites:BeforeNewManifest");
 5475|  9.02k|    new_descriptor_log = true;
 5476|  9.02k|  } else {
 5477|      0|    pending_manifest_file_number_ = manifest_file_number_;
 5478|      0|  }
 5479|       |
 5480|       |  // Local cached copy of state variable(s). WriteCurrentStateToManifest()
 5481|       |  // reads its content after releasing db mutex to avoid race with
 5482|       |  // SwitchMemtable().
 5483|  9.02k|  std::unordered_map<uint32_t, MutableCFState> curr_state;
 5484|  9.02k|  VersionEdit wal_additions;
 5485|  9.02k|  if (new_descriptor_log) {
  ------------------
  |  Branch (5485:7): [True: 9.02k, False: 0]
  ------------------
 5486|  9.02k|    pending_manifest_file_number_ = NewFileNumber();
 5487|  9.02k|    batch_edits.back()->SetNextFile(next_file_number_.load());
 5488|       |
 5489|       |    // if we are writing out new snapshot make sure to persist max column
 5490|       |    // family.
 5491|  9.02k|    if (column_family_set_->GetMaxColumnFamily() > 0) {
  ------------------
  |  Branch (5491:9): [True: 0, False: 9.02k]
  ------------------
 5492|      0|      first_writer.edit_list.front()->SetMaxColumnFamily(
 5493|      0|          column_family_set_->GetMaxColumnFamily());
 5494|      0|    }
 5495|  9.02k|    for (const auto* cfd : *column_family_set_) {
  ------------------
  |  Branch (5495:26): [True: 9.02k, False: 9.02k]
  ------------------
 5496|  9.02k|      assert(curr_state.find(cfd->GetID()) == curr_state.end());
 5497|  9.02k|      curr_state.emplace(
 5498|  9.02k|          cfd->GetID(),
 5499|  9.02k|          MutableCFState(cfd->GetLogNumber(), cfd->GetFullHistoryTsLow()));
 5500|  9.02k|    }
 5501|       |
 5502|  9.02k|    for (const auto& wal : wals_.GetWals()) {
  ------------------
  |  Branch (5502:26): [True: 0, False: 9.02k]
  ------------------
 5503|      0|      wal_additions.AddWal(wal.first, wal.second);
 5504|      0|    }
 5505|  9.02k|  }
 5506|       |
 5507|  9.02k|  uint64_t new_manifest_file_size = 0;
 5508|  9.02k|  Status s;
 5509|  9.02k|  IOStatus io_s;
 5510|  9.02k|  IOStatus manifest_io_status;
 5511|  9.02k|  std::unique_ptr<log::Writer> new_desc_log_ptr;
 5512|  9.02k|  {
 5513|  9.02k|    FileOptions opt_file_opts = fs_->OptimizeForManifestWrite(file_options_);
 5514|  9.02k|    mu->Unlock();
 5515|  9.02k|    TEST_SYNC_POINT("VersionSet::LogAndApply:WriteManifestStart");
 5516|  9.02k|    TEST_SYNC_POINT_CALLBACK("VersionSet::LogAndApply:WriteManifest", nullptr);
 5517|  9.02k|    if (!first_writer.edit_list.front()->IsColumnFamilyManipulation()) {
  ------------------
  |  Branch (5517:9): [True: 9.02k, False: 0]
  ------------------
 5518|  18.0k|      for (int i = 0; i < static_cast<int>(versions.size()); ++i) {
  ------------------
  |  Branch (5518:23): [True: 9.02k, False: 9.02k]
  ------------------
 5519|  9.02k|        assert(!builder_guards.empty() &&
 5520|  9.02k|               builder_guards.size() == versions.size());
 5521|  9.02k|        assert(!mutable_cf_options_ptrs.empty() &&
 5522|  9.02k|               builder_guards.size() == versions.size());
 5523|  9.02k|        ColumnFamilyData* cfd = versions[i]->cfd_;
 5524|  9.02k|        s = builder_guards[i]->version_builder()->LoadTableHandlers(
 5525|  9.02k|            cfd->internal_stats(), 1 /* max_threads */,
 5526|  9.02k|            true /* prefetch_index_and_filter_in_cache */,
 5527|  9.02k|            false /* is_initial_load */,
 5528|  9.02k|            mutable_cf_options_ptrs[i]->prefix_extractor,
 5529|  9.02k|            MaxFileSizeForL0MetaPin(*mutable_cf_options_ptrs[i]), read_options,
 5530|  9.02k|            mutable_cf_options_ptrs[i]->block_protection_bytes_per_key);
 5531|  9.02k|        if (!s.ok()) {
  ------------------
  |  Branch (5531:13): [True: 0, False: 9.02k]
  ------------------
 5532|      0|          if (db_options_->paranoid_checks) {
  ------------------
  |  Branch (5532:15): [True: 0, False: 0]
  ------------------
 5533|      0|            break;
 5534|      0|          }
 5535|      0|          s = Status::OK();
 5536|      0|        }
 5537|  9.02k|      }
 5538|  9.02k|    }
 5539|       |
 5540|  9.02k|    log::Writer* raw_desc_log_ptr = descriptor_log_.get();
 5541|  9.02k|    if (s.ok() && new_descriptor_log) {
  ------------------
  |  Branch (5541:9): [True: 9.02k, False: 0]
  |  Branch (5541:19): [True: 9.02k, False: 0]
  ------------------
 5542|       |      // This is fine because everything inside of this block is serialized --
 5543|       |      // only one thread can be here at the same time
 5544|       |      // create new manifest file
 5545|  9.02k|      ROCKS_LOG_INFO(db_options_->info_log, "Creating manifest %" PRIu64 "\n",
  ------------------
  |  |   39|  9.02k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  9.02k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  9.02k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  9.02k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 5546|  9.02k|                     pending_manifest_file_number_);
 5547|  9.02k|      std::string descriptor_fname =
 5548|  9.02k|          DescriptorFileName(dbname_, pending_manifest_file_number_);
 5549|  9.02k|      std::unique_ptr<FSWritableFile> descriptor_file;
 5550|  9.02k|      io_s = NewWritableFile(fs_.get(), descriptor_fname, &descriptor_file,
 5551|  9.02k|                             opt_file_opts);
 5552|  9.02k|      if (io_s.ok()) {
  ------------------
  |  Branch (5552:11): [True: 9.02k, False: 0]
  ------------------
 5553|  9.02k|        descriptor_file->SetPreallocationBlockSize(
 5554|  9.02k|            db_options_->manifest_preallocation_size);
 5555|  9.02k|        FileTypeSet tmp_set = db_options_->checksum_handoff_file_types;
 5556|  9.02k|        std::unique_ptr<WritableFileWriter> file_writer(new WritableFileWriter(
 5557|  9.02k|            std::move(descriptor_file), descriptor_fname, opt_file_opts, clock_,
 5558|  9.02k|            io_tracer_, nullptr, Histograms::HISTOGRAM_ENUM_MAX /* hist_type */,
 5559|  9.02k|            db_options_->listeners, nullptr,
 5560|  9.02k|            tmp_set.Contains(FileType::kDescriptorFile),
 5561|  9.02k|            tmp_set.Contains(FileType::kDescriptorFile)));
 5562|  9.02k|        new_desc_log_ptr.reset(
 5563|  9.02k|            new log::Writer(std::move(file_writer), 0, false));
 5564|  9.02k|        raw_desc_log_ptr = new_desc_log_ptr.get();
 5565|  9.02k|        s = WriteCurrentStateToManifest(write_options, curr_state,
 5566|  9.02k|                                        wal_additions, raw_desc_log_ptr, io_s);
 5567|  9.02k|        assert(s == io_s);
 5568|  9.02k|      }
 5569|  9.02k|      if (!io_s.ok()) {
  ------------------
  |  Branch (5569:11): [True: 0, False: 9.02k]
  ------------------
 5570|      0|        manifest_io_status = io_s;
 5571|      0|        s = io_s;
 5572|      0|      }
 5573|  9.02k|    }
 5574|       |
 5575|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (5575:9): [True: 9.02k, False: 0]
  ------------------
 5576|  9.02k|      if (!first_writer.edit_list.front()->IsColumnFamilyManipulation()) {
  ------------------
  |  Branch (5576:11): [True: 9.02k, False: 0]
  ------------------
 5577|  9.02k|        constexpr bool update_stats = true;
 5578|       |
 5579|  18.0k|        for (int i = 0; i < static_cast<int>(versions.size()); ++i) {
  ------------------
  |  Branch (5579:25): [True: 9.02k, False: 9.02k]
  ------------------
 5580|  9.02k|          versions[i]->PrepareAppend(*mutable_cf_options_ptrs[i], read_options,
 5581|  9.02k|                                     update_stats);
 5582|  9.02k|        }
 5583|  9.02k|      }
 5584|       |
 5585|       |      // Write new records to MANIFEST log
 5586|       |#ifndef NDEBUG
 5587|       |      size_t idx = 0;
 5588|       |#endif
 5589|  9.02k|      assert(batch_edits.size() == batch_edits_ts_sz.size());
 5590|  27.0k|      for (size_t bidx = 0; bidx < batch_edits.size(); bidx++) {
  ------------------
  |  Branch (5590:29): [True: 18.0k, False: 9.02k]
  ------------------
 5591|  18.0k|        auto& e = batch_edits[bidx];
 5592|  18.0k|        files_to_quarantine_if_commit_fail.push_back(
 5593|  18.0k|            e->GetFilesToQuarantineIfCommitFail());
 5594|  18.0k|        std::string record;
 5595|  18.0k|        if (!e->EncodeTo(&record, batch_edits_ts_sz[bidx])) {
  ------------------
  |  Branch (5595:13): [True: 0, False: 18.0k]
  ------------------
 5596|      0|          s = Status::Corruption("Unable to encode VersionEdit:" +
 5597|      0|                                 e->DebugString(true));
 5598|      0|          break;
 5599|      0|        }
 5600|  18.0k|        TEST_KILL_RANDOM_WITH_WEIGHT("VersionSet::LogAndApply:BeforeAddRecord",
 5601|  18.0k|                                     REDUCE_ODDS2);
 5602|       |#ifndef NDEBUG
 5603|       |        if (batch_edits.size() > 1 && batch_edits.size() - 1 == idx) {
 5604|       |          TEST_SYNC_POINT_CALLBACK(
 5605|       |              "VersionSet::ProcessManifestWrites:BeforeWriteLastVersionEdit:0",
 5606|       |              nullptr);
 5607|       |          TEST_SYNC_POINT(
 5608|       |              "VersionSet::ProcessManifestWrites:BeforeWriteLastVersionEdit:1");
 5609|       |        }
 5610|       |        ++idx;
 5611|       |#endif /* !NDEBUG */
 5612|  18.0k|        io_s = raw_desc_log_ptr->AddRecord(write_options, record);
 5613|  18.0k|        if (!io_s.ok()) {
  ------------------
  |  Branch (5613:13): [True: 0, False: 18.0k]
  ------------------
 5614|      0|          s = io_s;
 5615|      0|          manifest_io_status = io_s;
 5616|      0|          break;
 5617|      0|        }
 5618|  18.0k|      }
 5619|       |
 5620|  9.02k|      if (s.ok()) {
  ------------------
  |  Branch (5620:11): [True: 9.02k, False: 0]
  ------------------
 5621|  9.02k|        io_s =
 5622|  9.02k|            SyncManifest(db_options_, write_options, raw_desc_log_ptr->file());
 5623|  9.02k|        manifest_io_status = io_s;
 5624|  9.02k|        TEST_SYNC_POINT_CALLBACK(
 5625|  9.02k|            "VersionSet::ProcessManifestWrites:AfterSyncManifest", &io_s);
 5626|  9.02k|      }
 5627|  9.02k|      if (!io_s.ok()) {
  ------------------
  |  Branch (5627:11): [True: 0, False: 9.02k]
  ------------------
 5628|      0|        s = io_s;
 5629|      0|        ROCKS_LOG_ERROR(db_options_->info_log, "MANIFEST write %s\n",
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 5630|      0|                        s.ToString().c_str());
 5631|      0|      }
 5632|  9.02k|    }
 5633|       |
 5634|       |    // If we just created a new descriptor file, install it by writing a
 5635|       |    // new CURRENT file that points to it.
 5636|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (5636:9): [True: 9.02k, False: 0]
  ------------------
 5637|  9.02k|      assert(manifest_io_status.ok());
 5638|  9.02k|    }
 5639|  9.02k|    if (s.ok() && new_descriptor_log) {
  ------------------
  |  Branch (5639:9): [True: 9.02k, False: 0]
  |  Branch (5639:19): [True: 9.02k, False: 0]
  ------------------
 5640|  9.02k|      io_s = SetCurrentFile(write_options, fs_.get(), dbname_,
 5641|  9.02k|                            pending_manifest_file_number_,
 5642|  9.02k|                            dir_contains_current_file);
 5643|  9.02k|      if (!io_s.ok()) {
  ------------------
  |  Branch (5643:11): [True: 0, False: 9.02k]
  ------------------
 5644|      0|        s = io_s;
 5645|       |        // Quarantine old manifest file in case new manifest file's CURRENT file
 5646|       |        // wasn't created successfully and the old manifest is needed.
 5647|      0|        limbo_descriptor_log_file_number.push_back(manifest_file_number_);
 5648|      0|        files_to_quarantine_if_commit_fail.push_back(
 5649|      0|            &limbo_descriptor_log_file_number);
 5650|      0|      }
 5651|  9.02k|    }
 5652|       |
 5653|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (5653:9): [True: 9.02k, False: 0]
  ------------------
 5654|       |      // find offset in manifest file where this version is stored.
 5655|  9.02k|      new_manifest_file_size = raw_desc_log_ptr->file()->GetFileSize();
 5656|  9.02k|    }
 5657|       |
 5658|  9.02k|    if (first_writer.edit_list.front()->IsColumnFamilyDrop()) {
  ------------------
  |  Branch (5658:9): [True: 0, False: 9.02k]
  ------------------
 5659|      0|      TEST_SYNC_POINT("VersionSet::LogAndApply::ColumnFamilyDrop:0");
 5660|      0|      TEST_SYNC_POINT("VersionSet::LogAndApply::ColumnFamilyDrop:1");
 5661|      0|      TEST_SYNC_POINT("VersionSet::LogAndApply::ColumnFamilyDrop:2");
 5662|      0|    }
 5663|       |
 5664|  9.02k|    LogFlush(db_options_->info_log);
 5665|  9.02k|    TEST_SYNC_POINT("VersionSet::LogAndApply:WriteManifestDone");
 5666|  9.02k|    mu->Lock();
 5667|  9.02k|  }
 5668|       |
 5669|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (5669:7): [True: 9.02k, False: 0]
  ------------------
 5670|       |    // Apply WAL edits, DB mutex must be held.
 5671|  18.0k|    for (auto& e : batch_edits) {
  ------------------
  |  Branch (5671:18): [True: 18.0k, False: 9.02k]
  ------------------
 5672|  18.0k|      if (e->IsWalAddition()) {
  ------------------
  |  Branch (5672:11): [True: 0, False: 18.0k]
  ------------------
 5673|      0|        s = wals_.AddWals(e->GetWalAdditions());
 5674|  18.0k|      } else if (e->IsWalDeletion()) {
  ------------------
  |  Branch (5674:18): [True: 0, False: 18.0k]
  ------------------
 5675|      0|        s = wals_.DeleteWalsBefore(e->GetWalDeletion().GetLogNumber());
 5676|      0|      }
 5677|  18.0k|      if (!s.ok()) {
  ------------------
  |  Branch (5677:11): [True: 0, False: 18.0k]
  ------------------
 5678|      0|        break;
 5679|      0|      }
 5680|  18.0k|    }
 5681|  9.02k|  }
 5682|       |
 5683|  9.02k|  if (!io_s.ok()) {
  ------------------
  |  Branch (5683:7): [True: 0, False: 9.02k]
  ------------------
 5684|      0|    if (io_status_.ok()) {
  ------------------
  |  Branch (5684:9): [True: 0, False: 0]
  ------------------
 5685|      0|      io_status_ = io_s;
 5686|      0|      if (error_handler_) {
  ------------------
  |  Branch (5686:11): [True: 0, False: 0]
  ------------------
 5687|      0|        error_handler_->AddFilesToQuarantine(
 5688|      0|            files_to_quarantine_if_commit_fail);
 5689|      0|      }
 5690|      0|    }
 5691|  9.02k|  } else if (!io_status_.ok()) {
  ------------------
  |  Branch (5691:14): [True: 0, False: 9.02k]
  ------------------
 5692|      0|    io_status_ = io_s;
 5693|      0|    if (error_handler_) {
  ------------------
  |  Branch (5693:9): [True: 0, False: 0]
  ------------------
 5694|      0|      error_handler_->ClearFilesToQuarantine();
 5695|      0|    }
 5696|      0|  }
 5697|       |
 5698|       |  // Append the old manifest file to the obsolete_manifest_ list to be deleted
 5699|       |  // by PurgeObsoleteFiles later.
 5700|  9.02k|  if (s.ok() && new_descriptor_log) {
  ------------------
  |  Branch (5700:7): [True: 9.02k, False: 0]
  |  Branch (5700:17): [True: 9.02k, False: 0]
  ------------------
 5701|  9.02k|    descriptor_log_ = std::move(new_desc_log_ptr);
 5702|  9.02k|    obsolete_manifests_.emplace_back(
 5703|  9.02k|        DescriptorFileName("", manifest_file_number_));
 5704|  9.02k|  }
 5705|       |
 5706|       |  // Install the new versions
 5707|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (5707:7): [True: 9.02k, False: 0]
  ------------------
 5708|  9.02k|    if (first_writer.edit_list.front()->IsColumnFamilyAdd()) {
  ------------------
  |  Branch (5708:9): [True: 0, False: 9.02k]
  ------------------
 5709|      0|      assert(batch_edits.size() == 1);
 5710|      0|      assert(new_cf_options != nullptr);
 5711|      0|      assert(max_last_sequence == descriptor_last_sequence_);
 5712|      0|      CreateColumnFamily(*new_cf_options, read_options,
 5713|      0|                         first_writer.edit_list.front());
 5714|  9.02k|    } else if (first_writer.edit_list.front()->IsColumnFamilyDrop()) {
  ------------------
  |  Branch (5714:16): [True: 0, False: 9.02k]
  ------------------
 5715|      0|      assert(batch_edits.size() == 1);
 5716|      0|      assert(max_last_sequence == descriptor_last_sequence_);
 5717|      0|      first_writer.cfd->SetDropped();
 5718|      0|      first_writer.cfd->UnrefAndTryDelete();
 5719|  9.02k|    } else {
 5720|       |      // Each version in versions corresponds to a column family.
 5721|       |      // For each column family, update its log number indicating that logs
 5722|       |      // with number smaller than this should be ignored.
 5723|  9.02k|      uint64_t last_min_log_number_to_keep = 0;
 5724|  18.0k|      for (const auto& e : batch_edits) {
  ------------------
  |  Branch (5724:26): [True: 18.0k, False: 9.02k]
  ------------------
 5725|  18.0k|        ColumnFamilyData* cfd = nullptr;
 5726|  18.0k|        if (!e->IsColumnFamilyManipulation()) {
  ------------------
  |  Branch (5726:13): [True: 18.0k, False: 0]
  ------------------
 5727|  18.0k|          cfd = column_family_set_->GetColumnFamily(e->GetColumnFamily());
 5728|       |          // e would not have been added to batch_edits if its corresponding
 5729|       |          // column family is dropped.
 5730|  18.0k|          assert(cfd);
 5731|  18.0k|        }
 5732|  18.0k|        if (cfd) {
  ------------------
  |  Branch (5732:13): [True: 18.0k, False: 0]
  ------------------
 5733|  18.0k|          if (e->HasLogNumber() && e->GetLogNumber() > cfd->GetLogNumber()) {
  ------------------
  |  Branch (5733:15): [True: 4.51k, False: 13.5k]
  |  Branch (5733:36): [True: 4.51k, False: 0]
  ------------------
 5734|  4.51k|            cfd->SetLogNumber(e->GetLogNumber());
 5735|  4.51k|          }
 5736|  18.0k|          if (e->HasFullHistoryTsLow()) {
  ------------------
  |  Branch (5736:15): [True: 0, False: 18.0k]
  ------------------
 5737|      0|            cfd->SetFullHistoryTsLow(e->GetFullHistoryTsLow());
 5738|      0|          }
 5739|  18.0k|        }
 5740|  18.0k|        if (e->HasMinLogNumberToKeep()) {
  ------------------
  |  Branch (5740:13): [True: 4.51k, False: 13.5k]
  ------------------
 5741|  4.51k|          last_min_log_number_to_keep =
 5742|  4.51k|              std::max(last_min_log_number_to_keep, e->GetMinLogNumberToKeep());
 5743|  4.51k|        }
 5744|  18.0k|      }
 5745|       |
 5746|  9.02k|      if (last_min_log_number_to_keep != 0) {
  ------------------
  |  Branch (5746:11): [True: 4.51k, False: 4.51k]
  ------------------
 5747|  4.51k|        MarkMinLogNumberToKeep(last_min_log_number_to_keep);
 5748|  4.51k|      }
 5749|       |
 5750|  18.0k|      for (int i = 0; i < static_cast<int>(versions.size()); ++i) {
  ------------------
  |  Branch (5750:23): [True: 9.02k, False: 9.02k]
  ------------------
 5751|  9.02k|        ColumnFamilyData* cfd = versions[i]->cfd_;
 5752|  9.02k|        AppendVersion(cfd, versions[i]);
 5753|  9.02k|      }
 5754|  9.02k|    }
 5755|  9.02k|    assert(max_last_sequence >= descriptor_last_sequence_);
 5756|  9.02k|    descriptor_last_sequence_ = max_last_sequence;
 5757|  9.02k|    manifest_file_number_ = pending_manifest_file_number_;
 5758|  9.02k|    manifest_file_size_ = new_manifest_file_size;
 5759|  9.02k|    prev_log_number_ = first_writer.edit_list.front()->GetPrevLogNumber();
 5760|  9.02k|  } else {
 5761|      0|    std::string version_edits;
 5762|      0|    for (auto& e : batch_edits) {
  ------------------
  |  Branch (5762:18): [True: 0, False: 0]
  ------------------
 5763|      0|      version_edits += ("\n" + e->DebugString(true));
 5764|      0|    }
 5765|      0|    ROCKS_LOG_ERROR(db_options_->info_log,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 5766|      0|                    "Error in committing version edit to MANIFEST: %s",
 5767|      0|                    version_edits.c_str());
 5768|      0|    for (auto v : versions) {
  ------------------
  |  Branch (5768:17): [True: 0, False: 0]
  ------------------
 5769|      0|      delete v;
 5770|      0|    }
 5771|       |    // If manifest append failed for whatever reason, the file could be
 5772|       |    // corrupted. So we need to force the next version update to start a
 5773|       |    // new manifest file.
 5774|      0|    descriptor_log_.reset();
 5775|      0|    new_desc_log_ptr.reset();
 5776|       |    // If manifest operations failed, then we know the CURRENT file still
 5777|       |    // points to the original MANIFEST. Therefore, we can safely delete the
 5778|       |    // new MANIFEST.
 5779|       |    // If manifest operations succeeded, and we are here, then it is possible
 5780|       |    // that renaming tmp file to CURRENT failed.
 5781|       |    //
 5782|       |    // On local POSIX-compliant FS, the CURRENT must point to the original
 5783|       |    // MANIFEST. We can delete the new MANIFEST for simplicity, but we can also
 5784|       |    // keep it. Future recovery will ignore this MANIFEST. It's also ok for the
 5785|       |    // process not to crash and continue using the db. Any future LogAndApply()
 5786|       |    // call will switch to a new MANIFEST and update CURRENT, still ignoring
 5787|       |    // this one.
 5788|       |    //
 5789|       |    // On non-local FS, it is
 5790|       |    // possible that the rename operation succeeded on the server (remote)
 5791|       |    // side, but the client somehow returns a non-ok status to RocksDB. Note
 5792|       |    // that this does not violate atomicity. Should we delete the new MANIFEST
 5793|       |    // successfully, a subsequent recovery attempt will likely see the CURRENT
 5794|       |    // pointing to the new MANIFEST, thus fail. We will not be able to open the
 5795|       |    // DB again. Therefore, if manifest operations succeed, we should keep the
 5796|       |    // the new MANIFEST. If the process proceeds, any future LogAndApply() call
 5797|       |    // will switch to a new MANIFEST and update CURRENT. If user tries to
 5798|       |    // re-open the DB,
 5799|       |    // a) CURRENT points to the new MANIFEST, and the new MANIFEST is present.
 5800|       |    // b) CURRENT points to the original MANIFEST, and the original MANIFEST
 5801|       |    //    also exists.
 5802|      0|    if (!manifest_io_status.ok() && new_descriptor_log) {
  ------------------
  |  Branch (5802:9): [True: 0, False: 0]
  |  Branch (5802:37): [True: 0, False: 0]
  ------------------
 5803|      0|      ROCKS_LOG_INFO(db_options_->info_log,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 5804|      0|                     "Deleting manifest %" PRIu64 " current manifest %" PRIu64
 5805|      0|                     "\n",
 5806|      0|                     pending_manifest_file_number_, manifest_file_number_);
 5807|      0|      Status manifest_del_status = env_->DeleteFile(
 5808|      0|          DescriptorFileName(dbname_, pending_manifest_file_number_));
 5809|      0|      if (!manifest_del_status.ok()) {
  ------------------
  |  Branch (5809:11): [True: 0, False: 0]
  ------------------
 5810|      0|        ROCKS_LOG_WARN(db_options_->info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 5811|      0|                       "Failed to delete manifest %" PRIu64 ": %s",
 5812|      0|                       pending_manifest_file_number_,
 5813|      0|                       manifest_del_status.ToString().c_str());
 5814|      0|      }
 5815|      0|    }
 5816|      0|  }
 5817|       |
 5818|  9.02k|  pending_manifest_file_number_ = 0;
 5819|       |
 5820|       |#ifndef NDEBUG
 5821|       |  // This is here kind of awkwardly because there's no other consistency
 5822|       |  // checks on `VersionSet`'s updates for the new `Version`s. We might want
 5823|       |  // to move it to a dedicated function, or remove it if we gain enough
 5824|       |  // confidence in `descriptor_last_sequence_`.
 5825|       |  if (s.ok()) {
 5826|       |    for (const auto* v : versions) {
 5827|       |      const auto* vstorage = v->storage_info();
 5828|       |      for (int level = 0; level < vstorage->num_levels(); ++level) {
 5829|       |        for (const auto& file : vstorage->LevelFiles(level)) {
 5830|       |          assert(file->fd.largest_seqno <= descriptor_last_sequence_);
 5831|       |        }
 5832|       |      }
 5833|       |    }
 5834|       |  }
 5835|       |#endif  // NDEBUG
 5836|       |
 5837|       |  // wake up all the waiting writers
 5838|  9.02k|  while (true) {
  ------------------
  |  Branch (5838:10): [Folded - Ignored]
  ------------------
 5839|  9.02k|    ManifestWriter* ready = manifest_writers_.front();
 5840|  9.02k|    manifest_writers_.pop_front();
 5841|  9.02k|    bool need_signal = true;
 5842|  9.02k|    for (const auto& w : writers) {
  ------------------
  |  Branch (5842:24): [True: 9.02k, False: 0]
  ------------------
 5843|  9.02k|      if (&w == ready) {
  ------------------
  |  Branch (5843:11): [True: 9.02k, False: 0]
  ------------------
 5844|  9.02k|        need_signal = false;
 5845|  9.02k|        break;
 5846|  9.02k|      }
 5847|  9.02k|    }
 5848|  9.02k|    ready->status = s;
 5849|  9.02k|    ready->done = true;
 5850|  9.02k|    if (ready->manifest_write_callback) {
  ------------------
  |  Branch (5850:9): [True: 9.02k, False: 0]
  ------------------
 5851|  9.02k|      (ready->manifest_write_callback)(s);
 5852|  9.02k|    }
 5853|  9.02k|    if (need_signal) {
  ------------------
  |  Branch (5853:9): [True: 0, False: 9.02k]
  ------------------
 5854|      0|      ready->cv.Signal();
 5855|      0|    }
 5856|  9.02k|    if (ready == last_writer) {
  ------------------
  |  Branch (5856:9): [True: 9.02k, False: 0]
  ------------------
 5857|  9.02k|      break;
 5858|  9.02k|    }
 5859|  9.02k|  }
 5860|  9.02k|  if (!manifest_writers_.empty()) {
  ------------------
  |  Branch (5860:7): [True: 0, False: 9.02k]
  ------------------
 5861|      0|    manifest_writers_.front()->cv.Signal();
 5862|      0|  }
 5863|  9.02k|  return s;
 5864|  9.02k|}
_ZN7rocksdb10VersionSet11LogAndApplyERKNS_10autovectorIPNS_16ColumnFamilyDataELm8EEERKNS1_IPKNS_16MutableCFOptionsELm8EEERKNS_11ReadOptionsERKNS_12WriteOptionsERKNS1_INS1_IPNS_11VersionEditELm8EEELm8EEEPNS_17InstrumentedMutexEPNS_11FSDirectoryEbPKNS_19ColumnFamilyOptionsERKNSt3__16vectorINSW_8functionIFvRKNS_6StatusEEEENSW_9allocatorIS13_EEEE:
 5883|  9.02k|    const std::vector<std::function<void(const Status&)>>& manifest_wcbs) {
 5884|  9.02k|  mu->AssertHeld();
 5885|  9.02k|  int num_edits = 0;
 5886|  9.02k|  for (const auto& elist : edit_lists) {
  ------------------
  |  Branch (5886:26): [True: 9.02k, False: 9.02k]
  ------------------
 5887|  9.02k|    num_edits += static_cast<int>(elist.size());
 5888|  9.02k|  }
 5889|  9.02k|  if (num_edits == 0) {
  ------------------
  |  Branch (5889:7): [True: 0, False: 9.02k]
  ------------------
 5890|      0|    return Status::OK();
 5891|  9.02k|  } else if (num_edits > 1) {
  ------------------
  |  Branch (5891:14): [True: 4.51k, False: 4.51k]
  ------------------
 5892|       |#ifndef NDEBUG
 5893|       |    for (const auto& edit_list : edit_lists) {
 5894|       |      for (const auto& edit : edit_list) {
 5895|       |        assert(!edit->IsColumnFamilyManipulation());
 5896|       |      }
 5897|       |    }
 5898|       |#endif /* ! NDEBUG */
 5899|  4.51k|  }
 5900|       |
 5901|  9.02k|  int num_cfds = static_cast<int>(column_family_datas.size());
 5902|  9.02k|  if (num_cfds == 1 && column_family_datas[0] == nullptr) {
  ------------------
  |  Branch (5902:7): [True: 9.02k, False: 0]
  |  Branch (5902:24): [True: 0, False: 9.02k]
  ------------------
 5903|      0|    assert(edit_lists.size() == 1 && edit_lists[0].size() == 1);
 5904|      0|    assert(edit_lists[0][0]->IsColumnFamilyAdd());
 5905|      0|    assert(new_cf_options != nullptr);
 5906|      0|  }
 5907|  9.02k|  std::deque<ManifestWriter> writers;
 5908|  9.02k|  if (num_cfds > 0) {
  ------------------
  |  Branch (5908:7): [True: 9.02k, False: 0]
  ------------------
 5909|  9.02k|    assert(static_cast<size_t>(num_cfds) == mutable_cf_options_list.size());
 5910|  9.02k|    assert(static_cast<size_t>(num_cfds) == edit_lists.size());
 5911|  9.02k|  }
 5912|  18.0k|  for (int i = 0; i < num_cfds; ++i) {
  ------------------
  |  Branch (5912:19): [True: 9.02k, False: 9.02k]
  ------------------
 5913|  9.02k|    const auto wcb =
 5914|  9.02k|        manifest_wcbs.empty() ? [](const Status&) {} : manifest_wcbs[i];
  ------------------
  |  Branch (5914:9): [True: 9.02k, False: 0]
  ------------------
 5915|  9.02k|    writers.emplace_back(mu, column_family_datas[i],
 5916|  9.02k|                         *mutable_cf_options_list[i], edit_lists[i], wcb);
 5917|  9.02k|    manifest_writers_.push_back(&writers[i]);
 5918|  9.02k|  }
 5919|  9.02k|  assert(!writers.empty());
 5920|  9.02k|  ManifestWriter& first_writer = writers.front();
 5921|  9.02k|  TEST_SYNC_POINT_CALLBACK("VersionSet::LogAndApply:BeforeWriterWaiting",
 5922|  9.02k|                           nullptr);
 5923|  9.02k|  while (!first_writer.done && &first_writer != manifest_writers_.front()) {
  ------------------
  |  Branch (5923:10): [True: 9.02k, False: 0]
  |  Branch (5923:32): [True: 0, False: 9.02k]
  ------------------
 5924|      0|    first_writer.cv.Wait();
 5925|      0|  }
 5926|  9.02k|  if (first_writer.done) {
  ------------------
  |  Branch (5926:7): [True: 0, False: 9.02k]
  ------------------
 5927|       |    // All non-CF-manipulation operations can be grouped together and committed
 5928|       |    // to MANIFEST. They should all have finished. The status code is stored in
 5929|       |    // the first manifest writer.
 5930|       |#ifndef NDEBUG
 5931|       |    for (const auto& writer : writers) {
 5932|       |      assert(writer.done);
 5933|       |    }
 5934|       |    TEST_SYNC_POINT_CALLBACK("VersionSet::LogAndApply:WakeUpAndDone", mu);
 5935|       |#endif /* !NDEBUG */
 5936|      0|    return first_writer.status;
 5937|      0|  }
 5938|       |
 5939|  9.02k|  int num_undropped_cfds = 0;
 5940|  9.02k|  for (auto cfd : column_family_datas) {
  ------------------
  |  Branch (5940:17): [True: 9.02k, False: 9.02k]
  ------------------
 5941|       |    // if cfd == nullptr, it is a column family add.
 5942|  9.02k|    if (cfd == nullptr || !cfd->IsDropped()) {
  ------------------
  |  Branch (5942:9): [True: 0, False: 9.02k]
  |  Branch (5942:27): [True: 9.02k, False: 0]
  ------------------
 5943|  9.02k|      ++num_undropped_cfds;
 5944|  9.02k|    }
 5945|  9.02k|  }
 5946|  9.02k|  if (0 == num_undropped_cfds) {
  ------------------
  |  Branch (5946:7): [True: 0, False: 9.02k]
  ------------------
 5947|      0|    for (int i = 0; i != num_cfds; ++i) {
  ------------------
  |  Branch (5947:21): [True: 0, False: 0]
  ------------------
 5948|      0|      manifest_writers_.pop_front();
 5949|      0|    }
 5950|       |    // Notify new head of manifest write queue.
 5951|      0|    if (!manifest_writers_.empty()) {
  ------------------
  |  Branch (5951:9): [True: 0, False: 0]
  ------------------
 5952|      0|      manifest_writers_.front()->cv.Signal();
 5953|      0|    }
 5954|      0|    return Status::ColumnFamilyDropped();
 5955|      0|  }
 5956|  9.02k|  return ProcessManifestWrites(writers, mu, dir_contains_current_file,
 5957|  9.02k|                               new_descriptor_log, new_cf_options, read_options,
 5958|  9.02k|                               write_options);
 5959|  9.02k|}
_ZN7rocksdb10VersionSet17LogAndApplyHelperEPNS_16ColumnFamilyDataEPNS_14VersionBuilderEPNS_11VersionEditEPmPNS_17InstrumentedMutexE:
 5978|  18.0k|                                     InstrumentedMutex* mu) {
 5979|  18.0k|#ifdef NDEBUG
 5980|  18.0k|  (void)cfd;
 5981|  18.0k|#endif
 5982|  18.0k|  mu->AssertHeld();
 5983|  18.0k|  assert(!edit->IsColumnFamilyManipulation());
 5984|  18.0k|  assert(max_last_sequence != nullptr);
 5985|       |
 5986|  18.0k|  if (edit->HasLogNumber()) {
  ------------------
  |  Branch (5986:7): [True: 4.51k, False: 13.5k]
  ------------------
 5987|  4.51k|    assert(edit->GetLogNumber() >= cfd->GetLogNumber());
 5988|  4.51k|    assert(edit->GetLogNumber() < next_file_number_.load());
 5989|  4.51k|  }
 5990|       |
 5991|  18.0k|  if (!edit->HasPrevLogNumber()) {
  ------------------
  |  Branch (5991:7): [True: 18.0k, False: 0]
  ------------------
 5992|  18.0k|    edit->SetPrevLogNumber(prev_log_number_);
 5993|  18.0k|  }
 5994|  18.0k|  edit->SetNextFile(next_file_number_.load());
 5995|  18.0k|  if (edit->HasLastSequence() && edit->GetLastSequence() > *max_last_sequence) {
  ------------------
  |  Branch (5995:7): [True: 4.48k, False: 13.5k]
  |  Branch (5995:34): [True: 4.48k, False: 0]
  ------------------
 5996|  4.48k|    *max_last_sequence = edit->GetLastSequence();
 5997|  13.5k|  } else {
 5998|  13.5k|    edit->SetLastSequence(*max_last_sequence);
 5999|  13.5k|  }
 6000|       |
 6001|       |  // The builder can be nullptr only if edit is WAL manipulation,
 6002|       |  // because WAL edits do not need to be applied to versions,
 6003|       |  // we return Status::OK() in this case.
 6004|  18.0k|  assert(builder || edit->IsWalManipulation());
 6005|  18.0k|  return builder ? builder->Apply(edit) : Status::OK();
  ------------------
  |  Branch (6005:10): [True: 18.0k, False: 0]
  ------------------
 6006|  18.0k|}
_ZN7rocksdb10VersionSet22GetCurrentManifestPathERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPNS_10FileSystemEPS7_Pm:
 6011|  9.02k|                                          uint64_t* manifest_file_number) {
 6012|  9.02k|  assert(fs != nullptr);
 6013|  9.02k|  assert(manifest_path != nullptr);
 6014|  9.02k|  assert(manifest_file_number != nullptr);
 6015|       |
 6016|  9.02k|  std::string fname;
 6017|  9.02k|  Status s = ReadFileToString(fs, CurrentFileName(dbname), &fname);
 6018|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (6018:7): [True: 0, False: 9.02k]
  ------------------
 6019|      0|    return s;
 6020|      0|  }
 6021|  9.02k|  if (fname.empty() || fname.back() != '\n') {
  ------------------
  |  Branch (6021:7): [True: 0, False: 9.02k]
  |  Branch (6021:24): [True: 0, False: 9.02k]
  ------------------
 6022|      0|    return Status::Corruption("CURRENT file does not end with newline");
 6023|      0|  }
 6024|       |  // remove the trailing '\n'
 6025|  9.02k|  fname.resize(fname.size() - 1);
 6026|  9.02k|  FileType type;
 6027|  9.02k|  bool parse_ok = ParseFileName(fname, manifest_file_number, &type);
 6028|  9.02k|  if (!parse_ok || type != kDescriptorFile) {
  ------------------
  |  Branch (6028:7): [True: 0, False: 9.02k]
  |  Branch (6028:20): [True: 0, False: 9.02k]
  ------------------
 6029|      0|    return Status::Corruption("CURRENT file corrupted");
 6030|      0|  }
 6031|  9.02k|  *manifest_path = dbname;
 6032|  9.02k|  if (dbname.back() != '/') {
  ------------------
  |  Branch (6032:7): [True: 9.02k, False: 0]
  ------------------
 6033|  9.02k|    manifest_path->push_back('/');
 6034|  9.02k|  }
 6035|  9.02k|  manifest_path->append(fname);
 6036|  9.02k|  return Status::OK();
 6037|  9.02k|}
_ZN7rocksdb10VersionSet7RecoverERKNSt3__16vectorINS_22ColumnFamilyDescriptorENS1_9allocatorIS3_EEEEbPNS1_12basic_stringIcNS1_11char_traitsIcEENS4_IcEEEEbbPNS_6StatusE:
 6042|  9.02k|    Status* log_status) {
 6043|  9.02k|  const ReadOptions read_options(Env::IOActivity::kDBOpen);
 6044|       |  // Read "CURRENT" file, which contains a pointer to the current manifest
 6045|       |  // file
 6046|  9.02k|  std::string manifest_path;
 6047|  9.02k|  Status s = GetCurrentManifestPath(dbname_, fs_.get(), &manifest_path,
 6048|  9.02k|                                    &manifest_file_number_);
 6049|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (6049:7): [True: 0, False: 9.02k]
  ------------------
 6050|      0|    return s;
 6051|      0|  }
 6052|       |
 6053|  9.02k|  ROCKS_LOG_INFO(db_options_->info_log, "Recovering from manifest file: %s\n",
  ------------------
  |  |   39|  9.02k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  9.02k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  9.02k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  9.02k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 6054|  9.02k|                 manifest_path.c_str());
 6055|       |
 6056|  9.02k|  std::unique_ptr<SequentialFileReader> manifest_file_reader;
 6057|  9.02k|  {
 6058|  9.02k|    std::unique_ptr<FSSequentialFile> manifest_file;
 6059|  9.02k|    s = fs_->NewSequentialFile(manifest_path,
 6060|  9.02k|                               fs_->OptimizeForManifestRead(file_options_),
 6061|  9.02k|                               &manifest_file, nullptr);
 6062|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (6062:9): [True: 0, False: 9.02k]
  ------------------
 6063|      0|      return s;
 6064|      0|    }
 6065|  9.02k|    manifest_file_reader.reset(new SequentialFileReader(
 6066|  9.02k|        std::move(manifest_file), manifest_path,
 6067|  9.02k|        db_options_->log_readahead_size, io_tracer_, db_options_->listeners,
 6068|  9.02k|        /*rate_limiter=*/nullptr, is_retry));
 6069|  9.02k|  }
 6070|      0|  TEST_SYNC_POINT("VersionSet::Recover:StartManifestRead");
 6071|       |
 6072|  9.02k|  uint64_t current_manifest_file_size = 0;
 6073|  9.02k|  uint64_t log_number = 0;
 6074|  9.02k|  {
 6075|  9.02k|    VersionSet::LogReporter reporter;
 6076|  9.02k|    Status log_read_status;
 6077|  9.02k|    reporter.status = &log_read_status;
 6078|  9.02k|    log::Reader reader(nullptr, std::move(manifest_file_reader), &reporter,
 6079|  9.02k|                       true /* checksum */, 0 /* log_number */);
 6080|  9.02k|    VersionEditHandler handler(
 6081|  9.02k|        read_only, column_families, const_cast<VersionSet*>(this),
 6082|  9.02k|        /*track_found_and_missing_files=*/false, no_error_if_files_missing,
 6083|  9.02k|        io_tracer_, read_options, EpochNumberRequirement::kMightMissing);
 6084|  9.02k|    handler.Iterate(reader, &log_read_status);
 6085|  9.02k|    s = handler.status();
 6086|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (6086:9): [True: 9.02k, False: 0]
  ------------------
 6087|  9.02k|      log_number = handler.GetVersionEditParams().GetLogNumber();
 6088|  9.02k|      current_manifest_file_size = reader.GetReadOffset();
 6089|  9.02k|      assert(current_manifest_file_size != 0);
 6090|  9.02k|      handler.GetDbId(db_id);
 6091|  9.02k|    }
 6092|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (6092:9): [True: 9.02k, False: 0]
  ------------------
 6093|  9.02k|      RecoverEpochNumbers();
 6094|  9.02k|    }
 6095|  9.02k|    if (log_status) {
  ------------------
  |  Branch (6095:9): [True: 9.02k, False: 0]
  ------------------
 6096|  9.02k|      *log_status = log_read_status;
 6097|  9.02k|    }
 6098|  9.02k|  }
 6099|       |
 6100|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (6100:7): [True: 9.02k, False: 0]
  ------------------
 6101|  9.02k|    manifest_file_size_ = current_manifest_file_size;
 6102|  9.02k|    ROCKS_LOG_INFO(
  ------------------
  |  |   39|  9.02k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  9.02k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  9.02k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  9.02k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 6103|  9.02k|        db_options_->info_log,
 6104|  9.02k|        "Recovered from manifest file:%s succeeded,"
 6105|  9.02k|        "manifest_file_number is %" PRIu64 ", next_file_number is %" PRIu64
 6106|  9.02k|        ", last_sequence is %" PRIu64 ", log_number is %" PRIu64
 6107|  9.02k|        ",prev_log_number is %" PRIu64 ",max_column_family is %" PRIu32
 6108|  9.02k|        ",min_log_number_to_keep is %" PRIu64 "\n",
 6109|  9.02k|        manifest_path.c_str(), manifest_file_number_, next_file_number_.load(),
 6110|  9.02k|        last_sequence_.load(), log_number, prev_log_number_,
 6111|  9.02k|        column_family_set_->GetMaxColumnFamily(), min_log_number_to_keep());
 6112|       |
 6113|  9.02k|    for (auto cfd : *column_family_set_) {
  ------------------
  |  Branch (6113:19): [True: 9.02k, False: 9.02k]
  ------------------
 6114|  9.02k|      if (cfd->IsDropped()) {
  ------------------
  |  Branch (6114:11): [True: 0, False: 9.02k]
  ------------------
 6115|      0|        continue;
 6116|      0|      }
 6117|  9.02k|      ROCKS_LOG_INFO(db_options_->info_log,
  ------------------
  |  |   39|  9.02k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  9.02k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  9.02k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  9.02k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 6118|  9.02k|                     "Column family [%s] (ID %" PRIu32
 6119|  9.02k|                     "), log number is %" PRIu64 "\n",
 6120|  9.02k|                     cfd->GetName().c_str(), cfd->GetID(), cfd->GetLogNumber());
 6121|  9.02k|    }
 6122|  9.02k|  }
 6123|       |
 6124|  9.02k|  return s;
 6125|  9.02k|}
_ZN7rocksdb10VersionSet19RecoverEpochNumbersEv:
 6275|  9.02k|void VersionSet::RecoverEpochNumbers() {
 6276|  9.02k|  for (auto cfd : *column_family_set_) {
  ------------------
  |  Branch (6276:17): [True: 9.02k, False: 9.02k]
  ------------------
 6277|  9.02k|    if (cfd->IsDropped()) {
  ------------------
  |  Branch (6277:9): [True: 0, False: 9.02k]
  ------------------
 6278|      0|      continue;
 6279|      0|    }
 6280|  9.02k|    assert(cfd->initialized());
 6281|  9.02k|    cfd->RecoverEpochNumbers();
 6282|  9.02k|  }
 6283|  9.02k|}
_ZN7rocksdb10VersionSet18MarkFileNumberUsedEm:
 6564|  27.0k|void VersionSet::MarkFileNumberUsed(uint64_t number) {
 6565|       |  // only called during recovery and repair which are single threaded, so this
 6566|       |  // works because there can't be concurrent calls
 6567|  27.0k|  if (next_file_number_.load(std::memory_order_relaxed) <= number) {
  ------------------
  |  Branch (6567:7): [True: 0, False: 27.0k]
  ------------------
 6568|      0|    next_file_number_.store(number + 1, std::memory_order_relaxed);
 6569|      0|  }
 6570|  27.0k|}
_ZN7rocksdb10VersionSet22MarkMinLogNumberToKeepEm:
 6573|  13.5k|void VersionSet::MarkMinLogNumberToKeep(uint64_t number) {
 6574|  13.5k|  if (min_log_number_to_keep_.load(std::memory_order_relaxed) < number) {
  ------------------
  |  Branch (6574:7): [True: 4.51k, False: 9.02k]
  ------------------
 6575|  4.51k|    min_log_number_to_keep_.store(number, std::memory_order_relaxed);
 6576|  4.51k|  }
 6577|  13.5k|}
_ZN7rocksdb10VersionSet27WriteCurrentStateToManifestERKNS_12WriteOptionsERKNSt3__113unordered_mapIjNS0_14MutableCFStateENS4_4hashIjEENS4_8equal_toIjEENS4_9allocatorINS4_4pairIKjS6_EEEEEERKNS_11VersionEditEPNS_3log6WriterERNS_8IOStatusE:
 6582|  9.02k|    const VersionEdit& wal_additions, log::Writer* log, IOStatus& io_s) {
 6583|       |  // TODO: Break up into multiple records to reduce memory usage on recovery?
 6584|       |
 6585|       |  // WARNING: This method doesn't hold a mutex!!
 6586|       |
 6587|       |  // This is done without DB mutex lock held, but only within single-threaded
 6588|       |  // LogAndApply. Column family manipulations can only happen within LogAndApply
 6589|       |  // (the same single thread), so we're safe to iterate.
 6590|       |
 6591|  9.02k|  assert(io_s.ok());
 6592|  9.02k|  if (db_options_->write_dbid_to_manifest) {
  ------------------
  |  Branch (6592:7): [True: 0, False: 9.02k]
  ------------------
 6593|      0|    VersionEdit edit_for_db_id;
 6594|      0|    assert(!db_id_.empty());
 6595|      0|    edit_for_db_id.SetDBId(db_id_);
 6596|      0|    std::string db_id_record;
 6597|      0|    if (!edit_for_db_id.EncodeTo(&db_id_record)) {
  ------------------
  |  Branch (6597:9): [True: 0, False: 0]
  ------------------
 6598|      0|      return Status::Corruption("Unable to Encode VersionEdit:" +
 6599|      0|                                edit_for_db_id.DebugString(true));
 6600|      0|    }
 6601|      0|    io_s = log->AddRecord(write_options, db_id_record);
 6602|      0|    if (!io_s.ok()) {
  ------------------
  |  Branch (6602:9): [True: 0, False: 0]
  ------------------
 6603|      0|      return io_s;
 6604|      0|    }
 6605|      0|  }
 6606|       |
 6607|       |  // Save WALs.
 6608|  9.02k|  if (!wal_additions.GetWalAdditions().empty()) {
  ------------------
  |  Branch (6608:7): [True: 0, False: 9.02k]
  ------------------
 6609|      0|    TEST_SYNC_POINT_CALLBACK("VersionSet::WriteCurrentStateToManifest:SaveWal",
 6610|      0|                             const_cast<VersionEdit*>(&wal_additions));
 6611|      0|    std::string record;
 6612|      0|    if (!wal_additions.EncodeTo(&record)) {
  ------------------
  |  Branch (6612:9): [True: 0, False: 0]
  ------------------
 6613|      0|      return Status::Corruption("Unable to Encode VersionEdit: " +
 6614|      0|                                wal_additions.DebugString(true));
 6615|      0|    }
 6616|      0|    io_s = log->AddRecord(write_options, record);
 6617|      0|    if (!io_s.ok()) {
  ------------------
  |  Branch (6617:9): [True: 0, False: 0]
  ------------------
 6618|      0|      return io_s;
 6619|      0|    }
 6620|      0|  }
 6621|       |
 6622|       |  // New manifest should rollover the WAL deletion record from previous
 6623|       |  // manifest. Otherwise, when an addition record of a deleted WAL gets added to
 6624|       |  // this new manifest later (which can happens in e.g, SyncWAL()), this new
 6625|       |  // manifest creates an illusion that such WAL hasn't been deleted.
 6626|  9.02k|  VersionEdit wal_deletions;
 6627|  9.02k|  wal_deletions.DeleteWalsBefore(min_log_number_to_keep());
 6628|  9.02k|  std::string wal_deletions_record;
 6629|  9.02k|  if (!wal_deletions.EncodeTo(&wal_deletions_record)) {
  ------------------
  |  Branch (6629:7): [True: 0, False: 9.02k]
  ------------------
 6630|      0|    return Status::Corruption("Unable to Encode VersionEdit: " +
 6631|      0|                              wal_deletions.DebugString(true));
 6632|      0|  }
 6633|  9.02k|  io_s = log->AddRecord(write_options, wal_deletions_record);
 6634|  9.02k|  if (!io_s.ok()) {
  ------------------
  |  Branch (6634:7): [True: 0, False: 9.02k]
  ------------------
 6635|      0|    return io_s;
 6636|      0|  }
 6637|       |
 6638|  9.02k|  for (auto cfd : *column_family_set_) {
  ------------------
  |  Branch (6638:17): [True: 9.02k, False: 9.02k]
  ------------------
 6639|  9.02k|    assert(cfd);
 6640|       |
 6641|  9.02k|    if (cfd->IsDropped()) {
  ------------------
  |  Branch (6641:9): [True: 0, False: 9.02k]
  ------------------
 6642|      0|      continue;
 6643|      0|    }
 6644|  9.02k|    assert(cfd->initialized());
 6645|  9.02k|    {
 6646|       |      // Store column family info
 6647|  9.02k|      VersionEdit edit;
 6648|  9.02k|      if (cfd->GetID() != 0) {
  ------------------
  |  Branch (6648:11): [True: 0, False: 9.02k]
  ------------------
 6649|       |        // default column family is always there,
 6650|       |        // no need to explicitly write it
 6651|      0|        edit.AddColumnFamily(cfd->GetName());
 6652|      0|        edit.SetColumnFamily(cfd->GetID());
 6653|      0|      }
 6654|  9.02k|      edit.SetComparatorName(
 6655|  9.02k|          cfd->internal_comparator().user_comparator()->Name());
 6656|  9.02k|      edit.SetPersistUserDefinedTimestamps(
 6657|  9.02k|          cfd->ioptions()->persist_user_defined_timestamps);
 6658|  9.02k|      std::string record;
 6659|  9.02k|      if (!edit.EncodeTo(&record)) {
  ------------------
  |  Branch (6659:11): [True: 0, False: 9.02k]
  ------------------
 6660|      0|        return Status::Corruption("Unable to Encode VersionEdit:" +
 6661|      0|                                  edit.DebugString(true));
 6662|      0|      }
 6663|  9.02k|      io_s = log->AddRecord(write_options, record);
 6664|  9.02k|      if (!io_s.ok()) {
  ------------------
  |  Branch (6664:11): [True: 0, False: 9.02k]
  ------------------
 6665|      0|        return io_s;
 6666|      0|      }
 6667|  9.02k|    }
 6668|       |
 6669|  9.02k|    {
 6670|       |      // Save files
 6671|  9.02k|      VersionEdit edit;
 6672|  9.02k|      edit.SetColumnFamily(cfd->GetID());
 6673|       |
 6674|  9.02k|      const auto* current = cfd->current();
 6675|  9.02k|      assert(current);
 6676|       |
 6677|  9.02k|      const auto* vstorage = current->storage_info();
 6678|  9.02k|      assert(vstorage);
 6679|       |
 6680|  72.2k|      for (int level = 0; level < cfd->NumberLevels(); level++) {
  ------------------
  |  Branch (6680:27): [True: 63.1k, False: 9.02k]
  ------------------
 6681|  63.1k|        const auto& level_files = vstorage->LevelFiles(level);
 6682|       |
 6683|  63.1k|        for (const auto& f : level_files) {
  ------------------
  |  Branch (6683:28): [True: 0, False: 63.1k]
  ------------------
 6684|      0|          assert(f);
 6685|       |
 6686|      0|          edit.AddFile(level, f->fd.GetNumber(), f->fd.GetPathId(),
 6687|      0|                       f->fd.GetFileSize(), f->smallest, f->largest,
 6688|      0|                       f->fd.smallest_seqno, f->fd.largest_seqno,
 6689|      0|                       f->marked_for_compaction, f->temperature,
 6690|      0|                       f->oldest_blob_file_number, f->oldest_ancester_time,
 6691|      0|                       f->file_creation_time, f->epoch_number, f->file_checksum,
 6692|      0|                       f->file_checksum_func_name, f->unique_id,
 6693|      0|                       f->compensated_range_deletion_size, f->tail_size,
 6694|      0|                       f->user_defined_timestamps_persisted);
 6695|      0|        }
 6696|  63.1k|      }
 6697|       |
 6698|  9.02k|      edit.SetCompactCursors(vstorage->GetCompactCursors());
 6699|       |
 6700|  9.02k|      const auto& blob_files = vstorage->GetBlobFiles();
 6701|  9.02k|      for (const auto& meta : blob_files) {
  ------------------
  |  Branch (6701:29): [True: 0, False: 9.02k]
  ------------------
 6702|      0|        assert(meta);
 6703|       |
 6704|      0|        const uint64_t blob_file_number = meta->GetBlobFileNumber();
 6705|       |
 6706|      0|        edit.AddBlobFile(blob_file_number, meta->GetTotalBlobCount(),
 6707|      0|                         meta->GetTotalBlobBytes(), meta->GetChecksumMethod(),
 6708|      0|                         meta->GetChecksumValue());
 6709|      0|        if (meta->GetGarbageBlobCount() > 0) {
  ------------------
  |  Branch (6709:13): [True: 0, False: 0]
  ------------------
 6710|      0|          edit.AddBlobFileGarbage(blob_file_number, meta->GetGarbageBlobCount(),
 6711|      0|                                  meta->GetGarbageBlobBytes());
 6712|      0|        }
 6713|      0|      }
 6714|       |
 6715|  9.02k|      const auto iter = curr_state.find(cfd->GetID());
 6716|  9.02k|      assert(iter != curr_state.end());
 6717|  9.02k|      uint64_t log_number = iter->second.log_number;
 6718|  9.02k|      edit.SetLogNumber(log_number);
 6719|       |
 6720|  9.02k|      if (cfd->GetID() == 0) {
  ------------------
  |  Branch (6720:11): [True: 9.02k, False: 0]
  ------------------
 6721|       |        // min_log_number_to_keep is for the whole db, not for specific column
 6722|       |        // family. So it does not need to be set for every column family, just
 6723|       |        // need to be set once. Since default CF can never be dropped, we set
 6724|       |        // the min_log to the default CF here.
 6725|  9.02k|        uint64_t min_log = min_log_number_to_keep();
 6726|  9.02k|        if (min_log != 0) {
  ------------------
  |  Branch (6726:13): [True: 0, False: 9.02k]
  ------------------
 6727|      0|          edit.SetMinLogNumberToKeep(min_log);
 6728|      0|        }
 6729|  9.02k|      }
 6730|       |
 6731|  9.02k|      const std::string& full_history_ts_low = iter->second.full_history_ts_low;
 6732|  9.02k|      if (!full_history_ts_low.empty()) {
  ------------------
  |  Branch (6732:11): [True: 0, False: 9.02k]
  ------------------
 6733|      0|        edit.SetFullHistoryTsLow(full_history_ts_low);
 6734|      0|      }
 6735|       |
 6736|  9.02k|      edit.SetLastSequence(descriptor_last_sequence_);
 6737|       |
 6738|  9.02k|      const Comparator* ucmp = cfd->user_comparator();
 6739|  9.02k|      assert(ucmp);
 6740|  9.02k|      std::string record;
 6741|  9.02k|      if (!edit.EncodeTo(&record, ucmp->timestamp_size())) {
  ------------------
  |  Branch (6741:11): [True: 0, False: 9.02k]
  ------------------
 6742|      0|        return Status::Corruption("Unable to Encode VersionEdit:" +
 6743|      0|                                  edit.DebugString(true));
 6744|      0|      }
 6745|  9.02k|      io_s = log->AddRecord(write_options, record);
 6746|  9.02k|      if (!io_s.ok()) {
  ------------------
  |  Branch (6746:11): [True: 0, False: 9.02k]
  ------------------
 6747|      0|        return io_s;
 6748|      0|      }
 6749|  9.02k|    }
 6750|  9.02k|  }
 6751|  9.02k|  return Status::OK();
 6752|  9.02k|}
_ZN7rocksdb10VersionSet15ApproximateSizeERKNS_24SizeApproximationOptionsERKNS_11ReadOptionsEPNS_7VersionERKNS_5SliceESB_iiNS_17TableReaderCallerE:
 6764|   131k|                                     int end_level, TableReaderCaller caller) {
 6765|   131k|  const auto& icmp = v->cfd_->internal_comparator();
 6766|       |
 6767|       |  // pre-condition
 6768|   131k|  assert(icmp.Compare(start, end) <= 0);
 6769|       |
 6770|   131k|  uint64_t total_full_size = 0;
 6771|   131k|  const auto* vstorage = v->storage_info();
 6772|   131k|  const int num_non_empty_levels = vstorage->num_non_empty_levels();
 6773|   131k|  end_level = (end_level == -1) ? num_non_empty_levels
  ------------------
  |  Branch (6773:15): [True: 131k, False: 0]
  ------------------
 6774|   131k|                                : std::min(end_level, num_non_empty_levels);
 6775|   131k|  if (end_level <= start_level) {
  ------------------
  |  Branch (6775:7): [True: 131k, False: 0]
  ------------------
 6776|   131k|    return 0;
 6777|   131k|  }
 6778|       |
 6779|       |  // Outline of the optimization that uses options.files_size_error_margin.
 6780|       |  // When approximating the files total size that is used to store a keys range,
 6781|       |  // we first sum up the sizes of the files that fully fall into the range.
 6782|       |  // Then we sum up the sizes of all the files that may intersect with the range
 6783|       |  // (this includes all files in L0 as well). Then, if total_intersecting_size
 6784|       |  // is smaller than total_full_size * options.files_size_error_margin - we can
 6785|       |  // infer that the intersecting files have a sufficiently negligible
 6786|       |  // contribution to the total size, and we can approximate the storage required
 6787|       |  // for the keys in range as just half of the intersecting_files_size.
 6788|       |  // E.g., if the value of files_size_error_margin is 0.1, then the error of the
 6789|       |  // approximation is limited to only ~10% of the total size of files that fully
 6790|       |  // fall into the keys range. In such case, this helps to avoid a costly
 6791|       |  // process of binary searching the intersecting files that is required only
 6792|       |  // for a more precise calculation of the total size.
 6793|       |
 6794|      0|  autovector<FdWithKeyRange*, 32> first_files;
 6795|      0|  autovector<FdWithKeyRange*, 16> last_files;
 6796|       |
 6797|       |  // scan all the levels
 6798|      0|  for (int level = start_level; level < end_level; ++level) {
  ------------------
  |  Branch (6798:33): [True: 0, False: 0]
  ------------------
 6799|      0|    const LevelFilesBrief& files_brief = vstorage->LevelFilesBrief(level);
 6800|      0|    if (files_brief.num_files == 0) {
  ------------------
  |  Branch (6800:9): [True: 0, False: 0]
  ------------------
 6801|       |      // empty level, skip exploration
 6802|      0|      continue;
 6803|      0|    }
 6804|       |
 6805|      0|    if (level == 0) {
  ------------------
  |  Branch (6805:9): [True: 0, False: 0]
  ------------------
 6806|       |      // level 0 files are not in sorted order, we need to iterate through
 6807|       |      // the list to compute the total bytes that require scanning,
 6808|       |      // so handle the case explicitly (similarly to first_files case)
 6809|      0|      for (size_t i = 0; i < files_brief.num_files; i++) {
  ------------------
  |  Branch (6809:26): [True: 0, False: 0]
  ------------------
 6810|      0|        first_files.push_back(&files_brief.files[i]);
 6811|      0|      }
 6812|      0|      continue;
 6813|      0|    }
 6814|       |
 6815|      0|    assert(level > 0);
 6816|      0|    assert(files_brief.num_files > 0);
 6817|       |
 6818|       |    // identify the file position for start key
 6819|      0|    const int idx_start =
 6820|      0|        FindFileInRange(icmp, files_brief, start, 0,
 6821|      0|                        static_cast<uint32_t>(files_brief.num_files - 1));
 6822|      0|    assert(static_cast<size_t>(idx_start) < files_brief.num_files);
 6823|       |
 6824|       |    // identify the file position for end key
 6825|      0|    int idx_end = idx_start;
 6826|      0|    if (icmp.Compare(files_brief.files[idx_end].largest_key, end) < 0) {
  ------------------
  |  Branch (6826:9): [True: 0, False: 0]
  ------------------
 6827|      0|      idx_end =
 6828|      0|          FindFileInRange(icmp, files_brief, end, idx_start,
 6829|      0|                          static_cast<uint32_t>(files_brief.num_files - 1));
 6830|      0|    }
 6831|      0|    assert(idx_end >= idx_start &&
 6832|      0|           static_cast<size_t>(idx_end) < files_brief.num_files);
 6833|       |
 6834|       |    // scan all files from the starting index to the ending index
 6835|       |    // (inferred from the sorted order)
 6836|       |
 6837|       |    // first scan all the intermediate full files (excluding first and last)
 6838|      0|    for (int i = idx_start + 1; i < idx_end; ++i) {
  ------------------
  |  Branch (6838:33): [True: 0, False: 0]
  ------------------
 6839|      0|      uint64_t file_size = files_brief.files[i].fd.GetFileSize();
 6840|       |      // The entire file falls into the range, so we can just take its size.
 6841|      0|      assert(file_size == ApproximateSize(read_options, v, files_brief.files[i],
 6842|      0|                                          start, end, caller));
 6843|      0|      total_full_size += file_size;
 6844|      0|    }
 6845|       |
 6846|       |    // save the first and the last files (which may be the same file), so we
 6847|       |    // can scan them later.
 6848|      0|    first_files.push_back(&files_brief.files[idx_start]);
 6849|      0|    if (idx_start != idx_end) {
  ------------------
  |  Branch (6849:9): [True: 0, False: 0]
  ------------------
 6850|       |      // we need to estimate size for both files, only if they are different
 6851|      0|      last_files.push_back(&files_brief.files[idx_end]);
 6852|      0|    }
 6853|      0|  }
 6854|       |
 6855|       |  // The sum of all file sizes that intersect the [start, end] keys range.
 6856|      0|  uint64_t total_intersecting_size = 0;
 6857|      0|  for (const auto* file_ptr : first_files) {
  ------------------
  |  Branch (6857:29): [True: 0, False: 0]
  ------------------
 6858|      0|    total_intersecting_size += file_ptr->fd.GetFileSize();
 6859|      0|  }
 6860|      0|  for (const auto* file_ptr : last_files) {
  ------------------
  |  Branch (6860:29): [True: 0, False: 0]
  ------------------
 6861|      0|    total_intersecting_size += file_ptr->fd.GetFileSize();
 6862|      0|  }
 6863|       |
 6864|       |  // Now scan all the first & last files at each level, and estimate their size.
 6865|       |  // If the total_intersecting_size is less than X% of the total_full_size - we
 6866|       |  // want to approximate the result in order to avoid the costly binary search
 6867|       |  // inside ApproximateSize. We use half of file size as an approximation below.
 6868|       |
 6869|      0|  const double margin = options.files_size_error_margin;
 6870|      0|  if (margin > 0 && total_intersecting_size <
  ------------------
  |  Branch (6870:7): [True: 0, False: 0]
  |  Branch (6870:21): [True: 0, False: 0]
  ------------------
 6871|      0|                        static_cast<uint64_t>(total_full_size * margin)) {
 6872|      0|    total_full_size += total_intersecting_size / 2;
 6873|      0|  } else {
 6874|       |    // Estimate for all the first files (might also be last files), at each
 6875|       |    // level
 6876|      0|    for (const auto file_ptr : first_files) {
  ------------------
  |  Branch (6876:30): [True: 0, False: 0]
  ------------------
 6877|      0|      total_full_size +=
 6878|      0|          ApproximateSize(read_options, v, *file_ptr, start, end, caller);
 6879|      0|    }
 6880|       |
 6881|       |    // Estimate for all the last files, at each level
 6882|      0|    for (const auto file_ptr : last_files) {
  ------------------
  |  Branch (6882:30): [True: 0, False: 0]
  ------------------
 6883|       |      // We could use ApproximateSize here, but calling ApproximateOffsetOf
 6884|       |      // directly is just more efficient.
 6885|      0|      total_full_size +=
 6886|      0|          ApproximateOffsetOf(read_options, v, *file_ptr, end, caller);
 6887|      0|    }
 6888|      0|  }
 6889|       |
 6890|      0|  return total_full_size;
 6891|   131k|}
_ZNK7rocksdb10VersionSet12AddLiveFilesEPNSt3__16vectorImNS1_9allocatorImEEEES6_:
 6995|  18.0k|                              std::vector<uint64_t>* live_blob_files) const {
 6996|  18.0k|  assert(live_table_files);
 6997|  18.0k|  assert(live_blob_files);
 6998|       |
 6999|       |  // pre-calculate space requirement
 7000|  18.0k|  size_t total_table_files = 0;
 7001|  18.0k|  size_t total_blob_files = 0;
 7002|       |
 7003|  18.0k|  assert(column_family_set_);
 7004|  18.0k|  for (auto cfd : *column_family_set_) {
  ------------------
  |  Branch (7004:17): [True: 18.0k, False: 18.0k]
  ------------------
 7005|  18.0k|    assert(cfd);
 7006|       |
 7007|  18.0k|    if (!cfd->initialized()) {
  ------------------
  |  Branch (7007:9): [True: 0, False: 18.0k]
  ------------------
 7008|      0|      continue;
 7009|      0|    }
 7010|       |
 7011|  18.0k|    Version* const dummy_versions = cfd->dummy_versions();
 7012|  18.0k|    assert(dummy_versions);
 7013|       |
 7014|  36.1k|    for (Version* v = dummy_versions->next_; v != dummy_versions;
  ------------------
  |  Branch (7014:46): [True: 18.0k, False: 18.0k]
  ------------------
 7015|  18.0k|         v = v->next_) {
 7016|  18.0k|      assert(v);
 7017|       |
 7018|  18.0k|      const auto* vstorage = v->storage_info();
 7019|  18.0k|      assert(vstorage);
 7020|       |
 7021|   144k|      for (int level = 0; level < vstorage->num_levels(); ++level) {
  ------------------
  |  Branch (7021:27): [True: 126k, False: 18.0k]
  ------------------
 7022|   126k|        total_table_files += vstorage->LevelFiles(level).size();
 7023|   126k|      }
 7024|       |
 7025|  18.0k|      total_blob_files += vstorage->GetBlobFiles().size();
 7026|  18.0k|    }
 7027|  18.0k|  }
 7028|       |
 7029|       |  // just one time extension to the right size
 7030|  18.0k|  live_table_files->reserve(live_table_files->size() + total_table_files);
 7031|  18.0k|  live_blob_files->reserve(live_blob_files->size() + total_blob_files);
 7032|       |
 7033|  18.0k|  assert(column_family_set_);
 7034|  18.0k|  for (auto cfd : *column_family_set_) {
  ------------------
  |  Branch (7034:17): [True: 18.0k, False: 18.0k]
  ------------------
 7035|  18.0k|    assert(cfd);
 7036|  18.0k|    if (!cfd->initialized()) {
  ------------------
  |  Branch (7036:9): [True: 0, False: 18.0k]
  ------------------
 7037|      0|      continue;
 7038|      0|    }
 7039|       |
 7040|  18.0k|    auto* current = cfd->current();
 7041|  18.0k|    bool found_current = false;
 7042|       |
 7043|  18.0k|    Version* const dummy_versions = cfd->dummy_versions();
 7044|  18.0k|    assert(dummy_versions);
 7045|       |
 7046|  36.1k|    for (Version* v = dummy_versions->next_; v != dummy_versions;
  ------------------
  |  Branch (7046:46): [True: 18.0k, False: 18.0k]
  ------------------
 7047|  18.0k|         v = v->next_) {
 7048|  18.0k|      v->AddLiveFiles(live_table_files, live_blob_files);
 7049|  18.0k|      if (v == current) {
  ------------------
  |  Branch (7049:11): [True: 18.0k, False: 0]
  ------------------
 7050|  18.0k|        found_current = true;
 7051|  18.0k|      }
 7052|  18.0k|    }
 7053|       |
 7054|  18.0k|    if (!found_current && current != nullptr) {
  ------------------
  |  Branch (7054:9): [True: 0, False: 18.0k]
  |  Branch (7054:27): [True: 0, False: 0]
  ------------------
 7055|       |      // Should never happen unless it is a bug.
 7056|      0|      assert(false);
 7057|      0|      current->AddLiveFiles(live_table_files, live_blob_files);
 7058|      0|    }
 7059|  18.0k|  }
 7060|  18.0k|}
_ZN7rocksdb10VersionSet20GetLiveFilesMetaDataEPNSt3__16vectorINS_16LiveFileMetaDataENS1_9allocatorIS3_EEEE:
 7174|  9.02k|void VersionSet::GetLiveFilesMetaData(std::vector<LiveFileMetaData>* metadata) {
 7175|  9.02k|  if (!metadata) {
  ------------------
  |  Branch (7175:7): [True: 0, False: 9.02k]
  ------------------
 7176|      0|    return;
 7177|      0|  }
 7178|  9.02k|  assert(metadata);
 7179|  9.02k|  size_t count = 0;
 7180|  9.02k|  for (auto cfd : *column_family_set_) {
  ------------------
  |  Branch (7180:17): [True: 9.02k, False: 9.02k]
  ------------------
 7181|  9.02k|    if (cfd->IsDropped() || !cfd->initialized()) {
  ------------------
  |  Branch (7181:9): [True: 0, False: 9.02k]
  |  Branch (7181:29): [True: 0, False: 9.02k]
  ------------------
 7182|      0|      continue;
 7183|      0|    }
 7184|  72.2k|    for (int level = 0; level < cfd->NumberLevels(); level++) {
  ------------------
  |  Branch (7184:25): [True: 63.1k, False: 9.02k]
  ------------------
 7185|  63.1k|      count += cfd->current()->storage_info()->LevelFiles(level).size();
 7186|  63.1k|    }
 7187|  9.02k|  }
 7188|  9.02k|  metadata->reserve(count);
 7189|  9.02k|  for (auto cfd : *column_family_set_) {
  ------------------
  |  Branch (7189:17): [True: 9.02k, False: 9.02k]
  ------------------
 7190|  9.02k|    if (cfd->IsDropped() || !cfd->initialized()) {
  ------------------
  |  Branch (7190:9): [True: 0, False: 9.02k]
  |  Branch (7190:29): [True: 0, False: 9.02k]
  ------------------
 7191|      0|      continue;
 7192|      0|    }
 7193|  72.2k|    for (int level = 0; level < cfd->NumberLevels(); level++) {
  ------------------
  |  Branch (7193:25): [True: 63.1k, False: 9.02k]
  ------------------
 7194|  63.1k|      for (const auto& file :
  ------------------
  |  Branch (7194:29): [True: 0, False: 63.1k]
  ------------------
 7195|  63.1k|           cfd->current()->storage_info()->LevelFiles(level)) {
 7196|      0|        LiveFileMetaData filemetadata;
 7197|      0|        filemetadata.column_family_name = cfd->GetName();
 7198|      0|        uint32_t path_id = file->fd.GetPathId();
 7199|      0|        if (path_id < cfd->ioptions()->cf_paths.size()) {
  ------------------
  |  Branch (7199:13): [True: 0, False: 0]
  ------------------
 7200|      0|          filemetadata.db_path = cfd->ioptions()->cf_paths[path_id].path;
 7201|      0|        } else {
 7202|      0|          assert(!cfd->ioptions()->cf_paths.empty());
 7203|      0|          filemetadata.db_path = cfd->ioptions()->cf_paths.back().path;
 7204|      0|        }
 7205|      0|        filemetadata.directory = filemetadata.db_path;
 7206|      0|        const uint64_t file_number = file->fd.GetNumber();
 7207|      0|        filemetadata.name = MakeTableFileName("", file_number);
 7208|      0|        filemetadata.relative_filename = filemetadata.name.substr(1);
 7209|      0|        filemetadata.file_number = file_number;
 7210|      0|        filemetadata.level = level;
 7211|      0|        filemetadata.size = file->fd.GetFileSize();
 7212|      0|        filemetadata.smallestkey = file->smallest.user_key().ToString();
 7213|      0|        filemetadata.largestkey = file->largest.user_key().ToString();
 7214|      0|        filemetadata.smallest_seqno = file->fd.smallest_seqno;
 7215|      0|        filemetadata.largest_seqno = file->fd.largest_seqno;
 7216|      0|        filemetadata.num_reads_sampled =
 7217|      0|            file->stats.num_reads_sampled.load(std::memory_order_relaxed);
 7218|      0|        filemetadata.being_compacted = file->being_compacted;
 7219|      0|        filemetadata.num_entries = file->num_entries;
 7220|      0|        filemetadata.num_deletions = file->num_deletions;
 7221|      0|        filemetadata.oldest_blob_file_number = file->oldest_blob_file_number;
 7222|      0|        filemetadata.file_checksum = file->file_checksum;
 7223|      0|        filemetadata.file_checksum_func_name = file->file_checksum_func_name;
 7224|      0|        filemetadata.temperature = file->temperature;
 7225|      0|        filemetadata.oldest_ancester_time = file->TryGetOldestAncesterTime();
 7226|      0|        filemetadata.file_creation_time = file->TryGetFileCreationTime();
 7227|      0|        filemetadata.epoch_number = file->epoch_number;
 7228|      0|        metadata->push_back(filemetadata);
 7229|      0|      }
 7230|  63.1k|    }
 7231|  9.02k|  }
 7232|  9.02k|}
_ZN7rocksdb10VersionSet16GetObsoleteFilesEPNSt3__16vectorINS_16ObsoleteFileInfoENS1_9allocatorIS3_EEEEPNS2_INS_20ObsoleteBlobFileInfoENS4_IS8_EEEEPNS2_INS1_12basic_stringIcNS1_11char_traitsIcEENS4_IcEEEENS4_ISG_EEEEm:
 7237|  18.0k|                                  uint64_t min_pending_output) {
 7238|  18.0k|  assert(files);
 7239|  18.0k|  assert(blob_files);
 7240|  18.0k|  assert(manifest_filenames);
 7241|  18.0k|  assert(files->empty());
 7242|  18.0k|  assert(blob_files->empty());
 7243|  18.0k|  assert(manifest_filenames->empty());
 7244|       |
 7245|  18.0k|  std::vector<ObsoleteFileInfo> pending_files;
 7246|  18.0k|  for (auto& f : obsolete_files_) {
  ------------------
  |  Branch (7246:16): [True: 0, False: 18.0k]
  ------------------
 7247|      0|    if (f.metadata->fd.GetNumber() < min_pending_output) {
  ------------------
  |  Branch (7247:9): [True: 0, False: 0]
  ------------------
 7248|      0|      files->emplace_back(std::move(f));
 7249|      0|    } else {
 7250|      0|      pending_files.emplace_back(std::move(f));
 7251|      0|    }
 7252|      0|  }
 7253|  18.0k|  obsolete_files_.swap(pending_files);
 7254|       |
 7255|  18.0k|  std::vector<ObsoleteBlobFileInfo> pending_blob_files;
 7256|  18.0k|  for (auto& blob_file : obsolete_blob_files_) {
  ------------------
  |  Branch (7256:24): [True: 0, False: 18.0k]
  ------------------
 7257|      0|    if (blob_file.GetBlobFileNumber() < min_pending_output) {
  ------------------
  |  Branch (7257:9): [True: 0, False: 0]
  ------------------
 7258|      0|      blob_files->emplace_back(std::move(blob_file));
 7259|      0|    } else {
 7260|      0|      pending_blob_files.emplace_back(std::move(blob_file));
 7261|      0|    }
 7262|      0|  }
 7263|  18.0k|  obsolete_blob_files_.swap(pending_blob_files);
 7264|       |
 7265|  18.0k|  obsolete_manifests_.swap(*manifest_filenames);
 7266|  18.0k|}
_ZN7rocksdb10VersionSet18CreateColumnFamilyERKNS_19ColumnFamilyOptionsERKNS_11ReadOptionsEPKNS_11VersionEditE:
 7280|  9.02k|    const VersionEdit* edit) {
 7281|  9.02k|  assert(edit->IsColumnFamilyAdd());
 7282|       |
 7283|  9.02k|  MutableCFOptions dummy_cf_options;
 7284|  9.02k|  Version* dummy_versions =
 7285|  9.02k|      new Version(nullptr, this, file_options_, dummy_cf_options, io_tracer_);
 7286|       |  // Ref() dummy version once so that later we can call Unref() to delete it
 7287|       |  // by avoiding calling "delete" explicitly (~Version is private)
 7288|  9.02k|  dummy_versions->Ref();
 7289|  9.02k|  auto new_cfd = column_family_set_->CreateColumnFamily(
 7290|  9.02k|      edit->GetColumnFamilyName(), edit->GetColumnFamily(), dummy_versions,
 7291|  9.02k|      cf_options);
 7292|       |
 7293|  9.02k|  Version* v = new Version(new_cfd, this, file_options_,
 7294|  9.02k|                           *new_cfd->GetLatestMutableCFOptions(), io_tracer_,
 7295|  9.02k|                           current_version_number_++);
 7296|       |
 7297|  9.02k|  constexpr bool update_stats = false;
 7298|       |
 7299|  9.02k|  v->PrepareAppend(*new_cfd->GetLatestMutableCFOptions(), read_options,
 7300|  9.02k|                   update_stats);
 7301|       |
 7302|  9.02k|  AppendVersion(new_cfd, v);
 7303|       |  // GetLatestMutableCFOptions() is safe here without mutex since the
 7304|       |  // cfd is not available to client
 7305|  9.02k|  new_cfd->CreateNewMemtable(*new_cfd->GetLatestMutableCFOptions(),
 7306|  9.02k|                             LastSequence());
 7307|  9.02k|  new_cfd->SetLogNumber(edit->GetLogNumber());
 7308|  9.02k|  return new_cfd;
 7309|  9.02k|}
version_set.cc:_ZN7rocksdb12_GLOBAL__N_126SortFileByOverlappingRatioERKNS_21InternalKeyComparatorERKNSt3__16vectorIPNS_12FileMetaDataENS4_9allocatorIS7_EEEESC_PNS_11SystemClockEiimPNS5_INS0_5FsizeENS8_ISF_EEEE:
 3960|   162k|    std::vector<Fsize>* temp) {
 3961|   162k|  std::unordered_map<uint64_t, uint64_t> file_to_order;
 3962|   162k|  auto next_level_it = next_level_files.begin();
 3963|       |
 3964|   162k|  int64_t curr_time;
 3965|   162k|  Status status = clock->GetCurrentTime(&curr_time);
 3966|   162k|  if (!status.ok()) {
  ------------------
  |  Branch (3966:7): [True: 0, False: 162k]
  ------------------
 3967|       |    // If we can't get time, disable TTL.
 3968|      0|    ttl = 0;
 3969|      0|  }
 3970|       |
 3971|   162k|  FileTtlBooster ttl_booster(static_cast<uint64_t>(curr_time), ttl,
 3972|   162k|                             num_non_empty_levels, level);
 3973|       |
 3974|   162k|  for (auto& file : files) {
  ------------------
  |  Branch (3974:19): [True: 4.48k, False: 162k]
  ------------------
 3975|  4.48k|    uint64_t overlapping_bytes = 0;
 3976|       |    // Skip files in next level that is smaller than current file
 3977|  4.48k|    while (next_level_it != next_level_files.end() &&
  ------------------
  |  Branch (3977:12): [True: 0, False: 4.48k]
  |  Branch (3977:12): [True: 0, False: 4.48k]
  ------------------
 3978|  4.48k|           icmp.Compare((*next_level_it)->largest, file->smallest) < 0) {
  ------------------
  |  Branch (3978:12): [True: 0, False: 0]
  ------------------
 3979|      0|      next_level_it++;
 3980|      0|    }
 3981|       |
 3982|  4.48k|    while (next_level_it != next_level_files.end() &&
  ------------------
  |  Branch (3982:12): [True: 0, False: 4.48k]
  |  Branch (3982:12): [True: 0, False: 4.48k]
  ------------------
 3983|  4.48k|           icmp.Compare((*next_level_it)->smallest, file->largest) < 0) {
  ------------------
  |  Branch (3983:12): [True: 0, False: 0]
  ------------------
 3984|      0|      overlapping_bytes += (*next_level_it)->fd.file_size;
 3985|       |
 3986|      0|      if (icmp.Compare((*next_level_it)->largest, file->largest) > 0) {
  ------------------
  |  Branch (3986:11): [True: 0, False: 0]
  ------------------
 3987|       |        // next level file cross large boundary of current file.
 3988|      0|        break;
 3989|      0|      }
 3990|      0|      next_level_it++;
 3991|      0|    }
 3992|       |
 3993|  4.48k|    uint64_t ttl_boost_score = (ttl > 0) ? ttl_booster.GetBoostScore(file) : 1;
  ------------------
  |  Branch (3993:32): [True: 4.48k, False: 0]
  ------------------
 3994|  4.48k|    assert(ttl_boost_score > 0);
 3995|  4.48k|    assert(file->compensated_file_size != 0);
 3996|  4.48k|    file_to_order[file->fd.GetNumber()] = overlapping_bytes * 1024U /
 3997|  4.48k|                                          file->compensated_file_size /
 3998|  4.48k|                                          ttl_boost_score;
 3999|  4.48k|  }
 4000|       |
 4001|   162k|  size_t num_to_sort = temp->size() > VersionStorageInfo::kNumberFilesToSort
  ------------------
  |  Branch (4001:24): [True: 0, False: 162k]
  ------------------
 4002|   162k|                           ? VersionStorageInfo::kNumberFilesToSort
 4003|   162k|                           : temp->size();
 4004|       |
 4005|   162k|  std::partial_sort(temp->begin(), temp->begin() + num_to_sort, temp->end(),
 4006|   162k|                    [&](const Fsize& f1, const Fsize& f2) -> bool {
 4007|       |                      // If score is the same, pick file with smaller keys.
 4008|       |                      // This makes the algorithm more deterministic, and also
 4009|       |                      // help the trivial move case to have more files to
 4010|       |                      // extend.
 4011|   162k|                      if (f1.file->marked_for_compaction ==
 4012|   162k|                          f2.file->marked_for_compaction) {
 4013|   162k|                        if (file_to_order[f1.file->fd.GetNumber()] ==
 4014|   162k|                            file_to_order[f2.file->fd.GetNumber()]) {
 4015|   162k|                          return icmp.Compare(f1.file->smallest,
 4016|   162k|                                              f2.file->smallest) < 0;
 4017|   162k|                        }
 4018|   162k|                        return file_to_order[f1.file->fd.GetNumber()] <
 4019|   162k|                               file_to_order[f2.file->fd.GetNumber()];
 4020|   162k|                      } else {
 4021|   162k|                        return f1.file->marked_for_compaction >
 4022|   162k|                               f2.file->marked_for_compaction;
 4023|   162k|                      }
 4024|   162k|                    });
 4025|   162k|}
_ZNK7rocksdb10VersionSet14ManifestWriter13IsAllWalEditsEv:
 5051|  9.02k|  bool IsAllWalEdits() const {
 5052|  9.02k|    bool all_wal_edits = true;
 5053|  9.02k|    for (const auto& e : edit_list) {
  ------------------
  |  Branch (5053:24): [True: 9.02k, False: 0]
  ------------------
 5054|  9.02k|      if (!e->IsWalManipulation()) {
  ------------------
  |  Branch (5054:11): [True: 9.02k, False: 0]
  ------------------
 5055|  9.02k|        all_wal_edits = false;
 5056|  9.02k|        break;
 5057|  9.02k|      }
 5058|  9.02k|    }
 5059|  9.02k|    return all_wal_edits;
 5060|  9.02k|  }
_ZN7rocksdb10VersionSet14ManifestWriterD2Ev:
 5049|  9.02k|  ~ManifestWriter() { status.PermitUncheckedError(); }
version_set.cc:_ZZN7rocksdb10VersionSet11LogAndApplyERKNS_10autovectorIPNS_16ColumnFamilyDataELm8EEERKNS1_IPKNS_16MutableCFOptionsELm8EEERKNS_11ReadOptionsERKNS_12WriteOptionsERKNS1_INS1_IPNS_11VersionEditELm8EEELm8EEEPNS_17InstrumentedMutexEPNS_11FSDirectoryEbPKNS_19ColumnFamilyOptionsERKNSt3__16vectorINSW_8functionIFvRKNS_6StatusEEEENSW_9allocatorIS13_EEEEENK3$_0clES11_:
 5914|  9.02k|        manifest_wcbs.empty() ? [](const Status&) {} : manifest_wcbs[i];
_ZN7rocksdb10VersionSet14ManifestWriterC2EPNS_17InstrumentedMutexEPNS_16ColumnFamilyDataERKNS_16MutableCFOptionsERKNS_10autovectorIPNS_11VersionEditELm8EEERKNSt3__18functionIFvRKNS_6StatusEEEE:
 5048|  9.02k|        manifest_write_callback(manifest_wcb) {}

_ZN7rocksdb10VersionSet18GetColumnFamilySetEv:
 1518|   225k|  ColumnFamilySet* GetColumnFamilySet() { return column_family_set_.get(); }
_ZN7rocksdb10VersionSet24SetLastAllocatedSequenceEm:
 1381|  4.50k|  void SetLastAllocatedSequence(uint64_t s) {
 1382|  4.50k|    assert(s >= last_allocated_sequence_);
 1383|  4.50k|    last_allocated_sequence_.store(s, std::memory_order_seq_cst);
 1384|  4.50k|  }
_ZN7rocksdb10VersionSet24SetLastPublishedSequenceEm:
 1375|  4.50k|  void SetLastPublishedSequence(uint64_t s) {
 1376|  4.50k|    assert(s >= last_published_sequence_);
 1377|  4.50k|    last_published_sequence_.store(s, std::memory_order_seq_cst);
 1378|  4.50k|  }
_ZN7rocksdb10VersionSet15SetLastSequenceEm:
 1367|  1.36M|  void SetLastSequence(uint64_t s) {
 1368|  1.36M|    assert(s >= last_sequence_);
 1369|       |    // Last visible sequence must always be less than last written seq
 1370|  1.36M|    assert(!db_options_->two_write_queues || s <= last_allocated_sequence_);
 1371|  1.36M|    last_sequence_.store(s, std::memory_order_release);
 1372|  1.36M|  }
_ZN7rocksdb10VersionSet23GetRefedColumnFamilySetEv:
 1530|     46|  RefedColumnFamilySet GetRefedColumnFamilySet() {
 1531|     46|    return RefedColumnFamilySet(GetColumnFamilySet());
 1532|     46|  }
_ZN7rocksdb10VersionSet19offpeak_time_optionEv:
 1541|  36.1k|  const OffpeakTimeOption& offpeak_time_option() {
 1542|  36.1k|    return offpeak_time_option_;
 1543|  36.1k|  }
_ZN7rocksdb7Version12storage_infoEv:
 1027|   465k|  VersionStorageInfo* storage_info() { return &storage_info_; }
_ZNK7rocksdb18VersionStorageInfo13NumLevelFilesEi:
  322|    322|  int NumLevelFiles(int level) const {
  323|    322|    assert(finalized_);
  324|    322|    return static_cast<int>(files_[level].size());
  325|    322|  }
_ZNK7rocksdb10VersionSet12LastSequenceEv:
 1352|  1.38M|  uint64_t LastSequence() const {
 1353|  1.38M|    return last_sequence_.load(std::memory_order_acquire);
 1354|  1.38M|  }
_ZNK7rocksdb18VersionStorageInfo34BottommostFilesMarkedForCompactionEv:
  510|  9.02k|  BottommostFilesMarkedForCompaction() const {
  511|  9.02k|    assert(finalized_);
  512|  9.02k|    return bottommost_files_marked_for_compaction_;
  513|  9.02k|  }
_ZNK7rocksdb18VersionStorageInfo31bottommost_files_mark_thresholdEv:
  615|  9.02k|  SequenceNumber bottommost_files_mark_threshold() const {
  616|  9.02k|    return bottommost_files_mark_threshold_;
  617|  9.02k|  }
_ZNK7rocksdb10VersionSet24current_next_file_numberEv:
 1337|  13.5k|  uint64_t current_next_file_number() const { return next_file_number_.load(); }
_ZNK7rocksdb18VersionStorageInfo10LevelFilesEi:
  331|  1.30M|  const std::vector<FileMetaData*>& LevelFiles(int level) const {
  332|  1.30M|    return files_[level];
  333|  1.30M|  }
_ZN7rocksdb10VersionSet13NewFileNumberEv:
 1344|  40.5k|  uint64_t NewFileNumber() { return next_file_number_.fetch_add(1); }
_ZNK7rocksdb18VersionStorageInfo20num_non_empty_levelsEv:
  309|   144k|  int num_non_empty_levels() const {
  310|   144k|    assert(finalized_);
  311|   144k|    return num_non_empty_levels_;
  312|   144k|  }
_ZNK7rocksdb18VersionStorageInfo15LevelFilesBriefEi:
  456|  17.9k|  const ROCKSDB_NAMESPACE::LevelFilesBrief& LevelFilesBrief(int level) const {
  457|  17.9k|    assert(level < static_cast<int>(level_files_brief_.size()));
  458|  17.9k|    return level_files_brief_[level];
  459|  17.9k|  }
_ZNK7rocksdb18VersionStorageInfo12GetBlobFilesEv:
  408|   167k|  const BlobFiles& GetBlobFiles() const { return blob_files_; }
_ZN7rocksdb18VersionStorageInfo7ReserveEim:
  146|   126k|  void Reserve(int level, size_t size) { files_[level].reserve(size); }
_ZNK7rocksdb18VersionStorageInfo17GetCompactCursorsEv:
  155|  9.02k|  const std::vector<InternalKey>& GetCompactCursors() const {
  156|  9.02k|    return compact_cursor_;
  157|  9.02k|  }
_ZN7rocksdb18VersionStorageInfo11ReserveBlobEm:
  182|  18.0k|  void ReserveBlob(size_t size) { blob_files_.reserve(size); }
_ZNK7rocksdb18VersionStorageInfo20CompactionScoreLevelEi:
  257|    276|  int CompactionScoreLevel(int idx) const { return compaction_level_[idx]; }
_ZNK7rocksdb18VersionStorageInfo15CompactionScoreEi:
  260|  54.4k|  double CompactionScore(int idx) const { return compaction_score_[idx]; }
_ZNK7rocksdb18VersionStorageInfo10num_levelsEv:
  306|  1.75M|  int num_levels() const { return num_levels_; }
_ZNK7rocksdb18VersionStorageInfo22l0_delay_trigger_countEv:
  317|  18.0k|  int l0_delay_trigger_count() const { return l0_delay_trigger_count_; }
_ZN7rocksdb18VersionStorageInfo26set_l0_delay_trigger_countEi:
  319|  27.0k|  void set_l0_delay_trigger_count(int v) { l0_delay_trigger_count_ = v; }
_ZNK7rocksdb18VersionStorageInfo25GetEpochNumberRequirementEv:
  337|   103k|  EpochNumberRequirement GetEpochNumberRequirement() const {
  338|   103k|    return epoch_number_requirement_;
  339|   103k|  }
_ZN7rocksdb18VersionStorageInfo25SetEpochNumberRequirementENS_22EpochNumberRequirementE:
  341|  9.02k|      EpochNumberRequirement epoch_number_requirement) {
  342|  9.02k|    epoch_number_requirement_ = epoch_number_requirement;
  343|  9.02k|  }
_ZN7rocksdb18VersionStorageInfo12FileLocationC2Eim:
  358|  4.48k|        : level_(level), position_(position) {}
_ZNK7rocksdb18VersionStorageInfo12FileLocation8GetLevelEv:
  360|  8.96k|    int GetLevel() const { return level_; }
_ZN7rocksdb18VersionStorageInfo12FileLocation7InvalidEv:
  371|  8.96k|    static FileLocation Invalid() { return FileLocation(); }
_ZNK7rocksdb18VersionStorageInfo15GetFileLocationEm:
  379|  4.48k|  FileLocation GetFileLocation(uint64_t file_number) const {
  380|  4.48k|    const auto it = file_locations_.find(file_number);
  381|       |
  382|  4.48k|    if (it == file_locations_.end()) {
  ------------------
  |  Branch (382:9): [True: 4.48k, False: 0]
  ------------------
  383|  4.48k|      return FileLocation::Invalid();
  384|  4.48k|    }
  385|       |
  386|      0|    assert(it->second.GetLevel() < num_levels_);
  387|      0|    assert(it->second.GetPosition() < files_[it->second.GetLevel()].size());
  388|      0|    assert(files_[it->second.GetLevel()][it->second.GetPosition()]);
  389|      0|    assert(files_[it->second.GetLevel()][it->second.GetPosition()]
  390|      0|               ->fd.GetNumber() == file_number);
  391|       |
  392|      0|    return it->second;
  393|  4.48k|  }
_ZNK7rocksdb18VersionStorageInfo12GetBlobStatsEv:
  436|     46|  BlobStats GetBlobStats() const {
  437|     46|    uint64_t total_file_size = 0;
  438|     46|    uint64_t total_garbage_size = 0;
  439|       |
  440|     46|    for (const auto& meta : blob_files_) {
  ------------------
  |  Branch (440:27): [True: 0, False: 46]
  ------------------
  441|      0|      assert(meta);
  442|       |
  443|      0|      total_file_size += meta->GetBlobFileSize();
  444|      0|      total_garbage_size += meta->GetGarbageBlobBytes();
  445|      0|    }
  446|       |
  447|     46|    double space_amp = 0.0;
  448|     46|    if (total_file_size > total_garbage_size) {
  ------------------
  |  Branch (448:9): [True: 0, False: 46]
  ------------------
  449|      0|      space_amp = static_cast<double>(total_file_size) /
  450|      0|                  (total_file_size - total_garbage_size);
  451|      0|    }
  452|       |
  453|     46|    return BlobStats{total_file_size, total_garbage_size, space_amp};
  454|     46|  }
_ZNK7rocksdb18VersionStorageInfo24FilesMarkedForCompactionEv:
  470|  18.0k|      const {
  471|  18.0k|    assert(finalized_);
  472|  18.0k|    return files_marked_for_compaction_;
  473|  18.0k|  }
_ZNK7rocksdb18VersionStorageInfo15ExpiredTtlFilesEv:
  483|  9.02k|  const autovector<std::pair<int, FileMetaData*>>& ExpiredTtlFiles() const {
  484|  9.02k|    assert(finalized_);
  485|  9.02k|    return expired_ttl_files_;
  486|  9.02k|  }
_ZNK7rocksdb18VersionStorageInfo32FilesMarkedForPeriodicCompactionEv:
  492|  9.02k|  FilesMarkedForPeriodicCompaction() const {
  493|  9.02k|    assert(finalized_);
  494|  9.02k|    return files_marked_for_periodic_compaction_;
  495|  9.02k|  }
_ZNK7rocksdb18VersionStorageInfo15BottommostFilesEv:
  502|  9.02k|  const autovector<std::pair<int, FileMetaData*>>& BottommostFiles() const {
  503|  9.02k|    assert(finalized_);
  504|  9.02k|    return bottommost_files_;
  505|  9.02k|  }
_ZNK7rocksdb18VersionStorageInfo26FilesMarkedForForcedBlobGCEv:
  518|  9.02k|      const {
  519|  9.02k|    assert(finalized_);
  520|  9.02k|    return files_marked_for_forced_blob_gc_;
  521|  9.02k|  }
_ZNK7rocksdb18VersionStorageInfo10base_levelEv:
  523|  27.0k|  int base_level() const { return base_level_; }
_ZNK7rocksdb18VersionStorageInfo19GetAverageValueSizeEv:
  571|  27.0k|  uint64_t GetAverageValueSize() const {
  572|  27.0k|    if (accumulated_num_non_deletions_ == 0) {
  ------------------
  |  Branch (572:9): [True: 23.6k, False: 3.47k]
  ------------------
  573|  23.6k|      return 0;
  574|  23.6k|    }
  575|  3.47k|    assert(accumulated_raw_key_size_ + accumulated_raw_value_size_ > 0);
  576|  3.47k|    assert(accumulated_file_size_ > 0);
  577|  3.47k|    return accumulated_raw_value_size_ / accumulated_num_non_deletions_ *
  578|  3.47k|           accumulated_file_size_ /
  579|  3.47k|           (accumulated_raw_key_size_ + accumulated_raw_value_size_);
  580|  27.0k|  }
_ZNK7rocksdb18VersionStorageInfo18InternalComparatorEv:
  593|  99.2k|  const InternalKeyComparator* InternalComparator() const {
  594|  99.2k|    return internal_comparator_;
  595|  99.2k|  }
_ZNK7rocksdb18VersionStorageInfo33estimated_compaction_needed_bytesEv:
  603|  27.1k|  uint64_t estimated_compaction_needed_bytes() const {
  604|  27.1k|    return estimated_compaction_needed_bytes_;
  605|  27.1k|  }
_ZNK7rocksdb18VersionStorageInfo24force_consistency_checksEv:
  613|  76.7k|  bool force_consistency_checks() const { return force_consistency_checks_; }
_ZN7rocksdb18VersionStorageInfo19GenerateFileIndexerEv:
  637|  27.0k|  void GenerateFileIndexer() {
  638|  27.0k|    file_indexer_.UpdateIndex(&arena_, num_non_empty_levels_, files_);
  639|  27.0k|  }
_ZN7rocksdb16ObsoleteFileInfoC2EPNS_12FileMetaDataERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEjNS3_10shared_ptrINS_23CacheReservationManagerEEE:
  813|  4.48k|            std::move(file_metadata_cache_res_mgr_arg)) {}
_ZN7rocksdb16ObsoleteFileInfo14DeleteMetadataEv:
  835|  4.48k|  void DeleteMetadata() {
  836|  4.48k|    if (file_metadata_cache_res_mgr) {
  ------------------
  |  Branch (836:9): [True: 0, False: 4.48k]
  ------------------
  837|      0|      Status s = file_metadata_cache_res_mgr->UpdateCacheReservation(
  838|      0|          metadata->ApproximateMemoryUsage(), false /* increase */);
  839|      0|      s.PermitUncheckedError();
  840|      0|    }
  841|  4.48k|    delete metadata;
  842|  4.48k|    metadata = nullptr;
  843|  4.48k|  }
_ZNK7rocksdb7Version12storage_infoEv:
 1028|  9.02k|  const VersionStorageInfo* storage_info() const { return &storage_info_; }
_ZN7rocksdb7Version11version_setEv:
 1030|  36.1k|  VersionSet* version_set() { return vset_; }
_ZN7rocksdb21AtomicGroupReadBuffer13replay_bufferEv:
 1161|  22.5k|  std::vector<VersionEdit>& replay_buffer() { return replay_buffer_; }
_ZNK7rocksdb10VersionSet20manifest_file_numberEv:
 1329|  18.0k|  uint64_t manifest_file_number() const { return manifest_file_number_; }
_ZNK7rocksdb10VersionSet28pending_manifest_file_numberEv:
 1333|  18.0k|  uint64_t pending_manifest_file_number() const {
 1334|  18.0k|    return pending_manifest_file_number_;
 1335|  18.0k|  }
_ZNK7rocksdb10VersionSet22min_log_number_to_keepEv:
 1339|  49.6k|  uint64_t min_log_number_to_keep() const {
 1340|  49.6k|    return min_log_number_to_keep_.load();
 1341|  49.6k|  }
_ZNK7rocksdb10VersionSet15prev_log_numberEv:
 1402|  18.0k|  uint64_t prev_log_number() const { return prev_log_number_; }
_ZNK7rocksdb10VersionSet29MinLogNumberWithUnflushedDataEv:
 1409|  4.51k|  uint64_t MinLogNumberWithUnflushedData() const {
 1410|  4.51k|    return PreComputeMinLogNumberWithUnflushedData(nullptr);
 1411|  4.51k|  }
_ZNK7rocksdb10VersionSet39PreComputeMinLogNumberWithUnflushedDataEPKNS_16ColumnFamilyDataE:
 1434|  4.51k|      const ColumnFamilyData* cfd_to_skip) const {
 1435|  4.51k|    uint64_t min_log_num = std::numeric_limits<uint64_t>::max();
 1436|  4.51k|    for (auto cfd : *column_family_set_) {
  ------------------
  |  Branch (1436:19): [True: 4.51k, False: 4.51k]
  ------------------
 1437|  4.51k|      if (cfd == cfd_to_skip) {
  ------------------
  |  Branch (1437:11): [True: 0, False: 4.51k]
  ------------------
 1438|      0|        continue;
 1439|      0|      }
 1440|       |      // It's safe to ignore dropped column families here:
 1441|       |      // cfd->IsDropped() becomes true after the drop is persisted in MANIFEST.
 1442|  4.51k|      if (min_log_num > cfd->GetLogNumber() && !cfd->IsDropped()) {
  ------------------
  |  Branch (1442:11): [True: 4.51k, False: 0]
  |  Branch (1442:48): [True: 4.51k, False: 0]
  ------------------
 1443|  4.51k|        min_log_num = cfd->GetLogNumber();
 1444|  4.51k|      }
 1445|  4.51k|    }
 1446|  4.51k|    return min_log_num;
 1447|  4.51k|  }
_ZNK7rocksdb10VersionSet37GetRunningColumnFamiliesTimestampSizeEv:
 1521|  4.51k|      const {
 1522|  4.51k|    return column_family_set_->GetRunningColumnFamiliesTimestampSize();
 1523|  4.51k|  }
_ZNK7rocksdb10VersionSet39GetColumnFamiliesTimestampSizeForRecordEv:
 1526|  1.36M|  GetColumnFamiliesTimestampSizeForRecord() const {
 1527|  1.36M|    return column_family_set_->GetColumnFamiliesTimestampSizeForRecord();
 1528|  1.36M|  }
_ZN7rocksdb10VersionSet12file_optionsEv:
 1534|  18.0k|  const FileOptions& file_options() { return file_options_; }
_ZNK7rocksdb10VersionSet9GetWalSetEv:
 1560|  9.02k|  const WalSet& GetWalSet() const { return wals_; }
_ZN7rocksdb10VersionSet14MutableCFStateC2EmNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
 1614|  9.02k|        : log_number(_log_number), full_history_ts_low(std::move(ts_low)) {}
_ZN7rocksdb18VersionStorageInfo12FileLocationC2Ev:
  356|  8.96k|    FileLocation() = default;
_ZN7rocksdb21AtomicGroupReadBufferC2Ev:
 1152|  9.02k|  AtomicGroupReadBuffer() = default;

_ZN7rocksdb11WalDeletionC2Ev:
  106|   121k|  WalDeletion() : number_(kEmpty) {}
_ZN7rocksdb11WalDeletionC2Em:
  108|  9.02k|  explicit WalDeletion(WalNumber number) : number_(number) {}
_ZNK7rocksdb11WalDeletion7IsEmptyEv:
  118|  99.3k|  bool IsEmpty() const { return number_ == kEmpty; }
_ZN7rocksdb11WalDeletion5ResetEv:
  120|  22.5k|  void Reset() { number_ = kEmpty; }
_ZNK7rocksdb6WalSet7GetWalsEv:
  158|  18.0k|  const std::map<WalNumber, WalMetadata>& GetWals() const { return wals_; }

_ZN7rocksdb10WalManager21PurgeObsoleteWALFilesEv:
  141|  18.0k|void WalManager::PurgeObsoleteWALFiles() {
  142|  18.0k|  bool const ttl_enabled = db_options_.WAL_ttl_seconds > 0;
  143|  18.0k|  bool const size_limit_enabled = db_options_.WAL_size_limit_MB > 0;
  144|  18.0k|  if (!ttl_enabled && !size_limit_enabled) {
  ------------------
  |  Branch (144:7): [True: 18.0k, False: 0]
  |  Branch (144:23): [True: 18.0k, False: 0]
  ------------------
  145|  18.0k|    return;
  146|  18.0k|  }
  147|       |
  148|      0|  int64_t current_time = 0;
  149|      0|  Status s = db_options_.clock->GetCurrentTime(&current_time);
  150|      0|  if (!s.ok()) {
  ------------------
  |  Branch (150:7): [True: 0, False: 0]
  ------------------
  151|      0|    ROCKS_LOG_ERROR(db_options_.info_log, "Can't get current time: %s",
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  152|      0|                    s.ToString().c_str());
  153|      0|    assert(false);
  154|      0|    return;
  155|      0|  }
  156|      0|  uint64_t const now_seconds = static_cast<uint64_t>(current_time);
  157|      0|  uint64_t const time_to_check =
  158|      0|      ttl_enabled
  ------------------
  |  Branch (158:7): [True: 0, False: 0]
  ------------------
  159|      0|          ? std::min(kDefaultIntervalToDeleteObsoleteWAL,
  160|      0|                     std::max(uint64_t{1}, db_options_.WAL_ttl_seconds / 2))
  161|      0|          : kDefaultIntervalToDeleteObsoleteWAL;
  162|      0|  uint64_t old_last_run_time = purge_wal_files_last_run_.LoadRelaxed();
  163|      0|  do {
  164|      0|    if (old_last_run_time + time_to_check > now_seconds) {
  ------------------
  |  Branch (164:9): [True: 0, False: 0]
  ------------------
  165|       |      // last run is recent enough, no need to purge
  166|      0|      return;
  167|      0|    }
  168|      0|  } while (!purge_wal_files_last_run_.CasWeakRelaxed(
  ------------------
  |  Branch (168:12): [True: 0, False: 0]
  ------------------
  169|      0|      /*expected=*/old_last_run_time, /*desired=*/now_seconds));
  170|       |
  171|      0|  std::string archival_dir = ArchivalDirectory(wal_dir_);
  172|      0|  std::vector<std::string> files;
  173|      0|  s = env_->GetChildren(archival_dir, &files);
  174|      0|  if (!s.ok()) {
  ------------------
  |  Branch (174:7): [True: 0, False: 0]
  ------------------
  175|      0|    ROCKS_LOG_ERROR(db_options_.info_log, "Can't get archive files: %s",
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  176|      0|                    s.ToString().c_str());
  177|      0|    return;
  178|      0|  }
  179|       |
  180|      0|  size_t log_files_num = 0;
  181|      0|  uint64_t log_file_size = 0;
  182|      0|  for (auto& f : files) {
  ------------------
  |  Branch (182:16): [True: 0, False: 0]
  ------------------
  183|      0|    uint64_t number;
  184|      0|    FileType type;
  185|      0|    if (ParseFileName(f, &number, &type) && type == kWalFile) {
  ------------------
  |  Branch (185:9): [True: 0, False: 0]
  |  Branch (185:45): [True: 0, False: 0]
  ------------------
  186|      0|      std::string const file_path = archival_dir + "/" + f;
  187|      0|      if (ttl_enabled) {
  ------------------
  |  Branch (187:11): [True: 0, False: 0]
  ------------------
  188|      0|        uint64_t file_m_time;
  189|      0|        s = env_->GetFileModificationTime(file_path, &file_m_time);
  190|      0|        if (!s.ok()) {
  ------------------
  |  Branch (190:13): [True: 0, False: 0]
  ------------------
  191|      0|          ROCKS_LOG_WARN(db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  192|      0|                         "Can't get file mod time: %s: %s", file_path.c_str(),
  193|      0|                         s.ToString().c_str());
  194|      0|          continue;
  195|      0|        }
  196|      0|        if (now_seconds - file_m_time > db_options_.WAL_ttl_seconds) {
  ------------------
  |  Branch (196:13): [True: 0, False: 0]
  ------------------
  197|      0|          s = DeleteDBFile(&db_options_, file_path, archival_dir, false,
  198|      0|                           /*force_fg=*/!wal_in_db_path_);
  199|      0|          if (!s.ok()) {
  ------------------
  |  Branch (199:15): [True: 0, False: 0]
  ------------------
  200|      0|            ROCKS_LOG_WARN(db_options_.info_log, "Can't delete file: %s: %s",
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  201|      0|                           file_path.c_str(), s.ToString().c_str());
  202|      0|            continue;
  203|      0|          } else {
  204|      0|            MutexLock l(&read_first_record_cache_mutex_);
  205|      0|            read_first_record_cache_.erase(number);
  206|      0|          }
  207|      0|          continue;
  208|      0|        }
  209|      0|      }
  210|       |
  211|      0|      if (size_limit_enabled) {
  ------------------
  |  Branch (211:11): [True: 0, False: 0]
  ------------------
  212|      0|        uint64_t file_size;
  213|      0|        s = env_->GetFileSize(file_path, &file_size);
  214|      0|        if (!s.ok()) {
  ------------------
  |  Branch (214:13): [True: 0, False: 0]
  ------------------
  215|      0|          ROCKS_LOG_ERROR(db_options_.info_log,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  216|      0|                          "Unable to get file size: %s: %s", file_path.c_str(),
  217|      0|                          s.ToString().c_str());
  218|      0|          return;
  219|      0|        } else {
  220|      0|          if (file_size > 0) {
  ------------------
  |  Branch (220:15): [True: 0, False: 0]
  ------------------
  221|      0|            log_file_size = std::max(log_file_size, file_size);
  222|      0|            ++log_files_num;
  223|      0|          } else {
  224|      0|            s = DeleteDBFile(&db_options_, file_path, archival_dir, false,
  225|      0|                             /*force_fg=*/!wal_in_db_path_);
  226|      0|            if (!s.ok()) {
  ------------------
  |  Branch (226:17): [True: 0, False: 0]
  ------------------
  227|      0|              ROCKS_LOG_WARN(db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  228|      0|                             "Unable to delete file: %s: %s", file_path.c_str(),
  229|      0|                             s.ToString().c_str());
  230|      0|              continue;
  231|      0|            } else {
  232|      0|              MutexLock l(&read_first_record_cache_mutex_);
  233|      0|              read_first_record_cache_.erase(number);
  234|      0|            }
  235|      0|          }
  236|      0|        }
  237|      0|      }
  238|      0|    }
  239|      0|  }
  240|       |
  241|      0|  if (0 == log_files_num || !size_limit_enabled) {
  ------------------
  |  Branch (241:7): [True: 0, False: 0]
  |  Branch (241:29): [True: 0, False: 0]
  ------------------
  242|      0|    return;
  243|      0|  }
  244|       |
  245|      0|  size_t const files_keep_num = static_cast<size_t>(
  246|      0|      db_options_.WAL_size_limit_MB * 1024 * 1024 / log_file_size);
  247|      0|  if (log_files_num <= files_keep_num) {
  ------------------
  |  Branch (247:7): [True: 0, False: 0]
  ------------------
  248|      0|    return;
  249|      0|  }
  250|       |
  251|      0|  size_t files_del_num = log_files_num - files_keep_num;
  252|      0|  VectorWalPtr archived_logs;
  253|      0|  s = GetSortedWalsOfType(archival_dir, archived_logs, kArchivedLogFile,
  254|      0|                          /*need_seqno=*/false);
  255|      0|  if (!s.ok()) {
  ------------------
  |  Branch (255:7): [True: 0, False: 0]
  ------------------
  256|      0|    ROCKS_LOG_WARN(db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  257|      0|                   "Unable to get archived WALs from: %s: %s",
  258|      0|                   archival_dir.c_str(), s.ToString().c_str());
  259|      0|    files_del_num = 0;
  260|      0|  } else if (files_del_num > archived_logs.size()) {
  ------------------
  |  Branch (260:14): [True: 0, False: 0]
  ------------------
  261|      0|    ROCKS_LOG_WARN(db_options_.info_log,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  262|      0|                   "Trying to delete more archived log files than "
  263|      0|                   "exist. Deleting all");
  264|      0|    files_del_num = archived_logs.size();
  265|      0|  }
  266|       |
  267|      0|  for (size_t i = 0; i < files_del_num; ++i) {
  ------------------
  |  Branch (267:22): [True: 0, False: 0]
  ------------------
  268|      0|    std::string const file_path = archived_logs[i]->PathName();
  269|      0|    s = DeleteDBFile(&db_options_, wal_dir_ + "/" + file_path, wal_dir_, false,
  270|      0|                     /*force_fg=*/!wal_in_db_path_);
  271|      0|    if (!s.ok()) {
  ------------------
  |  Branch (271:9): [True: 0, False: 0]
  ------------------
  272|      0|      ROCKS_LOG_WARN(db_options_.info_log, "Unable to delete file: %s: %s",
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  273|      0|                     file_path.c_str(), s.ToString().c_str());
  274|      0|      continue;
  275|      0|    } else {
  276|      0|      MutexLock l(&read_first_record_cache_mutex_);
  277|      0|      read_first_record_cache_.erase(archived_logs[i]->LogNumber());
  278|      0|    }
  279|      0|  }
  280|      0|}

_ZN7rocksdb10WalManagerC2ERKNS_18ImmutableDBOptionsERKNS_11FileOptionsERKNSt3__110shared_ptrINS_8IOTracerEEEb:
   50|  9.02k|        io_tracer_(io_tracer) {}

_ZN7rocksdb10WriteBatchC2Emmmm:
  181|  2.74M|      rep_() {
  182|       |  // Currently `protection_bytes_per_key` can only be enabled at 8 bytes per
  183|       |  // entry.
  184|  2.74M|  assert(protection_bytes_per_key == 0 || protection_bytes_per_key == 8);
  185|  2.74M|  if (protection_bytes_per_key != 0) {
  ------------------
  |  Branch (185:7): [True: 0, False: 2.74M]
  ------------------
  186|      0|    prot_info_.reset(new WriteBatch::ProtectionInfo());
  187|      0|  }
  188|  2.74M|  rep_.reserve((reserved_bytes > WriteBatchInternal::kHeader)
  ------------------
  |  Branch (188:16): [True: 660k, False: 2.08M]
  ------------------
  189|  2.74M|                   ? reserved_bytes
  190|  2.74M|                   : WriteBatchInternal::kHeader);
  191|  2.74M|  rep_.resize(WriteBatchInternal::kHeader);
  192|  2.74M|}
_ZN7rocksdb10WriteBatchD2Ev:
  243|  2.74M|WriteBatch::~WriteBatch() = default;
_ZN7rocksdb10WriteBatch7HandlerD2Ev:
  245|  4.08M|WriteBatch::Handler::~Handler() = default;
_ZN7rocksdb10WriteBatch7Handler8ContinueEv:
  252|  4.08M|bool WriteBatch::Handler::Continue() { return true; }
_ZNK7rocksdb10WriteBatch5CountEv:
  273|  1.36M|uint32_t WriteBatch::Count() const { return WriteBatchInternal::Count(this); }
_ZNK7rocksdb10WriteBatch19ComputeContentFlagsEv:
  275|  1.36M|uint32_t WriteBatch::ComputeContentFlags() const {
  276|  1.36M|  auto rv = content_flags_.load(std::memory_order_relaxed);
  277|  1.36M|  if ((rv & ContentFlags::DEFERRED) != 0) {
  ------------------
  |  Branch (277:7): [True: 0, False: 1.36M]
  ------------------
  278|      0|    BatchContentClassifier classifier;
  279|       |    // Should we handle status here?
  280|      0|    Iterate(&classifier).PermitUncheckedError();
  281|      0|    rv = classifier.content_flags;
  282|       |
  283|       |    // this method is conceptually const, because it is performing a lazy
  284|       |    // computation that doesn't affect the abstract state of the batch.
  285|       |    // content_flags_ is marked mutable so that we can perform the
  286|       |    // following assignment
  287|      0|    content_flags_.store(rv, std::memory_order_relaxed);
  288|      0|  }
  289|  1.36M|  return rv;
  290|  1.36M|}
_ZNK7rocksdb10WriteBatch24GetProtectionBytesPerKeyEv:
  298|  1.36M|size_t WriteBatch::GetProtectionBytesPerKey() const {
  299|  1.36M|  if (prot_info_ != nullptr) {
  ------------------
  |  Branch (299:7): [True: 0, False: 1.36M]
  ------------------
  300|      0|    return prot_info_->GetBytesPerKey();
  301|      0|  }
  302|  1.36M|  return 0;
  303|  1.36M|}
_ZNK7rocksdb10WriteBatch14HasDeleteRangeEv:
  331|  1.36M|bool WriteBatch::HasDeleteRange() const {
  332|  1.36M|  return (ComputeContentFlags() & ContentFlags::HAS_DELETE_RANGE) != 0;
  333|  1.36M|}
_ZN7rocksdb24ReadRecordFromWriteBatchEPNS_5SliceEPcPjS1_S1_S1_S1_Pm:
  375|  4.08M|                                uint64_t* write_unix_time) {
  376|  4.08M|  assert(key != nullptr && value != nullptr);
  377|  4.08M|  *tag = (*input)[0];
  378|  4.08M|  input->remove_prefix(1);
  379|  4.08M|  *column_family = 0;  // default
  380|  4.08M|  switch (*tag) {
  381|      0|    case kTypeColumnFamilyValue:
  ------------------
  |  Branch (381:5): [True: 0, False: 4.08M]
  ------------------
  382|      0|      if (!GetVarint32(input, column_family)) {
  ------------------
  |  Branch (382:11): [True: 0, False: 0]
  ------------------
  383|      0|        return Status::Corruption("bad WriteBatch Put");
  384|      0|      }
  385|      0|      FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  386|  1.98M|    case kTypeValue:
  ------------------
  |  Branch (386:5): [True: 1.98M, False: 2.10M]
  ------------------
  387|  1.98M|      if (!GetLengthPrefixedSlice(input, key) ||
  ------------------
  |  Branch (387:11): [True: 0, False: 1.98M]
  ------------------
  388|  1.98M|          !GetLengthPrefixedSlice(input, value)) {
  ------------------
  |  Branch (388:11): [True: 0, False: 1.98M]
  ------------------
  389|      0|        return Status::Corruption("bad WriteBatch Put");
  390|      0|      }
  391|  1.98M|      break;
  392|  1.98M|    case kTypeColumnFamilyDeletion:
  ------------------
  |  Branch (392:5): [True: 0, False: 4.08M]
  ------------------
  393|      0|    case kTypeColumnFamilySingleDeletion:
  ------------------
  |  Branch (393:5): [True: 0, False: 4.08M]
  ------------------
  394|      0|      if (!GetVarint32(input, column_family)) {
  ------------------
  |  Branch (394:11): [True: 0, False: 0]
  ------------------
  395|      0|        return Status::Corruption("bad WriteBatch Delete");
  396|      0|      }
  397|      0|      FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  398|   558k|    case kTypeDeletion:
  ------------------
  |  Branch (398:5): [True: 558k, False: 3.52M]
  ------------------
  399|   558k|    case kTypeSingleDeletion:
  ------------------
  |  Branch (399:5): [True: 0, False: 4.08M]
  ------------------
  400|   558k|      if (!GetLengthPrefixedSlice(input, key)) {
  ------------------
  |  Branch (400:11): [True: 0, False: 558k]
  ------------------
  401|      0|        return Status::Corruption("bad WriteBatch Delete");
  402|      0|      }
  403|   558k|      break;
  404|   558k|    case kTypeColumnFamilyRangeDeletion:
  ------------------
  |  Branch (404:5): [True: 0, False: 4.08M]
  ------------------
  405|      0|      if (!GetVarint32(input, column_family)) {
  ------------------
  |  Branch (405:11): [True: 0, False: 0]
  ------------------
  406|      0|        return Status::Corruption("bad WriteBatch DeleteRange");
  407|      0|      }
  408|      0|      FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  409|  1.54M|    case kTypeRangeDeletion:
  ------------------
  |  Branch (409:5): [True: 1.54M, False: 2.53M]
  ------------------
  410|       |      // for range delete, "key" is begin_key, "value" is end_key
  411|  1.54M|      if (!GetLengthPrefixedSlice(input, key) ||
  ------------------
  |  Branch (411:11): [True: 0, False: 1.54M]
  ------------------
  412|  1.54M|          !GetLengthPrefixedSlice(input, value)) {
  ------------------
  |  Branch (412:11): [True: 0, False: 1.54M]
  ------------------
  413|      0|        return Status::Corruption("bad WriteBatch DeleteRange");
  414|      0|      }
  415|  1.54M|      break;
  416|  1.54M|    case kTypeColumnFamilyMerge:
  ------------------
  |  Branch (416:5): [True: 0, False: 4.08M]
  ------------------
  417|      0|      if (!GetVarint32(input, column_family)) {
  ------------------
  |  Branch (417:11): [True: 0, False: 0]
  ------------------
  418|      0|        return Status::Corruption("bad WriteBatch Merge");
  419|      0|      }
  420|      0|      FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  421|      0|    case kTypeMerge:
  ------------------
  |  Branch (421:5): [True: 0, False: 4.08M]
  ------------------
  422|      0|      if (!GetLengthPrefixedSlice(input, key) ||
  ------------------
  |  Branch (422:11): [True: 0, False: 0]
  ------------------
  423|      0|          !GetLengthPrefixedSlice(input, value)) {
  ------------------
  |  Branch (423:11): [True: 0, False: 0]
  ------------------
  424|      0|        return Status::Corruption("bad WriteBatch Merge");
  425|      0|      }
  426|      0|      break;
  427|      0|    case kTypeColumnFamilyBlobIndex:
  ------------------
  |  Branch (427:5): [True: 0, False: 4.08M]
  ------------------
  428|      0|      if (!GetVarint32(input, column_family)) {
  ------------------
  |  Branch (428:11): [True: 0, False: 0]
  ------------------
  429|      0|        return Status::Corruption("bad WriteBatch BlobIndex");
  430|      0|      }
  431|      0|      FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  432|      0|    case kTypeBlobIndex:
  ------------------
  |  Branch (432:5): [True: 0, False: 4.08M]
  ------------------
  433|      0|      if (!GetLengthPrefixedSlice(input, key) ||
  ------------------
  |  Branch (433:11): [True: 0, False: 0]
  ------------------
  434|      0|          !GetLengthPrefixedSlice(input, value)) {
  ------------------
  |  Branch (434:11): [True: 0, False: 0]
  ------------------
  435|      0|        return Status::Corruption("bad WriteBatch BlobIndex");
  436|      0|      }
  437|      0|      break;
  438|      0|    case kTypeLogData:
  ------------------
  |  Branch (438:5): [True: 0, False: 4.08M]
  ------------------
  439|      0|      assert(blob != nullptr);
  440|      0|      if (!GetLengthPrefixedSlice(input, blob)) {
  ------------------
  |  Branch (440:11): [True: 0, False: 0]
  ------------------
  441|      0|        return Status::Corruption("bad WriteBatch Blob");
  442|      0|      }
  443|      0|      break;
  444|      0|    case kTypeNoop:
  ------------------
  |  Branch (444:5): [True: 0, False: 4.08M]
  ------------------
  445|      0|    case kTypeBeginPrepareXID:
  ------------------
  |  Branch (445:5): [True: 0, False: 4.08M]
  ------------------
  446|       |      // This indicates that the prepared batch is also persisted in the db.
  447|       |      // This is used in WritePreparedTxn
  448|      0|    case kTypeBeginPersistedPrepareXID:
  ------------------
  |  Branch (448:5): [True: 0, False: 4.08M]
  ------------------
  449|       |      // This is used in WriteUnpreparedTxn
  450|      0|    case kTypeBeginUnprepareXID:
  ------------------
  |  Branch (450:5): [True: 0, False: 4.08M]
  ------------------
  451|      0|      break;
  452|      0|    case kTypeEndPrepareXID:
  ------------------
  |  Branch (452:5): [True: 0, False: 4.08M]
  ------------------
  453|      0|      if (!GetLengthPrefixedSlice(input, xid)) {
  ------------------
  |  Branch (453:11): [True: 0, False: 0]
  ------------------
  454|      0|        return Status::Corruption("bad EndPrepare XID");
  455|      0|      }
  456|      0|      break;
  457|      0|    case kTypeCommitXIDAndTimestamp:
  ------------------
  |  Branch (457:5): [True: 0, False: 4.08M]
  ------------------
  458|      0|      if (!GetLengthPrefixedSlice(input, key)) {
  ------------------
  |  Branch (458:11): [True: 0, False: 0]
  ------------------
  459|      0|        return Status::Corruption("bad commit timestamp");
  460|      0|      }
  461|      0|      FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  462|      0|    case kTypeCommitXID:
  ------------------
  |  Branch (462:5): [True: 0, False: 4.08M]
  ------------------
  463|      0|      if (!GetLengthPrefixedSlice(input, xid)) {
  ------------------
  |  Branch (463:11): [True: 0, False: 0]
  ------------------
  464|      0|        return Status::Corruption("bad Commit XID");
  465|      0|      }
  466|      0|      break;
  467|      0|    case kTypeRollbackXID:
  ------------------
  |  Branch (467:5): [True: 0, False: 4.08M]
  ------------------
  468|      0|      if (!GetLengthPrefixedSlice(input, xid)) {
  ------------------
  |  Branch (468:11): [True: 0, False: 0]
  ------------------
  469|      0|        return Status::Corruption("bad Rollback XID");
  470|      0|      }
  471|      0|      break;
  472|      0|    case kTypeColumnFamilyWideColumnEntity:
  ------------------
  |  Branch (472:5): [True: 0, False: 4.08M]
  ------------------
  473|      0|      if (!GetVarint32(input, column_family)) {
  ------------------
  |  Branch (473:11): [True: 0, False: 0]
  ------------------
  474|      0|        return Status::Corruption("bad WriteBatch PutEntity");
  475|      0|      }
  476|      0|      FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  477|      0|    case kTypeWideColumnEntity:
  ------------------
  |  Branch (477:5): [True: 0, False: 4.08M]
  ------------------
  478|      0|      if (!GetLengthPrefixedSlice(input, key) ||
  ------------------
  |  Branch (478:11): [True: 0, False: 0]
  ------------------
  479|      0|          !GetLengthPrefixedSlice(input, value)) {
  ------------------
  |  Branch (479:11): [True: 0, False: 0]
  ------------------
  480|      0|        return Status::Corruption("bad WriteBatch PutEntity");
  481|      0|      }
  482|      0|      break;
  483|      0|    case kTypeColumnFamilyValuePreferredSeqno:
  ------------------
  |  Branch (483:5): [True: 0, False: 4.08M]
  ------------------
  484|      0|      if (!GetVarint32(input, column_family)) {
  ------------------
  |  Branch (484:11): [True: 0, False: 0]
  ------------------
  485|      0|        return Status::Corruption("bad WriteBatch TimedPut");
  486|      0|      }
  487|      0|      FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  488|      0|    case kTypeValuePreferredSeqno: {
  ------------------
  |  Branch (488:5): [True: 0, False: 4.08M]
  ------------------
  489|      0|      Slice packed_value;
  490|      0|      if (!GetLengthPrefixedSlice(input, key) ||
  ------------------
  |  Branch (490:11): [True: 0, False: 0]
  ------------------
  491|      0|          !GetLengthPrefixedSlice(input, &packed_value)) {
  ------------------
  |  Branch (491:11): [True: 0, False: 0]
  ------------------
  492|      0|        return Status::Corruption("bad WriteBatch TimedPut");
  493|      0|      }
  494|      0|      if (write_unix_time) {
  ------------------
  |  Branch (494:11): [True: 0, False: 0]
  ------------------
  495|      0|        std::tie(*value, *write_unix_time) =
  496|      0|            ParsePackedValueWithWriteTime(packed_value);
  497|      0|      } else {
  498|       |        // Caller doesn't want to unpack write_unix_time, so keep it packed in
  499|       |        // the value.
  500|      0|        *value = packed_value;
  501|      0|      }
  502|      0|      break;
  503|      0|    }
  504|      0|    default:
  ------------------
  |  Branch (504:5): [True: 0, False: 4.08M]
  ------------------
  505|      0|      return Status::Corruption("unknown WriteBatch tag");
  506|  4.08M|  }
  507|  4.08M|  return Status::OK();
  508|  4.08M|}
_ZNK7rocksdb10WriteBatch7IterateEPNS0_7HandlerE:
  510|  4.08M|Status WriteBatch::Iterate(Handler* handler) const {
  511|  4.08M|  if (rep_.size() < WriteBatchInternal::kHeader) {
  ------------------
  |  Branch (511:7): [True: 0, False: 4.08M]
  ------------------
  512|      0|    return Status::Corruption("malformed WriteBatch (too small)");
  513|      0|  }
  514|       |
  515|  4.08M|  return WriteBatchInternal::Iterate(this, handler, WriteBatchInternal::kHeader,
  516|  4.08M|                                     rep_.size());
  517|  4.08M|}
_ZN7rocksdb18WriteBatchInternal7IterateEPKNS_10WriteBatchEPNS1_7HandlerEmm:
  521|  4.08M|                                   size_t end) {
  522|  4.08M|  if (begin > wb->rep_.size() || end > wb->rep_.size() || end < begin) {
  ------------------
  |  Branch (522:7): [True: 0, False: 4.08M]
  |  Branch (522:34): [True: 0, False: 4.08M]
  |  Branch (522:59): [True: 0, False: 4.08M]
  ------------------
  523|      0|    return Status::Corruption("Invalid start/end bounds for Iterate");
  524|      0|  }
  525|  4.08M|  assert(begin <= end);
  526|  4.08M|  Slice input(wb->rep_.data() + begin, static_cast<size_t>(end - begin));
  527|  4.08M|  bool whole_batch =
  528|  4.08M|      (begin == WriteBatchInternal::kHeader) && (end == wb->rep_.size());
  ------------------
  |  Branch (528:7): [True: 4.08M, False: 0]
  |  Branch (528:49): [True: 4.08M, False: 0]
  ------------------
  529|       |
  530|  4.08M|  Slice key, value, blob, xid;
  531|  4.08M|  uint64_t write_unix_time = 0;
  532|       |
  533|       |  // Sometimes a sub-batch starts with a Noop. We want to exclude such Noops as
  534|       |  // the batch boundary symbols otherwise we would mis-count the number of
  535|       |  // batches. We do that by checking whether the accumulated batch is empty
  536|       |  // before seeing the next Noop.
  537|  4.08M|  bool empty_batch = true;
  538|  4.08M|  uint32_t found = 0;
  539|  4.08M|  Status s;
  540|  4.08M|  char tag = 0;
  541|  4.08M|  uint32_t column_family = 0;  // default
  542|  4.08M|  bool last_was_try_again = false;
  543|  4.08M|  bool handler_continue = true;
  544|  8.17M|  while (((s.ok() && !input.empty()) || UNLIKELY(s.IsTryAgain()))) {
  ------------------
  |  |   14|  4.08M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 4.08M]
  |  |  ------------------
  ------------------
  |  Branch (544:12): [True: 8.17M, False: 0]
  |  Branch (544:22): [True: 4.08M, False: 4.08M]
  ------------------
  545|  4.08M|    handler_continue = handler->Continue();
  546|  4.08M|    if (!handler_continue) {
  ------------------
  |  Branch (546:9): [True: 0, False: 4.08M]
  ------------------
  547|      0|      break;
  548|      0|    }
  549|       |
  550|  4.08M|    if (LIKELY(!s.IsTryAgain())) {
  ------------------
  |  |   13|  4.08M|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 4.08M, False: 0]
  |  |  ------------------
  ------------------
  551|  4.08M|      last_was_try_again = false;
  552|  4.08M|      tag = 0;
  553|  4.08M|      column_family = 0;  // default
  554|       |
  555|  4.08M|      s = ReadRecordFromWriteBatch(&input, &tag, &column_family, &key, &value,
  556|  4.08M|                                   &blob, &xid, &write_unix_time);
  557|  4.08M|      if (!s.ok()) {
  ------------------
  |  Branch (557:11): [True: 0, False: 4.08M]
  ------------------
  558|      0|        return s;
  559|      0|      }
  560|  4.08M|    } else {
  561|      0|      assert(s.IsTryAgain());
  562|      0|      assert(!last_was_try_again);  // to detect infinite loop bugs
  563|      0|      if (UNLIKELY(last_was_try_again)) {
  ------------------
  |  |   14|      0|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  564|      0|        return Status::Corruption(
  565|      0|            "two consecutive TryAgain in WriteBatch handler; this is either a "
  566|      0|            "software bug or data corruption.");
  567|      0|      }
  568|      0|      last_was_try_again = true;
  569|      0|      s = Status::OK();
  570|      0|    }
  571|       |
  572|  4.08M|    switch (tag) {
  573|      0|      case kTypeColumnFamilyValue:
  ------------------
  |  Branch (573:7): [True: 0, False: 4.08M]
  ------------------
  574|  1.98M|      case kTypeValue:
  ------------------
  |  Branch (574:7): [True: 1.98M, False: 2.10M]
  ------------------
  575|  1.98M|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  576|  1.98M|               (ContentFlags::DEFERRED | ContentFlags::HAS_PUT));
  577|  1.98M|        s = handler->PutCF(column_family, key, value);
  578|  1.98M|        if (LIKELY(s.ok())) {
  ------------------
  |  |   13|  1.98M|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 1.98M, False: 0]
  |  |  ------------------
  ------------------
  579|  1.98M|          empty_batch = false;
  580|  1.98M|          found++;
  581|  1.98M|        }
  582|  1.98M|        break;
  583|      0|      case kTypeColumnFamilyDeletion:
  ------------------
  |  Branch (583:7): [True: 0, False: 4.08M]
  ------------------
  584|   558k|      case kTypeDeletion:
  ------------------
  |  Branch (584:7): [True: 558k, False: 3.52M]
  ------------------
  585|   558k|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  586|   558k|               (ContentFlags::DEFERRED | ContentFlags::HAS_DELETE));
  587|   558k|        s = handler->DeleteCF(column_family, key);
  588|   558k|        if (LIKELY(s.ok())) {
  ------------------
  |  |   13|   558k|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 558k, False: 0]
  |  |  ------------------
  ------------------
  589|   558k|          empty_batch = false;
  590|   558k|          found++;
  591|   558k|        }
  592|   558k|        break;
  593|      0|      case kTypeColumnFamilySingleDeletion:
  ------------------
  |  Branch (593:7): [True: 0, False: 4.08M]
  ------------------
  594|      0|      case kTypeSingleDeletion:
  ------------------
  |  Branch (594:7): [True: 0, False: 4.08M]
  ------------------
  595|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  596|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_SINGLE_DELETE));
  597|      0|        s = handler->SingleDeleteCF(column_family, key);
  598|      0|        if (LIKELY(s.ok())) {
  ------------------
  |  |   13|      0|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  599|      0|          empty_batch = false;
  600|      0|          found++;
  601|      0|        }
  602|      0|        break;
  603|      0|      case kTypeColumnFamilyRangeDeletion:
  ------------------
  |  Branch (603:7): [True: 0, False: 4.08M]
  ------------------
  604|  1.54M|      case kTypeRangeDeletion:
  ------------------
  |  Branch (604:7): [True: 1.54M, False: 2.53M]
  ------------------
  605|  1.54M|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  606|  1.54M|               (ContentFlags::DEFERRED | ContentFlags::HAS_DELETE_RANGE));
  607|  1.54M|        s = handler->DeleteRangeCF(column_family, key, value);
  608|  1.54M|        if (LIKELY(s.ok())) {
  ------------------
  |  |   13|  1.54M|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 1.54M, False: 0]
  |  |  ------------------
  ------------------
  609|  1.54M|          empty_batch = false;
  610|  1.54M|          found++;
  611|  1.54M|        }
  612|  1.54M|        break;
  613|      0|      case kTypeColumnFamilyMerge:
  ------------------
  |  Branch (613:7): [True: 0, False: 4.08M]
  ------------------
  614|      0|      case kTypeMerge:
  ------------------
  |  Branch (614:7): [True: 0, False: 4.08M]
  ------------------
  615|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  616|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_MERGE));
  617|      0|        s = handler->MergeCF(column_family, key, value);
  618|      0|        if (LIKELY(s.ok())) {
  ------------------
  |  |   13|      0|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  619|      0|          empty_batch = false;
  620|      0|          found++;
  621|      0|        }
  622|      0|        break;
  623|      0|      case kTypeColumnFamilyBlobIndex:
  ------------------
  |  Branch (623:7): [True: 0, False: 4.08M]
  ------------------
  624|      0|      case kTypeBlobIndex:
  ------------------
  |  Branch (624:7): [True: 0, False: 4.08M]
  ------------------
  625|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  626|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_BLOB_INDEX));
  627|      0|        s = handler->PutBlobIndexCF(column_family, key, value);
  628|      0|        if (LIKELY(s.ok())) {
  ------------------
  |  |   13|      0|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  629|      0|          found++;
  630|      0|        }
  631|      0|        break;
  632|      0|      case kTypeLogData:
  ------------------
  |  Branch (632:7): [True: 0, False: 4.08M]
  ------------------
  633|      0|        handler->LogData(blob);
  634|       |        // A batch might have nothing but LogData. It is still a batch.
  635|      0|        empty_batch = false;
  636|      0|        break;
  637|      0|      case kTypeBeginPrepareXID:
  ------------------
  |  Branch (637:7): [True: 0, False: 4.08M]
  ------------------
  638|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  639|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_BEGIN_PREPARE));
  640|      0|        s = handler->MarkBeginPrepare();
  641|      0|        assert(s.ok());
  642|      0|        empty_batch = false;
  643|      0|        if (handler->WriteAfterCommit() ==
  ------------------
  |  Branch (643:13): [True: 0, False: 0]
  ------------------
  644|      0|            WriteBatch::Handler::OptionState::kDisabled) {
  645|      0|          s = Status::NotSupported(
  646|      0|              "WriteCommitted txn tag when write_after_commit_ is disabled (in "
  647|      0|              "WritePrepared/WriteUnprepared mode). If it is not due to "
  648|      0|              "corruption, the WAL must be emptied before changing the "
  649|      0|              "WritePolicy.");
  650|      0|        }
  651|      0|        if (handler->WriteBeforePrepare() ==
  ------------------
  |  Branch (651:13): [True: 0, False: 0]
  ------------------
  652|      0|            WriteBatch::Handler::OptionState::kEnabled) {
  653|      0|          s = Status::NotSupported(
  654|      0|              "WriteCommitted txn tag when write_before_prepare_ is enabled "
  655|      0|              "(in WriteUnprepared mode). If it is not due to corruption, the "
  656|      0|              "WAL must be emptied before changing the WritePolicy.");
  657|      0|        }
  658|      0|        break;
  659|      0|      case kTypeBeginPersistedPrepareXID:
  ------------------
  |  Branch (659:7): [True: 0, False: 4.08M]
  ------------------
  660|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  661|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_BEGIN_PREPARE));
  662|      0|        s = handler->MarkBeginPrepare();
  663|      0|        assert(s.ok());
  664|      0|        empty_batch = false;
  665|      0|        if (handler->WriteAfterCommit() ==
  ------------------
  |  Branch (665:13): [True: 0, False: 0]
  ------------------
  666|      0|            WriteBatch::Handler::OptionState::kEnabled) {
  667|      0|          s = Status::NotSupported(
  668|      0|              "WritePrepared/WriteUnprepared txn tag when write_after_commit_ "
  669|      0|              "is enabled (in default WriteCommitted mode). If it is not due "
  670|      0|              "to corruption, the WAL must be emptied before changing the "
  671|      0|              "WritePolicy.");
  672|      0|        }
  673|      0|        break;
  674|      0|      case kTypeBeginUnprepareXID:
  ------------------
  |  Branch (674:7): [True: 0, False: 4.08M]
  ------------------
  675|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  676|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_BEGIN_UNPREPARE));
  677|      0|        s = handler->MarkBeginPrepare(true /* unprepared */);
  678|      0|        assert(s.ok());
  679|      0|        empty_batch = false;
  680|      0|        if (handler->WriteAfterCommit() ==
  ------------------
  |  Branch (680:13): [True: 0, False: 0]
  ------------------
  681|      0|            WriteBatch::Handler::OptionState::kEnabled) {
  682|      0|          s = Status::NotSupported(
  683|      0|              "WriteUnprepared txn tag when write_after_commit_ is enabled (in "
  684|      0|              "default WriteCommitted mode). If it is not due to corruption, "
  685|      0|              "the WAL must be emptied before changing the WritePolicy.");
  686|      0|        }
  687|      0|        if (handler->WriteBeforePrepare() ==
  ------------------
  |  Branch (687:13): [True: 0, False: 0]
  ------------------
  688|      0|            WriteBatch::Handler::OptionState::kDisabled) {
  689|      0|          s = Status::NotSupported(
  690|      0|              "WriteUnprepared txn tag when write_before_prepare_ is disabled "
  691|      0|              "(in WriteCommitted/WritePrepared mode). If it is not due to "
  692|      0|              "corruption, the WAL must be emptied before changing the "
  693|      0|              "WritePolicy.");
  694|      0|        }
  695|      0|        break;
  696|      0|      case kTypeEndPrepareXID:
  ------------------
  |  Branch (696:7): [True: 0, False: 4.08M]
  ------------------
  697|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  698|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_END_PREPARE));
  699|      0|        s = handler->MarkEndPrepare(xid);
  700|      0|        assert(s.ok());
  701|      0|        empty_batch = true;
  702|      0|        break;
  703|      0|      case kTypeCommitXID:
  ------------------
  |  Branch (703:7): [True: 0, False: 4.08M]
  ------------------
  704|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  705|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_COMMIT));
  706|      0|        s = handler->MarkCommit(xid);
  707|      0|        assert(s.ok());
  708|      0|        empty_batch = true;
  709|      0|        break;
  710|      0|      case kTypeCommitXIDAndTimestamp:
  ------------------
  |  Branch (710:7): [True: 0, False: 4.08M]
  ------------------
  711|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  712|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_COMMIT));
  713|       |        // key stores the commit timestamp.
  714|      0|        assert(!key.empty());
  715|      0|        s = handler->MarkCommitWithTimestamp(xid, key);
  716|      0|        if (LIKELY(s.ok())) {
  ------------------
  |  |   13|      0|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  717|      0|          empty_batch = true;
  718|      0|        }
  719|      0|        break;
  720|      0|      case kTypeRollbackXID:
  ------------------
  |  Branch (720:7): [True: 0, False: 4.08M]
  ------------------
  721|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  722|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_ROLLBACK));
  723|      0|        s = handler->MarkRollback(xid);
  724|      0|        assert(s.ok());
  725|      0|        empty_batch = true;
  726|      0|        break;
  727|      0|      case kTypeNoop:
  ------------------
  |  Branch (727:7): [True: 0, False: 4.08M]
  ------------------
  728|      0|        s = handler->MarkNoop(empty_batch);
  729|      0|        assert(s.ok());
  730|      0|        empty_batch = true;
  731|      0|        break;
  732|      0|      case kTypeWideColumnEntity:
  ------------------
  |  Branch (732:7): [True: 0, False: 4.08M]
  ------------------
  733|      0|      case kTypeColumnFamilyWideColumnEntity:
  ------------------
  |  Branch (733:7): [True: 0, False: 4.08M]
  ------------------
  734|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  735|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_PUT_ENTITY));
  736|      0|        s = handler->PutEntityCF(column_family, key, value);
  737|      0|        if (LIKELY(s.ok())) {
  ------------------
  |  |   13|      0|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  738|      0|          empty_batch = false;
  739|      0|          ++found;
  740|      0|        }
  741|      0|        break;
  742|      0|      case kTypeValuePreferredSeqno:
  ------------------
  |  Branch (742:7): [True: 0, False: 4.08M]
  ------------------
  743|      0|      case kTypeColumnFamilyValuePreferredSeqno:
  ------------------
  |  Branch (743:7): [True: 0, False: 4.08M]
  ------------------
  744|      0|        assert(wb->content_flags_.load(std::memory_order_relaxed) &
  745|      0|               (ContentFlags::DEFERRED | ContentFlags::HAS_TIMED_PUT));
  746|      0|        s = handler->TimedPutCF(column_family, key, value, write_unix_time);
  747|      0|        if (LIKELY(s.ok())) {
  ------------------
  |  |   13|      0|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  748|      0|          empty_batch = false;
  749|      0|          ++found;
  750|      0|        }
  751|      0|        break;
  752|      0|      default:
  ------------------
  |  Branch (752:7): [True: 0, False: 4.08M]
  ------------------
  753|      0|        return Status::Corruption("unknown WriteBatch tag");
  754|  4.08M|    }
  755|  4.08M|  }
  756|  4.08M|  if (!s.ok()) {
  ------------------
  |  Branch (756:7): [True: 0, False: 4.08M]
  ------------------
  757|      0|    return s;
  758|      0|  }
  759|  4.08M|  if (handler_continue && whole_batch &&
  ------------------
  |  Branch (759:7): [True: 4.08M, False: 0]
  |  Branch (759:27): [True: 4.08M, False: 0]
  ------------------
  760|  4.08M|      found != WriteBatchInternal::Count(wb)) {
  ------------------
  |  Branch (760:7): [True: 0, False: 4.08M]
  ------------------
  761|      0|    return Status::Corruption("WriteBatch has wrong count");
  762|  4.08M|  } else {
  763|  4.08M|    return Status::OK();
  764|  4.08M|  }
  765|  4.08M|}
_ZN7rocksdb18WriteBatchInternal23IsLatestPersistentStateEPKNS_10WriteBatchE:
  767|  1.36M|bool WriteBatchInternal::IsLatestPersistentState(const WriteBatch* b) {
  768|  1.36M|  return b->is_latest_persistent_state_;
  769|  1.36M|}
_ZN7rocksdb18WriteBatchInternal5CountEPKNS_10WriteBatchE:
  775|  9.53M|uint32_t WriteBatchInternal::Count(const WriteBatch* b) {
  776|  9.53M|  return DecodeFixed32(b->rep_.data() + 8);
  777|  9.53M|}
_ZN7rocksdb18WriteBatchInternal8SetCountEPNS_10WriteBatchEj:
  779|  1.36M|void WriteBatchInternal::SetCount(WriteBatch* b, uint32_t n) {
  780|  1.36M|  EncodeFixed32(&b->rep_[8], n);
  781|  1.36M|}
_ZN7rocksdb18WriteBatchInternal8SequenceEPKNS_10WriteBatchE:
  783|  2.72M|SequenceNumber WriteBatchInternal::Sequence(const WriteBatch* b) {
  784|  2.72M|  return SequenceNumber(DecodeFixed64(b->rep_.data()));
  785|  2.72M|}
_ZN7rocksdb18WriteBatchInternal11SetSequenceEPNS_10WriteBatchEm:
  787|  2.72M|void WriteBatchInternal::SetSequence(WriteBatch* b, SequenceNumber seq) {
  788|  2.72M|  EncodeFixed64(b->rep_.data(), seq);
  789|  2.72M|}
_ZN7rocksdb18WriteBatchInternal33GetColumnFamilyIdAndTimestampSizeEPNS_10WriteBatchEPNS_18ColumnFamilyHandleE:
  802|  1.36M|    WriteBatch* b, ColumnFamilyHandle* column_family) {
  803|  1.36M|  uint32_t cf_id = GetColumnFamilyID(column_family);
  804|  1.36M|  size_t ts_sz = 0;
  805|  1.36M|  Status s;
  806|  1.36M|  if (column_family) {
  ------------------
  |  Branch (806:7): [True: 1.36M, False: 0]
  ------------------
  807|  1.36M|    const Comparator* const ucmp = column_family->GetComparator();
  808|  1.36M|    if (ucmp) {
  ------------------
  |  Branch (808:9): [True: 1.36M, False: 0]
  ------------------
  809|  1.36M|      ts_sz = ucmp->timestamp_size();
  810|  1.36M|      if (0 == cf_id && b->default_cf_ts_sz_ != ts_sz) {
  ------------------
  |  Branch (810:11): [True: 1.36M, False: 0]
  |  Branch (810:25): [True: 0, False: 1.36M]
  ------------------
  811|      0|        s = Status::InvalidArgument("Default cf timestamp size mismatch");
  812|      0|      }
  813|  1.36M|    }
  814|  1.36M|  } else if (b->default_cf_ts_sz_ > 0) {
  ------------------
  |  Branch (814:14): [True: 0, False: 0]
  ------------------
  815|      0|    ts_sz = b->default_cf_ts_sz_;
  816|      0|  }
  817|  1.36M|  return std::make_tuple(s, cf_id, ts_sz);
  818|  1.36M|}
_ZN7rocksdb18WriteBatchInternal3PutEPNS_10WriteBatchEjRKNS_5SliceES5_:
  840|   660k|                               const Slice& key, const Slice& value) {
  841|   660k|  if (key.size() > size_t{std::numeric_limits<uint32_t>::max()}) {
  ------------------
  |  Branch (841:7): [True: 0, False: 660k]
  ------------------
  842|      0|    return Status::InvalidArgument("key is too large");
  843|      0|  }
  844|   660k|  if (value.size() > size_t{std::numeric_limits<uint32_t>::max()}) {
  ------------------
  |  Branch (844:7): [True: 0, False: 660k]
  ------------------
  845|      0|    return Status::InvalidArgument("value is too large");
  846|      0|  }
  847|       |
  848|   660k|  LocalSavePoint save(b);
  849|   660k|  WriteBatchInternal::SetCount(b, WriteBatchInternal::Count(b) + 1);
  850|   660k|  if (column_family_id == 0) {
  ------------------
  |  Branch (850:7): [True: 660k, False: 0]
  ------------------
  851|   660k|    b->rep_.push_back(static_cast<char>(kTypeValue));
  852|   660k|  } else {
  853|      0|    b->rep_.push_back(static_cast<char>(kTypeColumnFamilyValue));
  854|      0|    PutVarint32(&b->rep_, column_family_id);
  855|      0|  }
  856|   660k|  PutLengthPrefixedSlice(&b->rep_, key);
  857|   660k|  PutLengthPrefixedSlice(&b->rep_, value);
  858|   660k|  b->content_flags_.store(
  859|   660k|      b->content_flags_.load(std::memory_order_relaxed) | ContentFlags::HAS_PUT,
  860|   660k|      std::memory_order_relaxed);
  861|   660k|  if (b->prot_info_ != nullptr) {
  ------------------
  |  Branch (861:7): [True: 0, False: 660k]
  ------------------
  862|       |    // Technically the optype could've been `kTypeColumnFamilyValue` with the
  863|       |    // CF ID encoded in the `WriteBatch`. That distinction is unimportant
  864|       |    // however since we verify CF ID is correct, as well as all other fields
  865|       |    // (a missing/extra encoded CF ID would corrupt another field). It is
  866|       |    // convenient to consolidate on `kTypeValue` here as that is what will be
  867|       |    // inserted into memtable.
  868|      0|    b->prot_info_->entries_.emplace_back(ProtectionInfo64()
  869|      0|                                             .ProtectKVO(key, value, kTypeValue)
  870|      0|                                             .ProtectC(column_family_id));
  871|      0|  }
  872|   660k|  return save.commit();
  873|   660k|}
_ZN7rocksdb10WriteBatch3PutEPNS_18ColumnFamilyHandleERKNS_5SliceES5_:
  918|   660k|                       const Slice& value) {
  919|   660k|  size_t ts_sz = 0;
  920|   660k|  uint32_t cf_id = 0;
  921|   660k|  Status s;
  922|       |
  923|   660k|  std::tie(s, cf_id, ts_sz) =
  924|   660k|      WriteBatchInternal::GetColumnFamilyIdAndTimestampSize(this,
  925|   660k|                                                            column_family);
  926|       |
  927|   660k|  if (!s.ok()) {
  ------------------
  |  Branch (927:7): [True: 0, False: 660k]
  ------------------
  928|      0|    return s;
  929|      0|  }
  930|       |
  931|   660k|  if (0 == ts_sz) {
  ------------------
  |  Branch (931:7): [True: 660k, False: 0]
  ------------------
  932|   660k|    return WriteBatchInternal::Put(this, cf_id, key, value);
  933|   660k|  }
  934|       |
  935|      0|  needs_in_place_update_ts_ = true;
  936|      0|  has_key_with_ts_ = true;
  937|      0|  std::string dummy_ts(ts_sz, '\0');
  938|      0|  std::array<Slice, 2> key_with_ts{{key, dummy_ts}};
  939|      0|  return WriteBatchInternal::Put(this, cf_id, SliceParts(key_with_ts.data(), 2),
  940|      0|                                 SliceParts(&value, 1));
  941|   660k|}
_ZN7rocksdb18WriteBatchInternal6DeleteEPNS_10WriteBatchEjRKNS_5SliceE:
 1211|   186k|                                  const Slice& key) {
 1212|   186k|  LocalSavePoint save(b);
 1213|   186k|  WriteBatchInternal::SetCount(b, WriteBatchInternal::Count(b) + 1);
 1214|   186k|  if (column_family_id == 0) {
  ------------------
  |  Branch (1214:7): [True: 186k, False: 0]
  ------------------
 1215|   186k|    b->rep_.push_back(static_cast<char>(kTypeDeletion));
 1216|   186k|  } else {
 1217|      0|    b->rep_.push_back(static_cast<char>(kTypeColumnFamilyDeletion));
 1218|      0|    PutVarint32(&b->rep_, column_family_id);
 1219|      0|  }
 1220|   186k|  PutLengthPrefixedSlice(&b->rep_, key);
 1221|   186k|  b->content_flags_.store(b->content_flags_.load(std::memory_order_relaxed) |
 1222|   186k|                              ContentFlags::HAS_DELETE,
 1223|   186k|                          std::memory_order_relaxed);
 1224|   186k|  if (b->prot_info_ != nullptr) {
  ------------------
  |  Branch (1224:7): [True: 0, False: 186k]
  ------------------
 1225|       |    // See comment in first `WriteBatchInternal::Put()` overload concerning the
 1226|       |    // `ValueType` argument passed to `ProtectKVO()`.
 1227|      0|    b->prot_info_->entries_.emplace_back(
 1228|      0|        ProtectionInfo64()
 1229|      0|            .ProtectKVO(key, "" /* value */, kTypeDeletion)
 1230|      0|            .ProtectC(column_family_id));
 1231|      0|  }
 1232|   186k|  return save.commit();
 1233|   186k|}
_ZN7rocksdb10WriteBatch6DeleteEPNS_18ColumnFamilyHandleERKNS_5SliceE:
 1235|   186k|Status WriteBatch::Delete(ColumnFamilyHandle* column_family, const Slice& key) {
 1236|   186k|  size_t ts_sz = 0;
 1237|   186k|  uint32_t cf_id = 0;
 1238|   186k|  Status s;
 1239|       |
 1240|   186k|  std::tie(s, cf_id, ts_sz) =
 1241|   186k|      WriteBatchInternal::GetColumnFamilyIdAndTimestampSize(this,
 1242|   186k|                                                            column_family);
 1243|       |
 1244|   186k|  if (!s.ok()) {
  ------------------
  |  Branch (1244:7): [True: 0, False: 186k]
  ------------------
 1245|      0|    return s;
 1246|      0|  }
 1247|       |
 1248|   186k|  if (0 == ts_sz) {
  ------------------
  |  Branch (1248:7): [True: 186k, False: 0]
  ------------------
 1249|   186k|    return WriteBatchInternal::Delete(this, cf_id, key);
 1250|   186k|  }
 1251|       |
 1252|      0|  needs_in_place_update_ts_ = true;
 1253|      0|  has_key_with_ts_ = true;
 1254|      0|  std::string dummy_ts(ts_sz, '\0');
 1255|      0|  std::array<Slice, 2> key_with_ts{{key, dummy_ts}};
 1256|      0|  return WriteBatchInternal::Delete(this, cf_id,
 1257|      0|                                    SliceParts(key_with_ts.data(), 2));
 1258|   186k|}
_ZN7rocksdb18WriteBatchInternal11DeleteRangeEPNS_10WriteBatchEjRKNS_5SliceES5_:
 1442|   515k|                                       const Slice& end_key) {
 1443|   515k|  LocalSavePoint save(b);
 1444|   515k|  WriteBatchInternal::SetCount(b, WriteBatchInternal::Count(b) + 1);
 1445|   515k|  if (column_family_id == 0) {
  ------------------
  |  Branch (1445:7): [True: 515k, False: 0]
  ------------------
 1446|   515k|    b->rep_.push_back(static_cast<char>(kTypeRangeDeletion));
 1447|   515k|  } else {
 1448|      0|    b->rep_.push_back(static_cast<char>(kTypeColumnFamilyRangeDeletion));
 1449|      0|    PutVarint32(&b->rep_, column_family_id);
 1450|      0|  }
 1451|   515k|  PutLengthPrefixedSlice(&b->rep_, begin_key);
 1452|   515k|  PutLengthPrefixedSlice(&b->rep_, end_key);
 1453|   515k|  b->content_flags_.store(b->content_flags_.load(std::memory_order_relaxed) |
 1454|   515k|                              ContentFlags::HAS_DELETE_RANGE,
 1455|   515k|                          std::memory_order_relaxed);
 1456|   515k|  if (b->prot_info_ != nullptr) {
  ------------------
  |  Branch (1456:7): [True: 0, False: 515k]
  ------------------
 1457|       |    // See comment in first `WriteBatchInternal::Put()` overload concerning the
 1458|       |    // `ValueType` argument passed to `ProtectKVO()`.
 1459|       |    // In `DeleteRange()`, the end key is treated as the value.
 1460|      0|    b->prot_info_->entries_.emplace_back(
 1461|      0|        ProtectionInfo64()
 1462|      0|            .ProtectKVO(begin_key, end_key, kTypeRangeDeletion)
 1463|      0|            .ProtectC(column_family_id));
 1464|      0|  }
 1465|   515k|  return save.commit();
 1466|   515k|}
_ZN7rocksdb10WriteBatch11DeleteRangeEPNS_18ColumnFamilyHandleERKNS_5SliceES5_:
 1469|   515k|                               const Slice& begin_key, const Slice& end_key) {
 1470|   515k|  size_t ts_sz = 0;
 1471|   515k|  uint32_t cf_id = 0;
 1472|   515k|  Status s;
 1473|       |
 1474|   515k|  std::tie(s, cf_id, ts_sz) =
 1475|   515k|      WriteBatchInternal::GetColumnFamilyIdAndTimestampSize(this,
 1476|   515k|                                                            column_family);
 1477|       |
 1478|   515k|  if (!s.ok()) {
  ------------------
  |  Branch (1478:7): [True: 0, False: 515k]
  ------------------
 1479|      0|    return s;
 1480|      0|  }
 1481|       |
 1482|   515k|  if (0 == ts_sz) {
  ------------------
  |  Branch (1482:7): [True: 515k, False: 0]
  ------------------
 1483|   515k|    return WriteBatchInternal::DeleteRange(this, cf_id, begin_key, end_key);
 1484|   515k|  }
 1485|       |
 1486|      0|  needs_in_place_update_ts_ = true;
 1487|      0|  has_key_with_ts_ = true;
 1488|      0|  std::string dummy_ts(ts_sz, '\0');
 1489|      0|  std::array<Slice, 2> begin_key_with_ts{{begin_key, dummy_ts}};
 1490|      0|  std::array<Slice, 2> end_key_with_ts{{end_key, dummy_ts}};
 1491|      0|  return WriteBatchInternal::DeleteRange(
 1492|      0|      this, cf_id, SliceParts(begin_key_with_ts.data(), 2),
 1493|      0|      SliceParts(end_key_with_ts.data(), 2));
 1494|   515k|}
_ZNK7rocksdb10WriteBatch14VerifyChecksumEv:
 1784|  1.36M|Status WriteBatch::VerifyChecksum() const {
 1785|  1.36M|  if (prot_info_ == nullptr) {
  ------------------
  |  Branch (1785:7): [True: 1.36M, False: 0]
  ------------------
 1786|  1.36M|    return Status::OK();
 1787|  1.36M|  }
 1788|      0|  Slice input(rep_.data() + WriteBatchInternal::kHeader,
 1789|      0|              rep_.size() - WriteBatchInternal::kHeader);
 1790|      0|  Slice key, value, blob, xid;
 1791|      0|  char tag = 0;
 1792|      0|  uint32_t column_family = 0;  // default
 1793|      0|  Status s;
 1794|      0|  size_t prot_info_idx = 0;
 1795|      0|  bool checksum_protected = true;
 1796|      0|  while (!input.empty() && prot_info_idx < prot_info_->entries_.size()) {
  ------------------
  |  Branch (1796:10): [True: 0, False: 0]
  |  Branch (1796:28): [True: 0, False: 0]
  ------------------
 1797|       |    // In case key/value/column_family are not updated by
 1798|       |    // ReadRecordFromWriteBatch
 1799|      0|    key.clear();
 1800|      0|    value.clear();
 1801|      0|    column_family = 0;
 1802|      0|    s = ReadRecordFromWriteBatch(&input, &tag, &column_family, &key, &value,
 1803|      0|                                 &blob, &xid, /*write_unix_time=*/nullptr);
 1804|      0|    if (!s.ok()) {
  ------------------
  |  Branch (1804:9): [True: 0, False: 0]
  ------------------
 1805|      0|      return s;
 1806|      0|    }
 1807|      0|    checksum_protected = true;
 1808|       |    // Write batch checksum uses op_type without ColumnFamily (e.g., if op_type
 1809|       |    // in the write batch is kTypeColumnFamilyValue, kTypeValue is used to
 1810|       |    // compute the checksum), and encodes column family id separately. See
 1811|       |    // comment in first `WriteBatchInternal::Put()` for more detail.
 1812|      0|    switch (tag) {
 1813|      0|      case kTypeColumnFamilyValue:
  ------------------
  |  Branch (1813:7): [True: 0, False: 0]
  ------------------
 1814|      0|      case kTypeValue:
  ------------------
  |  Branch (1814:7): [True: 0, False: 0]
  ------------------
 1815|      0|        tag = kTypeValue;
 1816|      0|        break;
 1817|      0|      case kTypeColumnFamilyDeletion:
  ------------------
  |  Branch (1817:7): [True: 0, False: 0]
  ------------------
 1818|      0|      case kTypeDeletion:
  ------------------
  |  Branch (1818:7): [True: 0, False: 0]
  ------------------
 1819|      0|        tag = kTypeDeletion;
 1820|      0|        break;
 1821|      0|      case kTypeColumnFamilySingleDeletion:
  ------------------
  |  Branch (1821:7): [True: 0, False: 0]
  ------------------
 1822|      0|      case kTypeSingleDeletion:
  ------------------
  |  Branch (1822:7): [True: 0, False: 0]
  ------------------
 1823|      0|        tag = kTypeSingleDeletion;
 1824|      0|        break;
 1825|      0|      case kTypeColumnFamilyRangeDeletion:
  ------------------
  |  Branch (1825:7): [True: 0, False: 0]
  ------------------
 1826|      0|      case kTypeRangeDeletion:
  ------------------
  |  Branch (1826:7): [True: 0, False: 0]
  ------------------
 1827|      0|        tag = kTypeRangeDeletion;
 1828|      0|        break;
 1829|      0|      case kTypeColumnFamilyMerge:
  ------------------
  |  Branch (1829:7): [True: 0, False: 0]
  ------------------
 1830|      0|      case kTypeMerge:
  ------------------
  |  Branch (1830:7): [True: 0, False: 0]
  ------------------
 1831|      0|        tag = kTypeMerge;
 1832|      0|        break;
 1833|      0|      case kTypeColumnFamilyBlobIndex:
  ------------------
  |  Branch (1833:7): [True: 0, False: 0]
  ------------------
 1834|      0|      case kTypeBlobIndex:
  ------------------
  |  Branch (1834:7): [True: 0, False: 0]
  ------------------
 1835|      0|        tag = kTypeBlobIndex;
 1836|      0|        break;
 1837|      0|      case kTypeLogData:
  ------------------
  |  Branch (1837:7): [True: 0, False: 0]
  ------------------
 1838|      0|      case kTypeBeginPrepareXID:
  ------------------
  |  Branch (1838:7): [True: 0, False: 0]
  ------------------
 1839|      0|      case kTypeEndPrepareXID:
  ------------------
  |  Branch (1839:7): [True: 0, False: 0]
  ------------------
 1840|      0|      case kTypeCommitXID:
  ------------------
  |  Branch (1840:7): [True: 0, False: 0]
  ------------------
 1841|      0|      case kTypeRollbackXID:
  ------------------
  |  Branch (1841:7): [True: 0, False: 0]
  ------------------
 1842|      0|      case kTypeNoop:
  ------------------
  |  Branch (1842:7): [True: 0, False: 0]
  ------------------
 1843|      0|      case kTypeBeginPersistedPrepareXID:
  ------------------
  |  Branch (1843:7): [True: 0, False: 0]
  ------------------
 1844|      0|      case kTypeBeginUnprepareXID:
  ------------------
  |  Branch (1844:7): [True: 0, False: 0]
  ------------------
 1845|      0|      case kTypeDeletionWithTimestamp:
  ------------------
  |  Branch (1845:7): [True: 0, False: 0]
  ------------------
 1846|      0|      case kTypeCommitXIDAndTimestamp:
  ------------------
  |  Branch (1846:7): [True: 0, False: 0]
  ------------------
 1847|      0|        checksum_protected = false;
 1848|      0|        break;
 1849|      0|      case kTypeColumnFamilyWideColumnEntity:
  ------------------
  |  Branch (1849:7): [True: 0, False: 0]
  ------------------
 1850|      0|      case kTypeWideColumnEntity:
  ------------------
  |  Branch (1850:7): [True: 0, False: 0]
  ------------------
 1851|      0|        tag = kTypeWideColumnEntity;
 1852|      0|        break;
 1853|      0|      case kTypeColumnFamilyValuePreferredSeqno:
  ------------------
  |  Branch (1853:7): [True: 0, False: 0]
  ------------------
 1854|      0|      case kTypeValuePreferredSeqno:
  ------------------
  |  Branch (1854:7): [True: 0, False: 0]
  ------------------
 1855|      0|        tag = kTypeValuePreferredSeqno;
 1856|      0|        break;
 1857|      0|      default:
  ------------------
  |  Branch (1857:7): [True: 0, False: 0]
  ------------------
 1858|      0|        return Status::Corruption(
 1859|      0|            "unknown WriteBatch tag",
 1860|      0|            std::to_string(static_cast<unsigned int>(tag)));
 1861|      0|    }
 1862|      0|    if (checksum_protected) {
  ------------------
  |  Branch (1862:9): [True: 0, False: 0]
  ------------------
 1863|      0|      s = prot_info_->entries_[prot_info_idx++]
 1864|      0|              .StripC(column_family)
 1865|      0|              .StripKVO(key, value, static_cast<ValueType>(tag))
 1866|      0|              .GetStatus();
 1867|      0|      if (!s.ok()) {
  ------------------
  |  Branch (1867:11): [True: 0, False: 0]
  ------------------
 1868|      0|        return s;
 1869|      0|      }
 1870|      0|    }
 1871|      0|  }
 1872|       |
 1873|      0|  if (prot_info_idx != WriteBatchInternal::Count(this)) {
  ------------------
  |  Branch (1873:7): [True: 0, False: 0]
  ------------------
 1874|      0|    return Status::Corruption("WriteBatch has wrong count");
 1875|      0|  }
 1876|      0|  assert(WriteBatchInternal::Count(this) == prot_info_->entries_.size());
 1877|      0|  return Status::OK();
 1878|      0|}
_ZN7rocksdb18WriteBatchInternal10InsertIntoERNS_11WriteThread10WriteGroupEmPNS_21ColumnFamilyMemTablesEPNS_14FlushSchedulerEPNS_20TrimHistorySchedulerEbmPNS_2DBEbbb:
 3113|  1.36M|    bool concurrent_memtable_writes, bool seq_per_batch, bool batch_per_txn) {
 3114|  1.36M|  MemTableInserter inserter(
 3115|  1.36M|      sequence, memtables, flush_scheduler, trim_history_scheduler,
 3116|  1.36M|      ignore_missing_column_families, recovery_log_number, db,
 3117|  1.36M|      concurrent_memtable_writes, nullptr /* prot_info */,
 3118|  1.36M|      nullptr /*has_valid_writes*/, seq_per_batch, batch_per_txn);
 3119|  1.36M|  for (auto w : write_group) {
  ------------------
  |  Branch (3119:15): [True: 1.36M, False: 1.36M]
  ------------------
 3120|  1.36M|    if (w->CallbackFailed()) {
  ------------------
  |  Branch (3120:9): [True: 0, False: 1.36M]
  ------------------
 3121|      0|      continue;
 3122|      0|    }
 3123|  1.36M|    w->sequence = inserter.sequence();
 3124|  1.36M|    if (!w->ShouldWriteToMemtable()) {
  ------------------
  |  Branch (3124:9): [True: 0, False: 1.36M]
  ------------------
 3125|       |      // In seq_per_batch_ mode this advances the seq by one.
 3126|      0|      inserter.MaybeAdvanceSeq(true);
 3127|      0|      continue;
 3128|      0|    }
 3129|  1.36M|    SetSequence(w->batch, inserter.sequence());
 3130|  1.36M|    inserter.set_log_number_ref(w->log_ref);
 3131|  1.36M|    inserter.set_prot_info(w->batch->prot_info_.get());
 3132|  1.36M|    w->status = w->batch->Iterate(&inserter);
 3133|  1.36M|    if (!w->status.ok()) {
  ------------------
  |  Branch (3133:9): [True: 0, False: 1.36M]
  ------------------
 3134|      0|      return w->status;
 3135|      0|    }
 3136|  1.36M|    assert(!seq_per_batch || w->batch_cnt != 0);
 3137|  1.36M|    assert(!seq_per_batch || inserter.sequence() - w->sequence == w->batch_cnt);
 3138|  1.36M|  }
 3139|  1.36M|  return Status::OK();
 3140|  1.36M|}
_ZN7rocksdb18WriteBatchInternal10InsertIntoEPKNS_10WriteBatchEPNS_21ColumnFamilyMemTablesEPNS_14FlushSchedulerEPNS_20TrimHistorySchedulerEbmPNS_2DBEbPmPbbb:
 3177|  1.36M|    bool* has_valid_writes, bool seq_per_batch, bool batch_per_txn) {
 3178|  1.36M|  MemTableInserter inserter(Sequence(batch), memtables, flush_scheduler,
 3179|  1.36M|                            trim_history_scheduler,
 3180|  1.36M|                            ignore_missing_column_families, log_number, db,
 3181|  1.36M|                            concurrent_memtable_writes, batch->prot_info_.get(),
 3182|  1.36M|                            has_valid_writes, seq_per_batch, batch_per_txn);
 3183|  1.36M|  Status s = batch->Iterate(&inserter);
 3184|  1.36M|  if (next_seq != nullptr) {
  ------------------
  |  Branch (3184:7): [True: 1.36M, False: 0]
  ------------------
 3185|  1.36M|    *next_seq = inserter.sequence();
 3186|  1.36M|  }
 3187|  1.36M|  if (concurrent_memtable_writes) {
  ------------------
  |  Branch (3187:7): [True: 0, False: 1.36M]
  ------------------
 3188|      0|    inserter.PostProcess();
 3189|      0|  }
 3190|  1.36M|  return s;
 3191|  1.36M|}
_ZN7rocksdb18WriteBatchInternal11SetContentsEPNS_10WriteBatchERKNS_5SliceE:
 3294|  1.36M|Status WriteBatchInternal::SetContents(WriteBatch* b, const Slice& contents) {
 3295|  1.36M|  assert(contents.size() >= WriteBatchInternal::kHeader);
 3296|  1.36M|  assert(b->prot_info_ == nullptr);
 3297|       |
 3298|  1.36M|  b->rep_.assign(contents.data(), contents.size());
 3299|  1.36M|  b->content_flags_.store(ContentFlags::DEFERRED, std::memory_order_relaxed);
 3300|  1.36M|  return Status::OK();
 3301|  1.36M|}
_ZN7rocksdb18WriteBatchInternal16AppendedByteSizeEmm:
 3354|  1.36M|                                            size_t rightByteSize) {
 3355|  1.36M|  if (leftByteSize == 0 || rightByteSize == 0) {
  ------------------
  |  Branch (3355:7): [True: 1.36M, False: 0]
  |  Branch (3355:28): [True: 0, False: 0]
  ------------------
 3356|  1.36M|    return leftByteSize + rightByteSize;
 3357|  1.36M|  } else {
 3358|      0|    return leftByteSize + rightByteSize - WriteBatchInternal::kHeader;
 3359|      0|  }
 3360|  1.36M|}
_ZN7rocksdb18WriteBatchInternal20UpdateProtectionInfoEPNS_10WriteBatchEmPm:
 3364|  1.36M|                                                uint64_t* checksum) {
 3365|  1.36M|  if (bytes_per_key == 0) {
  ------------------
  |  Branch (3365:7): [True: 0, False: 1.36M]
  ------------------
 3366|      0|    if (wb->prot_info_ != nullptr) {
  ------------------
  |  Branch (3366:9): [True: 0, False: 0]
  ------------------
 3367|      0|      wb->prot_info_.reset();
 3368|      0|      return Status::OK();
 3369|      0|    } else {
 3370|       |      // Already not protected.
 3371|      0|      return Status::OK();
 3372|      0|    }
 3373|  1.36M|  } else if (bytes_per_key == 8) {
  ------------------
  |  Branch (3373:14): [True: 1.36M, False: 0]
  ------------------
 3374|  1.36M|    if (wb->prot_info_ == nullptr) {
  ------------------
  |  Branch (3374:9): [True: 1.36M, False: 0]
  ------------------
 3375|  1.36M|      wb->prot_info_.reset(new WriteBatch::ProtectionInfo());
 3376|  1.36M|      ProtectionInfoUpdater prot_info_updater(wb->prot_info_.get());
 3377|  1.36M|      Status s = wb->Iterate(&prot_info_updater);
 3378|  1.36M|      if (s.ok() && checksum != nullptr) {
  ------------------
  |  Branch (3378:11): [True: 1.36M, False: 0]
  |  Branch (3378:21): [True: 1.36M, False: 0]
  ------------------
 3379|  1.36M|        uint64_t expected_hash = XXH3_64bits(wb->rep_.data(), wb->rep_.size());
  ------------------
  |  |  410|  1.36M|#  define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits)
  |  |  ------------------
  |  |  |  |  387|  1.36M|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  1.36M|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3380|  1.36M|        if (expected_hash != *checksum) {
  ------------------
  |  Branch (3380:13): [True: 0, False: 1.36M]
  ------------------
 3381|      0|          return Status::Corruption("Write batch content corrupted.");
 3382|      0|        }
 3383|  1.36M|      }
 3384|  1.36M|      return s;
 3385|  1.36M|    } else {
 3386|       |      // Already protected.
 3387|      0|      return Status::OK();
 3388|      0|    }
 3389|  1.36M|  }
 3390|      0|  return Status::NotSupported(
 3391|      0|      "WriteBatch protection info must be zero or eight bytes/key");
 3392|  1.36M|}
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserterC2EmPNS_21ColumnFamilyMemTablesEPNS_14FlushSchedulerEPNS_20TrimHistorySchedulerEbmPNS_2DBEbPKNS_10WriteBatch14ProtectionInfoEPbbbb:
 2027|  2.72M|        hint_created_(false) {
 2028|  2.72M|    assert(cf_mems_);
 2029|  2.72M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter5PutCFEjRKNS_5SliceES4_:
 2276|  1.32M|               const Slice& value) override {
 2277|  1.32M|    const auto* kv_prot_info = NextProtectionInfo();
 2278|  1.32M|    Status ret_status;
 2279|       |
 2280|  1.32M|    auto rebuild_txn_op = [](WriteBatch* rebuilding_trx, uint32_t cf_id,
 2281|  1.32M|                             const Slice& k, const Slice& v) -> Status {
 2282|  1.32M|      return WriteBatchInternal::Put(rebuilding_trx, cf_id, k, v);
 2283|  1.32M|    };
 2284|       |
 2285|  1.32M|    if (kv_prot_info != nullptr) {
  ------------------
  |  Branch (2285:9): [True: 660k, False: 660k]
  ------------------
 2286|       |      // Memtable needs seqno, doesn't need CF ID
 2287|   660k|      auto mem_kv_prot_info =
 2288|   660k|          kv_prot_info->StripC(column_family_id).ProtectS(sequence_);
 2289|   660k|      ret_status = PutCFImpl(column_family_id, key, value, kTypeValue,
 2290|   660k|                             rebuild_txn_op, &mem_kv_prot_info);
 2291|   660k|    } else {
 2292|   660k|      ret_status = PutCFImpl(column_family_id, key, value, kTypeValue,
 2293|   660k|                             rebuild_txn_op, nullptr /* kv_prot_info */);
 2294|   660k|    }
 2295|       |    // TODO: this assumes that if TryAgain status is returned to the caller,
 2296|       |    // the operation is actually tried again. The proper way to do this is to
 2297|       |    // pass a `try_again` parameter to the operation itself and decrement
 2298|       |    // prot_info_idx_ based on that
 2299|  1.32M|    if (UNLIKELY(ret_status.IsTryAgain())) {
  ------------------
  |  |   14|  1.32M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.32M]
  |  |  ------------------
  ------------------
 2300|      0|      DecrementProtectionInfoIdxForTryAgain();
 2301|      0|    }
 2302|  1.32M|    return ret_status;
 2303|  1.32M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter18NextProtectionInfoEv:
 1958|  2.72M|  const ProtectionInfoKVOC64* NextProtectionInfo() {
 1959|  2.72M|    const ProtectionInfoKVOC64* res = nullptr;
 1960|  2.72M|    if (prot_info_ != nullptr) {
  ------------------
  |  Branch (1960:9): [True: 1.36M, False: 1.36M]
  ------------------
 1961|  1.36M|      assert(prot_info_idx_ < prot_info_->entries_.size());
 1962|  1.36M|      res = &prot_info_->entries_[prot_info_idx_];
 1963|  1.36M|      ++prot_info_idx_;
 1964|  1.36M|    }
 1965|  2.72M|    return res;
 1966|  2.72M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter9PutCFImplIZNS1_5PutCFEjRKNS_5SliceES5_EUlPNS_10WriteBatchEjS5_S5_E_EENS_6StatusEjS5_S5_NS_9ValueTypeET_PKNS_18ProtectionInfoKVOSImEE:
 2129|  1.32M|                   const ProtectionInfoKVOS64* kv_prot_info) {
 2130|       |    // optimize for non-recovery mode
 2131|  1.32M|    if (UNLIKELY(write_after_commit_ && rebuilding_trx_ != nullptr)) {
  ------------------
  |  |   14|  2.64M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.32M]
  |  |  |  Branch (14:40): [True: 1.32M, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 1.32M]
  |  |  ------------------
  ------------------
 2132|       |      // TODO(ajkr): propagate `ProtectionInfoKVOS64`.
 2133|      0|      return rebuild_txn_op(rebuilding_trx_, column_family_id, key, value);
 2134|       |      // else insert the values to the memtable right away
 2135|      0|    }
 2136|       |
 2137|  1.32M|    Status ret_status;
 2138|  1.32M|    if (UNLIKELY(!SeekToColumnFamily(column_family_id, &ret_status))) {
  ------------------
  |  |   14|  1.32M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.32M]
  |  |  ------------------
  ------------------
 2139|      0|      if (ret_status.ok() && rebuilding_trx_ != nullptr) {
  ------------------
  |  Branch (2139:11): [True: 0, False: 0]
  |  Branch (2139:30): [True: 0, False: 0]
  ------------------
 2140|      0|        assert(!write_after_commit_);
 2141|       |        // The CF is probably flushed and hence no need for insert but we still
 2142|       |        // need to keep track of the keys for upcoming rollback/commit.
 2143|       |        // TODO(ajkr): propagate `ProtectionInfoKVOS64`.
 2144|      0|        ret_status =
 2145|      0|            rebuild_txn_op(rebuilding_trx_, column_family_id, key, value);
 2146|      0|        if (ret_status.ok()) {
  ------------------
  |  Branch (2146:13): [True: 0, False: 0]
  ------------------
 2147|      0|          MaybeAdvanceSeq(IsDuplicateKeySeq(column_family_id, key));
 2148|      0|        }
 2149|      0|      } else if (ret_status.ok()) {
  ------------------
  |  Branch (2149:18): [True: 0, False: 0]
  ------------------
 2150|      0|        MaybeAdvanceSeq(false /* batch_boundary */);
 2151|      0|      }
 2152|      0|      return ret_status;
 2153|      0|    }
 2154|  1.32M|    assert(ret_status.ok());
 2155|       |
 2156|  1.32M|    MemTable* mem = cf_mems_->GetMemTable();
 2157|  1.32M|    auto* moptions = mem->GetImmutableMemTableOptions();
 2158|       |    // inplace_update_support is inconsistent with snapshots, and therefore with
 2159|       |    // any kind of transactions including the ones that use seq_per_batch
 2160|  1.32M|    assert(!seq_per_batch_ || !moptions->inplace_update_support);
 2161|  1.32M|    if (!moptions->inplace_update_support) {
  ------------------
  |  Branch (2161:9): [True: 1.32M, False: 0]
  ------------------
 2162|  1.32M|      ret_status =
 2163|  1.32M|          mem->Add(sequence_, value_type, key, value, kv_prot_info,
 2164|  1.32M|                   concurrent_memtable_writes_, get_post_process_info(mem),
 2165|  1.32M|                   hint_per_batch_ ? &GetHintMap()[mem] : nullptr);
  ------------------
  |  Branch (2165:20): [True: 0, False: 1.32M]
  ------------------
 2166|  1.32M|    } else if (moptions->inplace_callback == nullptr ||
  ------------------
  |  Branch (2166:16): [True: 0, False: 0]
  ------------------
 2167|      0|               value_type != kTypeValue) {
  ------------------
  |  Branch (2167:16): [True: 0, False: 0]
  ------------------
 2168|      0|      assert(!concurrent_memtable_writes_);
 2169|      0|      ret_status = mem->Update(sequence_, value_type, key, value, kv_prot_info);
 2170|      0|    } else {
 2171|      0|      assert(!concurrent_memtable_writes_);
 2172|      0|      assert(value_type == kTypeValue);
 2173|      0|      ret_status = mem->UpdateCallback(sequence_, key, value, kv_prot_info);
 2174|      0|      if (ret_status.IsNotFound()) {
  ------------------
  |  Branch (2174:11): [True: 0, False: 0]
  ------------------
 2175|       |        // key not found in memtable. Do sst get, update, add
 2176|      0|        SnapshotImpl read_from_snapshot;
 2177|      0|        read_from_snapshot.number_ = sequence_;
 2178|       |        // TODO: plumb Env::IOActivity, Env::IOPriority
 2179|      0|        ReadOptions ropts;
 2180|       |        // it's going to be overwritten for sure, so no point caching data block
 2181|       |        // containing the old version
 2182|      0|        ropts.fill_cache = false;
 2183|      0|        ropts.snapshot = &read_from_snapshot;
 2184|       |
 2185|      0|        std::string prev_value;
 2186|      0|        std::string merged_value;
 2187|       |
 2188|      0|        auto cf_handle = cf_mems_->GetColumnFamilyHandle();
 2189|      0|        Status get_status = Status::NotSupported();
 2190|      0|        if (db_ != nullptr && recovering_log_number_ == 0) {
  ------------------
  |  Branch (2190:13): [True: 0, False: 0]
  |  Branch (2190:31): [True: 0, False: 0]
  ------------------
 2191|      0|          if (cf_handle == nullptr) {
  ------------------
  |  Branch (2191:15): [True: 0, False: 0]
  ------------------
 2192|      0|            cf_handle = db_->DefaultColumnFamily();
 2193|      0|          }
 2194|       |          // TODO (yanqin): fix when user-defined timestamp is enabled.
 2195|      0|          get_status = db_->Get(ropts, cf_handle, key, &prev_value);
 2196|      0|        }
 2197|       |        // Intentionally overwrites the `NotFound` in `ret_status`.
 2198|      0|        if (!get_status.ok() && !get_status.IsNotFound()) {
  ------------------
  |  Branch (2198:13): [True: 0, False: 0]
  |  Branch (2198:33): [True: 0, False: 0]
  ------------------
 2199|      0|          ret_status = get_status;
 2200|      0|        } else {
 2201|      0|          ret_status = Status::OK();
 2202|      0|        }
 2203|      0|        if (ret_status.ok()) {
  ------------------
  |  Branch (2203:13): [True: 0, False: 0]
  ------------------
 2204|      0|          UpdateStatus update_status;
 2205|      0|          char* prev_buffer = const_cast<char*>(prev_value.c_str());
 2206|      0|          uint32_t prev_size = static_cast<uint32_t>(prev_value.size());
 2207|      0|          if (get_status.ok()) {
  ------------------
  |  Branch (2207:15): [True: 0, False: 0]
  ------------------
 2208|      0|            update_status = moptions->inplace_callback(prev_buffer, &prev_size,
 2209|      0|                                                       value, &merged_value);
 2210|      0|          } else {
 2211|      0|            update_status = moptions->inplace_callback(
 2212|      0|                nullptr /* existing_value */, nullptr /* existing_value_size */,
 2213|      0|                value, &merged_value);
 2214|      0|          }
 2215|      0|          if (update_status == UpdateStatus::UPDATED_INPLACE) {
  ------------------
  |  Branch (2215:15): [True: 0, False: 0]
  ------------------
 2216|      0|            assert(get_status.ok());
 2217|      0|            if (kv_prot_info != nullptr) {
  ------------------
  |  Branch (2217:17): [True: 0, False: 0]
  ------------------
 2218|      0|              ProtectionInfoKVOS64 updated_kv_prot_info(*kv_prot_info);
 2219|      0|              updated_kv_prot_info.UpdateV(value,
 2220|      0|                                           Slice(prev_buffer, prev_size));
 2221|       |              // prev_value is updated in-place with final value.
 2222|      0|              ret_status = mem->Add(sequence_, value_type, key,
 2223|      0|                                    Slice(prev_buffer, prev_size),
 2224|      0|                                    &updated_kv_prot_info);
 2225|      0|            } else {
 2226|      0|              ret_status = mem->Add(sequence_, value_type, key,
 2227|      0|                                    Slice(prev_buffer, prev_size),
 2228|      0|                                    nullptr /* kv_prot_info */);
 2229|      0|            }
 2230|      0|            if (ret_status.ok()) {
  ------------------
  |  Branch (2230:17): [True: 0, False: 0]
  ------------------
 2231|      0|              RecordTick(moptions->statistics, NUMBER_KEYS_WRITTEN);
 2232|      0|            }
 2233|      0|          } else if (update_status == UpdateStatus::UPDATED) {
  ------------------
  |  Branch (2233:22): [True: 0, False: 0]
  ------------------
 2234|      0|            if (kv_prot_info != nullptr) {
  ------------------
  |  Branch (2234:17): [True: 0, False: 0]
  ------------------
 2235|      0|              ProtectionInfoKVOS64 updated_kv_prot_info(*kv_prot_info);
 2236|      0|              updated_kv_prot_info.UpdateV(value, merged_value);
 2237|       |              // merged_value contains the final value.
 2238|      0|              ret_status = mem->Add(sequence_, value_type, key,
 2239|      0|                                    Slice(merged_value), &updated_kv_prot_info);
 2240|      0|            } else {
 2241|       |              // merged_value contains the final value.
 2242|      0|              ret_status =
 2243|      0|                  mem->Add(sequence_, value_type, key, Slice(merged_value),
 2244|      0|                           nullptr /* kv_prot_info */);
 2245|      0|            }
 2246|      0|            if (ret_status.ok()) {
  ------------------
  |  Branch (2246:17): [True: 0, False: 0]
  ------------------
 2247|      0|              RecordTick(moptions->statistics, NUMBER_KEYS_WRITTEN);
 2248|      0|            }
 2249|      0|          }
 2250|      0|        }
 2251|      0|      }
 2252|      0|    }
 2253|  1.32M|    if (UNLIKELY(ret_status.IsTryAgain())) {
  ------------------
  |  |   14|  1.32M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.32M]
  |  |  ------------------
  ------------------
 2254|      0|      assert(seq_per_batch_);
 2255|      0|      const bool kBatchBoundary = true;
 2256|      0|      MaybeAdvanceSeq(kBatchBoundary);
 2257|  1.32M|    } else if (ret_status.ok()) {
  ------------------
  |  Branch (2257:16): [True: 1.32M, False: 0]
  ------------------
 2258|  1.32M|      MaybeAdvanceSeq();
 2259|  1.32M|      CheckMemtableFull();
 2260|  1.32M|    }
 2261|       |    // optimize for non-recovery mode
 2262|       |    // If `ret_status` is `TryAgain` then the next (successful) try will add
 2263|       |    // the key to the rebuilding transaction object. If `ret_status` is
 2264|       |    // another non-OK `Status`, then the `rebuilding_trx_` will be thrown
 2265|       |    // away. So we only need to add to it when `ret_status.ok()`.
 2266|  1.32M|    if (UNLIKELY(ret_status.ok() && rebuilding_trx_ != nullptr)) {
  ------------------
  |  |   14|  2.64M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.32M]
  |  |  |  Branch (14:40): [True: 1.32M, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 1.32M]
  |  |  ------------------
  ------------------
 2267|      0|      assert(!write_after_commit_);
 2268|       |      // TODO(ajkr): propagate `ProtectionInfoKVOS64`.
 2269|      0|      ret_status =
 2270|      0|          rebuild_txn_op(rebuilding_trx_, column_family_id, key, value);
 2271|      0|    }
 2272|  1.32M|    return ret_status;
 2273|  1.32M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter18SeekToColumnFamilyEjPNS_6StatusE:
 2086|  2.72M|  bool SeekToColumnFamily(uint32_t column_family_id, Status* s) {
 2087|       |    // If we are in a concurrent mode, it is the caller's responsibility
 2088|       |    // to clone the original ColumnFamilyMemTables so that each thread
 2089|       |    // has its own instance.  Otherwise, it must be guaranteed that there
 2090|       |    // is no concurrent access
 2091|  2.72M|    bool found = cf_mems_->Seek(column_family_id);
 2092|  2.72M|    if (!found) {
  ------------------
  |  Branch (2092:9): [True: 0, False: 2.72M]
  ------------------
 2093|      0|      if (ignore_missing_column_families_) {
  ------------------
  |  Branch (2093:11): [True: 0, False: 0]
  ------------------
 2094|      0|        *s = Status::OK();
 2095|      0|      } else {
 2096|      0|        *s = Status::InvalidArgument(
 2097|      0|            "Invalid column family specified in write batch");
 2098|      0|      }
 2099|      0|      return false;
 2100|      0|    }
 2101|  2.72M|    if (recovering_log_number_ != 0 &&
  ------------------
  |  Branch (2101:9): [True: 1.36M, False: 1.36M]
  ------------------
 2102|  2.72M|        recovering_log_number_ < cf_mems_->GetLogNumber()) {
  ------------------
  |  Branch (2102:9): [True: 0, False: 1.36M]
  ------------------
 2103|       |      // This is true only in recovery environment (recovering_log_number_ is
 2104|       |      // always 0 in
 2105|       |      // non-recovery, regular write code-path)
 2106|       |      // * If recovering_log_number_ < cf_mems_->GetLogNumber(), this means that
 2107|       |      // column family already contains updates from this log. We can't apply
 2108|       |      // updates twice because of update-in-place or merge workloads -- ignore
 2109|       |      // the update
 2110|      0|      *s = Status::OK();
 2111|      0|      return false;
 2112|      0|    }
 2113|       |
 2114|  2.72M|    if (has_valid_writes_ != nullptr) {
  ------------------
  |  Branch (2114:9): [True: 1.36M, False: 1.36M]
  ------------------
 2115|  1.36M|      *has_valid_writes_ = true;
 2116|  1.36M|    }
 2117|       |
 2118|  2.72M|    if (log_number_ref_ > 0) {
  ------------------
  |  Branch (2118:9): [True: 0, False: 2.72M]
  ------------------
 2119|      0|      cf_mems_->GetMemTable()->RefLogContainingPrepSection(log_number_ref_);
 2120|      0|    }
 2121|       |
 2122|  2.72M|    return true;
 2123|  2.72M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter21get_post_process_infoEPNS_8MemTableE:
 3092|  2.53M|  MemTablePostProcessInfo* get_post_process_info(MemTable* mem) {
 3093|  2.53M|    if (!concurrent_memtable_writes_) {
  ------------------
  |  Branch (3093:9): [True: 2.53M, False: 0]
  ------------------
 3094|       |      // No need to batch counters locally if we don't use concurrent mode.
 3095|  2.53M|      return nullptr;
 3096|  2.53M|    }
 3097|      0|    return &GetPostMap()[mem];
 3098|  2.53M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter17CheckMemtableFullEv:
 2829|  2.53M|  void CheckMemtableFull() {
 2830|  2.53M|    if (flush_scheduler_ != nullptr) {
  ------------------
  |  Branch (2830:9): [True: 2.53M, False: 0]
  ------------------
 2831|  2.53M|      auto* cfd = cf_mems_->current();
 2832|  2.53M|      assert(cfd != nullptr);
 2833|  2.53M|      if (cfd->mem()->ShouldScheduleFlush() &&
  ------------------
  |  Branch (2833:11): [True: 0, False: 2.53M]
  ------------------
 2834|  2.53M|          cfd->mem()->MarkFlushScheduled()) {
  ------------------
  |  Branch (2834:11): [True: 0, False: 0]
  ------------------
 2835|       |        // MarkFlushScheduled only returns true if we are the one that
 2836|       |        // should take action, so no need to dedup further
 2837|      0|        flush_scheduler_->ScheduleWork(cfd);
 2838|      0|      }
 2839|  2.53M|    }
 2840|       |    // check if memtable_list size exceeds max_write_buffer_size_to_maintain
 2841|  2.53M|    if (trim_history_scheduler_ != nullptr) {
  ------------------
  |  Branch (2841:9): [True: 2.53M, False: 0]
  ------------------
 2842|  2.53M|      auto* cfd = cf_mems_->current();
 2843|       |
 2844|  2.53M|      assert(cfd);
 2845|  2.53M|      assert(cfd->ioptions());
 2846|       |
 2847|  2.53M|      const size_t size_to_maintain = static_cast<size_t>(
 2848|  2.53M|          cfd->ioptions()->max_write_buffer_size_to_maintain);
 2849|       |
 2850|  2.53M|      if (size_to_maintain > 0) {
  ------------------
  |  Branch (2850:11): [True: 0, False: 2.53M]
  ------------------
 2851|      0|        MemTableList* const imm = cfd->imm();
 2852|      0|        assert(imm);
 2853|       |
 2854|      0|        if (imm->HasHistory()) {
  ------------------
  |  Branch (2854:13): [True: 0, False: 0]
  ------------------
 2855|      0|          const MemTable* const mem = cfd->mem();
 2856|      0|          assert(mem);
 2857|       |
 2858|      0|          if (mem->MemoryAllocatedBytes() +
  ------------------
  |  Branch (2858:15): [True: 0, False: 0]
  ------------------
 2859|      0|                      imm->MemoryAllocatedBytesExcludingLast() >=
 2860|      0|                  size_to_maintain &&
 2861|      0|              imm->MarkTrimHistoryNeeded()) {
  ------------------
  |  Branch (2861:15): [True: 0, False: 0]
  ------------------
 2862|      0|            trim_history_scheduler_->ScheduleWork(cfd);
 2863|      0|          }
 2864|      0|        }
 2865|      0|      }
 2866|  2.53M|    }
 2867|  2.53M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter8DeleteCFEjRKNS_5SliceE:
 2397|   372k|  Status DeleteCF(uint32_t column_family_id, const Slice& key) override {
 2398|   372k|    const auto* kv_prot_info = NextProtectionInfo();
 2399|       |    // optimize for non-recovery mode
 2400|   372k|    if (UNLIKELY(write_after_commit_ && rebuilding_trx_ != nullptr)) {
  ------------------
  |  |   14|   744k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 372k]
  |  |  |  Branch (14:40): [True: 372k, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 372k]
  |  |  ------------------
  ------------------
 2401|       |      // TODO(ajkr): propagate `ProtectionInfoKVOS64`.
 2402|      0|      return WriteBatchInternal::Delete(rebuilding_trx_, column_family_id, key);
 2403|       |      // else insert the values to the memtable right away
 2404|      0|    }
 2405|       |
 2406|   372k|    Status ret_status;
 2407|   372k|    if (UNLIKELY(!SeekToColumnFamily(column_family_id, &ret_status))) {
  ------------------
  |  |   14|   372k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 372k]
  |  |  ------------------
  ------------------
 2408|      0|      if (ret_status.ok() && rebuilding_trx_ != nullptr) {
  ------------------
  |  Branch (2408:11): [True: 0, False: 0]
  |  Branch (2408:30): [True: 0, False: 0]
  ------------------
 2409|      0|        assert(!write_after_commit_);
 2410|       |        // The CF is probably flushed and hence no need for insert but we still
 2411|       |        // need to keep track of the keys for upcoming rollback/commit.
 2412|       |        // TODO(ajkr): propagate `ProtectionInfoKVOS64`.
 2413|      0|        ret_status =
 2414|      0|            WriteBatchInternal::Delete(rebuilding_trx_, column_family_id, key);
 2415|      0|        if (ret_status.ok()) {
  ------------------
  |  Branch (2415:13): [True: 0, False: 0]
  ------------------
 2416|      0|          MaybeAdvanceSeq(IsDuplicateKeySeq(column_family_id, key));
 2417|      0|        }
 2418|      0|      } else if (ret_status.ok()) {
  ------------------
  |  Branch (2418:18): [True: 0, False: 0]
  ------------------
 2419|      0|        MaybeAdvanceSeq(false /* batch_boundary */);
 2420|      0|      }
 2421|      0|      if (UNLIKELY(ret_status.IsTryAgain())) {
  ------------------
  |  |   14|      0|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2422|      0|        DecrementProtectionInfoIdxForTryAgain();
 2423|      0|      }
 2424|      0|      return ret_status;
 2425|      0|    }
 2426|       |
 2427|   372k|    ColumnFamilyData* cfd = cf_mems_->current();
 2428|   372k|    assert(!cfd || cfd->user_comparator());
 2429|   372k|    const size_t ts_sz = (cfd && cfd->user_comparator())
  ------------------
  |  Branch (2429:27): [True: 372k, False: 0]
  |  Branch (2429:34): [True: 372k, False: 0]
  ------------------
 2430|   372k|                             ? cfd->user_comparator()->timestamp_size()
 2431|   372k|                             : 0;
 2432|   372k|    const ValueType delete_type =
 2433|   372k|        (0 == ts_sz) ? kTypeDeletion : kTypeDeletionWithTimestamp;
  ------------------
  |  Branch (2433:9): [True: 372k, False: 0]
  ------------------
 2434|   372k|    if (kv_prot_info != nullptr) {
  ------------------
  |  Branch (2434:9): [True: 186k, False: 186k]
  ------------------
 2435|   186k|      auto mem_kv_prot_info =
 2436|   186k|          kv_prot_info->StripC(column_family_id).ProtectS(sequence_);
 2437|   186k|      mem_kv_prot_info.UpdateO(kTypeDeletion, delete_type);
 2438|   186k|      ret_status = DeleteImpl(column_family_id, key, Slice(), delete_type,
 2439|   186k|                              &mem_kv_prot_info);
 2440|   186k|    } else {
 2441|   186k|      ret_status = DeleteImpl(column_family_id, key, Slice(), delete_type,
 2442|   186k|                              nullptr /* kv_prot_info */);
 2443|   186k|    }
 2444|       |    // optimize for non-recovery mode
 2445|       |    // If `ret_status` is `TryAgain` then the next (successful) try will add
 2446|       |    // the key to the rebuilding transaction object. If `ret_status` is
 2447|       |    // another non-OK `Status`, then the `rebuilding_trx_` will be thrown
 2448|       |    // away. So we only need to add to it when `ret_status.ok()`.
 2449|   372k|    if (UNLIKELY(ret_status.ok() && rebuilding_trx_ != nullptr)) {
  ------------------
  |  |   14|   744k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 372k]
  |  |  |  Branch (14:40): [True: 372k, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 372k]
  |  |  ------------------
  ------------------
 2450|      0|      assert(!write_after_commit_);
 2451|       |      // TODO(ajkr): propagate `ProtectionInfoKVOS64`.
 2452|      0|      ret_status =
 2453|      0|          WriteBatchInternal::Delete(rebuilding_trx_, column_family_id, key);
 2454|      0|    }
 2455|   372k|    if (UNLIKELY(ret_status.IsTryAgain())) {
  ------------------
  |  |   14|   372k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 372k]
  |  |  ------------------
  ------------------
 2456|      0|      DecrementProtectionInfoIdxForTryAgain();
 2457|      0|    }
 2458|   372k|    return ret_status;
 2459|   372k|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter10DeleteImplEjRKNS_5SliceES4_NS_9ValueTypeEPKNS_18ProtectionInfoKVOSImEE:
 2379|  1.21M|                    const ProtectionInfoKVOS64* kv_prot_info) {
 2380|  1.21M|    Status ret_status;
 2381|  1.21M|    MemTable* mem = cf_mems_->GetMemTable();
 2382|  1.21M|    ret_status =
 2383|  1.21M|        mem->Add(sequence_, delete_type, key, value, kv_prot_info,
 2384|  1.21M|                 concurrent_memtable_writes_, get_post_process_info(mem),
 2385|  1.21M|                 hint_per_batch_ ? &GetHintMap()[mem] : nullptr);
  ------------------
  |  Branch (2385:18): [True: 0, False: 1.21M]
  ------------------
 2386|  1.21M|    if (UNLIKELY(ret_status.IsTryAgain())) {
  ------------------
  |  |   14|  1.21M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.21M]
  |  |  ------------------
  ------------------
 2387|      0|      assert(seq_per_batch_);
 2388|      0|      const bool kBatchBoundary = true;
 2389|      0|      MaybeAdvanceSeq(kBatchBoundary);
 2390|  1.21M|    } else if (ret_status.ok()) {
  ------------------
  |  Branch (2390:16): [True: 1.21M, False: 0]
  ------------------
 2391|  1.21M|      MaybeAdvanceSeq();
 2392|  1.21M|      CheckMemtableFull();
 2393|  1.21M|    }
 2394|  1.21M|    return ret_status;
 2395|  1.21M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter13DeleteRangeCFEjRKNS_5SliceES4_:
 2520|  1.03M|                       const Slice& end_key) override {
 2521|  1.03M|    const auto* kv_prot_info = NextProtectionInfo();
 2522|       |    // optimize for non-recovery mode
 2523|  1.03M|    if (UNLIKELY(write_after_commit_ && rebuilding_trx_ != nullptr)) {
  ------------------
  |  |   14|  2.06M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.03M]
  |  |  |  Branch (14:40): [True: 1.03M, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 1.03M]
  |  |  ------------------
  ------------------
 2524|       |      // TODO(ajkr): propagate `ProtectionInfoKVOS64`.
 2525|      0|      return WriteBatchInternal::DeleteRange(rebuilding_trx_, column_family_id,
 2526|      0|                                             begin_key, end_key);
 2527|       |      // else insert the values to the memtable right away
 2528|      0|    }
 2529|       |
 2530|  1.03M|    Status ret_status;
 2531|  1.03M|    if (UNLIKELY(!SeekToColumnFamily(column_family_id, &ret_status))) {
  ------------------
  |  |   14|  1.03M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 1.03M]
  |  |  ------------------
  ------------------
 2532|      0|      if (ret_status.ok() && rebuilding_trx_ != nullptr) {
  ------------------
  |  Branch (2532:11): [True: 0, False: 0]
  |  Branch (2532:30): [True: 0, False: 0]
  ------------------
 2533|      0|        assert(!write_after_commit_);
 2534|       |        // The CF is probably flushed and hence no need for insert but we still
 2535|       |        // need to keep track of the keys for upcoming rollback/commit.
 2536|       |        // TODO(ajkr): propagate `ProtectionInfoKVOS64`.
 2537|      0|        ret_status = WriteBatchInternal::DeleteRange(
 2538|      0|            rebuilding_trx_, column_family_id, begin_key, end_key);
 2539|      0|        if (ret_status.ok()) {
  ------------------
  |  Branch (2539:13): [True: 0, False: 0]
  ------------------
 2540|      0|          MaybeAdvanceSeq(IsDuplicateKeySeq(column_family_id, begin_key));
 2541|      0|        }
 2542|      0|      } else if (ret_status.ok()) {
  ------------------
  |  Branch (2542:18): [True: 0, False: 0]
  ------------------
 2543|      0|        MaybeAdvanceSeq(false /* batch_boundary */);
 2544|      0|      }
 2545|      0|      if (UNLIKELY(ret_status.IsTryAgain())) {
  ------------------
  |  |   14|      0|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2546|      0|        DecrementProtectionInfoIdxForTryAgain();
 2547|      0|      }
 2548|      0|      return ret_status;
 2549|      0|    }
 2550|  1.03M|    assert(ret_status.ok());
 2551|       |
 2552|  1.03M|    if (db_ != nullptr) {
  ------------------
  |  Branch (2552:9): [True: 1.03M, False: 0]
  ------------------
 2553|  1.03M|      auto cf_handle = cf_mems_->GetColumnFamilyHandle();
 2554|  1.03M|      if (cf_handle == nullptr) {
  ------------------
  |  Branch (2554:11): [True: 0, False: 1.03M]
  ------------------
 2555|      0|        cf_handle = db_->DefaultColumnFamily();
 2556|      0|      }
 2557|  1.03M|      auto* cfd =
 2558|  1.03M|          static_cast_with_check<ColumnFamilyHandleImpl>(cf_handle)->cfd();
 2559|  1.03M|      if (!cfd->is_delete_range_supported()) {
  ------------------
  |  Branch (2559:11): [True: 0, False: 1.03M]
  ------------------
 2560|       |        // TODO(ajkr): refactor `SeekToColumnFamily()` so it returns a `Status`.
 2561|      0|        ret_status.PermitUncheckedError();
 2562|      0|        return Status::NotSupported(
 2563|      0|            std::string("DeleteRange not supported for table type ") +
 2564|      0|            cfd->ioptions()->table_factory->Name() + " in CF " +
 2565|      0|            cfd->GetName());
 2566|      0|      }
 2567|  1.03M|      int cmp =
 2568|  1.03M|          cfd->user_comparator()->CompareWithoutTimestamp(begin_key, end_key);
 2569|  1.03M|      if (cmp > 0) {
  ------------------
  |  Branch (2569:11): [True: 0, False: 1.03M]
  ------------------
 2570|       |        // TODO(ajkr): refactor `SeekToColumnFamily()` so it returns a `Status`.
 2571|      0|        ret_status.PermitUncheckedError();
 2572|       |        // It's an empty range where endpoints appear mistaken. Don't bother
 2573|       |        // applying it to the DB, and return an error to the user.
 2574|      0|        return Status::InvalidArgument("end key comes before start key");
 2575|  1.03M|      } else if (cmp == 0) {
  ------------------
  |  Branch (2575:18): [True: 189k, False: 841k]
  ------------------
 2576|       |        // TODO(ajkr): refactor `SeekToColumnFamily()` so it returns a `Status`.
 2577|   189k|        ret_status.PermitUncheckedError();
 2578|       |        // It's an empty range. Don't bother applying it to the DB.
 2579|   189k|        return Status::OK();
 2580|   189k|      }
 2581|  1.03M|    }
 2582|       |
 2583|   841k|    if (kv_prot_info != nullptr) {
  ------------------
  |  Branch (2583:9): [True: 420k, False: 420k]
  ------------------
 2584|   420k|      auto mem_kv_prot_info =
 2585|   420k|          kv_prot_info->StripC(column_family_id).ProtectS(sequence_);
 2586|   420k|      ret_status = DeleteImpl(column_family_id, begin_key, end_key,
 2587|   420k|                              kTypeRangeDeletion, &mem_kv_prot_info);
 2588|   420k|    } else {
 2589|   420k|      ret_status = DeleteImpl(column_family_id, begin_key, end_key,
 2590|   420k|                              kTypeRangeDeletion, nullptr /* kv_prot_info */);
 2591|   420k|    }
 2592|       |    // optimize for non-recovery mode
 2593|       |    // If `ret_status` is `TryAgain` then the next (successful) try will add
 2594|       |    // the key to the rebuilding transaction object. If `ret_status` is
 2595|       |    // another non-OK `Status`, then the `rebuilding_trx_` will be thrown
 2596|       |    // away. So we only need to add to it when `ret_status.ok()`.
 2597|   841k|    if (UNLIKELY(!ret_status.IsTryAgain() && rebuilding_trx_ != nullptr)) {
  ------------------
  |  |   14|  1.68M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 841k]
  |  |  |  Branch (14:40): [True: 841k, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 841k]
  |  |  ------------------
  ------------------
 2598|      0|      assert(!write_after_commit_);
 2599|       |      // TODO(ajkr): propagate `ProtectionInfoKVOS64`.
 2600|      0|      ret_status = WriteBatchInternal::DeleteRange(
 2601|      0|          rebuilding_trx_, column_family_id, begin_key, end_key);
 2602|      0|    }
 2603|   841k|    if (UNLIKELY(ret_status.IsTryAgain())) {
  ------------------
  |  |   14|   841k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 841k]
  |  |  ------------------
  ------------------
 2604|      0|      DecrementProtectionInfoIdxForTryAgain();
 2605|      0|    }
 2606|   841k|    return ret_status;
 2607|  1.03M|  }
write_batch.cc:_ZNK7rocksdb12_GLOBAL__N_116MemTableInserter8sequenceEv:
 2073|  4.08M|  SequenceNumber sequence() const { return sequence_; }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter15MaybeAdvanceSeqEb:
 2061|  2.53M|  void MaybeAdvanceSeq(bool batch_boundry = false) {
 2062|  2.53M|    if (batch_boundry == seq_per_batch_) {
  ------------------
  |  Branch (2062:9): [True: 2.53M, False: 0]
  ------------------
 2063|  2.53M|      sequence_++;
 2064|  2.53M|    }
 2065|  2.53M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter18set_log_number_refEm:
 2067|  1.36M|  void set_log_number_ref(uint64_t log) { log_number_ref_ = log; }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserter13set_prot_infoEPKNS_10WriteBatch14ProtectionInfoE:
 2068|  1.36M|  void set_prot_info(const WriteBatch::ProtectionInfo* prot_info) {
 2069|  1.36M|    prot_info_ = prot_info;
 2070|  1.36M|    prot_info_idx_ = 0;
 2071|  1.36M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_116MemTableInserterD2Ev:
 2031|  2.72M|  ~MemTableInserter() override {
 2032|  2.72M|    if (dup_dectector_on_) {
  ------------------
  |  Branch (2032:9): [True: 0, False: 2.72M]
  ------------------
 2033|      0|      reinterpret_cast<DuplicateDetector*>(&duplicate_detector_)
 2034|      0|          ->~DuplicateDetector();
 2035|      0|    }
 2036|  2.72M|    if (post_info_created_) {
  ------------------
  |  Branch (2036:9): [True: 0, False: 2.72M]
  ------------------
 2037|      0|      reinterpret_cast<MemPostInfoMap*>(&mem_post_info_map_)->~MemPostInfoMap();
 2038|      0|    }
 2039|  2.72M|    if (hint_created_) {
  ------------------
  |  Branch (2039:9): [True: 0, False: 2.72M]
  ------------------
 2040|      0|      for (auto iter : GetHintMap()) {
  ------------------
  |  Branch (2040:22): [True: 0, False: 0]
  ------------------
 2041|      0|        delete[] reinterpret_cast<char*>(iter.second);
 2042|      0|      }
 2043|      0|      reinterpret_cast<HintMap*>(&hint_)->~HintMap();
 2044|      0|    }
 2045|  2.72M|    delete rebuilding_trx_;
 2046|  2.72M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_121ProtectionInfoUpdaterC2EPNS_10WriteBatch14ProtectionInfoE:
 3199|  1.36M|      : prot_info_(prot_info) {}
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_121ProtectionInfoUpdater5PutCFEjRKNS_5SliceES4_:
 3203|   660k|  Status PutCF(uint32_t cf, const Slice& key, const Slice& val) override {
 3204|   660k|    return UpdateProtInfo(cf, key, val, kTypeValue);
 3205|   660k|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_121ProtectionInfoUpdater14UpdateProtInfoEjRKNS_5SliceES4_NS_9ValueTypeE:
 3264|  1.36M|                        const ValueType op_type) {
 3265|  1.36M|    if (prot_info_) {
  ------------------
  |  Branch (3265:9): [True: 1.36M, False: 0]
  ------------------
 3266|  1.36M|      prot_info_->entries_.emplace_back(
 3267|  1.36M|          ProtectionInfo64().ProtectKVO(key, val, op_type).ProtectC(cf));
 3268|  1.36M|    }
 3269|  1.36M|    return Status::OK();
 3270|  1.36M|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_121ProtectionInfoUpdater8DeleteCFEjRKNS_5SliceE:
 3221|   186k|  Status DeleteCF(uint32_t cf, const Slice& key) override {
 3222|   186k|    return UpdateProtInfo(cf, key, "", kTypeDeletion);
 3223|   186k|  }
write_batch.cc:_ZN7rocksdb12_GLOBAL__N_121ProtectionInfoUpdater13DeleteRangeCFEjRKNS_5SliceES4_:
 3230|   515k|                       const Slice& end_key) override {
 3231|   515k|    return UpdateProtInfo(cf, begin_key, end_key, kTypeRangeDeletion);
 3232|   515k|  }

_ZN7rocksdb21ColumnFamilyMemTablesD2Ev:
   33|  9.02k|  virtual ~ColumnFamilyMemTables() {}
_ZN7rocksdb18WriteBatchInternal8ContentsEPKNS_10WriteBatchE:
  155|  1.36M|  static Slice Contents(const WriteBatch* batch) { return Slice(batch->rep_); }
_ZN7rocksdb18WriteBatchInternal8ByteSizeEPKNS_10WriteBatchE:
  157|  2.72M|  static size_t ByteSize(const WriteBatch* batch) { return batch->rep_.size(); }
_ZN7rocksdb18WriteBatchInternal22TimestampsUpdateNeededERKNS_10WriteBatchE:
  237|  1.36M|  static bool TimestampsUpdateNeeded(const WriteBatch& wb) {
  238|  1.36M|    return wb.needs_in_place_update_ts_;
  239|  1.36M|  }
_ZN7rocksdb14LocalSavePointC2EPNS_10WriteBatchE:
  262|  1.36M|  {
  263|  1.36M|  }
_ZN7rocksdb14LocalSavePoint6commitEv:
  268|  1.36M|  Status commit() {
  269|       |#ifndef NDEBUG
  270|       |    committed_ = true;
  271|       |#endif
  272|  1.36M|    if (batch_->max_bytes_ && batch_->rep_.size() > batch_->max_bytes_) {
  ------------------
  |  Branch (272:9): [True: 0, False: 1.36M]
  |  Branch (272:31): [True: 0, False: 0]
  ------------------
  273|      0|      batch_->rep_.resize(savepoint_.size);
  274|      0|      WriteBatchInternal::SetCount(batch_, savepoint_.count);
  275|      0|      if (batch_->prot_info_ != nullptr) {
  ------------------
  |  Branch (275:11): [True: 0, False: 0]
  ------------------
  276|      0|        batch_->prot_info_->entries_.resize(savepoint_.count);
  277|      0|      }
  278|      0|      batch_->content_flags_.store(savepoint_.content_flags,
  279|      0|                                   std::memory_order_relaxed);
  280|      0|      return Status::MemoryLimit();
  281|      0|    }
  282|  1.36M|    return Status::OK();
  283|  1.36M|  }

_ZNK7rocksdb15WriteController9IsStoppedEv:
   43|  1.37M|bool WriteController::IsStopped() const {
   44|  1.37M|  return total_stopped_.load(std::memory_order_relaxed) > 0;
   45|  1.37M|}

_ZN7rocksdb15WriteControllerC2Eml:
   34|  9.02k|            NewGenericRateLimiter(low_pri_rate_bytes_per_sec)) {
   35|  9.02k|    set_max_delayed_write_rate(_delayed_write_rate);
   36|  9.02k|  }
_ZN7rocksdb15WriteControllerD2Ev:
   37|  9.02k|  ~WriteController() = default;
_ZN7rocksdb15WriteController26set_max_delayed_write_rateEm:
   72|  9.02k|  void set_max_delayed_write_rate(uint64_t write_rate) {
   73|       |    // avoid divide 0
   74|  9.02k|    if (write_rate == 0) {
  ------------------
  |  Branch (74:9): [True: 0, False: 9.02k]
  ------------------
   75|      0|      write_rate = 1u;
   76|      0|    }
   77|  9.02k|    max_delayed_write_rate_ = write_rate;
   78|       |    // update delayed_write_rate_ as well
   79|  9.02k|    delayed_write_rate_ = write_rate;
   80|  9.02k|  }
_ZNK7rocksdb15WriteController10NeedsDelayEv:
   54|  1.37M|  bool NeedsDelay() const { return total_delayed_.load() > 0; }
_ZNK7rocksdb15WriteController21NeedSpeedupCompactionEv:
   55|  9.02k|  bool NeedSpeedupCompaction() const {
   56|  9.02k|    return IsStopped() || NeedsDelay() || total_compaction_pressure_.load() > 0;
  ------------------
  |  Branch (56:12): [True: 0, False: 9.02k]
  |  Branch (56:27): [True: 0, False: 9.02k]
  |  Branch (56:43): [True: 0, False: 9.02k]
  ------------------
   57|  9.02k|  }

_ZN7rocksdb29WriteStallCauseToHyphenStringENS_15WriteStallCauseE:
   14|    324|const std::string& WriteStallCauseToHyphenString(WriteStallCause cause) {
   15|    324|  static const std::string kMemtableLimit = "memtable-limit";
   16|    324|  static const std::string kL0FileCountLimit = "l0-file-count-limit";
   17|    324|  static const std::string kPendingCompactionBytes = "pending-compaction-bytes";
   18|    324|  static const std::string kWriteBufferManagerLimit =
   19|    324|      "write-buffer-manager-limit";
   20|    324|  switch (cause) {
   21|     92|    case WriteStallCause::kMemtableLimit:
  ------------------
  |  Branch (21:5): [True: 92, False: 232]
  ------------------
   22|     92|      return kMemtableLimit;
   23|     92|    case WriteStallCause::kL0FileCountLimit:
  ------------------
  |  Branch (23:5): [True: 92, False: 232]
  ------------------
   24|     92|      return kL0FileCountLimit;
   25|     92|    case WriteStallCause::kPendingCompactionBytes:
  ------------------
  |  Branch (25:5): [True: 92, False: 232]
  ------------------
   26|     92|      return kPendingCompactionBytes;
   27|     48|    case WriteStallCause::kWriteBufferManagerLimit:
  ------------------
  |  Branch (27:5): [True: 48, False: 276]
  ------------------
   28|     48|      return kWriteBufferManagerLimit;
   29|      0|    default:
  ------------------
  |  Branch (29:5): [True: 0, False: 324]
  ------------------
   30|      0|      break;
   31|    324|  }
   32|      0|  return InvalidWriteStallHyphenString();
   33|    324|}
_ZN7rocksdb33WriteStallConditionToHyphenStringENS_19WriteStallConditionE:
   36|    324|    WriteStallCondition condition) {
   37|    324|  static const std::string kDelayed = "delays";
   38|    324|  static const std::string kStopped = "stops";
   39|    324|  switch (condition) {
   40|    138|    case WriteStallCondition::kDelayed:
  ------------------
  |  Branch (40:5): [True: 138, False: 186]
  ------------------
   41|    138|      return kDelayed;
   42|    186|    case WriteStallCondition::kStopped:
  ------------------
  |  Branch (42:5): [True: 186, False: 138]
  ------------------
   43|    186|      return kStopped;
   44|      0|    default:
  ------------------
  |  Branch (44:5): [True: 0, False: 324]
  ------------------
   45|      0|      break;
   46|    324|  }
   47|      0|  return InvalidWriteStallHyphenString();
   48|    324|}
_ZN7rocksdb14InternalCFStatENS_15WriteStallCauseENS_19WriteStallConditionE:
   51|    276|    WriteStallCause cause, WriteStallCondition condition) {
   52|    276|  switch (cause) {
   53|     92|    case WriteStallCause::kMemtableLimit: {
  ------------------
  |  Branch (53:5): [True: 92, False: 184]
  ------------------
   54|     92|      switch (condition) {
  ------------------
  |  Branch (54:15): [True: 0, False: 92]
  ------------------
   55|     46|        case WriteStallCondition::kDelayed:
  ------------------
  |  Branch (55:9): [True: 46, False: 46]
  ------------------
   56|     46|          return InternalStats::MEMTABLE_LIMIT_DELAYS;
   57|     46|        case WriteStallCondition::kStopped:
  ------------------
  |  Branch (57:9): [True: 46, False: 46]
  ------------------
   58|     46|          return InternalStats::MEMTABLE_LIMIT_STOPS;
   59|      0|        case WriteStallCondition::kNormal:
  ------------------
  |  Branch (59:9): [True: 0, False: 92]
  ------------------
   60|      0|          break;
   61|     92|      }
   62|      0|      break;
   63|     92|    }
   64|     92|    case WriteStallCause::kL0FileCountLimit: {
  ------------------
  |  Branch (64:5): [True: 92, False: 184]
  ------------------
   65|     92|      switch (condition) {
  ------------------
  |  Branch (65:15): [True: 0, False: 92]
  ------------------
   66|     46|        case WriteStallCondition::kDelayed:
  ------------------
  |  Branch (66:9): [True: 46, False: 46]
  ------------------
   67|     46|          return InternalStats::L0_FILE_COUNT_LIMIT_DELAYS;
   68|     46|        case WriteStallCondition::kStopped:
  ------------------
  |  Branch (68:9): [True: 46, False: 46]
  ------------------
   69|     46|          return InternalStats::L0_FILE_COUNT_LIMIT_STOPS;
   70|      0|        case WriteStallCondition::kNormal:
  ------------------
  |  Branch (70:9): [True: 0, False: 92]
  ------------------
   71|      0|          break;
   72|     92|      }
   73|      0|      break;
   74|     92|    }
   75|     92|    case WriteStallCause::kPendingCompactionBytes: {
  ------------------
  |  Branch (75:5): [True: 92, False: 184]
  ------------------
   76|     92|      switch (condition) {
  ------------------
  |  Branch (76:15): [True: 0, False: 92]
  ------------------
   77|     46|        case WriteStallCondition::kDelayed:
  ------------------
  |  Branch (77:9): [True: 46, False: 46]
  ------------------
   78|     46|          return InternalStats::PENDING_COMPACTION_BYTES_LIMIT_DELAYS;
   79|     46|        case WriteStallCondition::kStopped:
  ------------------
  |  Branch (79:9): [True: 46, False: 46]
  ------------------
   80|     46|          return InternalStats::PENDING_COMPACTION_BYTES_LIMIT_STOPS;
   81|      0|        case WriteStallCondition::kNormal:
  ------------------
  |  Branch (81:9): [True: 0, False: 92]
  ------------------
   82|      0|          break;
   83|     92|      }
   84|      0|      break;
   85|     92|    }
   86|      0|    default:
  ------------------
  |  Branch (86:5): [True: 0, False: 276]
  ------------------
   87|      0|      break;
   88|    276|  }
   89|      0|  return InternalStats::INTERNAL_CF_STATS_ENUM_MAX;
   90|    276|}
_ZN7rocksdb14InternalDBStatENS_15WriteStallCauseENS_19WriteStallConditionE:
   93|     92|    WriteStallCause cause, WriteStallCondition condition) {
   94|     92|  switch (cause) {
   95|     92|    case WriteStallCause::kWriteBufferManagerLimit: {
  ------------------
  |  Branch (95:5): [True: 92, False: 0]
  ------------------
   96|     92|      switch (condition) {
   97|     46|        case WriteStallCondition::kStopped:
  ------------------
  |  Branch (97:9): [True: 46, False: 46]
  ------------------
   98|     46|          return InternalStats::kIntStatsWriteBufferManagerLimitStopsCounts;
   99|     46|        default:
  ------------------
  |  Branch (99:9): [True: 46, False: 46]
  ------------------
  100|     46|          break;
  101|     92|      }
  102|     46|      break;
  103|     92|    }
  104|     46|    default:
  ------------------
  |  Branch (104:5): [True: 0, False: 92]
  ------------------
  105|      0|      break;
  106|     92|  }
  107|     46|  return InternalStats::kIntStatsNumMax;
  108|     92|}
_ZN7rocksdb24isCFScopeWriteStallCauseENS_15WriteStallCauseE:
  110|    324|bool isCFScopeWriteStallCause(WriteStallCause cause) {
  111|    324|  uint32_t int_cause = static_cast<uint32_t>(cause);
  112|    324|  uint32_t lower_bound =
  113|    324|      static_cast<uint32_t>(WriteStallCause::kCFScopeWriteStallCauseEnumMax) -
  114|    324|      kNumCFScopeWriteStallCauses;
  115|    324|  uint32_t upper_bound =
  116|    324|      static_cast<uint32_t>(WriteStallCause::kCFScopeWriteStallCauseEnumMax) -
  117|    324|      1;
  118|    324|  return lower_bound <= int_cause && int_cause <= upper_bound;
  ------------------
  |  Branch (118:10): [True: 324, False: 0]
  |  Branch (118:38): [True: 276, False: 48]
  ------------------
  119|    324|}
_ZN7rocksdb24isDBScopeWriteStallCauseENS_15WriteStallCauseE:
  121|     48|bool isDBScopeWriteStallCause(WriteStallCause cause) {
  122|     48|  uint32_t int_cause = static_cast<uint32_t>(cause);
  123|     48|  uint32_t lower_bound =
  124|     48|      static_cast<uint32_t>(WriteStallCause::kDBScopeWriteStallCauseEnumMax) -
  125|     48|      kNumDBScopeWriteStallCauses;
  126|     48|  uint32_t upper_bound =
  127|     48|      static_cast<uint32_t>(WriteStallCause::kDBScopeWriteStallCauseEnumMax) -
  128|     48|      1;
  129|     48|  return lower_bound <= int_cause && int_cause <= upper_bound;
  ------------------
  |  Branch (129:10): [True: 48, False: 0]
  |  Branch (129:38): [True: 48, False: 0]
  ------------------
  130|     48|}
_ZN7rocksdb22WriteStallStatsMapKeys10TotalStopsEv:
  132|     92|const std::string& WriteStallStatsMapKeys::TotalStops() {
  133|     92|  static const std::string kTotalStops = "total-stops";
  134|     92|  return kTotalStops;
  135|     92|}
_ZN7rocksdb22WriteStallStatsMapKeys11TotalDelaysEv:
  137|     92|const std::string& WriteStallStatsMapKeys::TotalDelays() {
  138|     92|  static const std::string kTotalDelays = "total-delays";
  139|     92|  return kTotalDelays;
  140|     92|}
_ZN7rocksdb22WriteStallStatsMapKeys45CFL0FileCountLimitDelaysWithOngoingCompactionEv:
  143|     46|WriteStallStatsMapKeys::CFL0FileCountLimitDelaysWithOngoingCompaction() {
  144|     46|  static const std::string ret =
  145|     46|      "cf-l0-file-count-limit-delays-with-ongoing-compaction";
  146|     46|  return ret;
  147|     46|}
_ZN7rocksdb22WriteStallStatsMapKeys44CFL0FileCountLimitStopsWithOngoingCompactionEv:
  150|     46|WriteStallStatsMapKeys::CFL0FileCountLimitStopsWithOngoingCompaction() {
  151|     46|  static const std::string ret =
  152|     46|      "cf-l0-file-count-limit-stops-with-ongoing-compaction";
  153|     46|  return ret;
  154|     46|}
_ZN7rocksdb22WriteStallStatsMapKeys19CauseConditionCountENS_15WriteStallCauseENS_19WriteStallConditionE:
  157|    324|    WriteStallCause cause, WriteStallCondition condition) {
  158|    324|  std::string cause_condition_count_name;
  159|       |
  160|    324|  std::string cause_name;
  161|    324|  if (isCFScopeWriteStallCause(cause) || isDBScopeWriteStallCause(cause)) {
  ------------------
  |  Branch (161:7): [True: 276, False: 48]
  |  Branch (161:42): [True: 48, False: 0]
  ------------------
  162|    324|    cause_name = WriteStallCauseToHyphenString(cause);
  163|    324|  } else {
  164|      0|    assert(false);
  165|      0|    return "";
  166|      0|  }
  167|       |
  168|    324|  const std::string& condition_name =
  169|    324|      WriteStallConditionToHyphenString(condition);
  170|       |
  171|    324|  cause_condition_count_name.reserve(cause_name.size() + 1 +
  172|    324|                                     condition_name.size());
  173|    324|  cause_condition_count_name.append(cause_name);
  174|    324|  cause_condition_count_name.append("-");
  175|    324|  cause_condition_count_name.append(condition_name);
  176|       |
  177|    324|  return cause_condition_count_name;
  178|    324|}

_ZN7rocksdb11WriteThreadC2ERKNS_18ImmutableDBOptionsE:
   34|  18.0k|      stall_cv_(&stall_mu_) {}
_ZN7rocksdb11WriteThread8SetStateEPNS0_6WriterEh:
  212|  1.36M|void WriteThread::SetState(Writer* w, uint8_t new_state) {
  213|  1.36M|  assert(w);
  214|  1.36M|  auto state = w->state.load(std::memory_order_acquire);
  215|  1.36M|  if (state == STATE_LOCKED_WAITING ||
  ------------------
  |  Branch (215:7): [True: 0, False: 1.36M]
  ------------------
  216|  1.36M|      !w->state.compare_exchange_strong(state, new_state)) {
  ------------------
  |  Branch (216:7): [True: 0, False: 1.36M]
  ------------------
  217|      0|    assert(state == STATE_LOCKED_WAITING);
  218|       |
  219|      0|    std::lock_guard<std::mutex> guard(w->StateMutex());
  220|      0|    assert(w->state.load(std::memory_order_relaxed) != new_state);
  221|      0|    w->state.store(new_state, std::memory_order_relaxed);
  222|      0|    w->StateCV().notify_one();
  223|      0|  }
  224|  1.36M|}
_ZN7rocksdb11WriteThread7LinkOneEPNS0_6WriterEPNSt3__16atomicIS2_EE:
  226|  1.36M|bool WriteThread::LinkOne(Writer* w, std::atomic<Writer*>* newest_writer) {
  227|  1.36M|  assert(newest_writer != nullptr);
  228|  1.36M|  assert(w->state == STATE_INIT);
  229|  1.36M|  Writer* writers = newest_writer->load(std::memory_order_relaxed);
  230|  1.36M|  while (true) {
  ------------------
  |  Branch (230:10): [Folded - Ignored]
  ------------------
  231|  1.36M|    assert(writers != w);
  232|       |    // If write stall in effect, and w->no_slowdown is not true,
  233|       |    // block here until stall is cleared. If its true, then return
  234|       |    // immediately
  235|  1.36M|    if (writers == &write_stall_dummy_) {
  ------------------
  |  Branch (235:9): [True: 0, False: 1.36M]
  ------------------
  236|      0|      if (w->no_slowdown) {
  ------------------
  |  Branch (236:11): [True: 0, False: 0]
  ------------------
  237|      0|        w->status = Status::Incomplete("Write stall");
  238|      0|        SetState(w, STATE_COMPLETED);
  239|      0|        return false;
  240|      0|      }
  241|       |      // Since no_slowdown is false, wait here to be notified of the write
  242|       |      // stall clearing
  243|      0|      {
  244|      0|        MutexLock lock(&stall_mu_);
  245|      0|        writers = newest_writer->load(std::memory_order_relaxed);
  246|      0|        if (writers == &write_stall_dummy_) {
  ------------------
  |  Branch (246:13): [True: 0, False: 0]
  ------------------
  247|      0|          TEST_SYNC_POINT_CALLBACK("WriteThread::WriteStall::Wait", w);
  248|      0|          stall_cv_.Wait();
  249|       |          // Load newest_writers_ again since it may have changed
  250|      0|          writers = newest_writer->load(std::memory_order_relaxed);
  251|      0|          continue;
  252|      0|        }
  253|      0|      }
  254|      0|    }
  255|  1.36M|    w->link_older = writers;
  256|  1.36M|    if (newest_writer->compare_exchange_weak(writers, w)) {
  ------------------
  |  Branch (256:9): [True: 1.36M, False: 0]
  ------------------
  257|  1.36M|      return (writers == nullptr);
  258|  1.36M|    }
  259|  1.36M|  }
  260|  1.36M|}
_ZN7rocksdb11WriteThread23CreateMissingNewerLinksEPNS0_6WriterE:
  287|  1.36M|void WriteThread::CreateMissingNewerLinks(Writer* head) {
  288|  1.36M|  while (true) {
  ------------------
  |  Branch (288:10): [Folded - Ignored]
  ------------------
  289|  1.36M|    Writer* next = head->link_older;
  290|  1.36M|    if (next == nullptr || next->link_newer != nullptr) {
  ------------------
  |  Branch (290:9): [True: 1.36M, False: 0]
  |  Branch (290:28): [True: 0, False: 0]
  ------------------
  291|  1.36M|      assert(next == nullptr || next->link_newer == head);
  292|  1.36M|      break;
  293|  1.36M|    }
  294|      0|    next->link_newer = head;
  295|      0|    head = next;
  296|      0|  }
  297|  1.36M|}
_ZN7rocksdb11WriteThread14JoinBatchGroupEPNS0_6WriterE:
  401|  1.36M|void WriteThread::JoinBatchGroup(Writer* w) {
  402|  1.36M|  TEST_SYNC_POINT_CALLBACK("WriteThread::JoinBatchGroup:Start", w);
  403|  1.36M|  assert(w->batch != nullptr);
  404|       |
  405|  1.36M|  bool linked_as_leader = LinkOne(w, &newest_writer_);
  406|       |
  407|  1.36M|  w->CheckWriteEnqueuedCallback();
  408|       |
  409|  1.36M|  if (linked_as_leader) {
  ------------------
  |  Branch (409:7): [True: 1.36M, False: 0]
  ------------------
  410|  1.36M|    SetState(w, STATE_GROUP_LEADER);
  411|  1.36M|  }
  412|       |
  413|  1.36M|  TEST_SYNC_POINT_CALLBACK("WriteThread::JoinBatchGroup:Wait", w);
  414|  1.36M|  TEST_SYNC_POINT_CALLBACK("WriteThread::JoinBatchGroup:Wait2", w);
  415|       |
  416|  1.36M|  if (!linked_as_leader) {
  ------------------
  |  Branch (416:7): [True: 0, False: 1.36M]
  ------------------
  417|       |    /**
  418|       |     * Wait util:
  419|       |     * 1) An existing leader pick us as the new leader when it finishes
  420|       |     * 2) An existing leader pick us as its follewer and
  421|       |     * 2.1) finishes the memtable writes on our behalf
  422|       |     * 2.2) Or tell us to finish the memtable writes in pralallel
  423|       |     * 3) (pipelined write) An existing leader pick us as its follower and
  424|       |     *    finish book-keeping and WAL write for us, enqueue us as pending
  425|       |     *    memtable writer, and
  426|       |     * 3.1) we become memtable writer group leader, or
  427|       |     * 3.2) an existing memtable writer group leader tell us to finish memtable
  428|       |     *      writes in parallel.
  429|       |     */
  430|      0|    TEST_SYNC_POINT_CALLBACK("WriteThread::JoinBatchGroup:BeganWaiting", w);
  431|      0|    AwaitState(w,
  432|      0|               STATE_GROUP_LEADER | STATE_MEMTABLE_WRITER_LEADER |
  433|      0|                   STATE_PARALLEL_MEMTABLE_CALLER |
  434|      0|                   STATE_PARALLEL_MEMTABLE_WRITER | STATE_COMPLETED,
  435|      0|               &jbg_ctx);
  436|      0|    TEST_SYNC_POINT_CALLBACK("WriteThread::JoinBatchGroup:DoneWaiting", w);
  437|      0|  }
  438|  1.36M|}
_ZN7rocksdb11WriteThread23EnterAsBatchGroupLeaderEPNS0_6WriterEPNS0_10WriteGroupE:
  441|  1.36M|                                            WriteGroup* write_group) {
  442|  1.36M|  assert(leader->link_older == nullptr);
  443|  1.36M|  assert(leader->batch != nullptr);
  444|  1.36M|  assert(write_group != nullptr);
  445|       |
  446|  1.36M|  size_t size = WriteBatchInternal::ByteSize(leader->batch);
  447|       |
  448|       |  // Allow the group to grow up to a maximum size, but if the
  449|       |  // original write is small, limit the growth so we do not slow
  450|       |  // down the small write too much.
  451|  1.36M|  size_t max_size = max_write_batch_group_size_bytes;
  452|  1.36M|  const uint64_t min_batch_size_bytes = max_write_batch_group_size_bytes / 8;
  453|  1.36M|  if (size <= min_batch_size_bytes) {
  ------------------
  |  Branch (453:7): [True: 1.36M, False: 243]
  ------------------
  454|  1.36M|    max_size = size + min_batch_size_bytes;
  455|  1.36M|  }
  456|       |
  457|  1.36M|  leader->write_group = write_group;
  458|  1.36M|  write_group->leader = leader;
  459|  1.36M|  write_group->last_writer = leader;
  460|  1.36M|  write_group->size = 1;
  461|  1.36M|  Writer* newest_writer = newest_writer_.load(std::memory_order_acquire);
  462|       |
  463|       |  // This is safe regardless of any db mutex status of the caller. Previous
  464|       |  // calls to ExitAsGroupLeader either didn't call CreateMissingNewerLinks
  465|       |  // (they emptied the list and then we added ourself as leader) or had to
  466|       |  // explicitly wake us up (the list was non-empty when we added ourself,
  467|       |  // so we have already received our MarkJoined).
  468|  1.36M|  CreateMissingNewerLinks(newest_writer);
  469|       |
  470|       |  // This comment illustrates how the rest of the function works using an
  471|       |  // example. Notation:
  472|       |  //
  473|       |  // - Items are `Writer`s
  474|       |  // - Items prefixed by "@" have been included in `write_group`
  475|       |  // - Items prefixed by "*" have compatible options with `leader`, but have not
  476|       |  //   been included in `write_group` yet
  477|       |  // - Items after several spaces are in `r_list`. These have incompatible
  478|       |  //   options with `leader` and are temporarily separated from the main list.
  479|       |  //
  480|       |  // Each line below depicts the state of the linked lists at the beginning of
  481|       |  // an iteration of the while-loop.
  482|       |  //
  483|       |  // @leader, n1, *n2, n3, *newest_writer
  484|       |  // @leader, *n2, n3, *newest_writer,    n1
  485|       |  // @leader, @n2, n3, *newest_writer,    n1
  486|       |  //
  487|       |  // After the while-loop, the `r_list` is grafted back onto the main list.
  488|       |  //
  489|       |  // case A: no new `Writer`s arrived
  490|       |  // @leader, @n2, @newest_writer,        n1, n3
  491|       |  // @leader, @n2, @newest_writer, n1, n3
  492|       |  //
  493|       |  // case B: a new `Writer` (n4) arrived
  494|       |  // @leader, @n2, @newest_writer, n4     n1, n3
  495|       |  // @leader, @n2, @newest_writer, n1, n3, n4
  496|       |
  497|       |  // Tricky. Iteration start (leader) is exclusive and finish
  498|       |  // (newest_writer) is inclusive. Iteration goes from old to new.
  499|  1.36M|  Writer* w = leader;
  500|       |  // write_group end
  501|  1.36M|  Writer* we = leader;
  502|       |  // declare r_list
  503|  1.36M|  Writer* rb = nullptr;
  504|  1.36M|  Writer* re = nullptr;
  505|       |
  506|  1.36M|  while (w != newest_writer) {
  ------------------
  |  Branch (506:10): [True: 0, False: 1.36M]
  ------------------
  507|      0|    assert(w->link_newer);
  508|      0|    w = w->link_newer;
  509|       |
  510|      0|    if ((w->sync && !leader->sync) ||
  ------------------
  |  Branch (510:10): [True: 0, False: 0]
  |  Branch (510:21): [True: 0, False: 0]
  ------------------
  511|       |        // Do not include a sync write into a batch handled by a non-sync write.
  512|      0|        (w->no_slowdown != leader->no_slowdown) ||
  ------------------
  |  Branch (512:9): [True: 0, False: 0]
  ------------------
  513|       |        // Do not mix writes that are ok with delays with the ones that request
  514|       |        // fail on delays.
  515|      0|        (w->disable_wal != leader->disable_wal) ||
  ------------------
  |  Branch (515:9): [True: 0, False: 0]
  ------------------
  516|       |        // Do not mix writes that enable WAL with the ones whose WAL disabled.
  517|      0|        (w->protection_bytes_per_key != leader->protection_bytes_per_key) ||
  ------------------
  |  Branch (517:9): [True: 0, False: 0]
  ------------------
  518|       |        // Do not mix writes with different levels of integrity protection.
  519|      0|        (w->rate_limiter_priority != leader->rate_limiter_priority) ||
  ------------------
  |  Branch (519:9): [True: 0, False: 0]
  ------------------
  520|       |        // Do not mix writes with different rate limiter priorities.
  521|      0|        (w->batch == nullptr) ||
  ------------------
  |  Branch (521:9): [True: 0, False: 0]
  ------------------
  522|       |        // Do not include those writes with nullptr batch. Those are not writes
  523|       |        // those are something else. They want to be alone
  524|      0|        (w->callback != nullptr && !w->callback->AllowWriteBatching()) ||
  ------------------
  |  Branch (524:10): [True: 0, False: 0]
  |  Branch (524:36): [True: 0, False: 0]
  ------------------
  525|       |        // dont batch writes that don't want to be batched
  526|      0|        (size + WriteBatchInternal::ByteSize(w->batch) > max_size)
  ------------------
  |  Branch (526:9): [True: 0, False: 0]
  ------------------
  527|       |        // Do not make batch too big
  528|      0|    ) {
  529|       |      // remove from list
  530|      0|      w->link_older->link_newer = w->link_newer;
  531|      0|      if (w->link_newer != nullptr) {
  ------------------
  |  Branch (531:11): [True: 0, False: 0]
  ------------------
  532|      0|        w->link_newer->link_older = w->link_older;
  533|      0|      }
  534|       |      // insert into r_list
  535|      0|      if (re == nullptr) {
  ------------------
  |  Branch (535:11): [True: 0, False: 0]
  ------------------
  536|      0|        rb = re = w;
  537|      0|        w->link_older = nullptr;
  538|      0|      } else {
  539|      0|        w->link_older = re;
  540|      0|        re->link_newer = w;
  541|      0|        re = w;
  542|      0|      }
  543|      0|    } else {
  544|       |      // grow up
  545|      0|      we = w;
  546|      0|      w->write_group = write_group;
  547|      0|      size += WriteBatchInternal::ByteSize(w->batch);
  548|      0|      write_group->last_writer = w;
  549|      0|      write_group->size++;
  550|      0|    }
  551|      0|  }
  552|       |  // append r_list after write_group end
  553|  1.36M|  if (rb != nullptr) {
  ------------------
  |  Branch (553:7): [True: 0, False: 1.36M]
  ------------------
  554|      0|    rb->link_older = we;
  555|      0|    re->link_newer = nullptr;
  556|      0|    we->link_newer = rb;
  557|      0|    if (!newest_writer_.compare_exchange_weak(w, re)) {
  ------------------
  |  Branch (557:9): [True: 0, False: 0]
  ------------------
  558|      0|      while (w->link_older != newest_writer) {
  ------------------
  |  Branch (558:14): [True: 0, False: 0]
  ------------------
  559|      0|        w = w->link_older;
  560|      0|      }
  561|      0|      w->link_older = re;
  562|      0|    }
  563|      0|  }
  564|       |
  565|  1.36M|  TEST_SYNC_POINT_CALLBACK("WriteThread::EnterAsBatchGroupLeader:End", w);
  566|  1.36M|  return size;
  567|  1.36M|}
_ZN7rocksdb11WriteThread22ExitAsBatchGroupLeaderERNS0_10WriteGroupERNS_6StatusE:
  750|  1.36M|                                         Status& status) {
  751|  1.36M|  TEST_SYNC_POINT_CALLBACK("WriteThread::ExitAsBatchGroupLeader:Start",
  752|  1.36M|                           &write_group);
  753|       |
  754|  1.36M|  Writer* leader = write_group.leader;
  755|  1.36M|  Writer* last_writer = write_group.last_writer;
  756|  1.36M|  assert(leader->link_older == nullptr);
  757|       |
  758|       |  // If status is non-ok already, then write_group.status won't have the chance
  759|       |  // of being propagated to caller.
  760|  1.36M|  if (!status.ok()) {
  ------------------
  |  Branch (760:7): [True: 0, False: 1.36M]
  ------------------
  761|      0|    write_group.status.PermitUncheckedError();
  762|      0|  }
  763|       |
  764|       |  // Propagate memtable write error to the whole group.
  765|  1.36M|  if (status.ok() && !write_group.status.ok()) {
  ------------------
  |  Branch (765:7): [True: 1.36M, False: 0]
  |  Branch (765:22): [True: 0, False: 1.36M]
  ------------------
  766|      0|    status = write_group.status;
  767|      0|  }
  768|       |
  769|  1.36M|  if (enable_pipelined_write_) {
  ------------------
  |  Branch (769:7): [True: 0, False: 1.36M]
  ------------------
  770|       |    // We insert a dummy Writer right before our current write_group. This
  771|       |    // allows us to unlink our write_group without the risk that a subsequent
  772|       |    // writer becomes a new leader and might overtake us and add itself to the
  773|       |    // memtable-writer-list before we can do so. This ensures that writers are
  774|       |    // added to the memtable-writer-list in the exact same order in which they
  775|       |    // were in the newest_writer list.
  776|       |    // This must happen before completing the writers from our group to prevent
  777|       |    // a race where the owning thread of one of these writers can start a new
  778|       |    // write operation.
  779|      0|    Writer dummy;
  780|      0|    Writer* head = newest_writer_.load(std::memory_order_acquire);
  781|      0|    if (head != last_writer ||
  ------------------
  |  Branch (781:9): [True: 0, False: 0]
  ------------------
  782|      0|        !newest_writer_.compare_exchange_strong(head, &dummy)) {
  ------------------
  |  Branch (782:9): [True: 0, False: 0]
  ------------------
  783|       |      // Either last_writer wasn't the head during the load(), or it was the
  784|       |      // head during the load() but somebody else pushed onto the list before
  785|       |      // we did the compare_exchange_strong (causing it to fail). In the latter
  786|       |      // case compare_exchange_strong has the effect of re-reading its first
  787|       |      // param (head). No need to retry a failing CAS, because only a departing
  788|       |      // leader (which we are at the moment) can remove nodes from the list.
  789|      0|      assert(head != last_writer);
  790|       |
  791|       |      // After walking link_older starting from head (if not already done) we
  792|       |      // will be able to traverse w->link_newer below.
  793|      0|      CreateMissingNewerLinks(head);
  794|      0|      assert(last_writer->link_newer != nullptr);
  795|      0|      last_writer->link_newer->link_older = &dummy;
  796|      0|      dummy.link_newer = last_writer->link_newer;
  797|      0|    }
  798|       |
  799|       |    // Complete writers that don't write to memtable
  800|      0|    for (Writer* w = last_writer; w != leader;) {
  ------------------
  |  Branch (800:35): [True: 0, False: 0]
  ------------------
  801|      0|      Writer* next = w->link_older;
  802|      0|      w->status = status;
  803|      0|      if (!w->ShouldWriteToMemtable()) {
  ------------------
  |  Branch (803:11): [True: 0, False: 0]
  ------------------
  804|      0|        CompleteFollower(w, write_group);
  805|      0|      }
  806|      0|      w = next;
  807|      0|    }
  808|      0|    if (!leader->ShouldWriteToMemtable()) {
  ------------------
  |  Branch (808:9): [True: 0, False: 0]
  ------------------
  809|      0|      CompleteLeader(write_group);
  810|      0|    }
  811|       |
  812|      0|    TEST_SYNC_POINT_CALLBACK(
  813|      0|        "WriteThread::ExitAsBatchGroupLeader:AfterCompleteWriters",
  814|      0|        &write_group);
  815|       |
  816|       |    // Link the remaining of the group to memtable writer list.
  817|       |    // We have to link our group to memtable writer queue before wake up the
  818|       |    // next leader or set newest_writer_ to null, otherwise the next leader
  819|       |    // can run ahead of us and link to memtable writer queue before we do.
  820|      0|    if (write_group.size > 0) {
  ------------------
  |  Branch (820:9): [True: 0, False: 0]
  ------------------
  821|      0|      if (LinkGroup(write_group, &newest_memtable_writer_)) {
  ------------------
  |  Branch (821:11): [True: 0, False: 0]
  ------------------
  822|       |        // The leader can now be different from current writer.
  823|      0|        SetState(write_group.leader, STATE_MEMTABLE_WRITER_LEADER);
  824|      0|      }
  825|      0|    }
  826|       |
  827|       |    // Unlink the dummy writer from the list and identify the new leader
  828|      0|    head = newest_writer_.load(std::memory_order_acquire);
  829|      0|    if (head != &dummy ||
  ------------------
  |  Branch (829:9): [True: 0, False: 0]
  ------------------
  830|      0|        !newest_writer_.compare_exchange_strong(head, nullptr)) {
  ------------------
  |  Branch (830:9): [True: 0, False: 0]
  ------------------
  831|      0|      CreateMissingNewerLinks(head);
  832|      0|      Writer* new_leader = dummy.link_newer;
  833|      0|      assert(new_leader != nullptr);
  834|      0|      new_leader->link_older = nullptr;
  835|      0|      SetState(new_leader, STATE_GROUP_LEADER);
  836|      0|    }
  837|       |
  838|      0|    AwaitState(leader,
  839|      0|               STATE_MEMTABLE_WRITER_LEADER | STATE_PARALLEL_MEMTABLE_CALLER |
  840|      0|                   STATE_PARALLEL_MEMTABLE_WRITER | STATE_COMPLETED,
  841|      0|               &eabgl_ctx);
  842|  1.36M|  } else {
  843|  1.36M|    Writer* head = newest_writer_.load(std::memory_order_acquire);
  844|  1.36M|    if (head != last_writer ||
  ------------------
  |  Branch (844:9): [True: 0, False: 1.36M]
  ------------------
  845|  1.36M|        !newest_writer_.compare_exchange_strong(head, nullptr)) {
  ------------------
  |  Branch (845:9): [True: 0, False: 1.36M]
  ------------------
  846|       |      // Either last_writer wasn't the head during the load(), or it was the
  847|       |      // head during the load() but somebody else pushed onto the list before
  848|       |      // we did the compare_exchange_strong (causing it to fail).  In the
  849|       |      // latter case compare_exchange_strong has the effect of re-reading
  850|       |      // its first param (head).  No need to retry a failing CAS, because
  851|       |      // only a departing leader (which we are at the moment) can remove
  852|       |      // nodes from the list.
  853|      0|      assert(head != last_writer);
  854|       |
  855|       |      // After walking link_older starting from head (if not already done)
  856|       |      // we will be able to traverse w->link_newer below. This function
  857|       |      // can only be called from an active leader, only a leader can
  858|       |      // clear newest_writer_, we didn't, and only a clear newest_writer_
  859|       |      // could cause the next leader to start their work without a call
  860|       |      // to MarkJoined, so we can definitely conclude that no other leader
  861|       |      // work is going on here (with or without db mutex).
  862|      0|      CreateMissingNewerLinks(head);
  863|      0|      assert(last_writer->link_newer != nullptr);
  864|      0|      assert(last_writer->link_newer->link_older == last_writer);
  865|      0|      last_writer->link_newer->link_older = nullptr;
  866|       |
  867|       |      // Next leader didn't self-identify, because newest_writer_ wasn't
  868|       |      // nullptr when they enqueued (we were definitely enqueued before them
  869|       |      // and are still in the list).  That means leader handoff occurs when
  870|       |      // we call MarkJoined
  871|      0|      SetState(last_writer->link_newer, STATE_GROUP_LEADER);
  872|      0|    }
  873|       |    // else nobody else was waiting, although there might already be a new
  874|       |    // leader now
  875|       |
  876|  1.36M|    while (last_writer != leader) {
  ------------------
  |  Branch (876:12): [True: 0, False: 1.36M]
  ------------------
  877|      0|      assert(last_writer);
  878|      0|      last_writer->status = status;
  879|       |      // we need to read link_older before calling SetState, because as soon
  880|       |      // as it is marked committed the other thread's Await may return and
  881|       |      // deallocate the Writer.
  882|      0|      auto next = last_writer->link_older;
  883|      0|      SetState(last_writer, STATE_COMPLETED);
  884|       |
  885|      0|      last_writer = next;
  886|      0|    }
  887|  1.36M|  }
  888|  1.36M|}

_ZN7rocksdb11WriteThreadD2Ev:
  295|  18.0k|  virtual ~WriteThread() = default;
_ZN7rocksdb11WriteThread6WriterC2Ev:
  171|  18.0k|          link_newer(nullptr) {}
_ZN7rocksdb11WriteThread6WriterD2Ev:
  201|  1.37M|    ~Writer() {
  202|  1.37M|      if (made_waitable) {
  ------------------
  |  Branch (202:11): [True: 0, False: 1.37M]
  ------------------
  203|      0|        StateMutex().~mutex();
  204|      0|        StateCV().~condition_variable();
  205|      0|      }
  206|  1.37M|      status.PermitUncheckedError();
  207|  1.37M|      callback_status.PermitUncheckedError();
  208|  1.37M|    }
_ZN7rocksdb11WriteThread10WriteGroup8IteratorC2EPNS0_6WriterES4_:
  100|  13.6M|          : writer(w), last_writer(last) {}
_ZNK7rocksdb11WriteThread10WriteGroup8IteratordeEv:
  102|  6.80M|      Writer* operator*() const { return writer; }
_ZN7rocksdb11WriteThread10WriteGroup8IteratorppEv:
  104|  6.80M|      Iterator& operator++() {
  105|  6.80M|        assert(writer != nullptr);
  106|  6.80M|        if (writer == last_writer) {
  ------------------
  |  Branch (106:13): [True: 6.80M, False: 0]
  ------------------
  107|  6.80M|          writer = nullptr;
  108|  6.80M|        } else {
  109|      0|          writer = writer->link_newer;
  110|      0|        }
  111|  6.80M|        return *this;
  112|  6.80M|      }
_ZNK7rocksdb11WriteThread10WriteGroup8IteratorneERKS2_:
  114|  13.6M|      bool operator!=(const Iterator& other) const {
  115|  13.6M|        return writer != other.writer;
  116|  13.6M|      }
_ZNK7rocksdb11WriteThread10WriteGroup5beginEv:
  119|  6.80M|    Iterator begin() const { return Iterator(leader, last_writer); }
_ZNK7rocksdb11WriteThread10WriteGroup3endEv:
  120|  6.80M|    Iterator end() const { return Iterator(nullptr, nullptr); }
_ZN7rocksdb11WriteThread6WriterC2ERKNS_12WriteOptionsEPNS_10WriteBatchEPNS_13WriteCallbackEPNS_17UserWriteCallbackEmbmPNS_18PreReleaseCallbackEPNS_20PostMemTableCallbackE:
  199|  1.36M|          link_newer(nullptr) {}
_ZN7rocksdb11WriteThread6Writer13CheckCallbackEPNS_2DBE:
  210|  1.36M|    bool CheckCallback(DB* db) {
  211|  1.36M|      if (callback != nullptr) {
  ------------------
  |  Branch (211:11): [True: 0, False: 1.36M]
  ------------------
  212|      0|        callback_status = callback->Callback(db);
  213|      0|      }
  214|  1.36M|      return callback_status.ok();
  215|  1.36M|    }
_ZN7rocksdb11WriteThread6Writer26CheckWriteEnqueuedCallbackEv:
  217|  1.36M|    void CheckWriteEnqueuedCallback() {
  218|  1.36M|      if (user_write_cb != nullptr) {
  ------------------
  |  Branch (218:11): [True: 0, False: 1.36M]
  ------------------
  219|      0|        user_write_cb->OnWriteEnqueued();
  220|      0|      }
  221|  1.36M|    }
_ZN7rocksdb11WriteThread6Writer25CheckPostWalWriteCallbackEv:
  223|  1.36M|    void CheckPostWalWriteCallback() {
  224|  1.36M|      if (user_write_cb != nullptr) {
  ------------------
  |  Branch (224:11): [True: 0, False: 1.36M]
  ------------------
  225|      0|        user_write_cb->OnWalWriteFinish();
  226|      0|      }
  227|  1.36M|    }
_ZN7rocksdb11WriteThread6Writer11FinalStatusEv:
  241|  1.36M|    Status FinalStatus() {
  242|  1.36M|      if (!status.ok()) {
  ------------------
  |  Branch (242:11): [True: 0, False: 1.36M]
  ------------------
  243|       |        // a non-ok memtable write status takes presidence
  244|      0|        assert(callback == nullptr || callback_status.ok());
  245|      0|        return status;
  246|  1.36M|      } else if (!callback_status.ok()) {
  ------------------
  |  Branch (246:18): [True: 0, False: 1.36M]
  ------------------
  247|       |        // if the callback failed then that is the status we want
  248|       |        // because a memtable insert should not have been attempted
  249|      0|        assert(callback != nullptr);
  250|      0|        assert(status.ok());
  251|      0|        return callback_status;
  252|  1.36M|      } else {
  253|       |        // if there is no callback then we only care about
  254|       |        // the memtable insert status
  255|  1.36M|        assert(callback == nullptr || callback_status.ok());
  256|  1.36M|        return status;
  257|  1.36M|      }
  258|  1.36M|    }
_ZN7rocksdb11WriteThread6Writer14CallbackFailedEv:
  260|  10.8M|    bool CallbackFailed() {
  261|  10.8M|      return (callback != nullptr) && !callback_status.ok();
  ------------------
  |  Branch (261:14): [True: 0, False: 10.8M]
  |  Branch (261:39): [True: 0, False: 0]
  ------------------
  262|  10.8M|    }
_ZN7rocksdb11WriteThread6Writer21ShouldWriteToMemtableEv:
  264|  4.08M|    bool ShouldWriteToMemtable() {
  265|  4.08M|      return status.ok() && !CallbackFailed() && !disable_memtable;
  ------------------
  |  Branch (265:14): [True: 4.08M, False: 0]
  |  Branch (265:29): [True: 4.08M, False: 0]
  |  Branch (265:50): [True: 4.08M, False: 0]
  ------------------
  266|  4.08M|    }
_ZN7rocksdb11WriteThread17AdaptationContextC2EPKc:
  290|     10|    explicit AdaptationContext(const char* name0) : name(name0), value(0) {}

_ZN7rocksdb12CompositeEnvC2ERKNSt3__110shared_ptrINS_10FileSystemEEERKNS2_INS_11SystemClockEEE:
   34|      1|      : Env(fs, clock) {}
_ZN7rocksdb12CompositeEnv15RegisterDbPathsERKNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEE:
   36|  9.02k|  Status RegisterDbPaths(const std::vector<std::string>& paths) override {
   37|  9.02k|    return file_system_->RegisterDbPaths(paths);
   38|  9.02k|  }
_ZN7rocksdb12CompositeEnv17UnregisterDbPathsERKNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEE:
   39|  9.02k|  Status UnregisterDbPaths(const std::vector<std::string>& paths) override {
   40|  9.02k|    return file_system_->UnregisterDbPaths(paths);
   41|  9.02k|  }
_ZN7rocksdb12CompositeEnv10FileExistsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   77|  22.5k|  Status FileExists(const std::string& f) override {
   78|  22.5k|    IOOptions io_opts;
   79|  22.5k|    IODebugContext dbg;
   80|  22.5k|    return file_system_->FileExists(f, io_opts, &dbg);
   81|  22.5k|  }
_ZN7rocksdb12CompositeEnv11GetChildrenERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPNS1_6vectorIS7_NS5_IS7_EEEE:
   83|  18.0k|                     std::vector<std::string>* r) override {
   84|  18.0k|    IOOptions io_opts;
   85|  18.0k|    IODebugContext dbg;
   86|  18.0k|    return file_system_->GetChildren(dir, io_opts, r, &dbg);
   87|  18.0k|  }
_ZN7rocksdb12CompositeEnv10DeleteFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   94|  49.6k|  Status DeleteFile(const std::string& f) override {
   95|  49.6k|    IOOptions io_opts;
   96|  49.6k|    IODebugContext dbg;
   97|  49.6k|    return file_system_->DeleteFile(f, io_opts, &dbg);
   98|  49.6k|  }
_ZN7rocksdb12CompositeEnv18CreateDirIfMissingERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  109|  31.5k|  Status CreateDirIfMissing(const std::string& d) override {
  110|  31.5k|    IOOptions io_opts;
  111|  31.5k|    IODebugContext dbg;
  112|  31.5k|    return file_system_->CreateDirIfMissing(d, io_opts, &dbg);
  113|  31.5k|  }
_ZN7rocksdb12CompositeEnv9DeleteDirERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  114|  4.51k|  Status DeleteDir(const std::string& d) override {
  115|  4.51k|    IOOptions io_opts;
  116|  4.51k|    IODebugContext dbg;
  117|  4.51k|    return file_system_->DeleteDir(d, io_opts, &dbg);
  118|  4.51k|  }
_ZN7rocksdb12CompositeEnv11GetFileSizeERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPm:
  119|  22.5k|  Status GetFileSize(const std::string& f, uint64_t* s) override {
  120|  22.5k|    IOOptions io_opts;
  121|  22.5k|    IODebugContext dbg;
  122|  22.5k|    return file_system_->GetFileSize(f, io_opts, s, &dbg);
  123|  22.5k|  }
_ZN7rocksdb12CompositeEnv10RenameFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
  133|  22.5k|  Status RenameFile(const std::string& s, const std::string& t) override {
  134|  22.5k|    IOOptions io_opts;
  135|  22.5k|    IODebugContext dbg;
  136|  22.5k|    return file_system_->RenameFile(s, t, io_opts, &dbg);
  137|  22.5k|  }
_ZN7rocksdb12CompositeEnv8LockFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPPNS_8FileLockE:
  158|  13.5k|  Status LockFile(const std::string& f, FileLock** l) override {
  159|  13.5k|    IOOptions io_opts;
  160|  13.5k|    IODebugContext dbg;
  161|  13.5k|    return file_system_->LockFile(f, io_opts, l, &dbg);
  162|  13.5k|  }
_ZN7rocksdb12CompositeEnv10UnlockFileEPNS_8FileLockE:
  164|  13.5k|  Status UnlockFile(FileLock* l) override {
  165|  13.5k|    IOOptions io_opts;
  166|  13.5k|    IODebugContext dbg;
  167|  13.5k|    return file_system_->UnlockFile(l, io_opts, &dbg);
  168|  13.5k|  }
_ZN7rocksdb12CompositeEnv15GetAbsolutePathERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPS7_:
  171|  13.5k|                         std::string* output_path) override {
  172|  13.5k|    IOOptions io_opts;
  173|  13.5k|    IODebugContext dbg;
  174|  13.5k|    return file_system_->GetAbsolutePath(db_path, io_opts, output_path, &dbg);
  175|  13.5k|  }
_ZN7rocksdb12CompositeEnv9NewLoggerERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPNS1_10shared_ptrINS_6LoggerEEE:
  178|  13.5k|                   std::shared_ptr<Logger>* result) override {
  179|  13.5k|    IOOptions io_opts;
  180|  13.5k|    IODebugContext dbg;
  181|  13.5k|    return file_system_->NewLogger(fname, io_opts, result, &dbg);
  182|  13.5k|  }
_ZN7rocksdb12CompositeEnv8NowNanosEv:
  244|      2|  uint64_t NowNanos() override { return system_clock_->NowNanos(); }
_ZN7rocksdb12CompositeEnv14GetCurrentTimeEPl:
  252|      2|  Status GetCurrentTime(int64_t* unix_time) override {
  253|      2|    return system_clock_->GetCurrentTime(unix_time);
  254|      2|  }

_ZN7rocksdb3EnvC2ERKNSt3__110shared_ptrINS_10FileSystemEEERKNS2_INS_11SystemClockEEE:
  631|      1|    : thread_status_updater_(nullptr), file_system_(fs), system_clock_(clock) {}
_ZN7rocksdb3Env16PriorityToStringENS0_8PriorityE:
  718|      2|std::string Env::PriorityToString(Env::Priority priority) {
  719|      2|  switch (priority) {
  ------------------
  |  Branch (719:11): [True: 0, False: 2]
  ------------------
  720|      0|    case Env::Priority::BOTTOM:
  ------------------
  |  Branch (720:5): [True: 0, False: 2]
  ------------------
  721|      0|      return "Bottom";
  722|      1|    case Env::Priority::LOW:
  ------------------
  |  Branch (722:5): [True: 1, False: 1]
  ------------------
  723|      1|      return "Low";
  724|      1|    case Env::Priority::HIGH:
  ------------------
  |  Branch (724:5): [True: 1, False: 1]
  ------------------
  725|      1|      return "High";
  726|      0|    case Env::Priority::USER:
  ------------------
  |  Branch (726:5): [True: 0, False: 2]
  ------------------
  727|      0|      return "User";
  728|      0|    case Env::Priority::TOTAL:
  ------------------
  |  Branch (728:5): [True: 0, False: 2]
  ------------------
  729|      0|      assert(false);
  730|      2|  }
  731|      0|  return "Invalid";
  732|      2|}
_ZN7rocksdb3Env17GetHostNameStringEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  776|   108k|Status Env::GetHostNameString(std::string* result) {
  777|   108k|  std::array<char, kMaxHostNameLen> hostname_buf{};
  778|   108k|  Status s = GetHostName(hostname_buf.data(), hostname_buf.size());
  779|   108k|  if (s.ok()) {
  ------------------
  |  Branch (779:7): [True: 108k, False: 0]
  ------------------
  780|   108k|    hostname_buf[hostname_buf.size() - 1] = '\0';
  781|   108k|    result->assign(hostname_buf.data());
  782|   108k|  }
  783|   108k|  return s;
  784|   108k|}
_ZN7rocksdb3Env16GenerateUniqueIdEv:
  786|  4.51k|std::string Env::GenerateUniqueId() {
  787|  4.51k|  std::string result;
  788|  4.51k|  bool success = port::GenerateRfcUuid(&result);
  789|  4.51k|  if (!success) {
  ------------------
  |  Branch (789:7): [True: 0, False: 4.51k]
  ------------------
  790|       |    // Fall back on our own way of generating a unique ID and adapt it to
  791|       |    // RFC 4122 variant 1 version 4 (a random ID).
  792|       |    // https://en.wikipedia.org/wiki/Universally_unique_identifier
  793|       |    // We already tried GenerateRfcUuid so no need to try it again in
  794|       |    // GenerateRawUniqueId
  795|      0|    constexpr bool exclude_port_uuid = true;
  796|      0|    uint64_t upper, lower;
  797|      0|    GenerateRawUniqueId(&upper, &lower, exclude_port_uuid);
  798|       |
  799|       |    // Set 4-bit version to 4
  800|      0|    upper = (upper & (~uint64_t{0xf000})) | 0x4000;
  801|       |    // Set unary-encoded variant to 1 (0b10)
  802|      0|    lower = (lower & (~(uint64_t{3} << 62))) | (uint64_t{2} << 62);
  803|       |
  804|       |    // Use 36 character format of RFC 4122
  805|      0|    result.resize(36U);
  806|      0|    char* buf = result.data();
  807|      0|    PutBaseChars<16>(&buf, 8, upper >> 32, /*!uppercase*/ false);
  808|      0|    *(buf++) = '-';
  809|      0|    PutBaseChars<16>(&buf, 4, upper >> 16, /*!uppercase*/ false);
  810|      0|    *(buf++) = '-';
  811|      0|    PutBaseChars<16>(&buf, 4, upper, /*!uppercase*/ false);
  812|      0|    *(buf++) = '-';
  813|      0|    PutBaseChars<16>(&buf, 4, lower >> 48, /*!uppercase*/ false);
  814|      0|    *(buf++) = '-';
  815|      0|    PutBaseChars<16>(&buf, 12, lower, /*!uppercase*/ false);
  816|      0|    assert(buf == &result[36]);
  817|       |
  818|       |    // Verify variant 1 version 4
  819|      0|    assert(result[14] == '4');
  820|      0|    assert(result[19] == '8' || result[19] == '9' || result[19] == 'a' ||
  821|      0|           result[19] == 'b');
  822|      0|  }
  823|  4.51k|  return result;
  824|  4.51k|}
_ZN7rocksdb6LoggerD2Ev:
  843|  13.5k|Logger::~Logger() = default;
_ZN7rocksdb6Logger5CloseEv:
  845|  9.02k|Status Logger::Close() {
  846|  9.02k|  if (!closed_) {
  ------------------
  |  Branch (846:7): [True: 9.02k, False: 0]
  ------------------
  847|  9.02k|    closed_ = true;
  848|  9.02k|    return CloseImpl();
  849|  9.02k|  } else {
  850|      0|    return Status::OK();
  851|      0|  }
  852|  9.02k|}
_ZN7rocksdb8FileLockD2Ev:
  856|  13.5k|FileLock::~FileLock() = default;
_ZN7rocksdb8LogFlushEPNS_6LoggerE:
  858|  50.5k|void LogFlush(Logger* info_log) {
  859|  50.5k|  if (info_log) {
  ------------------
  |  Branch (859:7): [True: 50.5k, False: 0]
  ------------------
  860|  50.5k|    info_log->Flush();
  861|  50.5k|  }
  862|  50.5k|}
_ZN7rocksdb3LogEPNS_6LoggerEPKcz:
  870|  13.5k|void Log(Logger* info_log, const char* format, ...) {
  871|  13.5k|  va_list ap;
  872|  13.5k|  va_start(ap, format);
  873|  13.5k|  Logv(info_log, format, ap);
  874|  13.5k|  va_end(ap);
  875|  13.5k|}
_ZN7rocksdb6Logger4LogvENS_12InfoLogLevelEPKcP13__va_list_tag:
  878|  1.96M|                  va_list ap) {
  879|  1.96M|  static const char* kInfoLogLevelNames[5] = {"DEBUG", "INFO", "WARN", "ERROR",
  880|  1.96M|                                              "FATAL"};
  881|  1.96M|  if (log_level < log_level_) {
  ------------------
  |  Branch (881:7): [True: 0, False: 1.96M]
  ------------------
  882|      0|    return;
  883|      0|  }
  884|       |
  885|  1.96M|  if (log_level == InfoLogLevel::INFO_LEVEL) {
  ------------------
  |  Branch (885:7): [True: 1.96M, False: 0]
  ------------------
  886|       |    // Doesn't print log level if it is INFO level.
  887|       |    // This is to avoid unexpected performance regression after we add
  888|       |    // the feature of log level. All the logs before we add the feature
  889|       |    // are INFO level. We don't want to add extra costs to those existing
  890|       |    // logging.
  891|  1.96M|    Logv(format, ap);
  892|  1.96M|  } else if (log_level == InfoLogLevel::HEADER_LEVEL) {
  ------------------
  |  Branch (892:14): [True: 0, False: 0]
  ------------------
  893|      0|    LogHeader(format, ap);
  894|      0|  } else {
  895|      0|    char new_format[500];
  896|      0|    snprintf(new_format, sizeof(new_format) - 1, "[%s] %s",
  897|      0|             kInfoLogLevelNames[log_level], format);
  898|      0|    Logv(new_format, ap);
  899|      0|  }
  900|       |
  901|  1.96M|  if (log_level >= InfoLogLevel::WARN_LEVEL &&
  ------------------
  |  Branch (901:7): [True: 0, False: 1.96M]
  ------------------
  902|  1.96M|      log_level != InfoLogLevel::HEADER_LEVEL) {
  ------------------
  |  Branch (902:7): [True: 0, False: 0]
  ------------------
  903|       |    // Log messages with severity of warning or higher should be rare and are
  904|       |    // sometimes followed by an unclean crash. We want to be sure important
  905|       |    // messages are not lost in an application buffer when that happens.
  906|      0|    Flush();
  907|      0|  }
  908|  1.96M|}
_ZN7rocksdb3LogENS_12InfoLogLevelEPNS_6LoggerEPKcz:
  922|  1.79M|         ...) {
  923|  1.79M|  va_list ap;
  924|  1.79M|  va_start(ap, format);
  925|  1.79M|  Logv(log_level, info_log, format, ap);
  926|  1.79M|  va_end(ap);
  927|  1.79M|}
_ZN7rocksdb6HeaderEPNS_6LoggerEPKcz:
  935|  9.02k|void Header(Logger* info_log, const char* format, ...) {
  936|  9.02k|  va_list ap;
  937|  9.02k|  va_start(ap, format);
  938|  9.02k|  Headerv(info_log, format, ap);
  939|  9.02k|  va_end(ap);
  940|  9.02k|}
_ZN7rocksdb8LogFlushERKNSt3__110shared_ptrINS_6LoggerEEE:
 1007|  50.5k|void LogFlush(const std::shared_ptr<Logger>& info_log) {
 1008|  50.5k|  LogFlush(info_log.get());
 1009|  50.5k|}
_ZN7rocksdb3LogENS_12InfoLogLevelERKNSt3__110shared_ptrINS_6LoggerEEEPKcz:
 1012|   112k|         const char* format, ...) {
 1013|   112k|  va_list ap;
 1014|   112k|  va_start(ap, format);
 1015|   112k|  Logv(log_level, info_log.get(), format, ap);
 1016|   112k|  va_end(ap);
 1017|   112k|}
_ZN7rocksdb6HeaderERKNSt3__110shared_ptrINS_6LoggerEEEPKcz:
 1019|  58.6k|void Header(const std::shared_ptr<Logger>& info_log, const char* format, ...) {
 1020|  58.6k|  va_list ap;
 1021|  58.6k|  va_start(ap, format);
 1022|  58.6k|  Headerv(info_log.get(), format, ap);
 1023|  58.6k|  va_end(ap);
 1024|  58.6k|}
_ZN7rocksdb17WriteStringToFileEPNS_3EnvERKNS_5SliceERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEbPKNS_9IOOptionsE:
 1069|  4.51k|                         bool should_sync, const IOOptions* io_options) {
 1070|  4.51k|  const auto& fs = env->GetFileSystem();
 1071|  4.51k|  return WriteStringToFile(fs.get(), data, fname, should_sync,
 1072|  4.51k|                           io_options ? *io_options : IOOptions());
  ------------------
  |  Branch (1072:28): [True: 4.51k, False: 0]
  ------------------
 1073|  4.51k|}
_ZN7rocksdb10EnvOptionsC2ERKNS_9DBOptionsE:
 1147|  9.02k|EnvOptions::EnvOptions(const DBOptions& options) {
 1148|  9.02k|  AssignEnvOptions(this, options);
 1149|  9.02k|}
_ZN7rocksdb10EnvOptionsC2Ev:
 1151|  85.7k|EnvOptions::EnvOptions() {
 1152|  85.7k|  DBOptions options;
 1153|  85.7k|  AssignEnvOptions(this, options);
 1154|  85.7k|}
_ZNK7rocksdb3Env13GetFileSystemEv:
 1173|   194k|const std::shared_ptr<FileSystem>& Env::GetFileSystem() const {
 1174|   194k|  return file_system_;
 1175|   194k|}
_ZNK7rocksdb3Env14GetSystemClockEv:
 1177|   196k|const std::shared_ptr<SystemClock>& Env::GetSystemClock() const {
 1178|   196k|  return system_clock_;
 1179|   196k|}
env.cc:_ZN7rocksdbL4LogvEPNS_6LoggerEPKcP13__va_list_tag:
  864|  13.5k|static void Logv(Logger* info_log, const char* format, va_list ap) {
  865|  13.5k|  if (info_log && info_log->GetInfoLogLevel() <= InfoLogLevel::INFO_LEVEL) {
  ------------------
  |  Branch (865:7): [True: 13.5k, False: 0]
  |  Branch (865:19): [True: 13.5k, False: 0]
  ------------------
  866|  13.5k|    info_log->Logv(InfoLogLevel::INFO_LEVEL, format, ap);
  867|  13.5k|  }
  868|  13.5k|}
env.cc:_ZN7rocksdbL4LogvENS_12InfoLogLevelEPNS_6LoggerEPKcP13__va_list_tag:
  911|  1.90M|                 const char* format, va_list ap) {
  912|  1.90M|  if (info_log && info_log->GetInfoLogLevel() <= log_level) {
  ------------------
  |  Branch (912:7): [True: 1.90M, False: 0]
  |  Branch (912:19): [True: 1.88M, False: 22.5k]
  ------------------
  913|  1.88M|    if (log_level == InfoLogLevel::HEADER_LEVEL) {
  ------------------
  |  Branch (913:9): [True: 1.77M, False: 103k]
  ------------------
  914|  1.77M|      info_log->LogHeader(format, ap);
  915|  1.77M|    } else {
  916|   103k|      info_log->Logv(log_level, format, ap);
  917|   103k|    }
  918|  1.88M|  }
  919|  1.90M|}
env.cc:_ZN7rocksdbL7HeadervEPNS_6LoggerEPKcP13__va_list_tag:
  929|  67.7k|static void Headerv(Logger* info_log, const char* format, va_list ap) {
  930|  67.7k|  if (info_log) {
  ------------------
  |  Branch (930:7): [True: 67.7k, False: 0]
  ------------------
  931|  67.7k|    info_log->LogHeader(format, ap);
  932|  67.7k|  }
  933|  67.7k|}
env.cc:_ZN7rocksdb12_GLOBAL__N_116AssignEnvOptionsEPNS_10EnvOptionsERKNS_9DBOptionsE:
 1082|  94.7k|void AssignEnvOptions(EnvOptions* env_options, const DBOptions& options) {
 1083|  94.7k|  env_options->use_mmap_reads = options.allow_mmap_reads;
 1084|  94.7k|  env_options->use_mmap_writes = options.allow_mmap_writes;
 1085|  94.7k|  env_options->use_direct_reads = options.use_direct_reads;
 1086|  94.7k|  env_options->set_fd_cloexec = options.is_fd_close_on_exec;
 1087|  94.7k|  env_options->bytes_per_sync = options.bytes_per_sync;
 1088|  94.7k|  env_options->compaction_readahead_size = options.compaction_readahead_size;
 1089|  94.7k|  env_options->random_access_max_buffer_size =
 1090|  94.7k|      options.random_access_max_buffer_size;
 1091|  94.7k|  env_options->rate_limiter = options.rate_limiter.get();
 1092|  94.7k|  env_options->writable_file_max_buffer_size =
 1093|  94.7k|      options.writable_file_max_buffer_size;
 1094|  94.7k|  env_options->allow_fallocate = options.allow_fallocate;
 1095|  94.7k|  env_options->strict_bytes_per_sync = options.strict_bytes_per_sync;
 1096|  94.7k|  options.env->SanitizeEnvOptions(env_options);
 1097|  94.7k|}

_ZN7rocksdb3Env7DefaultEv:
  498|   361k|Env* Env::Default() {
  499|       |  // The following function call initializes the singletons of ThreadLocalPtr
  500|       |  // right before the static default_env.  This guarantees default_env will
  501|       |  // always being destructed before the ThreadLocalPtr singletons get
  502|       |  // destructed as C++ guarantees that the destructions of static variables
  503|       |  // is in the reverse order of their constructions.
  504|       |  //
  505|       |  // Since static members are destructed in the reverse order
  506|       |  // of their construction, having this call here guarantees that
  507|       |  // the destructor of static PosixEnv will go first, then the
  508|       |  // the singletons of ThreadLocalPtr.
  509|   361k|  ThreadLocalPtr::InitSingletons();
  510|   361k|  CompressionContextCache::InitSingleton();
  511|   361k|  INIT_SYNC_POINT_SINGLETONS();
  512|       |  // Avoid problems with accessing most members of Env::Default() during
  513|       |  // static destruction.
  514|   361k|  STATIC_AVOID_DESTRUCTION(PosixEnv, default_env);
  ------------------
  |  |   53|   361k|#define STATIC_AVOID_DESTRUCTION(Type, name) static Type& name = *new Type
  ------------------
  515|       |  // This destructor must be called on exit
  516|   361k|  static PosixEnv::JoinThreadsOnExit thread_joiner(default_env);
  517|   361k|  return &default_env;
  518|   361k|}
_ZN7rocksdb11SystemClock7DefaultEv:
  523|   126k|const std::shared_ptr<SystemClock>& SystemClock::Default() {
  524|   126k|  STATIC_AVOID_DESTRUCTION(std::shared_ptr<SystemClock>, instance)
  ------------------
  |  |   53|   126k|#define STATIC_AVOID_DESTRUCTION(Type, name) static Type& name = *new Type
  ------------------
  525|   126k|  (std::make_shared<PosixClock>());
  526|   126k|  return instance;
  527|   126k|}
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_18PosixEnvC2Ev:
  426|      1|      allow_non_owner_access_(allow_non_owner_access_storage_) {
  427|      1|  ThreadPoolImpl::PthreadCall("mutex_init", pthread_mutex_init(&mu_, nullptr));
  428|      5|  for (int pool_id = 0; pool_id < Env::Priority::TOTAL; ++pool_id) {
  ------------------
  |  Branch (428:25): [True: 4, False: 1]
  ------------------
  429|      4|    thread_pools_[pool_id].SetThreadPriority(
  430|      4|        static_cast<Env::Priority>(pool_id));
  431|       |    // This allows later initializing the thread-local-env of each thread.
  432|      4|    thread_pools_[pool_id].SetHostEnv(this);
  433|      4|  }
  434|      1|  thread_status_updater_ = CreateThreadStatusUpdater();
  435|      1|}
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_125CreateThreadStatusUpdaterEv:
  101|      1|ThreadStatusUpdater* CreateThreadStatusUpdater() {
  102|      1|  return new ThreadStatusUpdater();
  103|      1|}
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_18PosixEnv10UnScheduleEPvNS_3Env8PriorityE:
  443|  54.1k|int PosixEnv::UnSchedule(void* arg, Priority pri) {
  444|  54.1k|  return thread_pools_[pri].UnSchedule(arg);
  445|  54.1k|}
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_18PosixEnv11GetHostNameEPcm:
  334|   108k|  Status GetHostName(char* name, uint64_t len) override {
  335|   108k|    const size_t max_len = static_cast<size_t>(len);
  336|   108k|    int ret = gethostname(name, max_len);
  337|   108k|    if (ret < 0) {
  ------------------
  |  Branch (337:9): [True: 0, False: 108k]
  ------------------
  338|      0|      if (errno == EFAULT || errno == EINVAL) {
  ------------------
  |  Branch (338:11): [True: 0, False: 0]
  |  Branch (338:30): [True: 0, False: 0]
  ------------------
  339|      0|        return Status::InvalidArgument(errnoStr(errno).c_str());
  340|      0|      } else if (errno == ENAMETOOLONG) {
  ------------------
  |  Branch (340:18): [True: 0, False: 0]
  ------------------
  341|      0|        return IOError("GetHostName", std::string(name, strnlen(name, max_len)),
  342|      0|                       errno);
  343|      0|      } else {
  344|      0|        return IOError("GetHostName", "", errno);
  345|      0|      }
  346|      0|    }
  347|   108k|    return Status::OK();
  348|   108k|  }
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_18PosixEnv20GetBackgroundThreadsENS_3Env8PriorityE:
  362|  9.02k|  int GetBackgroundThreads(Priority pri) override {
  363|  9.02k|    assert(pri >= Priority::BOTTOM && pri <= Priority::HIGH);
  364|  9.02k|    return thread_pools_[pri].GetBackgroundThreads();
  365|  9.02k|  }
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_18PosixEnv28IncBackgroundThreadsIfNeededEiNS_3Env8PriorityE:
  373|  27.0k|  void IncBackgroundThreadsIfNeeded(int num, Priority pri) override {
  374|  27.0k|    assert(pri >= Priority::BOTTOM && pri <= Priority::HIGH);
  375|  27.0k|    thread_pools_[pri].IncBackgroundThreadsIfNeeded(num);
  376|  27.0k|  }
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_18PosixEnv16GenerateUniqueIdEv:
  354|  4.51k|  std::string GenerateUniqueId() override { return Env::GenerateUniqueId(); }
env_posix.cc:_ZNK7rocksdb12_GLOBAL__N_18PosixEnv22GetThreadStatusUpdaterEv:
  350|      2|  ThreadStatusUpdater* GetThreadStatusUpdater() const override {
  351|      2|    return Env::GetThreadStatusUpdater();
  352|      2|  }
env_posix.cc:_ZNK7rocksdb12_GLOBAL__N_18PosixEnv11GetThreadIDEv:
  318|  1.97M|  uint64_t GetThreadID() const override {
  319|  1.97M|    uint64_t thread_id = 0;
  320|  1.97M|#if defined(_GNU_SOURCE) && defined(__GLIBC_PREREQ)
  321|  1.97M|#if __GLIBC_PREREQ(2, 30)
  322|  1.97M|    thread_id = ::gettid();
  323|       |#else   // __GLIBC_PREREQ(2, 30)
  324|       |    pthread_t tid = pthread_self();
  325|       |    memcpy(&thread_id, &tid, std::min(sizeof(thread_id), sizeof(tid)));
  326|       |#endif  // __GLIBC_PREREQ(2, 30)
  327|       |#else   // defined(_GNU_SOURCE) && defined(__GLIBC_PREREQ)
  328|       |    pthread_t tid = pthread_self();
  329|       |    memcpy(&thread_id, &tid, std::min(sizeof(thread_id), sizeof(tid)));
  330|       |#endif  // defined(_GNU_SOURCE) && defined(__GLIBC_PREREQ)
  331|  1.97M|    return thread_id;
  332|  1.97M|  }
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_18PosixEnv17JoinThreadsOnExitC2ERS1_:
  219|      1|    explicit JoinThreadsOnExit(PosixEnv& _deflt) : deflt(_deflt) {}
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_18PosixEnv17JoinThreadsOnExitD2Ev:
  220|      1|    ~JoinThreadsOnExit() {
  221|      1|      for (const auto tid : deflt.threads_to_join_) {
  ------------------
  |  Branch (221:27): [True: 0, False: 1]
  ------------------
  222|      0|        pthread_join(tid, nullptr);
  223|      0|      }
  224|      5|      for (int pool_id = 0; pool_id < Env::Priority::TOTAL; ++pool_id) {
  ------------------
  |  Branch (224:29): [True: 4, False: 1]
  ------------------
  225|      4|        deflt.thread_pools_[pool_id].JoinAllThreads();
  226|      4|      }
  227|       |      // Do not delete the thread_status_updater_ in order to avoid the
  228|       |      // free after use when Env::Default() is destructed while some other
  229|       |      // child threads are still trying to update thread status. All
  230|       |      // PosixEnv instances use the same thread_status_updater_, so never
  231|       |      // explicitly delete it.
  232|      1|    }
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_110PosixClock9NowMicrosEv:
  138|  2.10M|  uint64_t NowMicros() override {
  139|  2.10M|    port::TimeVal tv;
  140|  2.10M|    port::GetTimeOfDay(&tv, nullptr);
  141|  2.10M|    return static_cast<uint64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
  142|  2.10M|  }
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_110PosixClock8NowNanosEv:
  144|  18.0k|  uint64_t NowNanos() override {
  145|  18.0k|#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_GNU_KFREEBSD) || \
  146|  18.0k|    defined(OS_AIX)
  147|  18.0k|    struct timespec ts;
  148|  18.0k|    clock_gettime(CLOCK_MONOTONIC, &ts);
  149|  18.0k|    return static_cast<uint64_t>(ts.tv_sec) * 1000000000 + ts.tv_nsec;
  150|       |#elif defined(OS_SOLARIS)
  151|       |    return gethrtime();
  152|       |#elif defined(__MACH__)
  153|       |    clock_serv_t cclock;
  154|       |    mach_timespec_t ts;
  155|       |    host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
  156|       |    clock_get_time(cclock, &ts);
  157|       |    mach_port_deallocate(mach_task_self(), cclock);
  158|       |    return static_cast<uint64_t>(ts.tv_sec) * 1000000000 + ts.tv_nsec;
  159|       |#else
  160|       |    return std::chrono::duration_cast<std::chrono::nanoseconds>(
  161|       |               std::chrono::steady_clock::now().time_since_epoch())
  162|       |        .count();
  163|       |#endif
  164|  18.0k|  }
env_posix.cc:_ZN7rocksdb12_GLOBAL__N_110PosixClock14GetCurrentTimeEPl:
  188|   216k|  Status GetCurrentTime(int64_t* unix_time) override {
  189|   216k|    time_t ret = time(nullptr);
  190|   216k|    if (ret == (time_t)-1) {
  ------------------
  |  Branch (190:9): [True: 0, False: 216k]
  ------------------
  191|      0|      return IOError("GetCurrentTime", "", errno);
  192|      0|    }
  193|   216k|    *unix_time = (int64_t)ret;
  194|   216k|    return Status::OK();
  195|   216k|  }

_ZN7rocksdb10FileSystemC2Ev:
   25|  27.0k|FileSystem::FileSystem() = default;
_ZN7rocksdb10FileSystemD2Ev:
   27|  27.0k|FileSystem::~FileSystem() = default;
_ZN7rocksdb10FileSystem9NewLoggerERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_9IOOptionsEPNS1_10shared_ptrINS_6LoggerEEEPNS_14IODebugContextE:
  113|  13.5k|                               IODebugContext* dbg) {
  114|  13.5k|  FileOptions options;
  115|  13.5k|  options.io_options = io_opts;
  116|       |  // TODO: Tune the buffer size.
  117|  13.5k|  options.writable_file_max_buffer_size = 1024 * 1024;
  118|  13.5k|  std::unique_ptr<FSWritableFile> writable_file;
  119|  13.5k|  const IOStatus status = NewWritableFile(fname, options, &writable_file, dbg);
  120|  13.5k|  if (!status.ok()) {
  ------------------
  |  Branch (120:7): [True: 0, False: 13.5k]
  ------------------
  121|      0|    return status;
  122|      0|  }
  123|       |
  124|  13.5k|  *result = std::make_shared<EnvLogger>(std::move(writable_file), fname,
  125|  13.5k|                                        options, Env::Default());
  126|  13.5k|  return IOStatus::OK();
  127|  13.5k|}
_ZNK7rocksdb10FileSystem18OptimizeForLogReadERKNS_11FileOptionsE:
  130|  4.51k|    const FileOptions& file_options) const {
  131|  4.51k|  FileOptions optimized_file_options(file_options);
  132|  4.51k|  optimized_file_options.use_direct_reads = false;
  133|  4.51k|  return optimized_file_options;
  134|  4.51k|}
_ZNK7rocksdb10FileSystem23OptimizeForManifestReadERKNS_11FileOptionsE:
  137|  9.02k|    const FileOptions& file_options) const {
  138|  9.02k|  FileOptions optimized_file_options(file_options);
  139|  9.02k|  optimized_file_options.use_direct_reads = false;
  140|  9.02k|  return optimized_file_options;
  141|  9.02k|}
_ZNK7rocksdb10FileSystem31OptimizeForCompactionTableWriteERKNS_11FileOptionsERKNS_18ImmutableDBOptionsE:
  159|  9.02k|    const ImmutableDBOptions& db_options) const {
  160|  9.02k|  FileOptions optimized_file_options(file_options);
  161|  9.02k|  optimized_file_options.use_direct_writes =
  162|  9.02k|      db_options.use_direct_io_for_flush_and_compaction;
  163|  9.02k|  return optimized_file_options;
  164|  9.02k|}
_ZN7rocksdb17WriteStringToFileEPNS_10FileSystemERKNS_5SliceERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEbRKNS_9IOOptionsE:
  184|  18.0k|                           const IOOptions& io_options) {
  185|  18.0k|  std::unique_ptr<FSWritableFile> file;
  186|  18.0k|  EnvOptions soptions;
  187|  18.0k|  IOStatus s = fs->NewWritableFile(fname, soptions, &file, nullptr);
  188|  18.0k|  if (!s.ok()) {
  ------------------
  |  Branch (188:7): [True: 0, False: 18.0k]
  ------------------
  189|      0|    return s;
  190|      0|  }
  191|  18.0k|  s = file->Append(data, io_options, nullptr);
  192|  18.0k|  if (s.ok() && should_sync) {
  ------------------
  |  Branch (192:7): [True: 18.0k, False: 0]
  |  Branch (192:17): [True: 18.0k, False: 0]
  ------------------
  193|  18.0k|    s = file->Sync(io_options, nullptr);
  194|  18.0k|  }
  195|  18.0k|  if (!s.ok()) {
  ------------------
  |  Branch (195:7): [True: 0, False: 18.0k]
  ------------------
  196|      0|    fs->DeleteFile(fname, io_options, nullptr);
  197|      0|  }
  198|  18.0k|  return s;
  199|  18.0k|}
_ZN7rocksdb16ReadFileToStringEPNS_10FileSystemERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPS8_:
  202|  18.0k|                          std::string* data) {
  203|  18.0k|  FileOptions soptions;
  204|  18.0k|  data->clear();
  205|  18.0k|  std::unique_ptr<FSSequentialFile> file;
  206|  18.0k|  IOStatus s = status_to_io_status(
  207|  18.0k|      fs->NewSequentialFile(fname, soptions, &file, nullptr));
  208|  18.0k|  if (!s.ok()) {
  ------------------
  |  Branch (208:7): [True: 0, False: 18.0k]
  ------------------
  209|      0|    return s;
  210|      0|  }
  211|  18.0k|  static const int kBufferSize = 8192;
  212|  18.0k|  char* space = new char[kBufferSize];
  213|  36.1k|  while (true) {
  ------------------
  |  Branch (213:10): [Folded - Ignored]
  ------------------
  214|  36.1k|    Slice fragment;
  215|  36.1k|    s = file->Read(kBufferSize, IOOptions(), &fragment, space, nullptr);
  216|  36.1k|    if (!s.ok()) {
  ------------------
  |  Branch (216:9): [True: 0, False: 36.1k]
  ------------------
  217|      0|      break;
  218|      0|    }
  219|  36.1k|    data->append(fragment.data(), fragment.size());
  220|  36.1k|    if (fragment.empty()) {
  ------------------
  |  Branch (220:9): [True: 18.0k, False: 18.0k]
  ------------------
  221|  18.0k|      break;
  222|  18.0k|    }
  223|  36.1k|  }
  224|  18.0k|  delete[] space;
  225|  18.0k|  return s;
  226|  18.0k|}
_ZN7rocksdb17FileSystemWrapperC2ERKNSt3__110shared_ptrINS_10FileSystemEEE:
  236|  27.0k|    : target_(t) {
  237|  27.0k|  RegisterOptions("", &target_, &fs_wrapper_type_info);
  238|  27.0k|}
_ZN7rocksdb15DirFsyncOptionsC2ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  269|  27.0k|DirFsyncOptions::DirFsyncOptions(std::string file_renamed_new_name) {
  270|  27.0k|  reason = kFileRenamed;
  271|  27.0k|  renamed_new_name = file_renamed_new_name;
  272|  27.0k|}

_ZN7rocksdb13FileSystemPtrC2ENSt3__110shared_ptrINS_10FileSystemEEERKNS2_INS_8IOTracerEEE:
  104|  27.0k|      : fs_(fs), io_tracer_(io_tracer) {
  105|  27.0k|    fs_tracer_ = std::make_shared<FileSystemTracingWrapper>(fs_, io_tracer_);
  106|  27.0k|  }
_ZN7rocksdb24FileSystemTracingWrapperC2ERKNSt3__110shared_ptrINS_10FileSystemEEERKNS2_INS_8IOTracerEEE:
   26|  27.0k|        clock_(SystemClock::Default().get()) {}
_ZNK7rocksdb13FileSystemPtrptEv:
  108|   117k|  std::shared_ptr<FileSystem> operator->() const {
  109|   117k|    if (io_tracer_ && io_tracer_->is_tracing_enabled()) {
  ------------------
  |  Branch (109:9): [True: 117k, False: 0]
  |  Branch (109:23): [True: 0, False: 117k]
  ------------------
  110|      0|      return fs_tracer_;
  111|   117k|    } else {
  112|   117k|      return fs_;
  113|   117k|    }
  114|   117k|  }
_ZNK7rocksdb17FSWritableFilePtr3getEv:
  365|  6.70M|  FSWritableFile* get() const {
  366|  6.70M|    if (io_tracer_ && io_tracer_->is_tracing_enabled()) {
  ------------------
  |  Branch (366:9): [True: 4.45M, False: 2.25M]
  |  Branch (366:23): [True: 0, False: 4.45M]
  ------------------
  367|      0|      return fs_tracer_.get();
  368|  6.70M|    } else if (fs_tracer_) {
  ------------------
  |  Branch (368:16): [True: 6.63M, False: 72.1k]
  ------------------
  369|  6.63M|      return fs_tracer_->target();
  370|  6.63M|    } else {
  371|  72.1k|      return nullptr;
  372|  72.1k|    }
  373|  6.70M|  }
_ZNK7rocksdb13FileSystemPtr3getEv:
  117|  72.2k|  FileSystem* get() const {
  118|  72.2k|    if (io_tracer_ && io_tracer_->is_tracing_enabled()) {
  ------------------
  |  Branch (118:9): [True: 72.2k, False: 0]
  |  Branch (118:23): [True: 0, False: 72.2k]
  ------------------
  119|      0|      return fs_tracer_.get();
  120|  72.2k|    } else {
  121|  72.2k|      return fs_.get();
  122|  72.2k|    }
  123|  72.2k|  }
_ZN7rocksdb24FileSystemTracingWrapperD2Ev:
   28|  27.0k|  ~FileSystemTracingWrapper() override {}
_ZN7rocksdb30FSSequentialFileTracingWrapperC2EONSt3__110unique_ptrINS_16FSSequentialFileENS1_14default_deleteIS3_EEEENS1_10shared_ptrINS_8IOTracerEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  145|  22.5k|        file_name_(file_name) {}
_ZN7rocksdb30FSSequentialFileTracingWrapperD2Ev:
  147|  22.5k|  ~FSSequentialFileTracingWrapper() override {}
_ZN7rocksdb19FSSequentialFilePtrC2EONSt3__110unique_ptrINS_16FSSequentialFileENS1_14default_deleteIS3_EEEERKNS1_10shared_ptrINS_8IOTracerEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  178|  22.5k|                                    1) /* pass file name */) {}
_ZNK7rocksdb19FSSequentialFilePtrptEv:
  180|  66.1k|  FSSequentialFile* operator->() const {
  181|  66.1k|    if (io_tracer_ && io_tracer_->is_tracing_enabled()) {
  ------------------
  |  Branch (181:9): [True: 48.0k, False: 18.0k]
  |  Branch (181:23): [True: 0, False: 48.0k]
  ------------------
  182|      0|      return const_cast<FSSequentialFileTracingWrapper*>(&fs_tracer_);
  183|  66.1k|    } else {
  184|  66.1k|      return fs_tracer_.target();
  185|  66.1k|    }
  186|  66.1k|  }
_ZN7rocksdb32FSRandomAccessFileTracingWrapperC2EONSt3__110unique_ptrINS_18FSRandomAccessFileENS1_14default_deleteIS3_EEEENS1_10shared_ptrINS_8IOTracerEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  215|  4.48k|        file_name_(file_name) {}
_ZN7rocksdb32FSRandomAccessFileTracingWrapperD2Ev:
  217|  4.48k|  ~FSRandomAccessFileTracingWrapper() override {}
_ZN7rocksdb21FSRandomAccessFilePtrC2EONSt3__110unique_ptrINS_18FSRandomAccessFileENS1_14default_deleteIS3_EEEERKNS1_10shared_ptrINS_8IOTracerEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  265|  4.48k|                                    1) /* pass file name */) {}
_ZNK7rocksdb21FSRandomAccessFilePtrptEv:
  267|   129k|  FSRandomAccessFile* operator->() const {
  268|   129k|    if (io_tracer_ && io_tracer_->is_tracing_enabled()) {
  ------------------
  |  Branch (268:9): [True: 129k, False: 0]
  |  Branch (268:23): [True: 0, False: 129k]
  ------------------
  269|      0|      return const_cast<FSRandomAccessFileTracingWrapper*>(&fs_tracer_);
  270|   129k|    } else {
  271|   129k|      return fs_tracer_.target();
  272|   129k|    }
  273|   129k|  }
_ZN7rocksdb28FSWritableFileTracingWrapperC2EONSt3__110unique_ptrINS_14FSWritableFileENS1_14default_deleteIS3_EEEENS1_10shared_ptrINS_8IOTracerEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  302|  49.6k|        file_name_(file_name) {}
_ZN7rocksdb28FSWritableFileTracingWrapperD2Ev:
  304|  49.6k|  ~FSWritableFileTracingWrapper() override {}
_ZN7rocksdb17FSWritableFilePtrC2EONSt3__110unique_ptrINS_14FSWritableFileENS1_14default_deleteIS3_EEEERKNS1_10shared_ptrINS_8IOTracerEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  350|  49.6k|      : io_tracer_(io_tracer) {
  351|  49.6k|    fs_tracer_.reset(new FSWritableFileTracingWrapper(
  352|  49.6k|        std::move(fs), io_tracer_,
  353|  49.6k|        file_name.substr(file_name.find_last_of("/\\") +
  354|  49.6k|                         1) /* pass file name */));
  355|  49.6k|  }
_ZNK7rocksdb17FSWritableFilePtrptEv:
  357|  29.2M|  FSWritableFile* operator->() const {
  358|  29.2M|    if (io_tracer_ && io_tracer_->is_tracing_enabled()) {
  ------------------
  |  Branch (358:9): [True: 20.4M, False: 8.77M]
  |  Branch (358:23): [True: 0, False: 20.4M]
  ------------------
  359|      0|      return fs_tracer_.get();
  360|  29.2M|    } else {
  361|  29.2M|      return fs_tracer_->target();
  362|  29.2M|    }
  363|  29.2M|  }
_ZN7rocksdb17FSWritableFilePtr5resetEv:
  375|  49.6k|  void reset() {
  376|  49.6k|    fs_tracer_.reset();
  377|  49.6k|    io_tracer_ = nullptr;
  378|  49.6k|  }

_ZN7rocksdb10FileSystem7DefaultEv:
 1268|  4.51k|std::shared_ptr<FileSystem> FileSystem::Default() {
 1269|  4.51k|  STATIC_AVOID_DESTRUCTION(std::shared_ptr<FileSystem>, instance)
  ------------------
  |  |   53|  4.51k|#define STATIC_AVOID_DESTRUCTION(Type, name) static Type& name = *new Type
  ------------------
 1270|  4.51k|  (std::make_shared<PosixFileSystem>());
 1271|  4.51k|  return instance;
 1272|  4.51k|}
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystemC2Ev:
 1250|      1|      allow_non_owner_access_(true) {
 1251|       |#if defined(ROCKSDB_IOURING_PRESENT)
 1252|       |  // Test whether IOUring is supported, and if it does, create a managing
 1253|       |  // object for thread local point so that in the future thread-local
 1254|       |  // io_uring can be created.
 1255|       |  struct io_uring* new_io_uring = CreateIOUring();
 1256|       |  if (new_io_uring != nullptr) {
 1257|       |    thread_local_io_urings_.reset(new ThreadLocalPtr(DeleteIOUring));
 1258|       |    delete new_io_uring;
 1259|       |  }
 1260|       |#endif
 1261|      1|}
fs_posix.cc:_ZNK7rocksdb12_GLOBAL__N_115PosixFileSystem4NameEv:
  144|  9.02k|  const char* Name() const override { return kClassName(); }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem10kClassNameEv:
  143|  9.02k|  static const char* kClassName() { return "PosixFileSystem"; }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem15RegisterDbPathsERKNSt3__16vectorINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS7_IS9_EEEE:
  934|  9.02k|  Status RegisterDbPaths(const std::vector<std::string>& paths) override {
  935|  9.02k|    return logical_block_size_cache_.RefAndCacheLogicalBlockSize(paths);
  936|  9.02k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem17UnregisterDbPathsERKNSt3__16vectorINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS7_IS9_EEEE:
  937|  9.02k|  Status UnregisterDbPaths(const std::vector<std::string>& paths) override {
  938|  9.02k|    logical_block_size_cache_.UnrefAndTryRemoveCachedLogicalBlockSize(paths);
  939|  9.02k|    return Status::OK();
  940|  9.02k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem17NewSequentialFileERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_11FileOptionsEPNS2_10unique_ptrINS_16FSSequentialFileENS2_14default_deleteISF_EEEEPNS_14IODebugContextE:
  165|  40.6k|                             IODebugContext* /*dbg*/) override {
  166|  40.6k|    result->reset();
  167|  40.6k|    int fd = -1;
  168|  40.6k|    int flags = cloexec_flags(O_RDONLY, &options);
  169|  40.6k|    FILE* file = nullptr;
  170|       |
  171|  40.6k|    if (options.use_direct_reads && !options.use_mmap_reads) {
  ------------------
  |  Branch (171:9): [True: 0, False: 40.6k]
  |  Branch (171:37): [True: 0, False: 0]
  ------------------
  172|      0|#if !defined(OS_MACOSX) && !defined(OS_OPENBSD) && !defined(OS_SOLARIS)
  173|      0|      flags |= O_DIRECT;
  174|      0|      TEST_SYNC_POINT_CALLBACK("NewSequentialFile:O_DIRECT", &flags);
  175|      0|#endif
  176|      0|    }
  177|       |
  178|  40.6k|    do {
  179|  40.6k|      IOSTATS_TIMER_GUARD(open_nanos);
  ------------------
  |  |   36|  40.6k|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  40.6k|  iostats_step_timer_##metric.Start();
  ------------------
  180|  40.6k|      fd = open(fname.c_str(), flags, GetDBFileMode(allow_non_owner_access_));
  181|  40.6k|    } while (fd < 0 && errno == EINTR);
  ------------------
  |  Branch (181:14): [True: 0, False: 40.6k]
  |  Branch (181:24): [True: 0, False: 0]
  ------------------
  182|  40.6k|    if (fd < 0) {
  ------------------
  |  Branch (182:9): [True: 0, False: 40.6k]
  ------------------
  183|      0|      return IOError("While opening a file for sequentially reading", fname,
  184|      0|                     errno);
  185|      0|    }
  186|       |
  187|  40.6k|    SetFD_CLOEXEC(fd, &options);
  188|       |
  189|  40.6k|    if (options.use_direct_reads && !options.use_mmap_reads) {
  ------------------
  |  Branch (189:9): [True: 0, False: 40.6k]
  |  Branch (189:37): [True: 0, False: 0]
  ------------------
  190|       |#ifdef OS_MACOSX
  191|       |      if (fcntl(fd, F_NOCACHE, 1) == -1) {
  192|       |        close(fd);
  193|       |        return IOError("While fcntl NoCache", fname, errno);
  194|       |      }
  195|       |#endif
  196|  40.6k|    } else {
  197|  40.6k|      do {
  198|  40.6k|        IOSTATS_TIMER_GUARD(open_nanos);
  ------------------
  |  |   36|  40.6k|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  40.6k|  iostats_step_timer_##metric.Start();
  ------------------
  199|  40.6k|        file = fdopen(fd, "r");
  200|  40.6k|      } while (file == nullptr && errno == EINTR);
  ------------------
  |  Branch (200:16): [True: 0, False: 40.6k]
  |  Branch (200:35): [True: 0, False: 0]
  ------------------
  201|  40.6k|      if (file == nullptr) {
  ------------------
  |  Branch (201:11): [True: 0, False: 40.6k]
  ------------------
  202|      0|        close(fd);
  203|      0|        return IOError("While opening file for sequentially read", fname,
  204|      0|                       errno);
  205|      0|      }
  206|  40.6k|    }
  207|  40.6k|    result->reset(new PosixSequentialFile(
  208|  40.6k|        fname, file, fd, GetLogicalBlockSizeForReadIfNeeded(options, fname, fd),
  209|  40.6k|        options));
  210|  40.6k|    return IOStatus::OK();
  211|  40.6k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_113cloexec_flagsEiPKNS_10EnvOptionsE:
  125|   171k|int cloexec_flags(int flags, const EnvOptions* options) {
  126|       |  // If the system supports opening the file with cloexec enabled,
  127|       |  // do so, as this avoids a race condition if a db is opened around
  128|       |  // the same time that a child process is forked
  129|   171k|#ifdef O_CLOEXEC
  130|   171k|  if (options == nullptr || options->set_fd_cloexec) {
  ------------------
  |  Branch (130:7): [True: 45.1k, False: 126k]
  |  Branch (130:29): [True: 126k, False: 0]
  ------------------
  131|   171k|    flags |= O_CLOEXEC;
  132|   171k|  }
  133|       |#else
  134|       |  (void)options;
  135|       |#endif
  136|   171k|  return flags;
  137|   171k|}
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_113GetDBFileModeEb:
   83|   126k|inline mode_t GetDBFileMode(bool allow_non_owner_access) {
   84|   126k|  return allow_non_owner_access ? 0644 : 0600;
  ------------------
  |  Branch (84:10): [True: 126k, False: 0]
  ------------------
   85|   126k|}
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem13SetFD_CLOEXECEiPKNS_10EnvOptionsE:
  156|   139k|  void SetFD_CLOEXEC(int fd, const EnvOptions* options) {
  157|   139k|    if ((options == nullptr || options->set_fd_cloexec) && fd > 0) {
  ------------------
  |  Branch (157:10): [True: 13.5k, False: 126k]
  |  Branch (157:32): [True: 126k, False: 0]
  |  Branch (157:60): [True: 139k, False: 0]
  ------------------
  158|   139k|      fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
  159|   139k|    }
  160|   139k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem34GetLogicalBlockSizeForReadIfNeededERKNS_10EnvOptionsERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEi:
 1234|  54.1k|    const EnvOptions& options, const std::string& fname, int fd) {
 1235|  54.1k|  return options.use_direct_reads
  ------------------
  |  Branch (1235:10): [True: 0, False: 54.1k]
  ------------------
 1236|  54.1k|             ? PosixFileSystem::GetLogicalBlockSize(fname, fd)
 1237|  54.1k|             : kDefaultPageSize;
 1238|  54.1k|}
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem19NewRandomAccessFileERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_11FileOptionsEPNS2_10unique_ptrINS_18FSRandomAccessFileENS2_14default_deleteISF_EEEEPNS_14IODebugContextE:
  216|  13.5k|                               IODebugContext* /*dbg*/) override {
  217|  13.5k|    result->reset();
  218|  13.5k|    IOStatus s = IOStatus::OK();
  219|  13.5k|    int fd;
  220|  13.5k|    int flags = cloexec_flags(O_RDONLY, &options);
  221|       |
  222|  13.5k|    if (options.use_direct_reads && !options.use_mmap_reads) {
  ------------------
  |  Branch (222:9): [True: 0, False: 13.5k]
  |  Branch (222:37): [True: 0, False: 0]
  ------------------
  223|      0|#if !defined(OS_MACOSX) && !defined(OS_OPENBSD) && !defined(OS_SOLARIS)
  224|      0|      flags |= O_DIRECT;
  225|      0|      TEST_SYNC_POINT_CALLBACK("NewRandomAccessFile:O_DIRECT", &flags);
  226|      0|#endif
  227|      0|    }
  228|       |
  229|  13.5k|    do {
  230|  13.5k|      IOSTATS_TIMER_GUARD(open_nanos);
  ------------------
  |  |   36|  13.5k|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  13.5k|  iostats_step_timer_##metric.Start();
  ------------------
  231|  13.5k|      fd = open(fname.c_str(), flags, GetDBFileMode(allow_non_owner_access_));
  232|  13.5k|    } while (fd < 0 && errno == EINTR);
  ------------------
  |  Branch (232:14): [True: 0, False: 13.5k]
  |  Branch (232:24): [True: 0, False: 0]
  ------------------
  233|  13.5k|    if (fd < 0) {
  ------------------
  |  Branch (233:9): [True: 0, False: 13.5k]
  ------------------
  234|      0|      s = IOError("While open a file for random read", fname, errno);
  235|      0|      return s;
  236|      0|    }
  237|  13.5k|    SetFD_CLOEXEC(fd, &options);
  238|       |
  239|  13.5k|    if (options.use_mmap_reads) {
  ------------------
  |  Branch (239:9): [True: 0, False: 13.5k]
  ------------------
  240|       |      // Use of mmap for random reads has been removed because it
  241|       |      // kills performance when storage is fast.
  242|       |      // Use mmap when virtual address-space is plentiful.
  243|      0|      uint64_t size;
  244|      0|      IOOptions opts;
  245|      0|      s = GetFileSize(fname, opts, &size, nullptr);
  246|      0|      if (s.ok()) {
  ------------------
  |  Branch (246:11): [True: 0, False: 0]
  ------------------
  247|      0|        void* base = mmap(nullptr, size, PROT_READ, MAP_SHARED, fd, 0);
  248|      0|        if (base != MAP_FAILED) {
  ------------------
  |  Branch (248:13): [True: 0, False: 0]
  ------------------
  249|      0|          result->reset(
  250|      0|              new PosixMmapReadableFile(fd, fname, base, size, options));
  251|      0|        } else {
  252|      0|          s = IOError("while mmap file for read", fname, errno);
  253|      0|          close(fd);
  254|      0|        }
  255|      0|      } else {
  256|      0|        close(fd);
  257|      0|      }
  258|  13.5k|    } else {
  259|  13.5k|      if (options.use_direct_reads && !options.use_mmap_reads) {
  ------------------
  |  Branch (259:11): [True: 0, False: 13.5k]
  |  Branch (259:39): [True: 0, False: 0]
  ------------------
  260|       |#ifdef OS_MACOSX
  261|       |        if (fcntl(fd, F_NOCACHE, 1) == -1) {
  262|       |          close(fd);
  263|       |          return IOError("while fcntl NoCache", fname, errno);
  264|       |        }
  265|       |#endif
  266|      0|      }
  267|  13.5k|      result->reset(new PosixRandomAccessFile(
  268|  13.5k|          fname, fd, GetLogicalBlockSizeForReadIfNeeded(options, fname, fd),
  269|  13.5k|          options
  270|       |#if defined(ROCKSDB_IOURING_PRESENT)
  271|       |          ,
  272|       |          !IsIOUringEnabled() ? nullptr : thread_local_io_urings_.get()
  273|       |#endif
  274|  13.5k|              ));
  275|  13.5k|    }
  276|  13.5k|    return s;
  277|  13.5k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem15NewWritableFileERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_11FileOptionsEPNS2_10unique_ptrINS_14FSWritableFileENS2_14default_deleteISF_EEEEPNS_14IODebugContextE:
  361|  67.6k|                           IODebugContext* dbg) override {
  362|  67.6k|    return OpenWritableFile(fname, options, false, result, dbg);
  363|  67.6k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem18ReopenWritableFileERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_11FileOptionsEPNS2_10unique_ptrINS_14FSWritableFileENS2_14default_deleteISF_EEEEPNS_14IODebugContextE:
  368|  4.51k|                              IODebugContext* dbg) override {
  369|  4.51k|    return OpenWritableFile(fname, options, true, result, dbg);
  370|  4.51k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem35GetLogicalBlockSizeForWriteIfNeededERKNS_10EnvOptionsERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEi:
 1241|  72.1k|    const EnvOptions& options, const std::string& fname, int fd) {
 1242|  72.1k|  return options.use_direct_writes
  ------------------
  |  Branch (1242:10): [True: 0, False: 72.1k]
  ------------------
 1243|  72.1k|             ? PosixFileSystem::GetLogicalBlockSize(fname, fd)
 1244|  72.1k|             : kDefaultPageSize;
 1245|  72.1k|}
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem12NewDirectoryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_9IOOptionsEPNS2_10unique_ptrINS_11FSDirectoryENS2_14default_deleteISF_EEEEPNS_14IODebugContextE:
  524|  31.5k|                        IODebugContext* /*dbg*/) override {
  525|  31.5k|    result->reset();
  526|  31.5k|    int fd;
  527|  31.5k|    int flags = cloexec_flags(0, nullptr);
  528|  31.5k|    {
  529|  31.5k|      IOSTATS_TIMER_GUARD(open_nanos);
  ------------------
  |  |   36|  31.5k|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  31.5k|  iostats_step_timer_##metric.Start();
  ------------------
  530|  31.5k|      fd = open(name.c_str(), flags);
  531|  31.5k|    }
  532|  31.5k|    if (fd < 0) {
  ------------------
  |  Branch (532:9): [True: 0, False: 31.5k]
  ------------------
  533|      0|      return IOError("While open directory", name, errno);
  534|  31.5k|    } else {
  535|  31.5k|      result->reset(new PosixDirectory(fd, name));
  536|  31.5k|    }
  537|  31.5k|    return IOStatus::OK();
  538|  31.5k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem10FileExistsERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_9IOOptionsEPNS_14IODebugContextE:
  541|  40.6k|                      IODebugContext* /*dbg*/) override {
  542|  40.6k|    int result = access(fname.c_str(), F_OK);
  543|       |
  544|  40.6k|    if (result == 0) {
  ------------------
  |  Branch (544:9): [True: 22.5k, False: 18.0k]
  ------------------
  545|  22.5k|      return IOStatus::OK();
  546|  22.5k|    }
  547|       |
  548|  18.0k|    int err = errno;
  549|  18.0k|    switch (err) {
  550|      0|      case EACCES:
  ------------------
  |  Branch (550:7): [True: 0, False: 18.0k]
  ------------------
  551|      0|      case ELOOP:
  ------------------
  |  Branch (551:7): [True: 0, False: 18.0k]
  ------------------
  552|      0|      case ENAMETOOLONG:
  ------------------
  |  Branch (552:7): [True: 0, False: 18.0k]
  ------------------
  553|  18.0k|      case ENOENT:
  ------------------
  |  Branch (553:7): [True: 18.0k, False: 0]
  ------------------
  554|  18.0k|      case ENOTDIR:
  ------------------
  |  Branch (554:7): [True: 0, False: 18.0k]
  ------------------
  555|  18.0k|        return IOStatus::NotFound();
  556|      0|      default:
  ------------------
  |  Branch (556:7): [True: 0, False: 18.0k]
  ------------------
  557|      0|        assert(err == EIO || err == ENOMEM);
  558|      0|        return IOStatus::IOError("Unexpected error(" + std::to_string(err) +
  559|      0|                                 ") accessing file `" + fname + "' ");
  560|  18.0k|    }
  561|  18.0k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem11GetChildrenERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_9IOOptionsEPNS2_6vectorIS8_NS6_IS8_EEEEPNS_14IODebugContextE:
  565|  72.2k|                       IODebugContext* /*dbg*/) override {
  566|  72.2k|    result->clear();
  567|       |
  568|  72.2k|    DIR* d = opendir(dir.c_str());
  569|  72.2k|    if (d == nullptr) {
  ------------------
  |  Branch (569:9): [True: 4.51k, False: 67.7k]
  ------------------
  570|  4.51k|      switch (errno) {
  571|      0|        case EACCES:
  ------------------
  |  Branch (571:9): [True: 0, False: 4.51k]
  ------------------
  572|  4.51k|        case ENOENT:
  ------------------
  |  Branch (572:9): [True: 4.51k, False: 0]
  ------------------
  573|  4.51k|        case ENOTDIR:
  ------------------
  |  Branch (573:9): [True: 0, False: 4.51k]
  ------------------
  574|  4.51k|          return IOStatus::NotFound();
  575|      0|        default:
  ------------------
  |  Branch (575:9): [True: 0, False: 4.51k]
  ------------------
  576|      0|          return IOError("While opendir", dir, errno);
  577|  4.51k|      }
  578|  4.51k|    }
  579|       |
  580|       |    // reset errno before calling readdir()
  581|  67.7k|    errno = 0;
  582|  67.7k|    struct dirent* entry;
  583|       |
  584|   758k|    while ((entry = readdir(d)) != nullptr) {
  ------------------
  |  Branch (584:12): [True: 690k, False: 67.7k]
  ------------------
  585|       |      // filter out '.' and '..' directory entries
  586|       |      // which appear only on some platforms
  587|   690k|      const bool ignore =
  588|   690k|          entry->d_type == DT_DIR &&
  ------------------
  |  Branch (588:11): [True: 135k, False: 555k]
  ------------------
  589|   690k|          (strcmp(entry->d_name, ".") == 0 ||
  ------------------
  |  Branch (589:12): [True: 67.7k, False: 67.7k]
  ------------------
  590|   135k|           strcmp(entry->d_name, "..") == 0
  ------------------
  |  Branch (590:12): [True: 67.7k, False: 0]
  ------------------
  591|   135k|#ifndef ASSERT_STATUS_CHECKED
  592|       |           // In case of ASSERT_STATUS_CHECKED, GetChildren support older
  593|       |           // version of API for debugging purpose.
  594|   135k|           || opts.do_not_recurse
  ------------------
  |  Branch (594:15): [True: 0, False: 0]
  ------------------
  595|   135k|#endif
  596|   135k|          );
  597|   690k|      if (!ignore) {
  ------------------
  |  Branch (597:11): [True: 555k, False: 135k]
  ------------------
  598|   555k|        result->push_back(entry->d_name);
  599|   555k|      }
  600|   690k|      errno = 0;  // reset errno if readdir() success
  601|   690k|    }
  602|       |
  603|       |    // always attempt to close the dir
  604|  67.7k|    const auto pre_close_errno = errno;  // errno may be modified by closedir
  605|  67.7k|    const int close_result = closedir(d);
  606|       |
  607|  67.7k|    if (pre_close_errno != 0) {
  ------------------
  |  Branch (607:9): [True: 0, False: 67.7k]
  ------------------
  608|       |      // error occurred during readdir
  609|      0|      return IOError("While readdir", dir, pre_close_errno);
  610|      0|    }
  611|       |
  612|  67.7k|    if (close_result != 0) {
  ------------------
  |  Branch (612:9): [True: 0, False: 67.7k]
  ------------------
  613|       |      // error occurred during closedir
  614|      0|      return IOError("While closedir", dir, errno);
  615|      0|    }
  616|       |
  617|  67.7k|    return IOStatus::OK();
  618|  67.7k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem10DeleteFileERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_9IOOptionsEPNS_14IODebugContextE:
  621|  63.1k|                      IODebugContext* /*dbg*/) override {
  622|  63.1k|    IOStatus result;
  623|  63.1k|    if (unlink(fname.c_str()) != 0) {
  ------------------
  |  Branch (623:9): [True: 0, False: 63.1k]
  ------------------
  624|      0|      result = IOError("while unlink() file", fname, errno);
  625|      0|    }
  626|  63.1k|    return result;
  627|  63.1k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem18CreateDirIfMissingERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_9IOOptionsEPNS_14IODebugContextE:
  639|  49.6k|                              IODebugContext* /*dbg*/) override {
  640|  49.6k|    if (mkdir(name.c_str(), 0755) != 0) {
  ------------------
  |  Branch (640:9): [True: 45.1k, False: 4.51k]
  ------------------
  641|  45.1k|      if (errno != EEXIST) {
  ------------------
  |  Branch (641:11): [True: 0, False: 45.1k]
  ------------------
  642|      0|        return IOError("While mkdir if missing", name, errno);
  643|  45.1k|      } else if (!DirExists(name)) {  // Check that name is actually a
  ------------------
  |  Branch (643:18): [True: 0, False: 45.1k]
  ------------------
  644|       |                                      // directory.
  645|       |        // Message is taken from mkdir
  646|      0|        return IOStatus::IOError("`" + name +
  647|      0|                                 "' exists but is not a directory");
  648|      0|      }
  649|  45.1k|    }
  650|  49.6k|    return IOStatus::OK();
  651|  49.6k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem9DeleteDirERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_9IOOptionsEPNS_14IODebugContextE:
  654|  4.51k|                     IODebugContext* /*dbg*/) override {
  655|  4.51k|    if (rmdir(name.c_str()) != 0) {
  ------------------
  |  Branch (655:9): [True: 0, False: 4.51k]
  ------------------
  656|      0|      return IOError("file rmdir", name, errno);
  657|      0|    }
  658|  4.51k|    return IOStatus::OK();
  659|  4.51k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem11GetFileSizeERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_9IOOptionsEPmPNS_14IODebugContextE:
  662|  31.5k|                       uint64_t* size, IODebugContext* /*dbg*/) override {
  663|  31.5k|    struct stat sbuf;
  664|  31.5k|    if (stat(fname.c_str(), &sbuf) != 0) {
  ------------------
  |  Branch (664:9): [True: 0, False: 31.5k]
  ------------------
  665|      0|      *size = 0;
  666|      0|      return IOError("while stat a file for size", fname, errno);
  667|  31.5k|    } else {
  668|  31.5k|      *size = sbuf.st_size;
  669|  31.5k|    }
  670|  31.5k|    return IOStatus::OK();
  671|  31.5k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem10RenameFileERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_RKNS_9IOOptionsEPNS_14IODebugContextE:
  687|  36.1k|                      IODebugContext* /*dbg*/) override {
  688|  36.1k|    if (rename(src.c_str(), target.c_str()) != 0) {
  ------------------
  |  Branch (688:9): [True: 0, False: 36.1k]
  ------------------
  689|      0|      return IOError("While renaming a file to " + target, src, errno);
  690|      0|    }
  691|  36.1k|    return IOStatus::OK();
  692|  36.1k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem8LockFileERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_9IOOptionsEPPNS_8FileLockEPNS_14IODebugContextE:
  740|  13.5k|                    FileLock** lock, IODebugContext* /*dbg*/) override {
  741|  13.5k|    *lock = nullptr;
  742|       |
  743|  13.5k|    LockHoldingInfo lhi;
  744|  13.5k|    int64_t current_time = 0;
  745|       |    // Ignore status code as the time is only used for error message.
  746|  13.5k|    SystemClock::Default()
  747|  13.5k|        ->GetCurrentTime(&current_time)
  748|  13.5k|        .PermitUncheckedError();
  749|  13.5k|    lhi.acquire_time = current_time;
  750|  13.5k|    lhi.acquiring_thread = Env::Default()->GetThreadID();
  751|       |
  752|  13.5k|    mutex_locked_files.Lock();
  753|       |    // If it already exists in the locked_files set, then it is already locked,
  754|       |    // and fail this lock attempt. Otherwise, insert it into locked_files.
  755|       |    // This check is needed because fcntl() does not detect lock conflict
  756|       |    // if the fcntl is issued by the same thread that earlier acquired
  757|       |    // this lock.
  758|       |    // We must do this check *before* opening the file:
  759|       |    // Otherwise, we will open a new file descriptor. Locks are associated with
  760|       |    // a process, not a file descriptor and when *any* file descriptor is
  761|       |    // closed, all locks the process holds for that *file* are released
  762|  13.5k|    const auto it_success = locked_files.insert({fname, lhi});
  763|  13.5k|    if (it_success.second == false) {
  ------------------
  |  Branch (763:9): [True: 0, False: 13.5k]
  ------------------
  764|      0|      LockHoldingInfo prev_info = it_success.first->second;
  765|      0|      mutex_locked_files.Unlock();
  766|      0|      errno = ENOLCK;
  767|       |      // Note that the thread ID printed is the same one as the one in
  768|       |      // posix logger, but posix logger prints it hex format.
  769|      0|      return IOError("lock hold by current process, acquire time " +
  770|      0|                         std::to_string(prev_info.acquire_time) +
  771|      0|                         " acquiring thread " +
  772|      0|                         std::to_string(prev_info.acquiring_thread),
  773|      0|                     fname, errno);
  774|      0|    }
  775|       |
  776|  13.5k|    IOStatus result = IOStatus::OK();
  777|  13.5k|    int fd;
  778|  13.5k|    int flags = cloexec_flags(O_RDWR | O_CREAT, nullptr);
  779|       |
  780|  13.5k|    {
  781|  13.5k|      IOSTATS_TIMER_GUARD(open_nanos);
  ------------------
  |  |   36|  13.5k|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  13.5k|  iostats_step_timer_##metric.Start();
  ------------------
  782|  13.5k|      fd = open(fname.c_str(), flags, 0644);
  783|  13.5k|    }
  784|  13.5k|    if (fd < 0) {
  ------------------
  |  Branch (784:9): [True: 0, False: 13.5k]
  ------------------
  785|      0|      result = IOError("while open a file for lock", fname, errno);
  786|  13.5k|    } else if (LockOrUnlock(fd, true) == -1) {
  ------------------
  |  Branch (786:16): [True: 0, False: 13.5k]
  ------------------
  787|      0|      result = IOError("While lock file", fname, errno);
  788|      0|      close(fd);
  789|  13.5k|    } else {
  790|  13.5k|      SetFD_CLOEXEC(fd, nullptr);
  791|  13.5k|      PosixFileLock* my_lock = new PosixFileLock;
  792|  13.5k|      my_lock->fd_ = fd;
  793|  13.5k|      my_lock->filename = fname;
  794|  13.5k|      *lock = my_lock;
  795|  13.5k|    }
  796|  13.5k|    if (!result.ok()) {
  ------------------
  |  Branch (796:9): [True: 0, False: 13.5k]
  ------------------
  797|       |      // If there is an error in locking, then remove the pathname from
  798|       |      // locked_files. (If we got this far, it did not exist in locked_files
  799|       |      // before this call.)
  800|      0|      locked_files.erase(fname);
  801|      0|    }
  802|       |
  803|  13.5k|    mutex_locked_files.Unlock();
  804|  13.5k|    return result;
  805|  13.5k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_112LockOrUnlockEib:
   96|  27.0k|static int LockOrUnlock(int fd, bool lock) {
   97|  27.0k|  errno = 0;
   98|  27.0k|  struct flock f;
   99|  27.0k|  memset(&f, 0, sizeof(f));
  100|  27.0k|  f.l_type = (lock ? F_WRLCK : F_UNLCK);
  ------------------
  |  Branch (100:15): [True: 13.5k, False: 13.5k]
  ------------------
  101|  27.0k|  f.l_whence = SEEK_SET;
  102|  27.0k|  f.l_start = 0;
  103|  27.0k|  f.l_len = 0;  // Lock/unlock entire file
  104|  27.0k|  int value = fcntl(fd, F_SETLK, &f);
  105|       |
  106|  27.0k|  return value;
  107|  27.0k|}
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_113PosixFileLockD2Ev:
  119|  13.5k|  ~PosixFileLock() override {
  120|       |    // Check for destruction without UnlockFile
  121|  13.5k|    assert(fd_ == -1);
  122|  13.5k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem10UnlockFileEPNS_8FileLockERKNS_9IOOptionsEPNS_14IODebugContextE:
  808|  13.5k|                      IODebugContext* /*dbg*/) override {
  809|  13.5k|    PosixFileLock* my_lock = static_cast<PosixFileLock*>(lock);
  810|  13.5k|    IOStatus result;
  811|  13.5k|    mutex_locked_files.Lock();
  812|       |    // If we are unlocking, then verify that we had locked it earlier,
  813|       |    // it should already exist in locked_files. Remove it from locked_files.
  814|  13.5k|    if (locked_files.erase(my_lock->filename) != 1) {
  ------------------
  |  Branch (814:9): [True: 0, False: 13.5k]
  ------------------
  815|      0|      errno = ENOLCK;
  816|      0|      result = IOError("unlock", my_lock->filename, errno);
  817|  13.5k|    } else if (LockOrUnlock(my_lock->fd_, false) == -1) {
  ------------------
  |  Branch (817:16): [True: 0, False: 13.5k]
  ------------------
  818|      0|      result = IOError("unlock", my_lock->filename, errno);
  819|      0|    }
  820|  13.5k|    close(my_lock->fd_);
  821|  13.5k|    my_lock->Clear();
  822|  13.5k|    delete my_lock;
  823|  13.5k|    mutex_locked_files.Unlock();
  824|  13.5k|    return result;
  825|  13.5k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_113PosixFileLock5ClearEv:
  114|  13.5k|  void Clear() {
  115|  13.5k|    fd_ = -1;
  116|  13.5k|    filename.clear();
  117|  13.5k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem15GetAbsolutePathERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_9IOOptionsEPS8_PNS_14IODebugContextE:
  829|  13.5k|                           IODebugContext* /*dbg*/) override {
  830|  13.5k|    if (!db_path.empty() && db_path[0] == '/') {
  ------------------
  |  Branch (830:9): [True: 13.5k, False: 0]
  |  Branch (830:29): [True: 13.5k, False: 0]
  ------------------
  831|  13.5k|      *output_path = db_path;
  832|  13.5k|      return IOStatus::OK();
  833|  13.5k|    }
  834|       |
  835|      0|    char the_path[4096];
  836|      0|    char* ret = getcwd(the_path, 4096);
  837|      0|    if (ret == nullptr) {
  ------------------
  |  Branch (837:9): [True: 0, False: 0]
  ------------------
  838|      0|      return IOStatus::IOError(errnoStr(errno).c_str());
  839|      0|    }
  840|       |
  841|      0|    *output_path = ret;
  842|      0|    return IOStatus::OK();
  843|      0|  }
fs_posix.cc:_ZNK7rocksdb12_GLOBAL__N_115PosixFileSystem19OptimizeForLogWriteERKNS_11FileOptionsERKNS_9DBOptionsE:
  911|  13.5k|                                  const DBOptions& db_options) const override {
  912|  13.5k|    FileOptions optimized = file_options;
  913|  13.5k|    optimized.use_mmap_writes = false;
  914|  13.5k|    optimized.use_direct_writes = false;
  915|  13.5k|    optimized.bytes_per_sync = db_options.wal_bytes_per_sync;
  916|       |    // TODO(icanadi) it's faster if fallocate_with_keep_size is false, but it
  917|       |    // breaks TransactionLogIteratorStallAtLastRecord unit test. Fix the unit
  918|       |    // test and make this false
  919|  13.5k|    optimized.fallocate_with_keep_size = true;
  920|  13.5k|    optimized.writable_file_max_buffer_size =
  921|  13.5k|        db_options.writable_file_max_buffer_size;
  922|  13.5k|    return optimized;
  923|  13.5k|  }
fs_posix.cc:_ZNK7rocksdb12_GLOBAL__N_115PosixFileSystem24OptimizeForManifestWriteERKNS_11FileOptionsE:
  926|  13.5k|      const FileOptions& file_options) const override {
  927|  13.5k|    FileOptions optimized = file_options;
  928|  13.5k|    optimized.use_mmap_writes = false;
  929|  13.5k|    optimized.use_direct_writes = false;
  930|  13.5k|    optimized.fallocate_with_keep_size = true;
  931|  13.5k|    return optimized;
  932|  13.5k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem12SupportedOpsERl:
 1185|  91.0k|  void SupportedOps(int64_t& supported_ops) override {
 1186|  91.0k|    supported_ops = 0;
 1187|       |#if defined(ROCKSDB_IOURING_PRESENT)
 1188|       |    if (IsIOUringEnabled()) {
 1189|       |      // Underlying FS supports async_io
 1190|       |      supported_ops |= (1 << FSSupportedOps::kAsyncIO);
 1191|       |    }
 1192|       |#endif
 1193|  91.0k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem16OpenWritableFileERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_11FileOptionsEbPNS2_10unique_ptrINS_14FSWritableFileENS2_14default_deleteISF_EEEEPNS_14IODebugContextE:
  282|  72.1k|                                    IODebugContext* /*dbg*/) {
  283|  72.1k|    result->reset();
  284|  72.1k|    IOStatus s;
  285|  72.1k|    int fd = -1;
  286|  72.1k|    int flags = (reopen) ? (O_CREAT | O_APPEND) : (O_CREAT | O_TRUNC);
  ------------------
  |  Branch (286:17): [True: 4.51k, False: 67.6k]
  ------------------
  287|       |    // Direct IO mode with O_DIRECT flag or F_NOCAHCE (MAC OSX)
  288|  72.1k|    if (options.use_direct_writes && !options.use_mmap_writes) {
  ------------------
  |  Branch (288:9): [True: 0, False: 72.1k]
  |  Branch (288:38): [True: 0, False: 0]
  ------------------
  289|       |      // Note: we should avoid O_APPEND here due to ta the following bug:
  290|       |      // POSIX requires that opening a file with the O_APPEND flag should
  291|       |      // have no affect on the location at which pwrite() writes data.
  292|       |      // However, on Linux, if a file is opened with O_APPEND, pwrite()
  293|       |      // appends data to the end of the file, regardless of the value of
  294|       |      // offset.
  295|       |      // More info here: https://linux.die.net/man/2/pwrite
  296|      0|      flags |= O_WRONLY;
  297|      0|#if !defined(OS_MACOSX) && !defined(OS_OPENBSD) && !defined(OS_SOLARIS)
  298|      0|      flags |= O_DIRECT;
  299|      0|#endif
  300|      0|      TEST_SYNC_POINT_CALLBACK("NewWritableFile:O_DIRECT", &flags);
  301|  72.1k|    } else if (options.use_mmap_writes) {
  ------------------
  |  Branch (301:16): [True: 0, False: 72.1k]
  ------------------
  302|       |      // non-direct I/O
  303|      0|      flags |= O_RDWR;
  304|  72.1k|    } else {
  305|  72.1k|      flags |= O_WRONLY;
  306|  72.1k|    }
  307|       |
  308|  72.1k|    flags = cloexec_flags(flags, &options);
  309|       |
  310|  72.1k|    do {
  311|  72.1k|      IOSTATS_TIMER_GUARD(open_nanos);
  ------------------
  |  |   36|  72.1k|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  72.1k|  iostats_step_timer_##metric.Start();
  ------------------
  312|  72.1k|      fd = open(fname.c_str(), flags, GetDBFileMode(allow_non_owner_access_));
  313|  72.1k|    } while (fd < 0 && errno == EINTR);
  ------------------
  |  Branch (313:14): [True: 0, False: 72.1k]
  |  Branch (313:24): [True: 0, False: 0]
  ------------------
  314|       |
  315|  72.1k|    if (fd < 0) {
  ------------------
  |  Branch (315:9): [True: 0, False: 72.1k]
  ------------------
  316|      0|      s = IOError("While open a file for appending", fname, errno);
  317|      0|      return s;
  318|      0|    }
  319|  72.1k|    SetFD_CLOEXEC(fd, &options);
  320|       |
  321|  72.1k|    if (options.use_mmap_writes) {
  ------------------
  |  Branch (321:9): [True: 0, False: 72.1k]
  ------------------
  322|      0|      MaybeForceDisableMmap(fd);
  323|      0|    }
  324|  72.1k|    if (options.use_mmap_writes && !forceMmapOff_) {
  ------------------
  |  Branch (324:9): [True: 0, False: 72.1k]
  |  Branch (324:36): [True: 0, False: 0]
  ------------------
  325|      0|      result->reset(new PosixMmapFile(fname, fd, page_size_, options));
  326|  72.1k|    } else if (options.use_direct_writes && !options.use_mmap_writes) {
  ------------------
  |  Branch (326:16): [True: 0, False: 72.1k]
  |  Branch (326:45): [True: 0, False: 0]
  ------------------
  327|       |#ifdef OS_MACOSX
  328|       |      if (fcntl(fd, F_NOCACHE, 1) == -1) {
  329|       |        close(fd);
  330|       |        s = IOError("While fcntl NoCache an opened file for appending", fname,
  331|       |                    errno);
  332|       |        return s;
  333|       |      }
  334|       |#elif defined(OS_SOLARIS)
  335|       |      if (directio(fd, DIRECTIO_ON) == -1) {
  336|       |        if (errno != ENOTTY) {  // ZFS filesystems don't support DIRECTIO_ON
  337|       |          close(fd);
  338|       |          s = IOError("While calling directio()", fname, errno);
  339|       |          return s;
  340|       |        }
  341|       |      }
  342|       |#endif
  343|      0|      result->reset(new PosixWritableFile(
  344|      0|          fname, fd, GetLogicalBlockSizeForWriteIfNeeded(options, fname, fd),
  345|      0|          options));
  346|  72.1k|    } else {
  347|       |      // disable mmap writes
  348|  72.1k|      EnvOptions no_mmap_writes_options = options;
  349|  72.1k|      no_mmap_writes_options.use_mmap_writes = false;
  350|  72.1k|      result->reset(
  351|  72.1k|          new PosixWritableFile(fname, fd,
  352|  72.1k|                                GetLogicalBlockSizeForWriteIfNeeded(
  353|  72.1k|                                    no_mmap_writes_options, fname, fd),
  354|  72.1k|                                no_mmap_writes_options));
  355|  72.1k|    }
  356|  72.1k|    return s;
  357|  72.1k|  }
fs_posix.cc:_ZN7rocksdb12_GLOBAL__N_115PosixFileSystem9DirExistsERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  946|  45.1k|  virtual bool DirExists(const std::string& dname) {
  947|  45.1k|    struct stat statbuf;
  948|  45.1k|    if (stat(dname.c_str(), &statbuf) == 0) {
  ------------------
  |  Branch (948:9): [True: 45.1k, False: 0]
  ------------------
  949|  45.1k|      return S_ISDIR(statbuf.st_mode);
  950|  45.1k|    }
  951|      0|    return false;  // stat() failed return false
  952|  45.1k|  }

_ZN7rocksdb7FadviseEilmi:
   82|  4.48k|int Fadvise(int fd, off_t offset, size_t len, int advice) {
   83|  4.48k|#ifdef OS_LINUX
   84|  4.48k|  return posix_fadvise(fd, offset, len, advice);
   85|       |#else
   86|       |  (void)fd;
   87|       |  (void)offset;
   88|       |  (void)len;
   89|       |  (void)advice;
   90|       |  return 0;  // simply do nothing.
   91|       |#endif
   92|  4.48k|}
_ZN7rocksdb19PosixSequentialFileC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP8_IO_FILEimRKNS_10EnvOptionsE:
  215|  40.6k|      logical_sector_size_(logical_block_size) {
  216|  40.6k|  assert(!options.use_direct_reads || !options.use_mmap_reads);
  217|  40.6k|}
_ZN7rocksdb19PosixSequentialFileD2Ev:
  219|  40.6k|PosixSequentialFile::~PosixSequentialFile() {
  220|  40.6k|  if (!use_direct_io()) {
  ------------------
  |  Branch (220:7): [True: 40.6k, False: 0]
  ------------------
  221|  40.6k|    assert(file_);
  222|  40.6k|    fclose(file_);
  223|  40.6k|  } else {
  224|      0|    assert(fd_);
  225|      0|    close(fd_);
  226|      0|  }
  227|  40.6k|}
_ZN7rocksdb19PosixSequentialFile4ReadEmRKNS_9IOOptionsEPNS_5SliceEPcPNS_14IODebugContextE:
  231|  69.1k|                                   IODebugContext* /*dbg*/) {
  232|  69.1k|  assert(result != nullptr && !use_direct_io());
  233|  69.1k|  IOStatus s;
  234|  69.1k|  size_t r = 0;
  235|  69.1k|  do {
  236|  69.1k|    clearerr(file_);
  237|  69.1k|    r = fread_unlocked(scratch, 1, n, file_);
  238|  69.1k|  } while (r == 0 && ferror(file_) && errno == EINTR);
  ------------------
  |  Branch (238:12): [True: 18.0k, False: 51.1k]
  |  Branch (238:22): [True: 0, False: 18.0k]
  |  Branch (238:39): [True: 0, False: 0]
  ------------------
  239|  69.1k|  *result = Slice(scratch, r);
  240|  69.1k|  if (r < n) {
  ------------------
  |  Branch (240:7): [True: 58.6k, False: 10.4k]
  ------------------
  241|  58.6k|    if (feof(file_)) {
  ------------------
  |  Branch (241:9): [True: 58.6k, False: 0]
  ------------------
  242|       |      // We leave status as ok if we hit the end of the file
  243|       |      // We also clear the error so that the reads can continue
  244|       |      // if a new data is written to the file
  245|  58.6k|      clearerr(file_);
  246|  58.6k|    } else {
  247|       |      // A partial read with an error: return a non-ok status
  248|      0|      s = IOError("While reading file sequentially", filename_, errno);
  249|      0|    }
  250|  58.6k|  }
  251|  69.1k|  return s;
  252|  69.1k|}
_ZN7rocksdb19RemoveTrailingSlashERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  376|  18.0k|std::string RemoveTrailingSlash(const std::string& path) {
  377|  18.0k|  std::string p = path;
  378|  18.0k|  if (p.size() > 1 && p.back() == '/') {
  ------------------
  |  Branch (378:7): [True: 18.0k, False: 0]
  |  Branch (378:23): [True: 0, False: 18.0k]
  ------------------
  379|      0|    p.pop_back();
  380|      0|  }
  381|  18.0k|  return p;
  382|  18.0k|}
_ZN7rocksdb21LogicalBlockSizeCache27RefAndCacheLogicalBlockSizeERKNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEE:
  385|  9.02k|    const std::vector<std::string>& directories) {
  386|  9.02k|  std::vector<std::string> dirs;
  387|  9.02k|  dirs.reserve(directories.size());
  388|  9.02k|  for (auto& d : directories) {
  ------------------
  |  Branch (388:16): [True: 9.02k, False: 9.02k]
  ------------------
  389|  9.02k|    dirs.emplace_back(RemoveTrailingSlash(d));
  390|  9.02k|  }
  391|       |
  392|  9.02k|  std::map<std::string, size_t> dir_sizes;
  393|  9.02k|  {
  394|  9.02k|    ReadLock lock(&cache_mutex_);
  395|  9.02k|    for (const auto& dir : dirs) {
  ------------------
  |  Branch (395:26): [True: 9.02k, False: 9.02k]
  ------------------
  396|  9.02k|      if (cache_.find(dir) == cache_.end()) {
  ------------------
  |  Branch (396:11): [True: 9.02k, False: 0]
  ------------------
  397|  9.02k|        dir_sizes.emplace(dir, 0);
  398|  9.02k|      }
  399|  9.02k|    }
  400|  9.02k|  }
  401|       |
  402|  9.02k|  Status s;
  403|  9.02k|  for (auto& dir_size : dir_sizes) {
  ------------------
  |  Branch (403:23): [True: 9.02k, False: 9.02k]
  ------------------
  404|  9.02k|    s = get_logical_block_size_of_directory_(dir_size.first, &dir_size.second);
  405|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (405:9): [True: 0, False: 9.02k]
  ------------------
  406|      0|      return s;
  407|      0|    }
  408|  9.02k|  }
  409|       |
  410|  9.02k|  WriteLock lock(&cache_mutex_);
  411|  9.02k|  for (const auto& dir : dirs) {
  ------------------
  |  Branch (411:24): [True: 9.02k, False: 9.02k]
  ------------------
  412|  9.02k|    auto& v = cache_[dir];
  413|  9.02k|    v.ref++;
  414|  9.02k|    auto dir_size = dir_sizes.find(dir);
  415|  9.02k|    if (dir_size != dir_sizes.end()) {
  ------------------
  |  Branch (415:9): [True: 9.02k, False: 0]
  ------------------
  416|  9.02k|      v.size = dir_size->second;
  417|  9.02k|    }
  418|  9.02k|  }
  419|  9.02k|  return s;
  420|  9.02k|}
_ZN7rocksdb21LogicalBlockSizeCache39UnrefAndTryRemoveCachedLogicalBlockSizeERKNSt3__16vectorINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS8_EEEE:
  423|  9.02k|    const std::vector<std::string>& directories) {
  424|  9.02k|  std::vector<std::string> dirs;
  425|  9.02k|  dirs.reserve(directories.size());
  426|  9.02k|  for (auto& dir : directories) {
  ------------------
  |  Branch (426:18): [True: 9.02k, False: 9.02k]
  ------------------
  427|  9.02k|    dirs.emplace_back(RemoveTrailingSlash(dir));
  428|  9.02k|  }
  429|       |
  430|  9.02k|  WriteLock lock(&cache_mutex_);
  431|  9.02k|  for (const auto& dir : dirs) {
  ------------------
  |  Branch (431:24): [True: 9.02k, False: 9.02k]
  ------------------
  432|  9.02k|    auto it = cache_.find(dir);
  433|  9.02k|    if (it != cache_.end() && !(--(it->second.ref))) {
  ------------------
  |  Branch (433:9): [True: 9.02k, False: 0]
  |  Branch (433:9): [True: 9.02k, False: 0]
  |  Branch (433:31): [True: 9.02k, False: 0]
  ------------------
  434|  9.02k|      cache_.erase(it);
  435|  9.02k|    }
  436|  9.02k|  }
  437|  9.02k|}
_ZN7rocksdb11PosixHelper30GetLogicalBlockSizeOfDirectoryERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPm:
  457|  9.02k|                                                   size_t* size) {
  458|  9.02k|  int fd = open(directory.c_str(), O_DIRECTORY | O_RDONLY);
  459|  9.02k|  if (fd == -1) {
  ------------------
  |  Branch (459:7): [True: 0, False: 9.02k]
  ------------------
  460|      0|    return Status::IOError("Cannot open directory " + directory);
  461|      0|  }
  462|  9.02k|  *size = PosixHelper::GetLogicalBlockSizeOfFd(fd);
  463|  9.02k|  close(fd);
  464|  9.02k|  return Status::OK();
  465|  9.02k|}
_ZN7rocksdb11PosixHelper23GetLogicalBlockSizeOfFdEi:
  467|  9.02k|size_t PosixHelper::GetLogicalBlockSizeOfFd(int fd) {
  468|  9.02k|#ifdef OS_LINUX
  469|  9.02k|  struct stat buf;
  470|  9.02k|  int result = fstat(fd, &buf);
  471|  9.02k|  if (result == -1) {
  ------------------
  |  Branch (471:7): [True: 0, False: 9.02k]
  ------------------
  472|      0|    return kDefaultPageSize;
  473|      0|  }
  474|  9.02k|  if (major(buf.st_dev) == 0) {
  ------------------
  |  Branch (474:7): [True: 9.02k, False: 0]
  ------------------
  475|       |    // Unnamed devices (e.g. non-device mounts), reserved as null device number.
  476|       |    // These don't have an entry in /sys/dev/block/. Return a sensible default.
  477|  9.02k|    return kDefaultPageSize;
  478|  9.02k|  }
  479|       |
  480|       |  // Reading queue/logical_block_size does not require special permissions.
  481|      0|  const int kBufferSize = 100;
  482|      0|  char path[kBufferSize];
  483|      0|  char real_path[PATH_MAX + 1];
  484|      0|  snprintf(path, kBufferSize, "/sys/dev/block/%u:%u", major(buf.st_dev),
  485|      0|           minor(buf.st_dev));
  486|      0|  if (realpath(path, real_path) == nullptr) {
  ------------------
  |  Branch (486:7): [True: 0, False: 0]
  ------------------
  487|      0|    return kDefaultPageSize;
  488|      0|  }
  489|      0|  std::string device_dir(real_path);
  490|      0|  if (!device_dir.empty() && device_dir.back() == '/') {
  ------------------
  |  Branch (490:7): [True: 0, False: 0]
  |  Branch (490:30): [True: 0, False: 0]
  ------------------
  491|      0|    device_dir.pop_back();
  492|      0|  }
  493|       |  // NOTE: sda3 and nvme0n1p1 do not have a `queue/` subdir, only the parent sda
  494|       |  // and nvme0n1 have it.
  495|       |  // $ ls -al '/sys/dev/block/8:3'
  496|       |  // lrwxrwxrwx. 1 root root 0 Jun 26 01:38 /sys/dev/block/8:3 ->
  497|       |  // ../../block/sda/sda3
  498|       |  // $ ls -al '/sys/dev/block/259:4'
  499|       |  // lrwxrwxrwx 1 root root 0 Jan 31 16:04 /sys/dev/block/259:4 ->
  500|       |  // ../../devices/pci0000:17/0000:17:00.0/0000:18:00.0/nvme/nvme0/nvme0n1/nvme0n1p1
  501|      0|  size_t parent_end = device_dir.rfind('/', device_dir.length() - 1);
  502|      0|  if (parent_end == std::string::npos) {
  ------------------
  |  Branch (502:7): [True: 0, False: 0]
  ------------------
  503|      0|    return kDefaultPageSize;
  504|      0|  }
  505|      0|  size_t parent_begin = device_dir.rfind('/', parent_end - 1);
  506|      0|  if (parent_begin == std::string::npos) {
  ------------------
  |  Branch (506:7): [True: 0, False: 0]
  ------------------
  507|      0|    return kDefaultPageSize;
  508|      0|  }
  509|      0|  std::string parent =
  510|      0|      device_dir.substr(parent_begin + 1, parent_end - parent_begin - 1);
  511|      0|  std::string child = device_dir.substr(parent_end + 1, std::string::npos);
  512|      0|  if (parent != "block" &&
  ------------------
  |  Branch (512:7): [True: 0, False: 0]
  ------------------
  513|      0|      (child.compare(0, 4, "nvme") || child.find('p') != std::string::npos)) {
  ------------------
  |  Branch (513:8): [True: 0, False: 0]
  |  Branch (513:39): [True: 0, False: 0]
  ------------------
  514|      0|    device_dir = device_dir.substr(0, parent_end);
  515|      0|  }
  516|      0|  std::string fname = device_dir + "/queue/logical_block_size";
  517|      0|  FILE* fp;
  518|      0|  size_t size = 0;
  519|      0|  fp = fopen(fname.c_str(), "r");
  520|      0|  if (fp != nullptr) {
  ------------------
  |  Branch (520:7): [True: 0, False: 0]
  ------------------
  521|      0|    char* line = nullptr;
  522|      0|    size_t len = 0;
  523|      0|    if (getline(&line, &len, fp) != -1) {
  ------------------
  |  Branch (523:9): [True: 0, False: 0]
  ------------------
  524|      0|      sscanf(line, "%zu", &size);
  525|      0|    }
  526|      0|    free(line);
  527|      0|    fclose(fp);
  528|      0|  }
  529|      0|  if (size != 0 && (size & (size - 1)) == 0) {
  ------------------
  |  Branch (529:7): [True: 0, False: 0]
  |  Branch (529:20): [True: 0, False: 0]
  ------------------
  530|      0|    return size;
  531|      0|  }
  532|      0|#endif
  533|      0|  (void)fd;
  534|      0|  return kDefaultPageSize;
  535|      0|}
_ZN7rocksdb21PosixRandomAccessFileC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEimRKNS_10EnvOptionsE:
  558|  13.5k|{
  559|  13.5k|  assert(!options.use_direct_reads || !options.use_mmap_reads);
  560|  13.5k|  assert(!options.use_mmap_reads);
  561|  13.5k|}
_ZN7rocksdb21PosixRandomAccessFileD2Ev:
  563|  13.5k|PosixRandomAccessFile::~PosixRandomAccessFile() { close(fd_); }
_ZNK7rocksdb21PosixRandomAccessFile4ReadEmmRKNS_9IOOptionsEPNS_5SliceEPcPNS_14IODebugContextE:
  568|  29.6k|                                     IODebugContext* /*dbg*/) const {
  569|  29.6k|  if (use_direct_io()) {
  ------------------
  |  Branch (569:7): [True: 0, False: 29.6k]
  ------------------
  570|      0|    assert(IsSectorAligned(offset, GetRequiredBufferAlignment()));
  571|      0|    assert(IsSectorAligned(n, GetRequiredBufferAlignment()));
  572|      0|    assert(IsSectorAligned(scratch, GetRequiredBufferAlignment()));
  573|      0|  }
  574|  29.6k|  IOStatus s;
  575|  29.6k|  ssize_t r = -1;
  576|  29.6k|  size_t left = n;
  577|  29.6k|  char* ptr = scratch;
  578|  59.3k|  while (left > 0) {
  ------------------
  |  Branch (578:10): [True: 29.6k, False: 29.6k]
  ------------------
  579|  29.6k|    r = pread(fd_, ptr, left, static_cast<off_t>(offset));
  580|  29.6k|    if (r <= 0) {
  ------------------
  |  Branch (580:9): [True: 0, False: 29.6k]
  ------------------
  581|      0|      if (r == -1 && errno == EINTR) {
  ------------------
  |  Branch (581:11): [True: 0, False: 0]
  |  Branch (581:22): [True: 0, False: 0]
  ------------------
  582|      0|        continue;
  583|      0|      }
  584|      0|      break;
  585|      0|    }
  586|  29.6k|    ptr += r;
  587|  29.6k|    offset += r;
  588|  29.6k|    left -= r;
  589|  29.6k|    if (use_direct_io() &&
  ------------------
  |  Branch (589:9): [True: 0, False: 29.6k]
  ------------------
  590|  29.6k|        r % static_cast<ssize_t>(GetRequiredBufferAlignment()) != 0) {
  ------------------
  |  Branch (590:9): [True: 0, False: 0]
  ------------------
  591|       |      // Bytes reads don't fill sectors. Should only happen at the end
  592|       |      // of the file.
  593|      0|      break;
  594|      0|    }
  595|  29.6k|  }
  596|  29.6k|  if (r < 0) {
  ------------------
  |  Branch (596:7): [True: 0, False: 29.6k]
  ------------------
  597|       |    // An error: return a non-ok status
  598|      0|    s = IOError("While pread offset " + std::to_string(offset) + " len " +
  599|      0|                    std::to_string(n),
  600|      0|                filename_, errno);
  601|      0|  }
  602|  29.6k|  *result = Slice(scratch, (r < 0) ? 0 : n - left);
  ------------------
  |  Branch (602:28): [True: 0, False: 29.6k]
  ------------------
  603|  29.6k|  return s;
  604|  29.6k|}
_ZN7rocksdb21PosixRandomAccessFile8PrefetchEmmRKNS_9IOOptionsEPNS_14IODebugContextE:
  783|  5.53k|                                         IODebugContext* /*dbg*/) {
  784|  5.53k|  IOStatus s;
  785|  5.53k|  if (!use_direct_io()) {
  ------------------
  |  Branch (785:7): [True: 5.53k, False: 0]
  ------------------
  786|  5.53k|    ssize_t r = 0;
  787|  5.53k|#ifdef OS_LINUX
  788|  5.53k|    r = readahead(fd_, offset, n);
  789|  5.53k|#endif
  790|       |#ifdef OS_MACOSX
  791|       |    radvisory advice;
  792|       |    advice.ra_offset = static_cast<off_t>(offset);
  793|       |    advice.ra_count = static_cast<int>(n);
  794|       |    r = fcntl(fd_, F_RDADVISE, &advice);
  795|       |#endif
  796|  5.53k|    if (r == -1) {
  ------------------
  |  Branch (796:9): [True: 0, False: 5.53k]
  ------------------
  797|      0|      s = IOError("While prefetching offset " + std::to_string(offset) +
  798|      0|                      " len " + std::to_string(n),
  799|      0|                  filename_, errno);
  800|      0|    }
  801|  5.53k|  }
  802|  5.53k|  return s;
  803|  5.53k|}
_ZN7rocksdb21PosixRandomAccessFile4HintENS_18FSRandomAccessFile13AccessPatternE:
  811|  4.48k|void PosixRandomAccessFile::Hint(AccessPattern pattern) {
  812|  4.48k|  if (use_direct_io()) {
  ------------------
  |  Branch (812:7): [True: 0, False: 4.48k]
  ------------------
  813|      0|    return;
  814|      0|  }
  815|  4.48k|  switch (pattern) {
  816|      0|    case kNormal:
  ------------------
  |  Branch (816:5): [True: 0, False: 4.48k]
  ------------------
  817|      0|      Fadvise(fd_, 0, 0, POSIX_FADV_NORMAL);
  818|      0|      break;
  819|  4.48k|    case kRandom:
  ------------------
  |  Branch (819:5): [True: 4.48k, False: 0]
  ------------------
  820|  4.48k|      Fadvise(fd_, 0, 0, POSIX_FADV_RANDOM);
  821|  4.48k|      break;
  822|      0|    case kSequential:
  ------------------
  |  Branch (822:5): [True: 0, False: 4.48k]
  ------------------
  823|      0|      Fadvise(fd_, 0, 0, POSIX_FADV_SEQUENTIAL);
  824|      0|      break;
  825|      0|    case kWillNeed:
  ------------------
  |  Branch (825:5): [True: 0, False: 4.48k]
  ------------------
  826|      0|      Fadvise(fd_, 0, 0, POSIX_FADV_WILLNEED);
  827|      0|      break;
  828|      0|    case kWontNeed:
  ------------------
  |  Branch (828:5): [True: 0, False: 4.48k]
  ------------------
  829|      0|      Fadvise(fd_, 0, 0, POSIX_FADV_DONTNEED);
  830|      0|      break;
  831|      0|    default:
  ------------------
  |  Branch (831:5): [True: 0, False: 4.48k]
  ------------------
  832|      0|      assert(false);
  833|      0|      break;
  834|  4.48k|  }
  835|  4.48k|}
_ZN7rocksdb17PosixWritableFileC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEimRKNS_10EnvOptionsE:
 1281|  72.1k|      logical_sector_size_(logical_block_size) {
 1282|  72.1k|#ifdef ROCKSDB_FALLOCATE_PRESENT
 1283|  72.1k|  allow_fallocate_ = options.allow_fallocate;
 1284|  72.1k|  fallocate_with_keep_size_ = options.fallocate_with_keep_size;
 1285|  72.1k|#endif
 1286|  72.1k|#ifdef ROCKSDB_RANGESYNC_PRESENT
 1287|  72.1k|  sync_file_range_supported_ = IsSyncFileRangeSupported(fd_);
 1288|  72.1k|#endif  // ROCKSDB_RANGESYNC_PRESENT
 1289|  72.1k|  assert(!options.use_mmap_writes);
 1290|  72.1k|}
_ZN7rocksdb17PosixWritableFileD2Ev:
 1292|  72.1k|PosixWritableFile::~PosixWritableFile() {
 1293|  72.1k|  if (fd_ >= 0) {
  ------------------
  |  Branch (1293:7): [True: 18.0k, False: 54.1k]
  ------------------
 1294|  18.0k|    IOStatus s = PosixWritableFile::Close(IOOptions(), nullptr);
 1295|  18.0k|    s.PermitUncheckedError();
 1296|  18.0k|  }
 1297|  72.1k|}
_ZN7rocksdb17PosixWritableFile6AppendERKNS_5SliceERKNS_9IOOptionsEPNS_14IODebugContextE:
 1300|  1.51M|                                   IODebugContext* /*dbg*/) {
 1301|  1.51M|  if (use_direct_io()) {
  ------------------
  |  Branch (1301:7): [True: 0, False: 1.51M]
  ------------------
 1302|      0|    assert(IsSectorAligned(data.size(), GetRequiredBufferAlignment()));
 1303|      0|    assert(IsSectorAligned(data.data(), GetRequiredBufferAlignment()));
 1304|      0|  }
 1305|  1.51M|  const char* src = data.data();
 1306|  1.51M|  size_t nbytes = data.size();
 1307|       |
 1308|  1.51M|  if (!PosixWrite(fd_, src, nbytes)) {
  ------------------
  |  Branch (1308:7): [True: 0, False: 1.51M]
  ------------------
 1309|      0|    return IOError("While appending to file", filename_, errno);
 1310|      0|  }
 1311|       |
 1312|  1.51M|  filesize_ += nbytes;
 1313|  1.51M|  return IOStatus::OK();
 1314|  1.51M|}
_ZN7rocksdb17PosixWritableFile8TruncateEmRKNS_9IOOptionsEPNS_14IODebugContextE:
 1336|  4.51k|                                     IODebugContext* /*dbg*/) {
 1337|  4.51k|  IOStatus s;
 1338|  4.51k|  int r = ftruncate(fd_, size);
 1339|  4.51k|  if (r < 0) {
  ------------------
  |  Branch (1339:7): [True: 0, False: 4.51k]
  ------------------
 1340|      0|    s = IOError("While ftruncate file to size " + std::to_string(size),
 1341|      0|                filename_, errno);
 1342|  4.51k|  } else {
 1343|  4.51k|    filesize_ = size;
 1344|  4.51k|  }
 1345|  4.51k|  return s;
 1346|  4.51k|}
_ZN7rocksdb17PosixWritableFile5CloseERKNS_9IOOptionsEPNS_14IODebugContextE:
 1349|  72.1k|                                  IODebugContext* /*dbg*/) {
 1350|  72.1k|  IOStatus s;
 1351|       |
 1352|  72.1k|  size_t block_size;
 1353|  72.1k|  size_t last_allocated_block;
 1354|  72.1k|  GetPreallocationStatus(&block_size, &last_allocated_block);
 1355|  72.1k|  TEST_SYNC_POINT_CALLBACK("PosixWritableFile::Close", &last_allocated_block);
 1356|  72.1k|  if (last_allocated_block > 0) {
  ------------------
  |  Branch (1356:7): [True: 18.0k, False: 54.1k]
  ------------------
 1357|       |    // trim the extra space preallocated at the end of the file
 1358|       |    // NOTE(ljin): we probably don't want to surface failure as an IOError,
 1359|       |    // but it will be nice to log these errors.
 1360|  18.0k|    int dummy __attribute__((__unused__));
 1361|  18.0k|    dummy = ftruncate(fd_, filesize_);
 1362|  18.0k|#if defined(ROCKSDB_FALLOCATE_PRESENT) && defined(FALLOC_FL_PUNCH_HOLE)
 1363|       |    // in some file systems, ftruncate only trims trailing space if the
 1364|       |    // new file size is smaller than the current size. Calling fallocate
 1365|       |    // with FALLOC_FL_PUNCH_HOLE flag to explicitly release these unused
 1366|       |    // blocks. FALLOC_FL_PUNCH_HOLE is supported on at least the following
 1367|       |    // filesystems:
 1368|       |    //   XFS (since Linux 2.6.38)
 1369|       |    //   ext4 (since Linux 3.0)
 1370|       |    //   Btrfs (since Linux 3.7)
 1371|       |    //   tmpfs (since Linux 3.5)
 1372|       |    // We ignore error since failure of this operation does not affect
 1373|       |    // correctness.
 1374|  18.0k|    struct stat file_stats;
 1375|  18.0k|    int result = fstat(fd_, &file_stats);
 1376|       |    // After ftruncate, we check whether ftruncate has the correct behavior.
 1377|       |    // If not, we should hack it with FALLOC_FL_PUNCH_HOLE
 1378|  18.0k|    if (result == 0 &&
  ------------------
  |  Branch (1378:9): [True: 18.0k, False: 0]
  ------------------
 1379|  18.0k|        (file_stats.st_size + file_stats.st_blksize - 1) /
  ------------------
  |  Branch (1379:9): [True: 0, False: 18.0k]
  ------------------
 1380|  18.0k|                file_stats.st_blksize !=
 1381|  18.0k|            file_stats.st_blocks / (file_stats.st_blksize / 512)) {
 1382|      0|      IOSTATS_TIMER_GUARD(allocate_nanos);
  ------------------
  |  |   36|      0|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|      0|  iostats_step_timer_##metric.Start();
  ------------------
 1383|      0|      if (allow_fallocate_) {
  ------------------
  |  Branch (1383:11): [True: 0, False: 0]
  ------------------
 1384|      0|        fallocate(fd_, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, filesize_,
 1385|      0|                  block_size * last_allocated_block - filesize_);
 1386|      0|      }
 1387|      0|    }
 1388|  18.0k|#endif
 1389|  18.0k|  }
 1390|       |
 1391|  72.1k|  if (close(fd_) < 0) {
  ------------------
  |  Branch (1391:7): [True: 0, False: 72.1k]
  ------------------
 1392|      0|    s = IOError("While closing file after writing", filename_, errno);
 1393|      0|  }
 1394|  72.1k|  fd_ = -1;
 1395|  72.1k|  return s;
 1396|  72.1k|}
_ZN7rocksdb17PosixWritableFile5FlushERKNS_9IOOptionsEPNS_14IODebugContextE:
 1400|  1.57M|                                  IODebugContext* /*dbg*/) {
 1401|  1.57M|  return IOStatus::OK();
 1402|  1.57M|}
_ZN7rocksdb17PosixWritableFile4SyncERKNS_9IOOptionsEPNS_14IODebugContextE:
 1405|  36.0k|                                 IODebugContext* /*dbg*/) {
 1406|       |#ifdef HAVE_FULLFSYNC
 1407|       |  if (::fcntl(fd_, F_FULLFSYNC) < 0) {
 1408|       |    return IOError("while fcntl(F_FULLFSYNC)", filename_, errno);
 1409|       |  }
 1410|       |#else   // HAVE_FULLFSYNC
 1411|  36.0k|  if (fdatasync(fd_) < 0) {
  ------------------
  |  Branch (1411:7): [True: 0, False: 36.0k]
  ------------------
 1412|      0|    return IOError("While fdatasync", filename_, errno);
 1413|      0|  }
 1414|  36.0k|#endif  // HAVE_FULLFSYNC
 1415|  36.0k|  return IOStatus::OK();
 1416|  36.0k|}
_ZN7rocksdb17PosixWritableFile5FsyncERKNS_9IOOptionsEPNS_14IODebugContextE:
 1419|  9.02k|                                  IODebugContext* /*dbg*/) {
 1420|       |#ifdef HAVE_FULLFSYNC
 1421|       |  if (::fcntl(fd_, F_FULLFSYNC) < 0) {
 1422|       |    return IOError("while fcntl(F_FULLFSYNC)", filename_, errno);
 1423|       |  }
 1424|       |#else   // HAVE_FULLFSYNC
 1425|  9.02k|  if (fsync(fd_) < 0) {
  ------------------
  |  Branch (1425:7): [True: 0, False: 9.02k]
  ------------------
 1426|      0|    return IOError("While fsync", filename_, errno);
 1427|      0|  }
 1428|  9.02k|#endif  // HAVE_FULLFSYNC
 1429|  9.02k|  return IOStatus::OK();
 1430|  9.02k|}
_ZN7rocksdb17PosixWritableFile11GetFileSizeERKNS_9IOOptionsEPNS_14IODebugContextE:
 1435|  1.49M|                                        IODebugContext* /*dbg*/) {
 1436|  1.49M|  return filesize_;
 1437|  1.49M|}
_ZN7rocksdb17PosixWritableFile20SetWriteLifeTimeHintENS_3Env17WriteLifeTimeHintE:
 1439|  13.5k|void PosixWritableFile::SetWriteLifeTimeHint(Env::WriteLifeTimeHint hint) {
 1440|  13.5k|#ifdef OS_LINUX
 1441|       |// Suppress Valgrind "Unimplemented functionality" error.
 1442|  13.5k|#ifndef ROCKSDB_VALGRIND_RUN
 1443|  13.5k|  uint64_t fcntl_hint = hint;
 1444|       |
 1445|  13.5k|  if (hint == write_hint_) {
  ------------------
  |  Branch (1445:7): [True: 0, False: 13.5k]
  ------------------
 1446|      0|    return;
 1447|      0|  }
 1448|  13.5k|  if (fcntl(fd_, F_SET_RW_HINT, &fcntl_hint) == 0) {
  ------------------
  |  Branch (1448:7): [True: 13.5k, False: 0]
  ------------------
 1449|  13.5k|    write_hint_ = hint;
 1450|  13.5k|  }
 1451|       |#else
 1452|       |  (void)hint;
 1453|       |#endif  // ROCKSDB_VALGRIND_RUN
 1454|       |#else
 1455|       |  (void)hint;
 1456|       |#endif  // OS_LINUX
 1457|  13.5k|}
_ZN7rocksdb17PosixWritableFile8AllocateEmmRKNS_9IOOptionsEPNS_14IODebugContextE:
 1480|  18.0k|                                     IODebugContext* /*dbg*/) {
 1481|  18.0k|  assert(offset <= static_cast<uint64_t>(std::numeric_limits<off_t>::max()));
 1482|  18.0k|  assert(len <= static_cast<uint64_t>(std::numeric_limits<off_t>::max()));
 1483|  18.0k|  TEST_KILL_RANDOM("PosixWritableFile::Allocate:0");
 1484|  18.0k|  IOSTATS_TIMER_GUARD(allocate_nanos);
  ------------------
  |  |   36|  18.0k|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  18.0k|  iostats_step_timer_##metric.Start();
  ------------------
 1485|  18.0k|  int alloc_status = 0;
 1486|  18.0k|  if (allow_fallocate_) {
  ------------------
  |  Branch (1486:7): [True: 18.0k, False: 0]
  ------------------
 1487|  18.0k|    alloc_status =
 1488|  18.0k|        fallocate(fd_, fallocate_with_keep_size_ ? FALLOC_FL_KEEP_SIZE : 0,
  ------------------
  |  Branch (1488:24): [True: 18.0k, False: 0]
  ------------------
 1489|  18.0k|                  static_cast<off_t>(offset), static_cast<off_t>(len));
 1490|  18.0k|  }
 1491|  18.0k|  if (alloc_status == 0) {
  ------------------
  |  Branch (1491:7): [True: 18.0k, False: 0]
  ------------------
 1492|  18.0k|    return IOStatus::OK();
 1493|  18.0k|  } else {
 1494|      0|    return IOError("While fallocate offset " + std::to_string(offset) +
 1495|      0|                       " len " + std::to_string(len),
 1496|      0|                   filename_, errno);
 1497|      0|  }
 1498|  18.0k|}
_ZN7rocksdb14PosixDirectoryC2EiRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 1651|  31.5k|    : fd_(fd), directory_name_(directory_name) {
 1652|  31.5k|  is_btrfs_ = false;
 1653|  31.5k|#ifdef OS_LINUX
 1654|  31.5k|  struct statfs buf;
 1655|  31.5k|  int ret = fstatfs(fd, &buf);
 1656|  31.5k|  is_btrfs_ = (ret == 0 && buf.f_type == static_cast<decltype(buf.f_type)>(
  ------------------
  |  Branch (1656:16): [True: 31.5k, False: 0]
  |  Branch (1656:28): [True: 0, False: 31.5k]
  ------------------
 1657|  31.5k|                                             BTRFS_SUPER_MAGIC));
  ------------------
  |  | 1648|  31.5k|#define BTRFS_SUPER_MAGIC 0x9123683E
  ------------------
 1658|  31.5k|#endif
 1659|  31.5k|}
_ZN7rocksdb14PosixDirectoryD2Ev:
 1661|  31.5k|PosixDirectory::~PosixDirectory() {
 1662|  31.5k|  if (fd_ >= 0) {
  ------------------
  |  Branch (1662:7): [True: 9.02k, False: 22.5k]
  ------------------
 1663|  9.02k|    IOStatus s = PosixDirectory::Close(IOOptions(), nullptr);
 1664|  9.02k|    s.PermitUncheckedError();
 1665|  9.02k|  }
 1666|  31.5k|}
_ZN7rocksdb14PosixDirectory5CloseERKNS_9IOOptionsEPNS_14IODebugContextE:
 1675|  31.5k|                               IODebugContext* /*dbg*/) {
 1676|  31.5k|  IOStatus s = IOStatus::OK();
 1677|  31.5k|  if (close(fd_) < 0) {
  ------------------
  |  Branch (1677:7): [True: 0, False: 31.5k]
  ------------------
 1678|      0|    s = IOError("While closing directory ", directory_name_, errno);
 1679|  31.5k|  } else {
 1680|  31.5k|    fd_ = -1;
 1681|  31.5k|  }
 1682|  31.5k|  return s;
 1683|  31.5k|}
_ZN7rocksdb14PosixDirectory19FsyncWithDirOptionsERKNS_9IOOptionsEPNS_14IODebugContextERKNS_15DirFsyncOptionsE:
 1687|  27.0k|    const DirFsyncOptions& dir_fsync_options) {
 1688|  27.0k|  assert(fd_ >= 0);  // Check use after close
 1689|  27.0k|  IOStatus s = IOStatus::OK();
 1690|  27.0k|#ifndef OS_AIX
 1691|  27.0k|  if (is_btrfs_) {
  ------------------
  |  Branch (1691:7): [True: 0, False: 27.0k]
  ------------------
 1692|       |    // skip dir fsync for new file creation, which is not needed for btrfs
 1693|      0|    if (dir_fsync_options.reason == DirFsyncOptions::kNewFileSynced) {
  ------------------
  |  Branch (1693:9): [True: 0, False: 0]
  ------------------
 1694|      0|      return s;
 1695|      0|    }
 1696|       |    // skip dir fsync for renaming file, only need to sync new file
 1697|      0|    if (dir_fsync_options.reason == DirFsyncOptions::kFileRenamed) {
  ------------------
  |  Branch (1697:9): [True: 0, False: 0]
  ------------------
 1698|      0|      std::string new_name = dir_fsync_options.renamed_new_name;
 1699|      0|      assert(!new_name.empty());
 1700|      0|      int fd;
 1701|      0|      do {
 1702|      0|        IOSTATS_TIMER_GUARD(open_nanos);
  ------------------
  |  |   36|      0|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|      0|  iostats_step_timer_##metric.Start();
  ------------------
 1703|      0|        fd = open(new_name.c_str(), O_RDONLY);
 1704|      0|      } while (fd < 0 && errno == EINTR);
  ------------------
  |  Branch (1704:16): [True: 0, False: 0]
  |  Branch (1704:26): [True: 0, False: 0]
  ------------------
 1705|      0|      if (fd < 0) {
  ------------------
  |  Branch (1705:11): [True: 0, False: 0]
  ------------------
 1706|      0|        s = IOError("While open renaming file", new_name, errno);
 1707|      0|      } else if (fsync(fd) < 0) {
  ------------------
  |  Branch (1707:18): [True: 0, False: 0]
  ------------------
 1708|      0|        s = IOError("While fsync renaming file", new_name, errno);
 1709|      0|      }
 1710|      0|      if (close(fd) < 0) {
  ------------------
  |  Branch (1710:11): [True: 0, False: 0]
  ------------------
 1711|      0|        s = IOError("While closing file after fsync", new_name, errno);
 1712|      0|      }
 1713|      0|      return s;
 1714|      0|    }
 1715|       |    // fallback to dir-fsync for kDefault, kDirRenamed and kFileDeleted
 1716|      0|  }
 1717|       |
 1718|       |  // skip fsync/fcntl when fd_ == -1 since this file descriptor has been closed
 1719|       |  // in either the de-construction or the close function, data must have been
 1720|       |  // fsync-ed before de-construction and close is called
 1721|       |#ifdef HAVE_FULLFSYNC
 1722|       |  // btrfs is a Linux file system, while currently F_FULLFSYNC is available on
 1723|       |  // Mac OS.
 1724|       |  assert(!is_btrfs_);
 1725|       |  if (fd_ != -1 && ::fcntl(fd_, F_FULLFSYNC) < 0) {
 1726|       |    return IOError("while fcntl(F_FULLFSYNC)", "a directory", errno);
 1727|       |  }
 1728|       |#else   // HAVE_FULLFSYNC
 1729|  27.0k|  if (fd_ != -1 && fsync(fd_) == -1) {
  ------------------
  |  Branch (1729:7): [True: 27.0k, False: 0]
  |  Branch (1729:20): [True: 0, False: 27.0k]
  ------------------
 1730|      0|    s = IOError("While fsync", "a directory", errno);
 1731|      0|  }
 1732|  27.0k|#endif  // HAVE_FULLFSYNC
 1733|  27.0k|#endif  // OS_AIX
 1734|  27.0k|  return s;
 1735|  27.0k|}
io_posix.cc:_ZN7rocksdb12_GLOBAL__N_124IsSyncFileRangeSupportedEi:
  168|  72.1k|bool IsSyncFileRangeSupported(int fd) {
  169|       |  // This function tracks and checks for cases where we know `sync_file_range`
  170|       |  // definitely will not work properly despite passing the compile-time check
  171|       |  // (`ROCKSDB_RANGESYNC_PRESENT`). If we are unsure, or if any of the checks
  172|       |  // fail in unexpected ways, we allow `sync_file_range` to be used. This way
  173|       |  // should minimize risk of impacting existing use cases.
  174|  72.1k|  struct statfs buf;
  175|  72.1k|  int ret = fstatfs(fd, &buf);
  176|  72.1k|  assert(ret == 0);
  177|  72.1k|  if (ret == 0 && buf.f_type == ZFS_SUPER_MAGIC) {
  ------------------
  |  |  165|  72.1k|#define ZFS_SUPER_MAGIC 0x2fc12fc1
  ------------------
  |  Branch (177:7): [True: 72.1k, False: 0]
  |  Branch (177:19): [True: 0, False: 72.1k]
  ------------------
  178|       |    // Testing on ZFS showed the writeback did not happen asynchronously when
  179|       |    // `sync_file_range` was called, even though it returned success. Avoid it
  180|       |    // and use `fdatasync` instead to preserve the contract of `bytes_per_sync`,
  181|       |    // even though this'll incur extra I/O for metadata.
  182|      0|    return false;
  183|      0|  }
  184|       |
  185|  72.1k|  ret = sync_file_range(fd, 0 /* offset */, 0 /* nbytes */, 0 /* flags */);
  186|  72.1k|  assert(!(ret == -1 && errno != ENOSYS));
  187|  72.1k|  if (ret == -1 && errno == ENOSYS) {
  ------------------
  |  Branch (187:7): [True: 0, False: 72.1k]
  |  Branch (187:20): [True: 0, False: 0]
  ------------------
  188|       |    // `sync_file_range` is not implemented on all platforms even if
  189|       |    // compile-time checks pass and a supported filesystem is in-use. For
  190|       |    // example, using ext4 on WSL (Windows Subsystem for Linux),
  191|       |    // `sync_file_range()` returns `ENOSYS`
  192|       |    // ("Function not implemented").
  193|      0|    return false;
  194|      0|  }
  195|       |  // None of the known cases matched, so allow `sync_file_range` use.
  196|  72.1k|  return true;
  197|  72.1k|}
io_posix.cc:_ZN7rocksdb12_GLOBAL__N_110PosixWriteEiPKcm:
  114|  1.51M|bool PosixWrite(int fd, const char* buf, size_t nbyte) {
  115|  1.51M|  const size_t kLimit1Gb = 1UL << 30;
  116|       |
  117|  1.51M|  const char* src = buf;
  118|  1.51M|  size_t left = nbyte;
  119|       |
  120|  3.02M|  while (left != 0) {
  ------------------
  |  Branch (120:10): [True: 1.51M, False: 1.51M]
  ------------------
  121|  1.51M|    size_t bytes_to_write = std::min(left, kLimit1Gb);
  122|       |
  123|  1.51M|    ssize_t done = write(fd, src, bytes_to_write);
  124|  1.51M|    if (done < 0) {
  ------------------
  |  Branch (124:9): [True: 0, False: 1.51M]
  ------------------
  125|      0|      if (errno == EINTR) {
  ------------------
  |  Branch (125:11): [True: 0, False: 0]
  ------------------
  126|      0|        continue;
  127|      0|      }
  128|      0|      return false;
  129|      0|    }
  130|  1.51M|    left -= done;
  131|  1.51M|    src += done;
  132|  1.51M|  }
  133|  1.51M|  return true;
  134|  1.51M|}

_ZN7rocksdb21LogicalBlockSizeCacheC2ENSt3__18functionIFmiEEENS2_IFNS_6StatusERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPmEEE:
  179|      2|            get_logical_block_size_of_directory) {}
_ZN7rocksdb21LogicalBlockSizeCache10CacheValueC2Ev:
  219|  9.02k|    CacheValue() : size(0), ref(0) {}
_ZNK7rocksdb19PosixSequentialFile13use_direct_ioEv:
  256|  73.6k|  bool use_direct_io() const override { return use_direct_io_; }
_ZNK7rocksdb19PosixSequentialFile26GetRequiredBufferAlignmentEv:
  257|  31.5k|  size_t GetRequiredBufferAlignment() const override {
  258|  31.5k|    return logical_sector_size_;
  259|  31.5k|  }
_ZNK7rocksdb21PosixRandomAccessFile13use_direct_ioEv:
  316|   134k|  bool use_direct_io() const override { return use_direct_io_; }
_ZNK7rocksdb21PosixRandomAccessFile26GetRequiredBufferAlignmentEv:
  317|  29.6k|  size_t GetRequiredBufferAlignment() const override {
  318|  29.6k|    return logical_sector_size_;
  319|  29.6k|  }
_ZNK7rocksdb17PosixWritableFile13use_direct_ioEv:
  376|  14.5M|  bool use_direct_io() const override { return use_direct_io_; }
_ZNK7rocksdb17PosixWritableFile26GetRequiredBufferAlignmentEv:
  380|  49.6k|  size_t GetRequiredBufferAlignment() const override {
  381|  49.6k|    return logical_sector_size_;
  382|  49.6k|  }

_ZN7rocksdb19GenerateRawUniqueIdEPmS0_b:
  138|      2|void GenerateRawUniqueId(uint64_t* a, uint64_t* b, bool exclude_port_uuid) {
  139|      2|  GenerateRawUniqueIdOpts opts;
  140|      2|  opts.exclude_port_uuid = exclude_port_uuid;
  141|      2|  assert(!opts.exclude_env_details);
  142|      2|  assert(!opts.exclude_random_device);
  143|      2|  GenerateRawUniqueIdImpl(a, b, opts);
  144|      2|}
_ZN7rocksdb25SemiStructuredUniqueIdGen5ResetEv:
  158|      2|void SemiStructuredUniqueIdGen::Reset() {
  159|      2|  saved_process_id_ = port::GetProcessID();
  160|      2|  GenerateRawUniqueId(&base_upper_, &base_lower_);
  161|      2|  counter_ = 0;
  162|      2|}
_ZN7rocksdb25SemiStructuredUniqueIdGen12GenerateNextEPmS1_:
  164|  9.02k|void SemiStructuredUniqueIdGen::GenerateNext(uint64_t* upper, uint64_t* lower) {
  165|  9.02k|  if (port::GetProcessID() == saved_process_id_) {
  ------------------
  |  Branch (165:7): [True: 9.02k, False: 0]
  ------------------
  166|       |    // Safe to increment the atomic for guaranteed uniqueness within this
  167|       |    // process lifetime. Xor slightly better than +. See
  168|       |    // https://github.com/pdillinger/unique_id
  169|  9.02k|    *lower = base_lower_ ^ counter_.fetch_add(1);
  170|  9.02k|    *upper = base_upper_;
  171|  9.02k|  } else {
  172|       |    // There must have been a fork() or something. Rather than attempting to
  173|       |    // update in a thread-safe way, simply fall back on GenerateRawUniqueId.
  174|      0|    GenerateRawUniqueId(upper, lower);
  175|      0|  }
  176|  9.02k|}
unique_id_gen.cc:_ZN7rocksdb12_GLOBAL__N_123GenerateRawUniqueIdImplEPmS1_RKNS0_23GenerateRawUniqueIdOptsE:
  129|      2|                             const GenerateRawUniqueIdOpts& opts) {
  130|      2|  Entropy e;
  131|      2|  std::memset(&e, 0, sizeof(e));
  132|      2|  e.Populate(opts);
  133|      2|  Hash2x64(reinterpret_cast<const char*>(&e), sizeof(e), a, b);
  134|      2|}
unique_id_gen.cc:_ZN7rocksdb12_GLOBAL__N_17Entropy8PopulateERKNS0_23GenerateRawUniqueIdOptsE:
  114|      2|  void Populate(const GenerateRawUniqueIdOpts& opts) {
  115|       |    // If we change the format of what goes into the entropy inputs, it's
  116|       |    // conceivable there could be a physical collision in the hash input
  117|       |    // even though they are logically different. This value should change
  118|       |    // if there's a change to the "schema" here, including byte order.
  119|      2|    version_identifier = (uint64_t{ROCKSDB_MAJOR} << 32) +
  ------------------
  |  |   14|      2|#define ROCKSDB_MAJOR 9
  ------------------
  120|      2|                         (uint64_t{ROCKSDB_MINOR} << 16) +
  ------------------
  |  |   15|      2|#define ROCKSDB_MINOR 6
  ------------------
  121|      2|                         uint64_t{ROCKSDB_PATCH};
  ------------------
  |  |   16|      2|#define ROCKSDB_PATCH 0
  ------------------
  122|      2|    et1.Populate(opts);
  123|      2|    et2.Populate(opts);
  124|      2|    et3.Populate(opts);
  125|      2|  }
unique_id_gen.cc:_ZN7rocksdb12_GLOBAL__N_124EntropyTrackRandomDevice8PopulateERKNS0_23GenerateRawUniqueIdOptsE:
   97|      2|  void Populate(const GenerateRawUniqueIdOpts& opts) {
   98|      2|    if (opts.exclude_random_device) {
  ------------------
  |  Branch (98:9): [True: 0, False: 2]
  ------------------
   99|      0|      return;
  100|      0|    }
  101|      2|    std::random_device r;
  102|     12|    for (auto& val : rand_vals) {
  ------------------
  |  Branch (102:20): [True: 12, False: 2]
  ------------------
  103|     12|      val = r();
  104|     12|    }
  105|      2|  }
unique_id_gen.cc:_ZN7rocksdb12_GLOBAL__N_122EntropyTrackEnvDetails8PopulateERKNS0_23GenerateRawUniqueIdOptsE:
   78|      2|  void Populate(const GenerateRawUniqueIdOpts& opts) {
   79|      2|    if (opts.exclude_env_details) {
  ------------------
  |  Branch (79:9): [True: 0, False: 2]
  ------------------
   80|      0|      return;
   81|      0|    }
   82|      2|    opts.env->GetHostName(hostname_buf.data(), hostname_buf.size())
   83|      2|        .PermitUncheckedError();
   84|      2|    process_id = port::GetProcessID();
   85|      2|    thread_id = opts.env->GetThreadID();
   86|      2|    opts.env->GetCurrentTime(&unix_time).PermitUncheckedError();
   87|      2|    nano_time = opts.env->NowNanos();
   88|      2|  }
unique_id_gen.cc:_ZN7rocksdb12_GLOBAL__N_120EntropyTrackPortUuid8PopulateERKNS0_23GenerateRawUniqueIdOptsE:
   59|      2|  void Populate(const GenerateRawUniqueIdOpts& opts) {
   60|      2|    if (opts.exclude_port_uuid) {
  ------------------
  |  Branch (60:9): [True: 0, False: 2]
  ------------------
   61|      0|      return;
   62|      0|    }
   63|      2|    std::string s;
   64|      2|    port::GenerateRfcUuid(&s);
   65|      2|    if (s.size() >= uuid.size()) {
  ------------------
  |  Branch (65:9): [True: 2, False: 0]
  ------------------
   66|      2|      std::copy_n(s.begin(), uuid.size(), uuid.begin());
   67|      2|    }
   68|      2|  }

_ZN7rocksdb25SemiStructuredUniqueIdGenC2Ev:
   59|      2|  SemiStructuredUniqueIdGen() { Reset(); }

_ZN7rocksdb15DeleteSchedulerC2EPNS_11SystemClockEPNS_10FileSystemElPNS_6LoggerEPNS_18SstFileManagerImplEdm:
   40|  13.5k|      max_trash_db_ratio_(max_trash_db_ratio) {
   41|  13.5k|  assert(sst_file_manager != nullptr);
   42|  13.5k|  assert(max_trash_db_ratio >= 0);
   43|  13.5k|  MaybeCreateBackgroundThread();
   44|  13.5k|}
_ZN7rocksdb15DeleteSchedulerD2Ev:
   46|  13.5k|DeleteScheduler::~DeleteScheduler() {
   47|  13.5k|  {
   48|  13.5k|    InstrumentedMutexLock l(&mu_);
   49|  13.5k|    closing_ = true;
   50|  13.5k|    cv_.SignalAll();
   51|  13.5k|  }
   52|  13.5k|  if (bg_thread_) {
  ------------------
  |  Branch (52:7): [True: 0, False: 13.5k]
  ------------------
   53|      0|    bg_thread_->join();
   54|      0|  }
   55|  13.5k|  for (const auto& it : bg_errors_) {
  ------------------
  |  Branch (55:23): [True: 0, False: 13.5k]
  ------------------
   56|      0|    it.second.PermitUncheckedError();
   57|      0|  }
   58|  13.5k|}
_ZN7rocksdb15DeleteScheduler10DeleteFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_b:
   62|  13.5k|                                   const bool force_bg) {
   63|  13.5k|  uint64_t total_size = sst_file_manager_->GetTotalSize();
   64|  13.5k|  if (rate_bytes_per_sec_.load() <= 0 ||
  ------------------
  |  Branch (64:7): [True: 13.5k, False: 0]
  ------------------
   65|  13.5k|      (!force_bg &&
  ------------------
  |  Branch (65:8): [True: 0, False: 0]
  ------------------
   66|  13.5k|       total_trash_size_.load() > total_size * max_trash_db_ratio_.load())) {
  ------------------
  |  Branch (66:8): [True: 0, False: 0]
  ------------------
   67|       |    // Rate limiting is disabled or trash size makes up more than
   68|       |    // max_trash_db_ratio_ (default 25%) of the total DB size
   69|  13.5k|    TEST_SYNC_POINT("DeleteScheduler::DeleteFile");
   70|  13.5k|    Status s = fs_->DeleteFile(file_path, IOOptions(), nullptr);
   71|  13.5k|    if (s.ok()) {
  ------------------
  |  Branch (71:9): [True: 13.5k, False: 0]
  ------------------
   72|  13.5k|      s = sst_file_manager_->OnDeleteFile(file_path);
   73|  13.5k|      ROCKS_LOG_INFO(info_log_,
  ------------------
  |  |   39|  13.5k|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|  13.5k|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|  13.5k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|  13.5k|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|  13.5k|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
   74|  13.5k|                     "Deleted file %s immediately, rate_bytes_per_sec %" PRIi64
   75|  13.5k|                     ", total_trash_size %" PRIu64 ", total_size %" PRIi64
   76|  13.5k|                     ", max_trash_db_ratio %lf",
   77|  13.5k|                     file_path.c_str(), rate_bytes_per_sec_.load(),
   78|  13.5k|                     total_trash_size_.load(), total_size,
   79|  13.5k|                     max_trash_db_ratio_.load());
   80|  13.5k|      InstrumentedMutexLock l(&mu_);
   81|  13.5k|      RecordTick(stats_.get(), FILES_DELETED_IMMEDIATELY);
   82|  13.5k|    }
   83|  13.5k|    return s;
   84|  13.5k|  }
   85|       |
   86|       |  // Move file to trash
   87|      0|  std::string trash_file;
   88|      0|  Status s = MarkAsTrash(file_path, &trash_file);
   89|      0|  ROCKS_LOG_INFO(info_log_, "Mark file: %s as trash -- %s", trash_file.c_str(),
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
   90|      0|                 s.ToString().c_str());
   91|       |
   92|      0|  if (!s.ok()) {
  ------------------
  |  Branch (92:7): [True: 0, False: 0]
  ------------------
   93|      0|    ROCKS_LOG_ERROR(info_log_, "Failed to mark %s as trash -- %s",
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
   94|      0|                    file_path.c_str(), s.ToString().c_str());
   95|      0|    s = fs_->DeleteFile(file_path, IOOptions(), nullptr);
   96|      0|    if (s.ok()) {
  ------------------
  |  Branch (96:9): [True: 0, False: 0]
  ------------------
   97|      0|      s = sst_file_manager_->OnDeleteFile(file_path);
   98|      0|      ROCKS_LOG_INFO(info_log_, "Deleted file %s immediately",
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
   99|      0|                     trash_file.c_str());
  100|      0|      InstrumentedMutexLock l(&mu_);
  101|      0|      RecordTick(stats_.get(), FILES_DELETED_IMMEDIATELY);
  102|      0|    }
  103|      0|    return s;
  104|      0|  }
  105|       |
  106|       |  // Update the total trash size
  107|      0|  uint64_t trash_file_size = 0;
  108|      0|  IOStatus io_s =
  109|      0|      fs_->GetFileSize(trash_file, IOOptions(), &trash_file_size, nullptr);
  110|      0|  if (io_s.ok()) {
  ------------------
  |  Branch (110:7): [True: 0, False: 0]
  ------------------
  111|      0|    total_trash_size_.fetch_add(trash_file_size);
  112|      0|  }
  113|       |  //**TODO: What should we do if we failed to
  114|       |  // get the file size?
  115|       |
  116|       |  // Add file to delete queue
  117|      0|  {
  118|      0|    InstrumentedMutexLock l(&mu_);
  119|      0|    RecordTick(stats_.get(), FILES_MARKED_TRASH);
  120|      0|    queue_.emplace(trash_file, dir_to_sync);
  121|      0|    pending_files_++;
  122|      0|    if (pending_files_ == 1) {
  ------------------
  |  Branch (122:9): [True: 0, False: 0]
  ------------------
  123|      0|      cv_.SignalAll();
  124|      0|    }
  125|      0|  }
  126|      0|  return s;
  127|      0|}
_ZN7rocksdb15DeleteScheduler11IsTrashFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  135|  90.2k|bool DeleteScheduler::IsTrashFile(const std::string& file_path) {
  136|  90.2k|  return (file_path.size() >= kTrashExtension.size() &&
  ------------------
  |  Branch (136:11): [True: 72.1k, False: 18.0k]
  ------------------
  137|  90.2k|          file_path.rfind(kTrashExtension) ==
  ------------------
  |  Branch (137:11): [True: 0, False: 72.1k]
  ------------------
  138|  72.1k|              file_path.size() - kTrashExtension.size());
  139|  90.2k|}
_ZN7rocksdb15DeleteScheduler16CleanupDirectoryEPNS_3EnvEPNS_18SstFileManagerImplERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
  142|  9.02k|                                         const std::string& path) {
  143|  9.02k|  Status s;
  144|       |  // Check if there are any files marked as trash in this path
  145|  9.02k|  std::vector<std::string> files_in_path;
  146|  9.02k|  const auto& fs = env->GetFileSystem();
  147|  9.02k|  IOOptions io_opts;
  148|  9.02k|  io_opts.do_not_recurse = true;
  149|  9.02k|  s = fs->GetChildren(path, io_opts, &files_in_path,
  150|  9.02k|                      /*IODebugContext*=*/nullptr);
  151|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (151:7): [True: 0, False: 9.02k]
  ------------------
  152|      0|    return s;
  153|      0|  }
  154|  90.2k|  for (const std::string& current_file : files_in_path) {
  ------------------
  |  Branch (154:40): [True: 90.2k, False: 9.02k]
  ------------------
  155|  90.2k|    if (!DeleteScheduler::IsTrashFile(current_file)) {
  ------------------
  |  Branch (155:9): [True: 90.2k, False: 0]
  ------------------
  156|       |      // not a trash file, skip
  157|  90.2k|      continue;
  158|  90.2k|    }
  159|       |
  160|      0|    Status file_delete;
  161|      0|    std::string trash_file = path + "/" + current_file;
  162|      0|    if (sfm) {
  ------------------
  |  Branch (162:9): [True: 0, False: 0]
  ------------------
  163|       |      // We have an SstFileManager that will schedule the file delete
  164|      0|      s = sfm->OnAddFile(trash_file);
  165|      0|      file_delete = sfm->ScheduleFileDeletion(trash_file, path);
  166|      0|    } else {
  167|       |      // Delete the file immediately
  168|      0|      file_delete = env->DeleteFile(trash_file);
  169|      0|    }
  170|       |
  171|      0|    if (s.ok() && !file_delete.ok()) {
  ------------------
  |  Branch (171:9): [True: 0, False: 0]
  |  Branch (171:19): [True: 0, False: 0]
  ------------------
  172|      0|      s = file_delete;
  173|      0|    }
  174|      0|  }
  175|       |
  176|  9.02k|  return s;
  177|  9.02k|}
_ZN7rocksdb15DeleteScheduler27MaybeCreateBackgroundThreadEv:
  400|  13.5k|void DeleteScheduler::MaybeCreateBackgroundThread() {
  401|  13.5k|  if (bg_thread_ == nullptr && rate_bytes_per_sec_.load() > 0) {
  ------------------
  |  Branch (401:7): [True: 13.5k, False: 0]
  |  Branch (401:32): [True: 0, False: 13.5k]
  ------------------
  402|      0|    bg_thread_.reset(
  403|      0|        new port::Thread(&DeleteScheduler::BackgroundEmptyTrash, this));
  404|      0|    ROCKS_LOG_INFO(info_log_,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  405|      0|                   "Created background thread for deletion scheduler with "
  406|      0|                   "rate_bytes_per_sec: %" PRIi64,
  407|      0|                   rate_bytes_per_sec_.load());
  408|      0|  }
  409|  13.5k|}

_ZN7rocksdb15DeleteScheduler21GetRateBytesPerSecondEv:
   43|  9.02k|  int64_t GetRateBytesPerSecond() { return rate_bytes_per_sec_.load(); }
_ZN7rocksdb15DeleteScheduler16SetStatisticsPtrERKNSt3__110shared_ptrINS_10StatisticsEEE:
   84|  9.02k|  void SetStatisticsPtr(const std::shared_ptr<Statistics>& stats) {
   85|  9.02k|    InstrumentedMutexLock l(&mu_);
   86|  9.02k|    stats_ = stats;
   87|  9.02k|  }

_ZN7rocksdb18FilePrefetchBuffer16TryReadFromCacheERKNS_9IOOptionsEPNS_22RandomAccessFileReaderEmmPNS_5SliceEPNS_6StatusEb:
  677|  20.8k|                                          bool for_compaction) {
  678|  20.8k|  bool ret = TryReadFromCacheUntracked(opts, reader, offset, n, result, status,
  679|  20.8k|                                       for_compaction);
  680|  20.8k|  if (usage_ == FilePrefetchBufferUsage::kTableOpenPrefetchTail && enable_) {
  ------------------
  |  Branch (680:7): [True: 0, False: 20.8k]
  |  Branch (680:68): [True: 0, False: 0]
  ------------------
  681|      0|    if (ret) {
  ------------------
  |  Branch (681:9): [True: 0, False: 0]
  ------------------
  682|      0|      RecordTick(stats_, TABLE_OPEN_PREFETCH_TAIL_HIT);
  683|      0|    } else {
  684|      0|      RecordTick(stats_, TABLE_OPEN_PREFETCH_TAIL_MISS);
  685|      0|    }
  686|      0|  }
  687|  20.8k|  return ret;
  688|  20.8k|}
_ZN7rocksdb18FilePrefetchBuffer25TryReadFromCacheUntrackedERKNS_9IOOptionsEPNS_22RandomAccessFileReaderEmmPNS_5SliceEPNS_6StatusEb:
  692|  20.8k|    size_t n, Slice* result, Status* status, bool for_compaction) {
  693|  20.8k|  if (track_min_offset_ && offset < min_offset_read_) {
  ------------------
  |  Branch (693:7): [True: 20.8k, False: 0]
  |  Branch (693:28): [True: 20.8k, False: 0]
  ------------------
  694|  20.8k|    min_offset_read_ = static_cast<size_t>(offset);
  695|  20.8k|  }
  696|       |
  697|  20.8k|  if (!enable_) {
  ------------------
  |  Branch (697:7): [True: 20.8k, False: 0]
  ------------------
  698|  20.8k|    return false;
  699|  20.8k|  }
  700|       |
  701|      0|  if (explicit_prefetch_submitted_) {
  ------------------
  |  Branch (701:7): [True: 0, False: 0]
  ------------------
  702|       |    // explicit_prefetch_submitted_ is special case where it expects request
  703|       |    // submitted in PrefetchAsync should match with this request. Otherwise
  704|       |    // buffers will be outdated.
  705|       |    // Random offset called. So abort the IOs.
  706|      0|    if (prev_offset_ != offset) {
  ------------------
  |  Branch (706:9): [True: 0, False: 0]
  ------------------
  707|      0|      AbortAllIOs();
  708|      0|      FreeAllBuffers();
  709|      0|      explicit_prefetch_submitted_ = false;
  710|      0|      return false;
  711|      0|    }
  712|      0|  }
  713|       |
  714|      0|  AllocateBufferIfEmpty();
  715|      0|  BufferInfo* buf = GetFirstBuffer();
  716|       |
  717|      0|  if (!explicit_prefetch_submitted_ && offset < buf->offset_) {
  ------------------
  |  Branch (717:7): [True: 0, False: 0]
  |  Branch (717:40): [True: 0, False: 0]
  ------------------
  718|      0|    return false;
  719|      0|  }
  720|       |
  721|      0|  bool prefetched = false;
  722|      0|  bool copy_to_overlap_buffer = false;
  723|       |  // If the buffer contains only a few of the requested bytes:
  724|       |  //    If readahead is enabled: prefetch the remaining bytes + readahead
  725|       |  //    bytes
  726|       |  //        and satisfy the request.
  727|       |  //    If readahead is not enabled: return false.
  728|      0|  TEST_SYNC_POINT_CALLBACK("FilePrefetchBuffer::TryReadFromCache",
  729|      0|                           &readahead_size_);
  730|       |
  731|      0|  if (explicit_prefetch_submitted_ ||
  ------------------
  |  Branch (731:7): [True: 0, False: 0]
  ------------------
  732|      0|      (buf->async_read_in_progress_ ||
  ------------------
  |  Branch (732:8): [True: 0, False: 0]
  ------------------
  733|      0|       offset + n > buf->offset_ + buf->CurrentSize())) {
  ------------------
  |  Branch (733:8): [True: 0, False: 0]
  ------------------
  734|       |    // In case readahead_size is trimmed (=0), we still want to poll the data
  735|       |    // submitted with explicit_prefetch_submitted_=true.
  736|      0|    if (readahead_size_ > 0 || explicit_prefetch_submitted_) {
  ------------------
  |  Branch (736:9): [True: 0, False: 0]
  |  Branch (736:32): [True: 0, False: 0]
  ------------------
  737|      0|      Status s;
  738|      0|      assert(reader != nullptr);
  739|      0|      assert(max_readahead_size_ >= readahead_size_);
  740|       |
  741|      0|      if (for_compaction) {
  ------------------
  |  Branch (741:11): [True: 0, False: 0]
  ------------------
  742|      0|        s = Prefetch(opts, reader, offset, std::max(n, readahead_size_));
  743|      0|      } else {
  744|      0|        if (implicit_auto_readahead_) {
  ------------------
  |  Branch (744:13): [True: 0, False: 0]
  ------------------
  745|      0|          if (!IsEligibleForPrefetch(offset, n)) {
  ------------------
  |  Branch (745:15): [True: 0, False: 0]
  ------------------
  746|       |            // Ignore status as Prefetch is not called.
  747|      0|            s.PermitUncheckedError();
  748|      0|            return false;
  749|      0|          }
  750|      0|        }
  751|       |
  752|       |        // Prefetch n + readahead_size_/2 synchronously as remaining
  753|       |        // readahead_size_/2 will be prefetched asynchronously if num_buffers_
  754|       |        // > 1.
  755|      0|        s = PrefetchInternal(
  756|      0|            opts, reader, offset, n,
  757|      0|            (num_buffers_ > 1 ? readahead_size_ / 2 : readahead_size_),
  ------------------
  |  Branch (757:14): [True: 0, False: 0]
  ------------------
  758|      0|            copy_to_overlap_buffer);
  759|      0|        explicit_prefetch_submitted_ = false;
  760|      0|      }
  761|       |
  762|      0|      if (!s.ok()) {
  ------------------
  |  Branch (762:11): [True: 0, False: 0]
  ------------------
  763|      0|        if (status) {
  ------------------
  |  Branch (763:13): [True: 0, False: 0]
  ------------------
  764|      0|          *status = s;
  765|      0|        }
  766|       |#ifndef NDEBUG
  767|       |        IGNORE_STATUS_IF_ERROR(s);
  768|       |#endif
  769|      0|        return false;
  770|      0|      }
  771|      0|      prefetched = explicit_prefetch_submitted_ ? false : true;
  ------------------
  |  Branch (771:20): [True: 0, False: 0]
  ------------------
  772|      0|    } else {
  773|      0|      return false;
  774|      0|    }
  775|      0|  } else if (!for_compaction) {
  ------------------
  |  Branch (775:14): [True: 0, False: 0]
  ------------------
  776|      0|    UpdateStats(/*found_in_buffer=*/true, n);
  777|      0|  }
  778|       |
  779|      0|  UpdateReadPattern(offset, n, /*decrease_readaheadsize=*/false);
  780|       |
  781|      0|  buf = GetFirstBuffer();
  782|      0|  if (copy_to_overlap_buffer) {
  ------------------
  |  Branch (782:7): [True: 0, False: 0]
  ------------------
  783|      0|    buf = overlap_buf_;
  784|      0|  }
  785|      0|  uint64_t offset_in_buffer = offset - buf->offset_;
  786|      0|  *result = Slice(buf->buffer_.BufferStart() + offset_in_buffer, n);
  787|      0|  if (prefetched) {
  ------------------
  |  Branch (787:7): [True: 0, False: 0]
  ------------------
  788|      0|    readahead_size_ = std::min(max_readahead_size_, readahead_size_ * 2);
  789|      0|  }
  790|      0|  return true;
  791|      0|}

_ZN7rocksdb15ReadaheadParamsC2Ev:
   36|  13.3k|  ReadaheadParams() {}
_ZN7rocksdb18FilePrefetchBufferC2ERKNS_15ReadaheadParamsEbbPNS_10FileSystemEPNS_11SystemClockEPNS_10StatisticsERKNSt3__18functionIFvbRmSC_EEENS_23FilePrefetchBufferUsageE:
  205|  4.48k|        num_buffers_(readahead_params.num_buffers) {
  206|  4.48k|    assert((num_file_reads_ >= num_file_reads_for_auto_readahead_ + 1) ||
  207|  4.48k|           (num_file_reads_ == 0));
  208|       |
  209|       |    // If num_buffers_ > 1, data is asynchronously filled in the
  210|       |    // queue. As result, data can be overlapping in two buffers. It copies the
  211|       |    // data to overlap_buf_ in order to to return continuous buffer.
  212|  4.48k|    if (num_buffers_ > 1) {
  ------------------
  |  Branch (212:9): [True: 0, False: 4.48k]
  ------------------
  213|      0|      overlap_buf_ = new BufferInfo();
  214|      0|    }
  215|       |
  216|  4.48k|    free_bufs_.resize(num_buffers_);
  217|  8.96k|    for (uint32_t i = 0; i < num_buffers_; i++) {
  ------------------
  |  Branch (217:26): [True: 4.48k, False: 4.48k]
  ------------------
  218|  4.48k|      free_bufs_[i] = new BufferInfo();
  219|  4.48k|    }
  220|  4.48k|  }
_ZN7rocksdb18FilePrefetchBufferD2Ev:
  222|  4.48k|  ~FilePrefetchBuffer() {
  223|       |    // Abort any pending async read request before destroying the class object.
  224|  4.48k|    if (fs_ != nullptr) {
  ------------------
  |  Branch (224:9): [True: 0, False: 4.48k]
  ------------------
  225|      0|      std::vector<void*> handles;
  226|      0|      for (auto& buf : bufs_) {
  ------------------
  |  Branch (226:22): [True: 0, False: 0]
  ------------------
  227|      0|        if (buf->async_read_in_progress_ && buf->io_handle_ != nullptr) {
  ------------------
  |  Branch (227:13): [True: 0, False: 0]
  |  Branch (227:45): [True: 0, False: 0]
  ------------------
  228|      0|          handles.emplace_back(buf->io_handle_);
  229|      0|        }
  230|      0|      }
  231|      0|      if (!handles.empty()) {
  ------------------
  |  Branch (231:11): [True: 0, False: 0]
  ------------------
  232|      0|        StopWatch sw(clock_, stats_, ASYNC_PREFETCH_ABORT_MICROS);
  233|      0|        Status s = fs_->AbortIO(handles);
  234|      0|        assert(s.ok());
  235|      0|      }
  236|       |
  237|      0|      for (auto& buf : bufs_) {
  ------------------
  |  Branch (237:22): [True: 0, False: 0]
  ------------------
  238|      0|        if (buf->io_handle_ != nullptr) {
  ------------------
  |  Branch (238:13): [True: 0, False: 0]
  ------------------
  239|      0|          DestroyAndClearIOHandle(buf);
  240|      0|          buf->ClearBuffer();
  241|      0|        }
  242|      0|        buf->async_read_in_progress_ = false;
  243|      0|      }
  244|      0|    }
  245|       |
  246|       |    // Prefetch buffer bytes discarded.
  247|  4.48k|    uint64_t bytes_discarded = 0;
  248|       |    // Iterated over buffers.
  249|  4.48k|    for (auto& buf : bufs_) {
  ------------------
  |  Branch (249:20): [True: 0, False: 4.48k]
  ------------------
  250|      0|      if (buf->DoesBufferContainData()) {
  ------------------
  |  Branch (250:11): [True: 0, False: 0]
  ------------------
  251|       |        // If last read was from this block and some bytes are still unconsumed.
  252|      0|        if (prev_offset_ >= buf->offset_ &&
  ------------------
  |  Branch (252:13): [True: 0, False: 0]
  ------------------
  253|      0|            prev_offset_ + prev_len_ < buf->offset_ + buf->CurrentSize()) {
  ------------------
  |  Branch (253:13): [True: 0, False: 0]
  ------------------
  254|      0|          bytes_discarded +=
  255|      0|              buf->CurrentSize() - (prev_offset_ + prev_len_ - buf->offset_);
  256|      0|        }
  257|       |        // If last read was from previous blocks and this block is unconsumed.
  258|      0|        else if (prev_offset_ < buf->offset_ &&
  ------------------
  |  Branch (258:18): [True: 0, False: 0]
  ------------------
  259|      0|                 prev_offset_ + prev_len_ <= buf->offset_) {
  ------------------
  |  Branch (259:18): [True: 0, False: 0]
  ------------------
  260|      0|          bytes_discarded += buf->CurrentSize();
  261|      0|        }
  262|      0|      }
  263|      0|    }
  264|       |
  265|  4.48k|    RecordInHistogram(stats_, PREFETCHED_BYTES_DISCARDED, bytes_discarded);
  266|       |
  267|  4.48k|    for (auto& buf : bufs_) {
  ------------------
  |  Branch (267:20): [True: 0, False: 4.48k]
  ------------------
  268|      0|      delete buf;
  269|      0|      buf = nullptr;
  270|      0|    }
  271|       |
  272|  4.48k|    for (auto& buf : free_bufs_) {
  ------------------
  |  Branch (272:20): [True: 4.48k, False: 4.48k]
  ------------------
  273|  4.48k|      delete buf;
  274|  4.48k|      buf = nullptr;
  275|  4.48k|    }
  276|       |
  277|  4.48k|    if (overlap_buf_ != nullptr) {
  ------------------
  |  Branch (277:9): [True: 0, False: 4.48k]
  ------------------
  278|      0|      delete overlap_buf_;
  279|      0|      overlap_buf_ = nullptr;
  280|      0|    }
  281|  4.48k|  }
_ZNK7rocksdb18FilePrefetchBuffer15min_offset_readEv:
  328|  4.48k|  size_t min_offset_read() const { return min_offset_read_; }

_ZN7rocksdb12DeleteDBFileEPKNS_18ImmutableDBOptionsERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_bb:
  127|  13.5k|                    const bool force_bg, const bool force_fg) {
  128|  13.5k|  SstFileManagerImpl* sfm =
  129|  13.5k|      static_cast<SstFileManagerImpl*>(db_options->sst_file_manager.get());
  130|  13.5k|  if (sfm && !force_fg) {
  ------------------
  |  Branch (130:7): [True: 13.5k, False: 0]
  |  Branch (130:14): [True: 13.5k, False: 0]
  ------------------
  131|  13.5k|    return sfm->ScheduleFileDeletion(fname, dir_to_sync, force_bg);
  132|  13.5k|  } else {
  133|      0|    return db_options->env->DeleteFile(fname);
  134|      0|  }
  135|  13.5k|}

_ZN7rocksdb24PrepareIOFromReadOptionsERKNS_11ReadOptionsEPNS_11SystemClockERNS_9IOOptionsE:
   69|  56.0k|                                         SystemClock* clock, IOOptions& opts) {
   70|  56.0k|  if (ro.deadline.count()) {
  ------------------
  |  Branch (70:7): [True: 0, False: 56.0k]
  ------------------
   71|      0|    std::chrono::microseconds now =
   72|      0|        std::chrono::microseconds(clock->NowMicros());
   73|       |    // Ensure there is atleast 1us available. We don't want to pass a value of
   74|       |    // 0 as that means no timeout
   75|      0|    if (now >= ro.deadline) {
  ------------------
  |  Branch (75:9): [True: 0, False: 0]
  ------------------
   76|      0|      return IOStatus::TimedOut("Deadline exceeded");
   77|      0|    }
   78|      0|    opts.timeout = ro.deadline - now;
   79|      0|  }
   80|       |
   81|  56.0k|  if (ro.io_timeout.count() &&
  ------------------
  |  Branch (81:7): [True: 0, False: 56.0k]
  ------------------
   82|  56.0k|      (!opts.timeout.count() || ro.io_timeout < opts.timeout)) {
  ------------------
  |  Branch (82:8): [True: 0, False: 0]
  |  Branch (82:33): [True: 0, False: 0]
  ------------------
   83|      0|    opts.timeout = ro.io_timeout;
   84|      0|  }
   85|       |
   86|  56.0k|  opts.rate_limiter_priority = ro.rate_limiter_priority;
   87|  56.0k|  opts.io_activity = ro.io_activity;
   88|       |
   89|  56.0k|  return IOStatus::OK();
   90|  56.0k|}
_ZN7rocksdb25PrepareIOFromWriteOptionsERKNS_12WriteOptionsERNS_9IOOptionsE:
   93|  2.94M|                                          IOOptions& opts) {
   94|  2.94M|  opts.rate_limiter_priority = wo.rate_limiter_priority;
   95|  2.94M|  opts.io_activity = wo.io_activity;
   96|       |
   97|  2.94M|  return IOStatus::OK();
   98|  2.94M|}
_ZN7rocksdb21CheckFSFeatureSupportEPNS_10FileSystemENS_14FSSupportedOpsE:
  104|  91.0k|inline bool CheckFSFeatureSupport(FileSystem* fs, FSSupportedOps feat) {
  105|  91.0k|  int64_t supported_ops = 0;
  106|  91.0k|  fs->SupportedOps(supported_ops);
  107|  91.0k|  if (supported_ops & (1ULL << feat)) {
  ------------------
  |  Branch (107:7): [True: 0, False: 91.0k]
  ------------------
  108|      0|    return true;
  109|      0|  }
  110|  91.0k|  return false;
  111|  91.0k|}

_ZN7rocksdb11LogFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEm:
   77|  22.5k|std::string LogFileName(const std::string& name, uint64_t number) {
   78|  22.5k|  assert(number > 0);
   79|  22.5k|  return MakeFileName(name, number, "log");
   80|  22.5k|}
_ZN7rocksdb17ArchivalDirectoryERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  104|  4.51k|std::string ArchivalDirectory(const std::string& dir) {
  105|  4.51k|  return dir + "/" + kArchivalDirName;
  106|  4.51k|}
_ZN7rocksdb17MakeTableFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEm:
  112|  13.4k|std::string MakeTableFileName(const std::string& path, uint64_t number) {
  113|  13.4k|  return MakeFileName(path, number, kRocksDbTFileExt.c_str());
  114|  13.4k|}
_ZN7rocksdb13TableFileNameERKNSt3__16vectorINS_6DbPathENS0_9allocatorIS2_EEEEmj:
  141|  8.96k|                          uint32_t path_id) {
  142|  8.96k|  assert(number > 0);
  143|  8.96k|  std::string path;
  144|  8.96k|  if (path_id >= db_paths.size()) {
  ------------------
  |  Branch (144:7): [True: 0, False: 8.96k]
  ------------------
  145|      0|    path = db_paths.back().path;
  146|  8.96k|  } else {
  147|  8.96k|    path = db_paths[path_id].path;
  148|  8.96k|  }
  149|  8.96k|  return MakeTableFileName(path, number);
  150|  8.96k|}
_ZN7rocksdb18DescriptorFileNameEm:
  165|  45.1k|std::string DescriptorFileName(uint64_t number) {
  166|  45.1k|  assert(number > 0);
  167|  45.1k|  char buf[100];
  168|  45.1k|  snprintf(buf, sizeof(buf), "MANIFEST-%06llu",
  169|  45.1k|           static_cast<unsigned long long>(number));
  170|  45.1k|  return buf;
  171|  45.1k|}
_ZN7rocksdb18DescriptorFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEm:
  173|  45.1k|std::string DescriptorFileName(const std::string& dbname, uint64_t number) {
  174|  45.1k|  return dbname + "/" + DescriptorFileName(number);
  175|  45.1k|}
_ZN7rocksdb15CurrentFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  177|  45.1k|std::string CurrentFileName(const std::string& dbname) {
  178|  45.1k|  return dbname + "/" + kCurrentFileName;
  179|  45.1k|}
_ZN7rocksdb12LockFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  181|  13.5k|std::string LockFileName(const std::string& dbname) { return dbname + "/LOCK"; }
_ZN7rocksdb12TempFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEm:
  183|  18.0k|std::string TempFileName(const std::string& dbname, uint64_t number) {
  184|  18.0k|  return MakeFileName(dbname, number, kTempFileNameSuffix.c_str());
  185|  18.0k|}
_ZN7rocksdb13InfoLogPrefixC2EbRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  188|  40.6k|                             const std::string& db_absolute_path) {
  189|  40.6k|  if (!has_log_dir) {
  ------------------
  |  Branch (189:7): [True: 40.6k, False: 0]
  ------------------
  190|  40.6k|    const char kInfoLogPrefix[] = "LOG";
  191|       |    // "\0" is automatically added to the end
  192|  40.6k|    snprintf(buf, sizeof(buf), kInfoLogPrefix);
  193|  40.6k|    prefix = Slice(buf, sizeof(kInfoLogPrefix) - 1);
  194|  40.6k|  } else {
  195|      0|    size_t len =
  196|      0|        GetInfoLogPrefix(NormalizePath(db_absolute_path), buf, sizeof(buf));
  197|      0|    prefix = Slice(buf, len);
  198|      0|  }
  199|  40.6k|}
_ZN7rocksdb15InfoLogFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_S8_:
  203|  13.5k|                            const std::string& log_dir) {
  204|  13.5k|  if (log_dir.empty()) {
  ------------------
  |  Branch (204:7): [True: 13.5k, False: 0]
  ------------------
  205|  13.5k|    return dbname + "/LOG";
  206|  13.5k|  }
  207|       |
  208|      0|  InfoLogPrefix info_log_prefix(true, db_path);
  209|      0|  return log_dir + "/" + info_log_prefix.buf;
  210|  13.5k|}
_ZN7rocksdb18OldInfoLogFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEmS8_S8_:
  215|  9.02k|                               const std::string& log_dir) {
  216|  9.02k|  char buf[50];
  217|  9.02k|  snprintf(buf, sizeof(buf), "%llu", static_cast<unsigned long long>(ts));
  218|       |
  219|  9.02k|  if (log_dir.empty()) {
  ------------------
  |  Branch (219:7): [True: 9.02k, False: 0]
  ------------------
  220|  9.02k|    return dbname + "/LOG.old." + buf;
  221|  9.02k|  }
  222|       |
  223|      0|  InfoLogPrefix info_log_prefix(true, db_path);
  224|      0|  return log_dir + "/" + info_log_prefix.buf + ".old." + buf;
  225|  9.02k|}
_ZN7rocksdb15OptionsFileNameEm:
  227|  9.02k|std::string OptionsFileName(uint64_t file_num) {
  228|  9.02k|  char buffer[256];
  229|  9.02k|  snprintf(buffer, sizeof(buffer), "%s%06" PRIu64,
  230|  9.02k|           kOptionsFileNamePrefix.c_str(), file_num);
  231|  9.02k|  return buffer;
  232|  9.02k|}
_ZN7rocksdb15OptionsFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEm:
  233|  9.02k|std::string OptionsFileName(const std::string& dbname, uint64_t file_num) {
  234|  9.02k|  return dbname + "/" + OptionsFileName(file_num);
  235|  9.02k|}
_ZN7rocksdb19TempOptionsFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEm:
  237|  9.02k|std::string TempOptionsFileName(const std::string& dbname, uint64_t file_num) {
  238|  9.02k|  char buffer[256];
  239|  9.02k|  snprintf(buffer, sizeof(buffer), "%s%06" PRIu64 ".%s",
  240|  9.02k|           kOptionsFileNamePrefix.c_str(), file_num,
  241|  9.02k|           kTempFileNameSuffix.c_str());
  242|  9.02k|  return dbname + "/" + buffer;
  243|  9.02k|}
_ZN7rocksdb16IdentityFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  252|  22.5k|std::string IdentityFileName(const std::string& dbname) {
  253|  22.5k|  return dbname + "/IDENTITY";
  254|  22.5k|}
_ZN7rocksdb13ParseFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPmPNS_8FileTypeEPNS_11WalFileTypeE:
  269|   257k|                   WalFileType* log_type) {
  270|   257k|  return ParseFileName(fname, number, "", type, log_type);
  271|   257k|}
_ZN7rocksdb13ParseFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPmRKNS_5SliceEPNS_8FileTypeEPNS_11WalFileTypeE:
  275|   807k|                   WalFileType* log_type) {
  276|   807k|  Slice rest(fname);
  277|   807k|  if (fname.length() > 1 && fname[0] == '/') {
  ------------------
  |  Branch (277:7): [True: 807k, False: 0]
  |  Branch (277:29): [True: 333k, False: 473k]
  ------------------
  278|   333k|    rest.remove_prefix(1);
  279|   333k|  }
  280|   807k|  if (rest == "IDENTITY") {
  ------------------
  |  Branch (280:7): [True: 90.2k, False: 717k]
  ------------------
  281|  90.2k|    *number = 0;
  282|  90.2k|    *type = kIdentityFile;
  283|   717k|  } else if (rest == "CURRENT") {
  ------------------
  |  Branch (283:14): [True: 90.2k, False: 627k]
  ------------------
  284|  90.2k|    *number = 0;
  285|  90.2k|    *type = kCurrentFile;
  286|   627k|  } else if (rest == "LOCK") {
  ------------------
  |  Branch (286:14): [True: 90.2k, False: 536k]
  ------------------
  287|  90.2k|    *number = 0;
  288|  90.2k|    *type = kDBLockFile;
  289|   536k|  } else if (info_log_name_prefix.size() > 0 &&
  ------------------
  |  Branch (289:14): [True: 374k, False: 162k]
  ------------------
  290|   536k|             rest.starts_with(info_log_name_prefix)) {
  ------------------
  |  Branch (290:14): [True: 94.7k, False: 279k]
  ------------------
  291|  94.7k|    rest.remove_prefix(info_log_name_prefix.size());
  292|  94.7k|    if (rest == "" || rest == ".old") {
  ------------------
  |  Branch (292:9): [True: 58.6k, False: 36.1k]
  |  Branch (292:9): [True: 58.6k, False: 36.1k]
  |  Branch (292:23): [True: 0, False: 36.1k]
  ------------------
  293|  58.6k|      *number = 0;
  294|  58.6k|      *type = kInfoLogFile;
  295|  58.6k|    } else if (rest.starts_with(".old.")) {
  ------------------
  |  Branch (295:16): [True: 36.1k, False: 0]
  ------------------
  296|  36.1k|      uint64_t ts_suffix;
  297|       |      // sizeof also counts the trailing '\0'.
  298|  36.1k|      rest.remove_prefix(sizeof(".old.") - 1);
  299|  36.1k|      if (!ConsumeDecimalNumber(&rest, &ts_suffix)) {
  ------------------
  |  Branch (299:11): [True: 0, False: 36.1k]
  ------------------
  300|      0|        return false;
  301|      0|      }
  302|  36.1k|      *number = ts_suffix;
  303|  36.1k|      *type = kInfoLogFile;
  304|  36.1k|    }
  305|   442k|  } else if (rest.starts_with("MANIFEST-")) {
  ------------------
  |  Branch (305:14): [True: 135k, False: 306k]
  ------------------
  306|   135k|    rest.remove_prefix(strlen("MANIFEST-"));
  307|   135k|    uint64_t num;
  308|   135k|    if (!ConsumeDecimalNumber(&rest, &num)) {
  ------------------
  |  Branch (308:9): [True: 0, False: 135k]
  ------------------
  309|      0|      return false;
  310|      0|    }
  311|   135k|    if (!rest.empty()) {
  ------------------
  |  Branch (311:9): [True: 0, False: 135k]
  ------------------
  312|      0|      return false;
  313|      0|    }
  314|   135k|    *type = kDescriptorFile;
  315|   135k|    *number = num;
  316|   306k|  } else if (rest.starts_with("METADB-")) {
  ------------------
  |  Branch (316:14): [True: 0, False: 306k]
  ------------------
  317|      0|    rest.remove_prefix(strlen("METADB-"));
  318|      0|    uint64_t num;
  319|      0|    if (!ConsumeDecimalNumber(&rest, &num)) {
  ------------------
  |  Branch (319:9): [True: 0, False: 0]
  ------------------
  320|      0|      return false;
  321|      0|    }
  322|      0|    if (!rest.empty()) {
  ------------------
  |  Branch (322:9): [True: 0, False: 0]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|      0|    *type = kMetaDatabase;
  326|      0|    *number = num;
  327|   306k|  } else if (rest.starts_with(kOptionsFileNamePrefix)) {
  ------------------
  |  Branch (327:14): [True: 117k, False: 189k]
  ------------------
  328|   117k|    uint64_t ts_suffix;
  329|   117k|    bool is_temp_file = false;
  330|   117k|    rest.remove_prefix(kOptionsFileNamePrefix.size());
  331|   117k|    const std::string kTempFileNameSuffixWithDot =
  332|   117k|        std::string(".") + kTempFileNameSuffix;
  333|   117k|    if (rest.ends_with(kTempFileNameSuffixWithDot)) {
  ------------------
  |  Branch (333:9): [True: 0, False: 117k]
  ------------------
  334|      0|      rest.remove_suffix(kTempFileNameSuffixWithDot.size());
  335|      0|      is_temp_file = true;
  336|      0|    }
  337|   117k|    if (!ConsumeDecimalNumber(&rest, &ts_suffix)) {
  ------------------
  |  Branch (337:9): [True: 0, False: 117k]
  ------------------
  338|      0|      return false;
  339|      0|    }
  340|   117k|    *number = ts_suffix;
  341|   117k|    *type = is_temp_file ? kTempFile : kOptionsFile;
  ------------------
  |  Branch (341:13): [True: 0, False: 117k]
  ------------------
  342|   189k|  } else {
  343|       |    // Avoid strtoull() to keep filename format independent of the
  344|       |    // current locale
  345|   189k|    bool archive_dir_found = false;
  346|   189k|    if (rest.starts_with(kArchivalDirName)) {
  ------------------
  |  Branch (346:9): [True: 0, False: 189k]
  ------------------
  347|      0|      if (rest.size() <= kArchivalDirName.size()) {
  ------------------
  |  Branch (347:11): [True: 0, False: 0]
  ------------------
  348|      0|        return false;
  349|      0|      }
  350|      0|      rest.remove_prefix(kArchivalDirName.size() +
  351|      0|                         1);  // Add 1 to remove / also
  352|      0|      if (log_type) {
  ------------------
  |  Branch (352:11): [True: 0, False: 0]
  ------------------
  353|      0|        *log_type = kArchivedLogFile;
  354|      0|      }
  355|      0|      archive_dir_found = true;
  356|      0|    }
  357|   189k|    uint64_t num;
  358|   189k|    if (!ConsumeDecimalNumber(&rest, &num)) {
  ------------------
  |  Branch (358:9): [True: 54.1k, False: 135k]
  ------------------
  359|  54.1k|      return false;
  360|  54.1k|    }
  361|   135k|    if (rest.size() <= 1 || rest[0] != '.') {
  ------------------
  |  Branch (361:9): [True: 0, False: 135k]
  |  Branch (361:29): [True: 0, False: 135k]
  ------------------
  362|      0|      return false;
  363|      0|    }
  364|   135k|    rest.remove_prefix(1);
  365|       |
  366|   135k|    Slice suffix = rest;
  367|   135k|    if (suffix == Slice("log")) {
  ------------------
  |  Branch (367:9): [True: 99.3k, False: 35.8k]
  ------------------
  368|  99.3k|      *type = kWalFile;
  369|  99.3k|      if (log_type && !archive_dir_found) {
  ------------------
  |  Branch (369:11): [True: 0, False: 99.3k]
  |  Branch (369:23): [True: 0, False: 0]
  ------------------
  370|      0|        *log_type = kAliveLogFile;
  371|      0|      }
  372|  99.3k|    } else if (archive_dir_found) {
  ------------------
  |  Branch (372:16): [True: 0, False: 35.8k]
  ------------------
  373|      0|      return false;  // Archive dir can contain only log files
  374|  35.8k|    } else if (suffix == Slice(kRocksDbTFileExt) ||
  ------------------
  |  Branch (374:16): [True: 35.8k, False: 0]
  |  Branch (374:16): [True: 35.8k, False: 0]
  ------------------
  375|  35.8k|               suffix == Slice(kLevelDbTFileExt)) {
  ------------------
  |  Branch (375:16): [True: 0, False: 0]
  ------------------
  376|  35.8k|      *type = kTableFile;
  377|  35.8k|    } else if (suffix == Slice(kRocksDBBlobFileExt)) {
  ------------------
  |  Branch (377:16): [True: 0, False: 0]
  ------------------
  378|      0|      *type = kBlobFile;
  379|      0|    } else if (suffix == Slice(kTempFileNameSuffix)) {
  ------------------
  |  Branch (379:16): [True: 0, False: 0]
  ------------------
  380|      0|      *type = kTempFile;
  381|      0|    } else {
  382|      0|      return false;
  383|      0|    }
  384|   135k|    *number = num;
  385|   135k|  }
  386|   753k|  return true;
  387|   807k|}
_ZN7rocksdb14SetCurrentFileERKNS_12WriteOptionsEPNS_10FileSystemERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEmPNS_11FSDirectoryE:
  391|  13.5k|                        FSDirectory* dir_contains_current_file) {
  392|       |  // Remove leading "dbname/" and add newline to manifest file name
  393|  13.5k|  std::string manifest = DescriptorFileName(dbname, descriptor_number);
  394|  13.5k|  Slice contents = manifest;
  395|  13.5k|  assert(contents.starts_with(dbname + "/"));
  396|  13.5k|  contents.remove_prefix(dbname.size() + 1);
  397|  13.5k|  std::string tmp = TempFileName(dbname, descriptor_number);
  398|  13.5k|  IOOptions opts;
  399|  13.5k|  IOStatus s = PrepareIOFromWriteOptions(write_options, opts);
  400|  13.5k|  if (s.ok()) {
  ------------------
  |  Branch (400:7): [True: 13.5k, False: 0]
  ------------------
  401|  13.5k|    s = WriteStringToFile(fs, contents.ToString() + "\n", tmp, true, opts);
  402|  13.5k|  }
  403|  13.5k|  TEST_SYNC_POINT_CALLBACK("SetCurrentFile:BeforeRename", &s);
  404|  13.5k|  if (s.ok()) {
  ------------------
  |  Branch (404:7): [True: 13.5k, False: 0]
  ------------------
  405|  13.5k|    TEST_KILL_RANDOM_WITH_WEIGHT("SetCurrentFile:0", REDUCE_ODDS2);
  406|  13.5k|    s = fs->RenameFile(tmp, CurrentFileName(dbname), opts, nullptr);
  407|  13.5k|    TEST_KILL_RANDOM_WITH_WEIGHT("SetCurrentFile:1", REDUCE_ODDS2);
  408|  13.5k|    TEST_SYNC_POINT_CALLBACK("SetCurrentFile:AfterRename", &s);
  409|  13.5k|  }
  410|  13.5k|  if (s.ok()) {
  ------------------
  |  Branch (410:7): [True: 13.5k, False: 0]
  ------------------
  411|  13.5k|    if (dir_contains_current_file != nullptr) {
  ------------------
  |  Branch (411:9): [True: 13.5k, False: 0]
  ------------------
  412|  13.5k|      s = dir_contains_current_file->FsyncWithDirOptions(
  413|  13.5k|          opts, nullptr, DirFsyncOptions(CurrentFileName(dbname)));
  414|  13.5k|    }
  415|  13.5k|  } else {
  416|      0|    fs->DeleteFile(tmp, opts, nullptr)
  417|      0|        .PermitUncheckedError();  // NOTE: PermitUncheckedError is acceptable
  418|       |                                  // here as we are already handling an error
  419|       |                                  // case, and this is just a best-attempt
  420|       |                                  // effort at some cleanup
  421|      0|  }
  422|  13.5k|  return s;
  423|  13.5k|}
_ZN7rocksdb15SetIdentityFileERKNS_12WriteOptionsEPNS_3EnvERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESD_:
  426|  4.51k|                       const std::string& dbname, const std::string& db_id) {
  427|  4.51k|  std::string id;
  428|  4.51k|  if (db_id.empty()) {
  ------------------
  |  Branch (428:7): [True: 4.51k, False: 0]
  ------------------
  429|  4.51k|    id = env->GenerateUniqueId();
  430|  4.51k|  } else {
  431|      0|    id = db_id;
  432|      0|  }
  433|  4.51k|  assert(!id.empty());
  434|       |  // Reserve the filename dbname/000000.dbtmp for the temporary identity file
  435|  4.51k|  std::string tmp = TempFileName(dbname, 0);
  436|  4.51k|  std::string identify_file_name = IdentityFileName(dbname);
  437|  4.51k|  Status s;
  438|  4.51k|  IOOptions opts;
  439|  4.51k|  s = PrepareIOFromWriteOptions(write_options, opts);
  440|  4.51k|  if (s.ok()) {
  ------------------
  |  Branch (440:7): [True: 4.51k, False: 0]
  ------------------
  441|  4.51k|    s = WriteStringToFile(env, id, tmp, true, &opts);
  442|  4.51k|  }
  443|  4.51k|  if (s.ok()) {
  ------------------
  |  Branch (443:7): [True: 4.51k, False: 0]
  ------------------
  444|  4.51k|    s = env->RenameFile(tmp, identify_file_name);
  445|  4.51k|  }
  446|  4.51k|  std::unique_ptr<FSDirectory> dir_obj;
  447|  4.51k|  if (s.ok()) {
  ------------------
  |  Branch (447:7): [True: 4.51k, False: 0]
  ------------------
  448|  4.51k|    s = env->GetFileSystem()->NewDirectory(dbname, opts, &dir_obj, nullptr);
  449|  4.51k|  }
  450|  4.51k|  if (s.ok()) {
  ------------------
  |  Branch (450:7): [True: 4.51k, False: 0]
  ------------------
  451|  4.51k|    s = dir_obj->FsyncWithDirOptions(opts, nullptr,
  452|  4.51k|                                     DirFsyncOptions(identify_file_name));
  453|  4.51k|  }
  454|       |
  455|       |  // The default Close() could return "NotSupported" and we bypass it
  456|       |  // if it is not impelmented. Detailed explanations can be found in
  457|       |  // db/db_impl/db_impl.h
  458|  4.51k|  if (s.ok()) {
  ------------------
  |  Branch (458:7): [True: 4.51k, False: 0]
  ------------------
  459|  4.51k|    Status temp_s = dir_obj->Close(opts, nullptr);
  460|  4.51k|    if (!temp_s.ok()) {
  ------------------
  |  Branch (460:9): [True: 0, False: 4.51k]
  ------------------
  461|      0|      if (temp_s.IsNotSupported()) {
  ------------------
  |  Branch (461:11): [True: 0, False: 0]
  ------------------
  462|      0|        temp_s.PermitUncheckedError();
  463|      0|      } else {
  464|      0|        s = temp_s;
  465|      0|      }
  466|      0|    }
  467|  4.51k|  }
  468|  4.51k|  if (!s.ok()) {
  ------------------
  |  Branch (468:7): [True: 0, False: 4.51k]
  ------------------
  469|      0|    env->DeleteFile(tmp).PermitUncheckedError();
  470|      0|  }
  471|  4.51k|  return s;
  472|  4.51k|}
_ZN7rocksdb12SyncManifestEPKNS_18ImmutableDBOptionsERKNS_12WriteOptionsEPNS_18WritableFileWriterE:
  476|  13.5k|                      WritableFileWriter* file) {
  477|  13.5k|  TEST_KILL_RANDOM_WITH_WEIGHT("SyncManifest:0", REDUCE_ODDS2);
  478|  13.5k|  StopWatch sw(db_options->clock, db_options->stats, MANIFEST_FILE_SYNC_MICROS);
  479|  13.5k|  IOOptions io_options;
  480|  13.5k|  IOStatus s = PrepareIOFromWriteOptions(write_options, io_options);
  481|  13.5k|  if (!s.ok()) {
  ------------------
  |  Branch (481:7): [True: 0, False: 13.5k]
  ------------------
  482|      0|    return s;
  483|      0|  }
  484|  13.5k|  return file->Sync(io_options, db_options->use_fsync);
  485|  13.5k|}
_ZN7rocksdb13NormalizePathERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  520|   108k|std::string NormalizePath(const std::string& path) {
  521|   108k|  std::string dst;
  522|       |
  523|   108k|  if (path.length() > 2 && path[0] == kFilePathSeparator &&
  ------------------
  |  Branch (523:7): [True: 108k, False: 0]
  |  Branch (523:28): [True: 108k, False: 0]
  ------------------
  524|   108k|      path[1] == kFilePathSeparator) {  // Handle UNC names
  ------------------
  |  Branch (524:7): [True: 0, False: 108k]
  ------------------
  525|      0|    dst.append(2, kFilePathSeparator);
  526|      0|  }
  527|       |
  528|  2.49M|  for (auto c : path) {
  ------------------
  |  Branch (528:15): [True: 2.49M, False: 108k]
  ------------------
  529|  2.49M|    if (!dst.empty() && (c == kFilePathSeparator || c == '/') &&
  ------------------
  |  Branch (529:9): [True: 2.38M, False: 108k]
  |  Branch (529:26): [True: 108k, False: 2.27M]
  |  Branch (529:53): [True: 0, False: 2.27M]
  ------------------
  530|  2.49M|        (dst.back() == kFilePathSeparator || dst.back() == '/')) {
  ------------------
  |  Branch (530:10): [True: 0, False: 108k]
  |  Branch (530:46): [True: 0, False: 108k]
  ------------------
  531|      0|      continue;
  532|      0|    }
  533|  2.49M|    dst.push_back(c);
  534|  2.49M|  }
  535|   108k|  return dst;
  536|   108k|}
filename.cc:_ZN7rocksdbL12MakeFileNameERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEmPKc:
   73|  54.0k|                                const char* suffix) {
   74|  54.0k|  return name + "/" + MakeFileName(number, suffix);
   75|  54.0k|}
filename.cc:_ZN7rocksdbL12MakeFileNameEmPKc:
   65|  54.0k|static std::string MakeFileName(uint64_t number, const char* suffix) {
   66|  54.0k|  char buf[100];
   67|  54.0k|  snprintf(buf, sizeof(buf), "%06llu.%s",
   68|  54.0k|           static_cast<unsigned long long>(number), suffix);
   69|  54.0k|  return buf;
   70|  54.0k|}

_ZN7rocksdb14LineFileReader8ReadLineEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_3Env10IOPriorityE:
   31|  1.88M|                              Env::IOPriority rate_limiter_priority) {
   32|  1.88M|  assert(out);
   33|  1.88M|  if (!io_status_.ok()) {
  ------------------
  |  Branch (33:7): [True: 0, False: 1.88M]
  ------------------
   34|       |    // Status should be checked (or permit unchecked) any time we return false.
   35|      0|    io_status_.MustCheck();
   36|      0|    return false;
   37|      0|  }
   38|  1.88M|  out->clear();
   39|  1.89M|  for (;;) {
   40|       |    // Look for line delimiter
   41|  1.89M|    const char* found = static_cast<const char*>(
   42|  1.89M|        std::memchr(buf_begin_, '\n', buf_end_ - buf_begin_));
   43|  1.89M|    if (found) {
  ------------------
  |  Branch (43:9): [True: 1.87M, False: 18.0k]
  ------------------
   44|  1.87M|      size_t len = found - buf_begin_;
   45|  1.87M|      out->append(buf_begin_, len);
   46|  1.87M|      buf_begin_ += len + /*delim*/ 1;
   47|  1.87M|      ++line_number_;
   48|  1.87M|      return true;
   49|  1.87M|    }
   50|  18.0k|    if (at_eof_) {
  ------------------
  |  Branch (50:9): [True: 9.02k, False: 9.02k]
  ------------------
   51|  9.02k|      io_status_.MustCheck();
   52|  9.02k|      return false;
   53|  9.02k|    }
   54|       |    // else flush and reload buffer
   55|  9.02k|    out->append(buf_begin_, buf_end_ - buf_begin_);
   56|  9.02k|    Slice result;
   57|  9.02k|    io_status_ =
   58|  9.02k|        sfr_.Read(buf_.size(), &result, buf_.data(), rate_limiter_priority);
   59|  9.02k|    IOSTATS_ADD(bytes_read, result.size());
  ------------------
  |  |   17|  9.02k|  if (!iostats_context.disable_iostats) { \
  |  |  ------------------
  |  |  |  Branch (17:7): [True: 9.02k, False: 0]
  |  |  ------------------
  |  |   18|  9.02k|    iostats_context.metric += value;      \
  |  |   19|  9.02k|  }
  ------------------
   60|  9.02k|    if (!io_status_.ok()) {
  ------------------
  |  Branch (60:9): [True: 0, False: 9.02k]
  ------------------
   61|      0|      io_status_.MustCheck();
   62|      0|      return false;
   63|      0|    }
   64|  9.02k|    if (result.size() != buf_.size()) {
  ------------------
  |  Branch (64:9): [True: 9.02k, False: 0]
  ------------------
   65|       |      // The obscure way of indicating EOF
   66|  9.02k|      at_eof_ = true;
   67|  9.02k|    }
   68|  9.02k|    buf_begin_ = result.data();
   69|  9.02k|    buf_end_ = result.data() + result.size();
   70|  9.02k|  }
   71|  1.88M|}

_ZNK7rocksdb14LineFileReader13GetLineNumberEv:
   52|  1.87M|  size_t GetLineNumber() const { return line_number_; }
_ZNK7rocksdb14LineFileReader9GetStatusEv:
   57|  9.02k|  const IOStatus& GetStatus() const { return io_status_; }
_ZN7rocksdb14LineFileReaderC2IJNSt3__110unique_ptrINS_16FSSequentialFileENS2_14default_deleteIS4_EEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERmEEEDpOT_:
   30|  9.02k|      : sfr_(std::forward<Args&&>(args)...) {}

_ZNK7rocksdb22RandomAccessFileReader4ReadERKNS_9IOOptionsEmmPNS_5SliceEPcPNSt3__110unique_ptrIA_cNS7_14default_deleteIS9_EEEE:
  109|  29.6k|                                      AlignedBuf* aligned_buf) const {
  110|  29.6k|  (void)aligned_buf;
  111|  29.6k|  const Env::IOPriority rate_limiter_priority = opts.rate_limiter_priority;
  112|       |
  113|  29.6k|  TEST_SYNC_POINT_CALLBACK("RandomAccessFileReader::Read", nullptr);
  114|       |
  115|       |  // To be paranoid: modify scratch a little bit, so in case underlying
  116|       |  // FileSystem doesn't fill the buffer but return success and `scratch` returns
  117|       |  // contains a previous block, returned value will not pass checksum.
  118|  29.6k|  if (n > 0 && scratch != nullptr) {
  ------------------
  |  Branch (118:7): [True: 29.6k, False: 0]
  |  Branch (118:16): [True: 29.6k, False: 0]
  ------------------
  119|       |    // This byte might not change anything for direct I/O case, but it's OK.
  120|  29.6k|    scratch[0]++;
  121|  29.6k|  }
  122|       |
  123|  29.6k|  IOStatus io_s;
  124|  29.6k|  uint64_t elapsed = 0;
  125|  29.6k|  size_t alignment = file_->GetRequiredBufferAlignment();
  126|  29.6k|  bool is_aligned = false;
  127|  29.6k|  if (scratch != nullptr) {
  ------------------
  |  Branch (127:7): [True: 29.6k, False: 0]
  ------------------
  128|       |    // Check if offset, length and buffer are aligned.
  129|  29.6k|    is_aligned = (offset & (alignment - 1)) == 0 &&
  ------------------
  |  Branch (129:18): [True: 4.49k, False: 25.2k]
  ------------------
  130|  29.6k|                 (n & (alignment - 1)) == 0 &&
  ------------------
  |  Branch (130:18): [True: 5, False: 4.48k]
  ------------------
  131|  29.6k|                 (uintptr_t(scratch) & (alignment - 1)) == 0;
  ------------------
  |  Branch (131:18): [True: 0, False: 5]
  ------------------
  132|  29.6k|  }
  133|       |
  134|  29.6k|  {
  135|  29.6k|    StopWatch sw(clock_, stats_, hist_type_,
  136|  29.6k|                 GetFileReadHistograms(stats_, opts.io_activity),
  137|  29.6k|                 (stats_ != nullptr) ? &elapsed : nullptr, true /*overwrite*/,
  ------------------
  |  Branch (137:18): [True: 0, False: 29.6k]
  ------------------
  138|  29.6k|                 true /*delay_enabled*/);
  139|  29.6k|    auto prev_perf_level = GetPerfLevel();
  140|  29.6k|    IOSTATS_TIMER_GUARD(read_nanos);
  ------------------
  |  |   36|  29.6k|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  29.6k|  iostats_step_timer_##metric.Start();
  ------------------
  141|  29.6k|    if (use_direct_io() && is_aligned == false) {
  ------------------
  |  Branch (141:9): [True: 0, False: 29.6k]
  |  Branch (141:28): [True: 0, False: 0]
  ------------------
  142|      0|      size_t aligned_offset =
  143|      0|          TruncateToPageBoundary(alignment, static_cast<size_t>(offset));
  144|      0|      size_t offset_advance = static_cast<size_t>(offset) - aligned_offset;
  145|      0|      size_t read_size =
  146|      0|          Roundup(static_cast<size_t>(offset + n), alignment) - aligned_offset;
  147|      0|      AlignedBuffer buf;
  148|      0|      buf.Alignment(alignment);
  149|      0|      buf.AllocateNewBuffer(read_size);
  150|      0|      while (buf.CurrentSize() < read_size) {
  ------------------
  |  Branch (150:14): [True: 0, False: 0]
  ------------------
  151|      0|        size_t allowed;
  152|      0|        if (rate_limiter_priority != Env::IO_TOTAL &&
  ------------------
  |  Branch (152:13): [True: 0, False: 0]
  ------------------
  153|      0|            rate_limiter_ != nullptr) {
  ------------------
  |  Branch (153:13): [True: 0, False: 0]
  ------------------
  154|      0|          allowed = rate_limiter_->RequestToken(
  155|      0|              buf.Capacity() - buf.CurrentSize(), buf.Alignment(),
  156|      0|              rate_limiter_priority, stats_, RateLimiter::OpType::kRead);
  157|      0|        } else {
  158|      0|          assert(buf.CurrentSize() == 0);
  159|      0|          allowed = read_size;
  160|      0|        }
  161|      0|        Slice tmp;
  162|       |
  163|      0|        FileOperationInfo::StartTimePoint start_ts;
  164|      0|        uint64_t orig_offset = 0;
  165|      0|        if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (165:13): [True: 0, False: 0]
  ------------------
  166|      0|          start_ts = FileOperationInfo::StartNow();
  167|      0|          orig_offset = aligned_offset + buf.CurrentSize();
  168|      0|        }
  169|       |
  170|      0|        {
  171|      0|          IOSTATS_CPU_TIMER_GUARD(cpu_read_nanos, clock_);
  ------------------
  |  |   41|      0|  PerfStepTimer iostats_step_timer_##metric(           \
  |  |   42|      0|      &(iostats_context.metric), clock, true,          \
  |  |   43|      0|      PerfLevel::kEnableTimeAndCPUTimeExceptForMutex); \
  |  |   44|      0|  iostats_step_timer_##metric.Start();
  ------------------
  172|       |          // Only user reads are expected to specify a timeout. And user reads
  173|       |          // are not subjected to rate_limiter and should go through only
  174|       |          // one iteration of this loop, so we don't need to check and adjust
  175|       |          // the opts.timeout before calling file_->Read
  176|      0|          assert(!opts.timeout.count() || allowed == read_size);
  177|      0|          io_s = file_->Read(aligned_offset + buf.CurrentSize(), allowed, opts,
  178|      0|                             &tmp, buf.Destination(), nullptr);
  179|      0|        }
  180|      0|        if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (180:13): [True: 0, False: 0]
  ------------------
  181|      0|          auto finish_ts = FileOperationInfo::FinishNow();
  182|      0|          NotifyOnFileReadFinish(orig_offset, tmp.size(), start_ts, finish_ts,
  183|      0|                                 io_s);
  184|      0|          if (!io_s.ok()) {
  ------------------
  |  Branch (184:15): [True: 0, False: 0]
  ------------------
  185|      0|            NotifyOnIOError(io_s, FileOperationType::kRead, file_name(),
  186|      0|                            tmp.size(), orig_offset);
  187|      0|          }
  188|      0|        }
  189|       |
  190|      0|        buf.Size(buf.CurrentSize() + tmp.size());
  191|      0|        if (!io_s.ok() || tmp.size() < allowed) {
  ------------------
  |  Branch (191:13): [True: 0, False: 0]
  |  Branch (191:27): [True: 0, False: 0]
  ------------------
  192|      0|          break;
  193|      0|        }
  194|      0|      }
  195|      0|      size_t res_len = 0;
  196|      0|      if (io_s.ok() && offset_advance < buf.CurrentSize()) {
  ------------------
  |  Branch (196:11): [True: 0, False: 0]
  |  Branch (196:24): [True: 0, False: 0]
  ------------------
  197|      0|        res_len = std::min(buf.CurrentSize() - offset_advance, n);
  198|      0|        if (aligned_buf == nullptr) {
  ------------------
  |  Branch (198:13): [True: 0, False: 0]
  ------------------
  199|      0|          buf.Read(scratch, offset_advance, res_len);
  200|      0|        } else {
  201|      0|          scratch = buf.BufferStart() + offset_advance;
  202|      0|          aligned_buf->reset(buf.Release());
  203|      0|        }
  204|      0|      }
  205|      0|      *result = Slice(scratch, res_len);
  206|  29.6k|    } else {
  207|  29.6k|      size_t pos = 0;
  208|  29.6k|      const char* res_scratch = nullptr;
  209|  59.3k|      while (pos < n) {
  ------------------
  |  Branch (209:14): [True: 29.6k, False: 29.6k]
  ------------------
  210|  29.6k|        size_t allowed;
  211|  29.6k|        if (rate_limiter_priority != Env::IO_TOTAL &&
  ------------------
  |  Branch (211:13): [True: 0, False: 29.6k]
  ------------------
  212|  29.6k|            rate_limiter_ != nullptr) {
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|          if (rate_limiter_->IsRateLimited(RateLimiter::OpType::kRead)) {
  ------------------
  |  Branch (213:15): [True: 0, False: 0]
  ------------------
  214|      0|            sw.DelayStart();
  215|      0|          }
  216|      0|          allowed = rate_limiter_->RequestToken(
  217|      0|              n - pos, (use_direct_io() ? alignment : 0), rate_limiter_priority,
  ------------------
  |  Branch (217:25): [True: 0, False: 0]
  ------------------
  218|      0|              stats_, RateLimiter::OpType::kRead);
  219|      0|          if (rate_limiter_->IsRateLimited(RateLimiter::OpType::kRead)) {
  ------------------
  |  Branch (219:15): [True: 0, False: 0]
  ------------------
  220|      0|            sw.DelayStop();
  221|      0|          }
  222|  29.6k|        } else {
  223|  29.6k|          allowed = n;
  224|  29.6k|        }
  225|  29.6k|        Slice tmp_result;
  226|       |
  227|  29.6k|        FileOperationInfo::StartTimePoint start_ts;
  228|  29.6k|        if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (228:13): [True: 0, False: 29.6k]
  ------------------
  229|      0|          start_ts = FileOperationInfo::StartNow();
  230|      0|        }
  231|       |
  232|  29.6k|        {
  233|  29.6k|          IOSTATS_CPU_TIMER_GUARD(cpu_read_nanos, clock_);
  ------------------
  |  |   41|  29.6k|  PerfStepTimer iostats_step_timer_##metric(           \
  |  |   42|  29.6k|      &(iostats_context.metric), clock, true,          \
  |  |   43|  29.6k|      PerfLevel::kEnableTimeAndCPUTimeExceptForMutex); \
  |  |   44|  29.6k|  iostats_step_timer_##metric.Start();
  ------------------
  234|       |          // Only user reads are expected to specify a timeout. And user reads
  235|       |          // are not subjected to rate_limiter and should go through only
  236|       |          // one iteration of this loop, so we don't need to check and adjust
  237|       |          // the opts.timeout before calling file_->Read
  238|  29.6k|          assert(!opts.timeout.count() || allowed == n);
  239|  29.6k|          io_s = file_->Read(offset + pos, allowed, opts, &tmp_result,
  240|  29.6k|                             scratch + pos, nullptr);
  241|  29.6k|        }
  242|  29.6k|        if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (242:13): [True: 0, False: 29.6k]
  ------------------
  243|      0|          auto finish_ts = FileOperationInfo::FinishNow();
  244|      0|          NotifyOnFileReadFinish(offset + pos, tmp_result.size(), start_ts,
  245|      0|                                 finish_ts, io_s);
  246|       |
  247|      0|          if (!io_s.ok()) {
  ------------------
  |  Branch (247:15): [True: 0, False: 0]
  ------------------
  248|      0|            NotifyOnIOError(io_s, FileOperationType::kRead, file_name(),
  249|      0|                            tmp_result.size(), offset + pos);
  250|      0|          }
  251|      0|        }
  252|  29.6k|        if (res_scratch == nullptr) {
  ------------------
  |  Branch (252:13): [True: 29.6k, False: 0]
  ------------------
  253|       |          // we can't simply use `scratch` because reads of mmap'd files return
  254|       |          // data in a different buffer.
  255|  29.6k|          res_scratch = tmp_result.data();
  256|  29.6k|        } else {
  257|       |          // make sure chunks are inserted contiguously into `res_scratch`.
  258|      0|          assert(tmp_result.data() == res_scratch + pos);
  259|      0|        }
  260|  29.6k|        pos += tmp_result.size();
  261|  29.6k|        if (!io_s.ok() || tmp_result.size() < allowed) {
  ------------------
  |  Branch (261:13): [True: 0, False: 29.6k]
  |  Branch (261:27): [True: 0, False: 29.6k]
  ------------------
  262|      0|          break;
  263|      0|        }
  264|  29.6k|      }
  265|  29.6k|      *result = Slice(res_scratch, io_s.ok() ? pos : 0);
  ------------------
  |  Branch (265:36): [True: 29.6k, False: 0]
  ------------------
  266|  29.6k|    }
  267|  29.6k|    RecordIOStats(stats_, file_temperature_, is_last_level_, result->size());
  268|  29.6k|    SetPerfLevel(prev_perf_level);
  269|  29.6k|  }
  270|  29.6k|  if (stats_ != nullptr && file_read_hist_ != nullptr) {
  ------------------
  |  Branch (270:7): [True: 0, False: 29.6k]
  |  Branch (270:28): [True: 0, False: 0]
  ------------------
  271|      0|    file_read_hist_->Add(elapsed);
  272|      0|  }
  273|       |
  274|       |#ifndef NDEBUG
  275|       |  auto pair = std::make_pair(&file_name_, &io_s);
  276|       |  if (offset == 0) {
  277|       |    TEST_SYNC_POINT_CALLBACK("RandomAccessFileReader::Read::BeforeReturn",
  278|       |                             &pair);
  279|       |  }
  280|       |  TEST_SYNC_POINT_CALLBACK("RandomAccessFileReader::Read::AnyOffset", &pair);
  281|       |#endif
  282|  29.6k|  return io_s;
  283|  29.6k|}
_ZNK7rocksdb22RandomAccessFileReader16PrepareIOOptionsERKNS_11ReadOptionsERNS_9IOOptionsE:
  478|  51.5k|                                                  IOOptions& opts) const {
  479|  51.5k|  if (clock_ != nullptr) {
  ------------------
  |  Branch (479:7): [True: 51.5k, False: 0]
  ------------------
  480|  51.5k|    return PrepareIOFromReadOptions(ro, clock_, opts);
  481|  51.5k|  } else {
  482|      0|    return PrepareIOFromReadOptions(ro, SystemClock::Default().get(), opts);
  483|      0|  }
  484|  51.5k|}
_ZN7rocksdb21GetFileReadHistogramsEPNS_10StatisticsENS_3Env10IOActivityE:
   26|  29.6k|                                        Env::IOActivity io_activity) {
   27|  29.6k|  switch (io_activity) {
   28|      0|    case Env::IOActivity::kFlush:
  ------------------
  |  Branch (28:5): [True: 0, False: 29.6k]
  ------------------
   29|      0|      return Histograms::FILE_READ_FLUSH_MICROS;
   30|      0|    case Env::IOActivity::kCompaction:
  ------------------
  |  Branch (30:5): [True: 0, False: 29.6k]
  ------------------
   31|      0|      return Histograms::FILE_READ_COMPACTION_MICROS;
   32|  20.8k|    case Env::IOActivity::kDBOpen:
  ------------------
  |  Branch (32:5): [True: 20.8k, False: 8.85k]
  ------------------
   33|  20.8k|      return Histograms::FILE_READ_DB_OPEN_MICROS;
   34|  8.85k|    default:
  ------------------
  |  Branch (34:5): [True: 8.85k, False: 20.8k]
  ------------------
   35|  8.85k|      break;
   36|  29.6k|  }
   37|       |
   38|  8.85k|  if (stats && stats->get_stats_level() > StatsLevel::kExceptDetailedTimers) {
  ------------------
  |  Branch (38:7): [True: 0, False: 8.85k]
  |  Branch (38:16): [True: 0, False: 0]
  ------------------
   39|      0|    switch (io_activity) {
   40|      0|      case Env::IOActivity::kGet:
  ------------------
  |  Branch (40:7): [True: 0, False: 0]
  ------------------
   41|      0|        return Histograms::FILE_READ_GET_MICROS;
   42|      0|      case Env::IOActivity::kMultiGet:
  ------------------
  |  Branch (42:7): [True: 0, False: 0]
  ------------------
   43|      0|        return Histograms::FILE_READ_MULTIGET_MICROS;
   44|      0|      case Env::IOActivity::kDBIterator:
  ------------------
  |  Branch (44:7): [True: 0, False: 0]
  ------------------
   45|      0|        return Histograms::FILE_READ_DB_ITERATOR_MICROS;
   46|      0|      case Env::IOActivity::kVerifyDBChecksum:
  ------------------
  |  Branch (46:7): [True: 0, False: 0]
  ------------------
   47|      0|        return Histograms::FILE_READ_VERIFY_DB_CHECKSUM_MICROS;
   48|      0|      case Env::IOActivity::kVerifyFileChecksums:
  ------------------
  |  Branch (48:7): [True: 0, False: 0]
  ------------------
   49|      0|        return Histograms::FILE_READ_VERIFY_FILE_CHECKSUMS_MICROS;
   50|      0|      default:
  ------------------
  |  Branch (50:7): [True: 0, False: 0]
  ------------------
   51|      0|        break;
   52|      0|    }
   53|      0|  }
   54|  8.85k|  return Histograms::HISTOGRAM_ENUM_MAX;
   55|  8.85k|}
_ZN7rocksdb13RecordIOStatsEPNS_10StatisticsENS_11TemperatureEbm:
   57|  29.6k|                          bool is_last_level, size_t size) {
   58|  29.6k|  IOSTATS_ADD(bytes_read, size);
  ------------------
  |  |   17|  29.6k|  if (!iostats_context.disable_iostats) { \
  |  |  ------------------
  |  |  |  Branch (17:7): [True: 29.6k, False: 0]
  |  |  ------------------
  |  |   18|  29.6k|    iostats_context.metric += value;      \
  |  |   19|  29.6k|  }
  ------------------
   59|       |  // record for last/non-last level
   60|  29.6k|  if (is_last_level) {
  ------------------
  |  Branch (60:7): [True: 0, False: 29.6k]
  ------------------
   61|      0|    RecordTick(stats, LAST_LEVEL_READ_BYTES, size);
   62|      0|    RecordTick(stats, LAST_LEVEL_READ_COUNT, 1);
   63|  29.6k|  } else {
   64|  29.6k|    RecordTick(stats, NON_LAST_LEVEL_READ_BYTES, size);
   65|  29.6k|    RecordTick(stats, NON_LAST_LEVEL_READ_COUNT, 1);
   66|  29.6k|  }
   67|       |
   68|       |  // record for temperature file
   69|  29.6k|  if (file_temperature != Temperature::kUnknown) {
  ------------------
  |  Branch (69:7): [True: 0, False: 29.6k]
  ------------------
   70|      0|    switch (file_temperature) {
   71|      0|      case Temperature::kHot:
  ------------------
  |  Branch (71:7): [True: 0, False: 0]
  ------------------
   72|      0|        IOSTATS_ADD(file_io_stats_by_temperature.hot_file_bytes_read, size);
  ------------------
  |  |   17|      0|  if (!iostats_context.disable_iostats) { \
  |  |  ------------------
  |  |  |  Branch (17:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   18|      0|    iostats_context.metric += value;      \
  |  |   19|      0|  }
  ------------------
   73|      0|        IOSTATS_ADD(file_io_stats_by_temperature.hot_file_read_count, 1);
  ------------------
  |  |   17|      0|  if (!iostats_context.disable_iostats) { \
  |  |  ------------------
  |  |  |  Branch (17:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   18|      0|    iostats_context.metric += value;      \
  |  |   19|      0|  }
  ------------------
   74|      0|        RecordTick(stats, HOT_FILE_READ_BYTES, size);
   75|      0|        RecordTick(stats, HOT_FILE_READ_COUNT, 1);
   76|      0|        break;
   77|      0|      case Temperature::kWarm:
  ------------------
  |  Branch (77:7): [True: 0, False: 0]
  ------------------
   78|      0|        IOSTATS_ADD(file_io_stats_by_temperature.warm_file_bytes_read, size);
  ------------------
  |  |   17|      0|  if (!iostats_context.disable_iostats) { \
  |  |  ------------------
  |  |  |  Branch (17:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   18|      0|    iostats_context.metric += value;      \
  |  |   19|      0|  }
  ------------------
   79|      0|        IOSTATS_ADD(file_io_stats_by_temperature.warm_file_read_count, 1);
  ------------------
  |  |   17|      0|  if (!iostats_context.disable_iostats) { \
  |  |  ------------------
  |  |  |  Branch (17:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   18|      0|    iostats_context.metric += value;      \
  |  |   19|      0|  }
  ------------------
   80|      0|        RecordTick(stats, WARM_FILE_READ_BYTES, size);
   81|      0|        RecordTick(stats, WARM_FILE_READ_COUNT, 1);
   82|      0|        break;
   83|      0|      case Temperature::kCold:
  ------------------
  |  Branch (83:7): [True: 0, False: 0]
  ------------------
   84|      0|        IOSTATS_ADD(file_io_stats_by_temperature.cold_file_bytes_read, size);
  ------------------
  |  |   17|      0|  if (!iostats_context.disable_iostats) { \
  |  |  ------------------
  |  |  |  Branch (17:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   18|      0|    iostats_context.metric += value;      \
  |  |   19|      0|  }
  ------------------
   85|      0|        IOSTATS_ADD(file_io_stats_by_temperature.cold_file_read_count, 1);
  ------------------
  |  |   17|      0|  if (!iostats_context.disable_iostats) { \
  |  |  ------------------
  |  |  |  Branch (17:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   18|      0|    iostats_context.metric += value;      \
  |  |   19|      0|  }
  ------------------
   86|      0|        RecordTick(stats, COLD_FILE_READ_BYTES, size);
   87|      0|        RecordTick(stats, COLD_FILE_READ_COUNT, 1);
   88|      0|        break;
   89|      0|      default:
  ------------------
  |  Branch (89:7): [True: 0, False: 0]
  ------------------
   90|      0|        break;
   91|      0|    }
   92|      0|  }
   93|  29.6k|}

_ZNK7rocksdb22RandomAccessFileReader21ShouldNotifyListenersEv:
   80|  59.3k|  bool ShouldNotifyListeners() const { return !listeners_.empty(); }
_ZN7rocksdb22RandomAccessFileReaderC2EONSt3__110unique_ptrINS_18FSRandomAccessFileENS1_14default_deleteIS3_EEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPNS_11SystemClockERKNS1_10shared_ptrINS_8IOTracerEEEPNS_10StatisticsEjPNS_13HistogramImplEPNS_11RateLimiterERKNS1_6vectorINSI_INS_13EventListenerEEENSB_ISV_EEEENS_11TemperatureEb:
  141|  4.48k|        is_last_level_(is_last_level) {
  142|  4.48k|    std::for_each(listeners.begin(), listeners.end(),
  143|  4.48k|                  [this](const std::shared_ptr<EventListener>& e) {
  144|  4.48k|                    if (e->ShouldBeNotifiedOnFileIO()) {
  145|  4.48k|                      listeners_.emplace_back(e);
  146|  4.48k|                    }
  147|  4.48k|                  });
  148|  4.48k|  }
_ZNK7rocksdb22RandomAccessFileReader8PrefetchERKNS_9IOOptionsEmm:
  178|  5.53k|  IOStatus Prefetch(const IOOptions& opts, uint64_t offset, size_t n) const {
  179|  5.53k|    return file_->Prefetch(offset, n, opts, nullptr);
  180|  5.53k|  }
_ZNK7rocksdb22RandomAccessFileReader9file_nameEv:
  184|  25.2k|  const std::string& file_name() const { return file_name_; }
_ZNK7rocksdb22RandomAccessFileReader13use_direct_ioEv:
  186|  64.9k|  bool use_direct_io() const { return file_->use_direct_io(); }

_ZN7rocksdb15NewWritableFileEPNS_10FileSystemERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPNS2_10unique_ptrINS_14FSWritableFileENS2_14default_deleteISC_EEEERKNS_11FileOptionsE:
   20|  27.0k|                         const FileOptions& options) {
   21|  27.0k|  TEST_SYNC_POINT_CALLBACK("NewWritableFile::FileOptions.temperature",
   22|  27.0k|                           const_cast<Temperature*>(&options.temperature));
   23|  27.0k|  IOStatus s = fs->NewWritableFile(fname, options, result, nullptr);
   24|  27.0k|  TEST_KILL_RANDOM_WITH_WEIGHT("NewWritableFile:0", REDUCE_ODDS2);
   25|  27.0k|  return s;
   26|  27.0k|}

_ZN7rocksdb20SequentialFileReader4ReadEmPNS_5SliceEPcNS_3Env10IOPriorityE:
   40|  33.0k|                                    Env::IOPriority rate_limiter_priority) {
   41|  33.0k|  IOStatus io_s;
   42|  33.0k|  IOOptions io_opts;
   43|  33.0k|  io_opts.rate_limiter_priority = rate_limiter_priority;
   44|  33.0k|  io_opts.verify_and_reconstruct_read = verify_and_reconstruct_read_;
   45|  33.0k|  if (use_direct_io()) {
  ------------------
  |  Branch (45:7): [True: 0, False: 33.0k]
  ------------------
   46|       |    //
   47|       |    //    |-offset_advance-|---bytes returned--|
   48|       |    //    |----------------------buf size-------------------------|
   49|       |    //    |                |                   |                  |
   50|       |    // aligned           offset          offset + n  Roundup(offset + n,
   51|       |    // offset                                             alignment)
   52|       |    //
   53|      0|    size_t offset = offset_.fetch_add(n);
   54|      0|    size_t alignment = file_->GetRequiredBufferAlignment();
   55|      0|    size_t aligned_offset = TruncateToPageBoundary(alignment, offset);
   56|      0|    size_t offset_advance = offset - aligned_offset;
   57|      0|    size_t size = Roundup(offset + n, alignment) - aligned_offset;
   58|      0|    size_t r = 0;
   59|      0|    AlignedBuffer buf;
   60|      0|    buf.Alignment(alignment);
   61|      0|    buf.AllocateNewBuffer(size);
   62|       |
   63|      0|    while (buf.CurrentSize() < size) {
  ------------------
  |  Branch (63:12): [True: 0, False: 0]
  ------------------
   64|      0|      size_t allowed;
   65|      0|      if (rate_limiter_priority != Env::IO_TOTAL && rate_limiter_ != nullptr) {
  ------------------
  |  Branch (65:11): [True: 0, False: 0]
  |  Branch (65:53): [True: 0, False: 0]
  ------------------
   66|      0|        allowed = rate_limiter_->RequestToken(
   67|      0|            buf.Capacity() - buf.CurrentSize(), buf.Alignment(),
   68|      0|            rate_limiter_priority, nullptr /* stats */,
   69|      0|            RateLimiter::OpType::kRead);
   70|      0|      } else {
   71|      0|        assert(buf.CurrentSize() == 0);
   72|      0|        allowed = size;
   73|      0|      }
   74|       |
   75|      0|      Slice tmp;
   76|      0|      uint64_t orig_offset = 0;
   77|      0|      FileOperationInfo::StartTimePoint start_ts;
   78|      0|      if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (78:11): [True: 0, False: 0]
  ------------------
   79|      0|        orig_offset = aligned_offset + buf.CurrentSize();
   80|      0|        start_ts = FileOperationInfo::StartNow();
   81|      0|      }
   82|      0|      io_s = file_->PositionedRead(aligned_offset + buf.CurrentSize(), allowed,
   83|      0|                                   io_opts, &tmp, buf.Destination(),
   84|      0|                                   nullptr /* dbg */);
   85|      0|      if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (85:11): [True: 0, False: 0]
  ------------------
   86|      0|        auto finish_ts = FileOperationInfo::FinishNow();
   87|      0|        NotifyOnFileReadFinish(orig_offset, tmp.size(), start_ts, finish_ts,
   88|      0|                               io_s);
   89|      0|      }
   90|      0|      buf.Size(buf.CurrentSize() + tmp.size());
   91|      0|      if (!io_s.ok() || tmp.size() < allowed) {
  ------------------
  |  Branch (91:11): [True: 0, False: 0]
  |  Branch (91:25): [True: 0, False: 0]
  ------------------
   92|      0|        break;
   93|      0|      }
   94|      0|    }
   95|       |
   96|      0|    if (io_s.ok() && offset_advance < buf.CurrentSize()) {
  ------------------
  |  Branch (96:9): [True: 0, False: 0]
  |  Branch (96:22): [True: 0, False: 0]
  ------------------
   97|      0|      r = buf.Read(scratch, offset_advance,
   98|      0|                   std::min(buf.CurrentSize() - offset_advance, n));
   99|      0|    }
  100|      0|    *result = Slice(scratch, r);
  101|  33.0k|  } else {
  102|       |    // To be paranoid, modify scratch a little bit, so in case underlying
  103|       |    // FileSystem doesn't fill the buffer but return success and `scratch`
  104|       |    // returns contains a previous block, returned value will not pass
  105|       |    // checksum.
  106|       |    // It's hard to find useful byte for direct I/O case, so we skip it.
  107|  33.0k|    if (n > 0 && scratch != nullptr) {
  ------------------
  |  Branch (107:9): [True: 33.0k, False: 0]
  |  Branch (107:18): [True: 33.0k, False: 0]
  ------------------
  108|  33.0k|      scratch[0]++;
  109|  33.0k|    }
  110|       |
  111|  33.0k|    size_t read = 0;
  112|  43.5k|    while (read < n) {
  ------------------
  |  Branch (112:12): [True: 33.0k, False: 10.4k]
  ------------------
  113|  33.0k|      size_t allowed;
  114|  33.0k|      if (rate_limiter_priority != Env::IO_TOTAL && rate_limiter_ != nullptr) {
  ------------------
  |  Branch (114:11): [True: 0, False: 33.0k]
  |  Branch (114:53): [True: 0, False: 0]
  ------------------
  115|      0|        allowed = rate_limiter_->RequestToken(
  116|      0|            n - read, 0 /* alignment */, rate_limiter_priority,
  117|      0|            nullptr /* stats */, RateLimiter::OpType::kRead);
  118|  33.0k|      } else {
  119|  33.0k|        allowed = n;
  120|  33.0k|      }
  121|  33.0k|      FileOperationInfo::StartTimePoint start_ts;
  122|  33.0k|      if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (122:11): [True: 0, False: 33.0k]
  ------------------
  123|      0|        start_ts = FileOperationInfo::StartNow();
  124|      0|      }
  125|  33.0k|      Slice tmp;
  126|  33.0k|      io_s = file_->Read(allowed, io_opts, &tmp, scratch + read,
  127|  33.0k|                         nullptr /* dbg */);
  128|  33.0k|      if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (128:11): [True: 0, False: 33.0k]
  ------------------
  129|      0|        auto finish_ts = FileOperationInfo::FinishNow();
  130|      0|        size_t offset = offset_.fetch_add(tmp.size());
  131|      0|        NotifyOnFileReadFinish(offset, tmp.size(), start_ts, finish_ts, io_s);
  132|      0|      }
  133|  33.0k|      read += tmp.size();
  134|  33.0k|      if (!io_s.ok() || tmp.size() < allowed) {
  ------------------
  |  Branch (134:11): [True: 0, False: 33.0k]
  |  Branch (134:25): [True: 22.5k, False: 10.4k]
  ------------------
  135|  22.5k|        break;
  136|  22.5k|      }
  137|  33.0k|    }
  138|  33.0k|    *result = Slice(scratch, read);
  139|  33.0k|  }
  140|  33.0k|  IOSTATS_ADD(bytes_read, result->size());
  ------------------
  |  |   17|  33.0k|  if (!iostats_context.disable_iostats) { \
  |  |  ------------------
  |  |  |  Branch (17:7): [True: 33.0k, False: 0]
  |  |  ------------------
  |  |   18|  33.0k|    iostats_context.metric += value;      \
  |  |   19|  33.0k|  }
  ------------------
  141|  33.0k|  return io_s;
  142|  33.0k|}
_ZN7rocksdb20SequentialFileReader26NewReadaheadSequentialFileEONSt3__110unique_ptrINS_16FSSequentialFileENS1_14default_deleteIS3_EEEEm:
  314|  22.5k|    std::unique_ptr<FSSequentialFile>&& file, size_t readahead_size) {
  315|  22.5k|  if (file->GetRequiredBufferAlignment() >= readahead_size) {
  ------------------
  |  Branch (315:7): [True: 13.5k, False: 9.02k]
  ------------------
  316|       |    // Short-circuit and return the original file if readahead_size is
  317|       |    // too small and hence doesn't make sense to be used for prefetching.
  318|  13.5k|    return std::move(file);
  319|  13.5k|  }
  320|  9.02k|  std::unique_ptr<FSSequentialFile> result(
  321|  9.02k|      new ReadaheadSequentialFile(std::move(file), readahead_size));
  322|  9.02k|  return result;
  323|  22.5k|}
sequence_file_reader.cc:_ZN7rocksdb12_GLOBAL__N_123ReadaheadSequentialFileC2EONSt3__110unique_ptrINS_16FSSequentialFileENS2_14default_deleteIS4_EEEEm:
  166|  9.02k|        read_offset_(0) {
  167|  9.02k|    buffer_.Alignment(alignment_);
  168|  9.02k|    buffer_.AllocateNewBuffer(readahead_size_);
  169|  9.02k|  }
sequence_file_reader.cc:_ZN7rocksdb12_GLOBAL__N_123ReadaheadSequentialFile4ReadEmRKNS_9IOOptionsEPNS_5SliceEPcPNS_14IODebugContextE:
  176|  9.02k|                IODebugContext* dbg) override {
  177|  9.02k|    std::unique_lock<std::mutex> lk(lock_);
  178|       |
  179|  9.02k|    size_t cached_len = 0;
  180|       |    // Check if there is a cache hit, meaning that [offset, offset + n) is
  181|       |    // either completely or partially in the buffer. If it's completely cached,
  182|       |    // including end of file case when offset + n is greater than EOF, then
  183|       |    // return.
  184|  9.02k|    if (TryReadFromCache(n, &cached_len, scratch) &&
  ------------------
  |  Branch (184:9): [True: 0, False: 9.02k]
  ------------------
  185|  9.02k|        (cached_len == n || buffer_.CurrentSize() < readahead_size_)) {
  ------------------
  |  Branch (185:10): [True: 0, False: 0]
  |  Branch (185:29): [True: 0, False: 0]
  ------------------
  186|       |      // We read exactly what we needed, or we hit end of file - return.
  187|      0|      *result = Slice(scratch, cached_len);
  188|      0|      return IOStatus::OK();
  189|      0|    }
  190|  9.02k|    n -= cached_len;
  191|       |
  192|  9.02k|    IOStatus s;
  193|       |    // Read-ahead only make sense if we have some slack left after reading
  194|  9.02k|    if (n + alignment_ >= readahead_size_) {
  ------------------
  |  Branch (194:9): [True: 0, False: 9.02k]
  ------------------
  195|      0|      s = file_->Read(n, opts, result, scratch + cached_len, dbg);
  196|      0|      if (s.ok()) {
  ------------------
  |  Branch (196:11): [True: 0, False: 0]
  ------------------
  197|      0|        read_offset_ += result->size();
  198|      0|        *result = Slice(scratch, cached_len + result->size());
  199|      0|      }
  200|      0|      buffer_.Clear();
  201|      0|      return s;
  202|      0|    }
  203|       |
  204|  9.02k|    s = ReadIntoBuffer(readahead_size_, opts, dbg);
  205|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (205:9): [True: 9.02k, False: 0]
  ------------------
  206|       |      // The data we need is now in cache, so we can safely read it
  207|  9.02k|      size_t remaining_len;
  208|  9.02k|      TryReadFromCache(n, &remaining_len, scratch + cached_len);
  209|  9.02k|      *result = Slice(scratch, cached_len + remaining_len);
  210|  9.02k|    }
  211|  9.02k|    return s;
  212|  9.02k|  }
sequence_file_reader.cc:_ZN7rocksdb12_GLOBAL__N_123ReadaheadSequentialFile16TryReadFromCacheEmPmPc:
  260|  18.0k|  bool TryReadFromCache(size_t n, size_t* cached_len, char* scratch) {
  261|  18.0k|    if (read_offset_ < buffer_offset_ ||
  ------------------
  |  Branch (261:9): [True: 0, False: 18.0k]
  ------------------
  262|  18.0k|        read_offset_ >= buffer_offset_ + buffer_.CurrentSize()) {
  ------------------
  |  Branch (262:9): [True: 9.02k, False: 9.02k]
  ------------------
  263|  9.02k|      *cached_len = 0;
  264|  9.02k|      return false;
  265|  9.02k|    }
  266|  9.02k|    uint64_t offset_in_buffer = read_offset_ - buffer_offset_;
  267|  9.02k|    *cached_len = std::min(
  268|  9.02k|        buffer_.CurrentSize() - static_cast<size_t>(offset_in_buffer), n);
  269|  9.02k|    memcpy(scratch, buffer_.BufferStart() + offset_in_buffer, *cached_len);
  270|  9.02k|    read_offset_ += *cached_len;
  271|  9.02k|    return true;
  272|  18.0k|  }
sequence_file_reader.cc:_ZN7rocksdb12_GLOBAL__N_123ReadaheadSequentialFile14ReadIntoBufferEmRKNS_9IOOptionsEPNS_14IODebugContextE:
  278|  9.02k|                          IODebugContext* dbg) {
  279|  9.02k|    if (n > buffer_.Capacity()) {
  ------------------
  |  Branch (279:9): [True: 0, False: 9.02k]
  ------------------
  280|      0|      n = buffer_.Capacity();
  281|      0|    }
  282|  9.02k|    assert(IsFileSectorAligned(n, alignment_));
  283|  9.02k|    Slice result;
  284|  9.02k|    IOStatus s = file_->Read(n, opts, &result, buffer_.BufferStart(), dbg);
  285|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (285:9): [True: 9.02k, False: 0]
  ------------------
  286|  9.02k|      buffer_offset_ = read_offset_;
  287|  9.02k|      buffer_.Size(result.size());
  288|  9.02k|      assert(result.size() == 0 || buffer_.BufferStart() == result.data());
  289|  9.02k|    }
  290|  9.02k|    return s;
  291|  9.02k|  }
sequence_file_reader.cc:_ZNK7rocksdb12_GLOBAL__N_123ReadaheadSequentialFile13use_direct_ioEv:
  253|  9.02k|  bool use_direct_io() const override { return file_->use_direct_io(); }

_ZN7rocksdb20SequentialFileReader18AddFileIOListenersERKNSt3__16vectorINS1_10shared_ptrINS_13EventListenerEEENS1_9allocatorIS5_EEEE:
   43|  22.5k|      const std::vector<std::shared_ptr<EventListener>>& listeners) {
   44|  22.5k|    std::for_each(listeners.begin(), listeners.end(),
   45|  22.5k|                  [this](const std::shared_ptr<EventListener>& e) {
   46|  22.5k|                    if (e->ShouldBeNotifiedOnFileIO()) {
   47|  22.5k|                      listeners_.emplace_back(e);
   48|  22.5k|                    }
   49|  22.5k|                  });
   50|  22.5k|  }
_ZNK7rocksdb20SequentialFileReader21ShouldNotifyListenersEv:
   52|  66.1k|  bool ShouldNotifyListeners() const { return !listeners_.empty(); }
_ZN7rocksdb20SequentialFileReaderC2EONSt3__110unique_ptrINS_16FSSequentialFileENS1_14default_deleteIS3_EEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmRKNS1_10shared_ptrINS_8IOTracerEEERKNS1_6vectorINSG_INS_13EventListenerEEENSB_ISN_EEEEPNS_11RateLimiterEb:
   90|  22.5k|        verify_and_reconstruct_read_(verify_and_reconstruct_read) {
   91|  22.5k|    AddFileIOListeners(listeners);
   92|  22.5k|  }
_ZNK7rocksdb20SequentialFileReader13use_direct_ioEv:
  119|  33.0k|  bool use_direct_io() const { return file_->use_direct_io(); }

_ZN7rocksdb18SstFileManagerImplC2ERKNSt3__110shared_ptrINS_11SystemClockEEERKNS2_INS_10FileSystemEEERKNS2_INS_6LoggerEEEldm:
   41|  13.5k|      cur_instance_(nullptr) {}
_ZN7rocksdb18SstFileManagerImplD2Ev:
   43|  13.5k|SstFileManagerImpl::~SstFileManagerImpl() {
   44|  13.5k|  Close();
   45|  13.5k|  bg_err_.PermitUncheckedError();
   46|  13.5k|}
_ZN7rocksdb18SstFileManagerImpl5CloseEv:
   48|  22.5k|void SstFileManagerImpl::Close() {
   49|  22.5k|  {
   50|  22.5k|    MutexLock l(&mu_);
   51|  22.5k|    if (closing_) {
  ------------------
  |  Branch (51:9): [True: 9.02k, False: 13.5k]
  ------------------
   52|  9.02k|      return;
   53|  9.02k|    }
   54|  13.5k|    closing_ = true;
   55|  13.5k|    cv_.SignalAll();
   56|  13.5k|  }
   57|  13.5k|  if (bg_thread_) {
  ------------------
  |  Branch (57:7): [True: 0, False: 13.5k]
  ------------------
   58|      0|    bg_thread_->join();
   59|      0|  }
   60|  13.5k|}
_ZN7rocksdb18SstFileManagerImpl9OnAddFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEm:
   75|  4.48k|                                     uint64_t file_size) {
   76|  4.48k|  MutexLock l(&mu_);
   77|  4.48k|  OnAddFileImpl(file_path, file_size);
   78|  4.48k|  TEST_SYNC_POINT_CALLBACK("SstFileManagerImpl::OnAddFile",
   79|  4.48k|                           const_cast<std::string*>(&file_path));
   80|  4.48k|  return Status::OK();
   81|  4.48k|}
_ZN7rocksdb18SstFileManagerImpl12OnDeleteFileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   83|  13.5k|Status SstFileManagerImpl::OnDeleteFile(const std::string& file_path) {
   84|  13.5k|  {
   85|  13.5k|    MutexLock l(&mu_);
   86|  13.5k|    OnDeleteFileImpl(file_path);
   87|  13.5k|  }
   88|  13.5k|  TEST_SYNC_POINT_CALLBACK("SstFileManagerImpl::OnDeleteFile",
   89|  13.5k|                           const_cast<std::string*>(&file_path));
   90|  13.5k|  return Status::OK();
   91|  13.5k|}
_ZN7rocksdb18SstFileManagerImpl12GetTotalSizeEv:
  212|  13.5k|uint64_t SstFileManagerImpl::GetTotalSize() {
  213|  13.5k|  MutexLock l(&mu_);
  214|  13.5k|  return total_files_size_;
  215|  13.5k|}
_ZN7rocksdb18SstFileManagerImpl27GetDeleteRateBytesPerSecondEv:
  223|  9.02k|int64_t SstFileManagerImpl::GetDeleteRateBytesPerSecond() {
  224|  9.02k|  return delete_scheduler_.GetRateBytesPerSecond();
  225|  9.02k|}
_ZN7rocksdb18SstFileManagerImpl17ReserveDiskBufferEmRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  244|  9.02k|                                           const std::string& path) {
  245|  9.02k|  MutexLock l(&mu_);
  246|       |
  247|  9.02k|  reserved_disk_buffer_ += size;
  248|  9.02k|  if (path_.empty()) {
  ------------------
  |  Branch (248:7): [True: 9.02k, False: 0]
  ------------------
  249|  9.02k|    path_ = path;
  250|  9.02k|  }
  251|  9.02k|}
_ZN7rocksdb18SstFileManagerImpl19CancelErrorRecoveryEPNS_12ErrorHandlerE:
  396|  9.02k|bool SstFileManagerImpl::CancelErrorRecovery(ErrorHandler* handler) {
  397|  9.02k|  MutexLock l(&mu_);
  398|       |
  399|  9.02k|  if (cur_instance_ == handler) {
  ------------------
  |  Branch (399:7): [True: 0, False: 9.02k]
  ------------------
  400|       |    // This instance is currently busy attempting to recover
  401|       |    // Nullify it so the recovery thread doesn't attempt to access it again
  402|      0|    cur_instance_ = nullptr;
  403|      0|    return false;
  404|      0|  }
  405|       |
  406|  9.02k|  for (auto iter = error_handler_list_.begin();
  407|  9.02k|       iter != error_handler_list_.end(); ++iter) {
  ------------------
  |  Branch (407:8): [True: 0, False: 9.02k]
  ------------------
  408|      0|    if ((*iter) == handler) {
  ------------------
  |  Branch (408:9): [True: 0, False: 0]
  ------------------
  409|      0|      error_handler_list_.erase(iter);
  410|      0|      return true;
  411|      0|    }
  412|      0|  }
  413|  9.02k|  return false;
  414|  9.02k|}
_ZN7rocksdb18SstFileManagerImpl20ScheduleFileDeletionERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_b:
  418|  13.5k|                                                const bool force_bg) {
  419|  13.5k|  TEST_SYNC_POINT_CALLBACK("SstFileManagerImpl::ScheduleFileDeletion",
  420|  13.5k|                           const_cast<std::string*>(&file_path));
  421|  13.5k|  return delete_scheduler_.DeleteFile(file_path, path_to_sync, force_bg);
  422|  13.5k|}
_ZN7rocksdb18SstFileManagerImpl13OnAddFileImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEm:
  429|  4.48k|                                       uint64_t file_size) {
  430|  4.48k|  auto tracked_file = tracked_files_.find(file_path);
  431|  4.48k|  if (tracked_file != tracked_files_.end()) {
  ------------------
  |  Branch (431:7): [True: 0, False: 4.48k]
  ------------------
  432|       |    // File was added before, we will just update the size
  433|      0|    total_files_size_ -= tracked_file->second;
  434|      0|    total_files_size_ += file_size;
  435|      0|    cur_compactions_reserved_size_ -= file_size;
  436|  4.48k|  } else {
  437|  4.48k|    total_files_size_ += file_size;
  438|  4.48k|  }
  439|  4.48k|  tracked_files_[file_path] = file_size;
  440|  4.48k|}
_ZN7rocksdb18SstFileManagerImpl16OnDeleteFileImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  442|  13.5k|void SstFileManagerImpl::OnDeleteFileImpl(const std::string& file_path) {
  443|  13.5k|  auto tracked_file = tracked_files_.find(file_path);
  444|  13.5k|  if (tracked_file == tracked_files_.end()) {
  ------------------
  |  Branch (444:7): [True: 13.5k, False: 0]
  ------------------
  445|       |    // File is not tracked
  446|  13.5k|    return;
  447|  13.5k|  }
  448|       |
  449|      0|  total_files_size_ -= tracked_file->second;
  450|      0|  tracked_files_.erase(tracked_file);
  451|      0|}
_ZN7rocksdb17NewSstFileManagerEPNS_3EnvENSt3__110shared_ptrINS_6LoggerEEENS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEElbPNS_6StatusEdm:
  458|  13.5k|                                  uint64_t bytes_max_delete_chunk) {
  459|  13.5k|  const auto& fs = env->GetFileSystem();
  460|  13.5k|  return NewSstFileManager(env, fs, info_log, trash_dir, rate_bytes_per_sec,
  461|  13.5k|                           delete_existing_trash, status, max_trash_db_ratio,
  462|  13.5k|                           bytes_max_delete_chunk);
  463|  13.5k|}
_ZN7rocksdb17NewSstFileManagerEPNS_3EnvENSt3__110shared_ptrINS_10FileSystemEEENS3_INS_6LoggerEEERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEElbPNS_6StatusEdm:
  471|  13.5k|                                  uint64_t bytes_max_delete_chunk) {
  472|  13.5k|  const auto& clock = env->GetSystemClock();
  473|  13.5k|  SstFileManagerImpl* res =
  474|  13.5k|      new SstFileManagerImpl(clock, fs, info_log, rate_bytes_per_sec,
  475|  13.5k|                             max_trash_db_ratio, bytes_max_delete_chunk);
  476|       |
  477|       |  // trash_dir is deprecated and not needed anymore, but if user passed it
  478|       |  // we will still remove files in it.
  479|  13.5k|  Status s = Status::OK();
  480|  13.5k|  if (delete_existing_trash && trash_dir != "") {
  ------------------
  |  Branch (480:7): [True: 13.5k, False: 0]
  |  Branch (480:32): [True: 0, False: 13.5k]
  ------------------
  481|      0|    std::vector<std::string> files_in_trash;
  482|      0|    s = fs->GetChildren(trash_dir, IOOptions(), &files_in_trash, nullptr);
  483|      0|    if (s.ok()) {
  ------------------
  |  Branch (483:9): [True: 0, False: 0]
  ------------------
  484|      0|      for (const std::string& trash_file : files_in_trash) {
  ------------------
  |  Branch (484:42): [True: 0, False: 0]
  ------------------
  485|      0|        std::string path_in_trash = trash_dir + "/" + trash_file;
  486|      0|        res->OnAddFile(path_in_trash);
  487|      0|        Status file_delete =
  488|      0|            res->ScheduleFileDeletion(path_in_trash, trash_dir);
  489|      0|        if (s.ok() && !file_delete.ok()) {
  ------------------
  |  Branch (489:13): [True: 0, False: 0]
  |  Branch (489:23): [True: 0, False: 0]
  ------------------
  490|      0|          s = file_delete;
  491|      0|        }
  492|      0|      }
  493|      0|    }
  494|      0|  }
  495|       |
  496|  13.5k|  if (status) {
  ------------------
  |  Branch (496:7): [True: 0, False: 13.5k]
  ------------------
  497|      0|    *status = s;
  498|  13.5k|  } else {
  499|       |    // No one passed us a Status, so they must not care about the error...
  500|  13.5k|    s.PermitUncheckedError();
  501|  13.5k|  }
  502|       |
  503|  13.5k|  return res;
  504|  13.5k|}

_ZN7rocksdb18SstFileManagerImpl16SetStatisticsPtrERKNSt3__110shared_ptrINS_10StatisticsEEE:
  138|  9.02k|  void SetStatisticsPtr(const std::shared_ptr<Statistics>& stats) override {
  139|  9.02k|    stats_ = stats;
  140|  9.02k|    delete_scheduler_.SetStatisticsPtr(stats);
  141|  9.02k|  }

_ZN7rocksdb18WritableFileWriter6AppendERKNS_9IOOptionsERKNS_5SliceEj:
   65|  4.93M|                                    uint32_t crc32c_checksum) {
   66|  4.93M|  if (seen_error()) {
  ------------------
  |  Branch (66:7): [True: 0, False: 4.93M]
  ------------------
   67|      0|    return GetWriterHasPreviousErrorStatus();
   68|      0|  }
   69|       |
   70|  4.93M|  StopWatch sw(clock_, stats_, hist_type_,
   71|  4.93M|               GetFileWriteHistograms(hist_type_, opts.io_activity));
   72|       |
   73|  4.93M|  const IOOptions io_options = FinalizeIOOptions(opts);
   74|  4.93M|  const char* src = data.data();
   75|  4.93M|  size_t left = data.size();
   76|  4.93M|  IOStatus s;
   77|  4.93M|  pending_sync_ = true;
   78|       |
   79|  4.93M|  TEST_KILL_RANDOM_WITH_WEIGHT("WritableFileWriter::Append:0", REDUCE_ODDS2);
   80|       |
   81|       |  // Calculate the checksum of appended data
   82|  4.93M|  UpdateFileChecksum(data);
   83|       |
   84|  4.93M|  {
   85|  4.93M|    IOSTATS_TIMER_GUARD(prepare_write_nanos);
  ------------------
  |  |   36|  4.93M|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  4.93M|  iostats_step_timer_##metric.Start();
  ------------------
   86|  4.93M|    TEST_SYNC_POINT("WritableFileWriter::Append:BeforePrepareWrite");
   87|  4.93M|    writable_file_->PrepareWrite(static_cast<size_t>(GetFileSize()), left,
   88|  4.93M|                                 io_options, nullptr);
   89|  4.93M|  }
   90|       |
   91|       |  // See whether we need to enlarge the buffer to avoid the flush
   92|  4.93M|  if (buf_.Capacity() - buf_.CurrentSize() < left) {
  ------------------
  |  Branch (92:7): [True: 2.45k, False: 4.93M]
  ------------------
   93|  2.45k|    for (size_t cap = buf_.Capacity();
   94|  3.20k|         cap < max_buffer_size_;  // There is still room to increase
  ------------------
  |  Branch (94:10): [True: 3.16k, False: 42]
  ------------------
   95|  3.16k|         cap *= 2) {
   96|       |      // See whether the next available size is large enough.
   97|       |      // Buffer will never be increased to more than max_buffer_size_.
   98|  3.16k|      size_t desired_capacity = std::min(cap * 2, max_buffer_size_);
   99|  3.16k|      if (desired_capacity - buf_.CurrentSize() >= left ||
  ------------------
  |  Branch (99:11): [True: 2.41k, False: 753]
  ------------------
  100|  3.16k|          (use_direct_io() && desired_capacity == max_buffer_size_)) {
  ------------------
  |  Branch (100:12): [True: 0, False: 753]
  |  Branch (100:31): [True: 0, False: 0]
  ------------------
  101|  2.41k|        buf_.AllocateNewBuffer(desired_capacity, true);
  102|  2.41k|        break;
  103|  2.41k|      }
  104|  3.16k|    }
  105|  2.45k|  }
  106|       |
  107|       |  // Flush only when buffered I/O
  108|  4.93M|  if (!use_direct_io() && (buf_.Capacity() - buf_.CurrentSize()) < left) {
  ------------------
  |  Branch (108:7): [True: 4.93M, False: 0]
  |  Branch (108:27): [True: 42, False: 4.93M]
  ------------------
  109|     42|    if (buf_.CurrentSize() > 0) {
  ------------------
  |  Branch (109:9): [True: 42, False: 0]
  ------------------
  110|     42|      s = Flush(io_options);
  111|     42|      if (!s.ok()) {
  ------------------
  |  Branch (111:11): [True: 0, False: 42]
  ------------------
  112|      0|        set_seen_error(s);
  113|      0|        return s;
  114|      0|      }
  115|     42|    }
  116|     42|    assert(buf_.CurrentSize() == 0);
  117|     42|  }
  118|       |
  119|  4.93M|  if (perform_data_verification_ && buffered_data_with_checksum_ &&
  ------------------
  |  Branch (119:7): [True: 0, False: 4.93M]
  |  Branch (119:37): [True: 0, False: 0]
  ------------------
  120|  4.93M|      crc32c_checksum != 0) {
  ------------------
  |  Branch (120:7): [True: 0, False: 0]
  ------------------
  121|       |    // Since we want to use the checksum of the input data, we cannot break it
  122|       |    // into several pieces. We will only write them in the buffer when buffer
  123|       |    // size is enough. Otherwise, we will directly write it down.
  124|      0|    if (use_direct_io() || (buf_.Capacity() - buf_.CurrentSize()) >= left) {
  ------------------
  |  Branch (124:9): [True: 0, False: 0]
  |  Branch (124:28): [True: 0, False: 0]
  ------------------
  125|      0|      if ((buf_.Capacity() - buf_.CurrentSize()) >= left) {
  ------------------
  |  Branch (125:11): [True: 0, False: 0]
  ------------------
  126|      0|        size_t appended = buf_.Append(src, left);
  127|      0|        if (appended != left) {
  ------------------
  |  Branch (127:13): [True: 0, False: 0]
  ------------------
  128|      0|          s = IOStatus::Corruption("Write buffer append failure");
  129|      0|        }
  130|      0|        buffered_data_crc32c_checksum_ = crc32c::Crc32cCombine(
  131|      0|            buffered_data_crc32c_checksum_, crc32c_checksum, appended);
  132|      0|      } else {
  133|      0|        while (left > 0) {
  ------------------
  |  Branch (133:16): [True: 0, False: 0]
  ------------------
  134|      0|          size_t appended = buf_.Append(src, left);
  135|      0|          buffered_data_crc32c_checksum_ =
  136|      0|              crc32c::Extend(buffered_data_crc32c_checksum_, src, appended);
  137|      0|          left -= appended;
  138|      0|          src += appended;
  139|       |
  140|      0|          if (left > 0) {
  ------------------
  |  Branch (140:15): [True: 0, False: 0]
  ------------------
  141|      0|            s = Flush(io_options);
  142|      0|            if (!s.ok()) {
  ------------------
  |  Branch (142:17): [True: 0, False: 0]
  ------------------
  143|      0|              break;
  144|      0|            }
  145|      0|          }
  146|      0|        }
  147|      0|      }
  148|      0|    } else {
  149|      0|      assert(buf_.CurrentSize() == 0);
  150|      0|      buffered_data_crc32c_checksum_ = crc32c_checksum;
  151|      0|      s = WriteBufferedWithChecksum(io_options, src, left);
  152|      0|    }
  153|  4.93M|  } else {
  154|       |    // In this case, either we do not need to do the data verification or
  155|       |    // caller does not provide the checksum of the data (crc32c_checksum = 0).
  156|       |    //
  157|       |    // We never write directly to disk with direct I/O on.
  158|       |    // or we simply use it for its original purpose to accumulate many small
  159|       |    // chunks
  160|  4.93M|    if (use_direct_io() || (buf_.Capacity() >= left)) {
  ------------------
  |  Branch (160:9): [True: 0, False: 4.93M]
  |  Branch (160:28): [True: 4.93M, False: 14]
  ------------------
  161|  9.86M|      while (left > 0) {
  ------------------
  |  Branch (161:14): [True: 4.92M, False: 4.93M]
  ------------------
  162|  4.92M|        size_t appended = buf_.Append(src, left);
  163|  4.92M|        if (perform_data_verification_ && buffered_data_with_checksum_) {
  ------------------
  |  Branch (163:13): [True: 0, False: 4.92M]
  |  Branch (163:43): [True: 0, False: 0]
  ------------------
  164|      0|          buffered_data_crc32c_checksum_ =
  165|      0|              crc32c::Extend(buffered_data_crc32c_checksum_, src, appended);
  166|      0|        }
  167|  4.92M|        left -= appended;
  168|  4.92M|        src += appended;
  169|       |
  170|  4.92M|        if (left > 0) {
  ------------------
  |  Branch (170:13): [True: 0, False: 4.92M]
  ------------------
  171|      0|          s = Flush(io_options);
  172|      0|          if (!s.ok()) {
  ------------------
  |  Branch (172:15): [True: 0, False: 0]
  ------------------
  173|      0|            break;
  174|      0|          }
  175|      0|        }
  176|  4.92M|      }
  177|  4.93M|    } else {
  178|       |      // Writing directly to file bypassing the buffer
  179|     14|      assert(buf_.CurrentSize() == 0);
  180|     14|      if (perform_data_verification_ && buffered_data_with_checksum_) {
  ------------------
  |  Branch (180:11): [True: 0, False: 14]
  |  Branch (180:41): [True: 0, False: 0]
  ------------------
  181|      0|        buffered_data_crc32c_checksum_ = crc32c::Value(src, left);
  182|      0|        s = WriteBufferedWithChecksum(io_options, src, left);
  183|     14|      } else {
  184|     14|        s = WriteBuffered(io_options, src, left);
  185|     14|      }
  186|     14|    }
  187|  4.93M|  }
  188|       |
  189|  4.93M|  TEST_KILL_RANDOM("WritableFileWriter::Append:1");
  190|  4.93M|  if (s.ok()) {
  ------------------
  |  Branch (190:7): [True: 4.93M, False: 0]
  ------------------
  191|  4.93M|    uint64_t cur_size = filesize_.load(std::memory_order_acquire);
  192|  4.93M|    filesize_.store(cur_size + data.size(), std::memory_order_release);
  193|  4.93M|  } else {
  194|      0|    set_seen_error(s);
  195|      0|  }
  196|  4.93M|  return s;
  197|  4.93M|}
_ZN7rocksdb18WritableFileWriter5CloseERKNS_9IOOptionsE:
  242|  85.7k|IOStatus WritableFileWriter::Close(const IOOptions& opts) {
  243|  85.7k|  IOOptions io_options = FinalizeIOOptions(opts);
  244|  85.7k|  if (seen_error()) {
  ------------------
  |  Branch (244:7): [True: 0, False: 85.7k]
  ------------------
  245|      0|    IOStatus interim;
  246|      0|    if (writable_file_.get() != nullptr) {
  ------------------
  |  Branch (246:9): [True: 0, False: 0]
  ------------------
  247|      0|      interim = writable_file_->Close(io_options, nullptr);
  248|      0|      writable_file_.reset();
  249|      0|    }
  250|      0|    if (interim.ok()) {
  ------------------
  |  Branch (250:9): [True: 0, False: 0]
  ------------------
  251|      0|      return IOStatus::IOError(
  252|      0|          "File is closed but data not flushed as writer has previous error.");
  253|      0|    } else {
  254|      0|      return interim;
  255|      0|    }
  256|      0|  }
  257|       |
  258|       |  // Do not quit immediately on failure the file MUST be closed
  259|       |
  260|       |  // Possible to close it twice now as we MUST close
  261|       |  // in __dtor, simply flushing is not enough
  262|       |  // Windows when pre-allocating does not fill with zeros
  263|       |  // also with unbuffered access we also set the end of data.
  264|  85.7k|  if (writable_file_.get() == nullptr) {
  ------------------
  |  Branch (264:7): [True: 36.0k, False: 49.6k]
  ------------------
  265|  36.0k|    return IOStatus::OK();
  266|  36.0k|  }
  267|       |
  268|  49.6k|  IOStatus s;
  269|  49.6k|  s = Flush(io_options);  // flush cache to OS
  270|       |
  271|  49.6k|  IOStatus interim;
  272|       |  // In direct I/O mode we write whole pages so
  273|       |  // we need to let the file know where data ends.
  274|  49.6k|  if (use_direct_io()) {
  ------------------
  |  Branch (274:7): [True: 0, False: 49.6k]
  ------------------
  275|      0|    {
  276|      0|      FileOperationInfo::StartTimePoint start_ts;
  277|      0|      if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (277:11): [True: 0, False: 0]
  ------------------
  278|      0|        start_ts = FileOperationInfo::StartNow();
  279|      0|      }
  280|      0|      uint64_t filesz = filesize_.load(std::memory_order_acquire);
  281|      0|      interim = writable_file_->Truncate(filesz, io_options, nullptr);
  282|      0|      if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (282:11): [True: 0, False: 0]
  ------------------
  283|      0|        auto finish_ts = FileOperationInfo::FinishNow();
  284|      0|        NotifyOnFileTruncateFinish(start_ts, finish_ts, s);
  285|      0|        if (!interim.ok()) {
  ------------------
  |  Branch (285:13): [True: 0, False: 0]
  ------------------
  286|      0|          NotifyOnIOError(interim, FileOperationType::kTruncate, file_name(),
  287|      0|                          filesz);
  288|      0|        }
  289|      0|      }
  290|      0|    }
  291|      0|    if (interim.ok()) {
  ------------------
  |  Branch (291:9): [True: 0, False: 0]
  ------------------
  292|      0|      {
  293|      0|        FileOperationInfo::StartTimePoint start_ts;
  294|      0|        if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (294:13): [True: 0, False: 0]
  ------------------
  295|      0|          start_ts = FileOperationInfo::StartNow();
  296|      0|        }
  297|      0|        interim = writable_file_->Fsync(io_options, nullptr);
  298|      0|        if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (298:13): [True: 0, False: 0]
  ------------------
  299|      0|          auto finish_ts = FileOperationInfo::FinishNow();
  300|      0|          NotifyOnFileSyncFinish(start_ts, finish_ts, s,
  301|      0|                                 FileOperationType::kFsync);
  302|      0|          if (!interim.ok()) {
  ------------------
  |  Branch (302:15): [True: 0, False: 0]
  ------------------
  303|      0|            NotifyOnIOError(interim, FileOperationType::kFsync, file_name());
  304|      0|          }
  305|      0|        }
  306|      0|      }
  307|      0|    }
  308|      0|    if (!interim.ok() && s.ok()) {
  ------------------
  |  Branch (308:9): [True: 0, False: 0]
  |  Branch (308:26): [True: 0, False: 0]
  ------------------
  309|      0|      s = interim;
  310|      0|    }
  311|      0|  }
  312|       |
  313|  49.6k|  TEST_KILL_RANDOM("WritableFileWriter::Close:0");
  314|  49.6k|  {
  315|  49.6k|    FileOperationInfo::StartTimePoint start_ts;
  316|  49.6k|    if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (316:9): [True: 0, False: 49.6k]
  ------------------
  317|      0|      start_ts = FileOperationInfo::StartNow();
  318|      0|    }
  319|  49.6k|    interim = writable_file_->Close(io_options, nullptr);
  320|  49.6k|    if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (320:9): [True: 0, False: 49.6k]
  ------------------
  321|      0|      auto finish_ts = FileOperationInfo::FinishNow();
  322|      0|      NotifyOnFileCloseFinish(start_ts, finish_ts, s);
  323|      0|      if (!interim.ok()) {
  ------------------
  |  Branch (323:11): [True: 0, False: 0]
  ------------------
  324|      0|        NotifyOnIOError(interim, FileOperationType::kClose, file_name());
  325|      0|      }
  326|      0|    }
  327|  49.6k|  }
  328|  49.6k|  if (!interim.ok() && s.ok()) {
  ------------------
  |  Branch (328:7): [True: 0, False: 49.6k]
  |  Branch (328:24): [True: 0, False: 0]
  ------------------
  329|      0|    s = interim;
  330|      0|  }
  331|       |
  332|  49.6k|  writable_file_.reset();
  333|  49.6k|  TEST_KILL_RANDOM("WritableFileWriter::Close:1");
  334|       |
  335|  49.6k|  if (s.ok()) {
  ------------------
  |  Branch (335:7): [True: 49.6k, False: 0]
  ------------------
  336|  49.6k|    if (checksum_generator_ != nullptr && !checksum_finalized_) {
  ------------------
  |  Branch (336:9): [True: 0, False: 49.6k]
  |  Branch (336:43): [True: 0, False: 0]
  ------------------
  337|      0|      checksum_generator_->Finalize();
  338|      0|      checksum_finalized_ = true;
  339|      0|    }
  340|  49.6k|  } else {
  341|      0|    set_seen_error(s);
  342|      0|  }
  343|       |
  344|  49.6k|  return s;
  345|  85.7k|}
_ZN7rocksdb18WritableFileWriter5FlushERKNS_9IOOptionsE:
  349|  1.57M|IOStatus WritableFileWriter::Flush(const IOOptions& opts) {
  350|  1.57M|  if (seen_error()) {
  ------------------
  |  Branch (350:7): [True: 0, False: 1.57M]
  ------------------
  351|      0|    return GetWriterHasPreviousErrorStatus();
  352|      0|  }
  353|       |
  354|  1.57M|  const IOOptions io_options = FinalizeIOOptions(opts);
  355|       |
  356|  1.57M|  IOStatus s;
  357|  1.57M|  TEST_KILL_RANDOM_WITH_WEIGHT("WritableFileWriter::Flush:0", REDUCE_ODDS2);
  358|       |
  359|  1.57M|  if (buf_.CurrentSize() > 0) {
  ------------------
  |  Branch (359:7): [True: 1.49M, False: 81.2k]
  ------------------
  360|  1.49M|    if (use_direct_io()) {
  ------------------
  |  Branch (360:9): [True: 0, False: 1.49M]
  ------------------
  361|      0|      if (pending_sync_) {
  ------------------
  |  Branch (361:11): [True: 0, False: 0]
  ------------------
  362|      0|        if (perform_data_verification_ && buffered_data_with_checksum_) {
  ------------------
  |  Branch (362:13): [True: 0, False: 0]
  |  Branch (362:43): [True: 0, False: 0]
  ------------------
  363|      0|          s = WriteDirectWithChecksum(io_options);
  364|      0|        } else {
  365|      0|          s = WriteDirect(io_options);
  366|      0|        }
  367|      0|      }
  368|  1.49M|    } else {
  369|  1.49M|      if (perform_data_verification_ && buffered_data_with_checksum_) {
  ------------------
  |  Branch (369:11): [True: 0, False: 1.49M]
  |  Branch (369:41): [True: 0, False: 0]
  ------------------
  370|      0|        s = WriteBufferedWithChecksum(io_options, buf_.BufferStart(),
  371|      0|                                      buf_.CurrentSize());
  372|  1.49M|      } else {
  373|  1.49M|        s = WriteBuffered(io_options, buf_.BufferStart(), buf_.CurrentSize());
  374|  1.49M|      }
  375|  1.49M|    }
  376|  1.49M|    if (!s.ok()) {
  ------------------
  |  Branch (376:9): [True: 0, False: 1.49M]
  ------------------
  377|      0|      set_seen_error(s);
  378|      0|      return s;
  379|      0|    }
  380|  1.49M|  }
  381|       |
  382|  1.57M|  {
  383|  1.57M|    FileOperationInfo::StartTimePoint start_ts;
  384|  1.57M|    if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (384:9): [True: 0, False: 1.57M]
  ------------------
  385|      0|      start_ts = FileOperationInfo::StartNow();
  386|      0|    }
  387|  1.57M|    s = writable_file_->Flush(io_options, nullptr);
  388|  1.57M|    if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (388:9): [True: 0, False: 1.57M]
  ------------------
  389|      0|      auto finish_ts = std::chrono::steady_clock::now();
  390|      0|      NotifyOnFileFlushFinish(start_ts, finish_ts, s);
  391|      0|      if (!s.ok()) {
  ------------------
  |  Branch (391:11): [True: 0, False: 0]
  ------------------
  392|      0|        NotifyOnIOError(s, FileOperationType::kFlush, file_name());
  393|      0|      }
  394|      0|    }
  395|  1.57M|  }
  396|       |
  397|  1.57M|  if (!s.ok()) {
  ------------------
  |  Branch (397:7): [True: 0, False: 1.57M]
  ------------------
  398|      0|    set_seen_error(s);
  399|      0|    return s;
  400|      0|  }
  401|       |
  402|       |  // sync OS cache to disk for every bytes_per_sync_
  403|       |  // TODO: give log file and sst file different options (log
  404|       |  // files could be potentially cached in OS for their whole
  405|       |  // life time, thus we might not want to flush at all).
  406|       |
  407|       |  // We try to avoid sync to the last 1MB of data. For two reasons:
  408|       |  // (1) avoid rewrite the same page that is modified later.
  409|       |  // (2) for older version of OS, write can block while writing out
  410|       |  //     the page.
  411|       |  // Xfs does neighbor page flushing outside of the specified ranges. We
  412|       |  // need to make sure sync range is far from the write offset.
  413|  1.57M|  if (!use_direct_io() && bytes_per_sync_) {
  ------------------
  |  Branch (413:7): [True: 1.57M, False: 0]
  |  Branch (413:27): [True: 0, False: 1.57M]
  ------------------
  414|      0|    const uint64_t kBytesNotSyncRange =
  415|      0|        1024 * 1024;                                // recent 1MB is not synced.
  416|      0|    const uint64_t kBytesAlignWhenSync = 4 * 1024;  // Align 4KB.
  417|      0|    uint64_t cur_size = filesize_.load(std::memory_order_acquire);
  418|      0|    if (cur_size > kBytesNotSyncRange) {
  ------------------
  |  Branch (418:9): [True: 0, False: 0]
  ------------------
  419|      0|      uint64_t offset_sync_to = cur_size - kBytesNotSyncRange;
  420|      0|      offset_sync_to -= offset_sync_to % kBytesAlignWhenSync;
  421|      0|      assert(offset_sync_to >= last_sync_size_);
  422|      0|      if (offset_sync_to > 0 &&
  ------------------
  |  Branch (422:11): [True: 0, False: 0]
  ------------------
  423|      0|          offset_sync_to - last_sync_size_ >= bytes_per_sync_) {
  ------------------
  |  Branch (423:11): [True: 0, False: 0]
  ------------------
  424|      0|        s = RangeSync(io_options, last_sync_size_,
  425|      0|                      offset_sync_to - last_sync_size_);
  426|      0|        if (!s.ok()) {
  ------------------
  |  Branch (426:13): [True: 0, False: 0]
  ------------------
  427|      0|          set_seen_error(s);
  428|      0|        }
  429|      0|        last_sync_size_ = offset_sync_to;
  430|      0|      }
  431|      0|    }
  432|      0|  }
  433|       |
  434|  1.57M|  return s;
  435|  1.57M|}
_ZN7rocksdb18WritableFileWriter15GetFileChecksumEv:
  437|  4.48k|std::string WritableFileWriter::GetFileChecksum() {
  438|  4.48k|  if (checksum_generator_ != nullptr) {
  ------------------
  |  Branch (438:7): [True: 0, False: 4.48k]
  ------------------
  439|      0|    assert(checksum_finalized_);
  440|      0|    return checksum_generator_->GetChecksum();
  441|  4.48k|  } else {
  442|  4.48k|    return kUnknownFileChecksum;
  443|  4.48k|  }
  444|  4.48k|}
_ZNK7rocksdb18WritableFileWriter23GetFileChecksumFuncNameEv:
  446|  4.48k|const char* WritableFileWriter::GetFileChecksumFuncName() const {
  447|  4.48k|  if (checksum_generator_ != nullptr) {
  ------------------
  |  Branch (447:7): [True: 0, False: 4.48k]
  ------------------
  448|      0|    return checksum_generator_->Name();
  449|  4.48k|  } else {
  450|  4.48k|    return kUnknownFileChecksumFuncName;
  451|  4.48k|  }
  452|  4.48k|}
_ZN7rocksdb18WritableFileWriter16PrepareIOOptionsERKNS_12WriteOptionsERNS_9IOOptionsE:
  455|  2.90M|                                              IOOptions& opts) {
  456|  2.90M|  return PrepareIOFromWriteOptions(wo, opts);
  457|  2.90M|}
_ZN7rocksdb18WritableFileWriter4SyncERKNS_9IOOptionsEb:
  459|  27.0k|IOStatus WritableFileWriter::Sync(const IOOptions& opts, bool use_fsync) {
  460|  27.0k|  if (seen_error()) {
  ------------------
  |  Branch (460:7): [True: 0, False: 27.0k]
  ------------------
  461|      0|    return GetWriterHasPreviousErrorStatus();
  462|      0|  }
  463|       |
  464|  27.0k|  IOOptions io_options = FinalizeIOOptions(opts);
  465|  27.0k|  IOStatus s = Flush(io_options);
  466|  27.0k|  if (!s.ok()) {
  ------------------
  |  Branch (466:7): [True: 0, False: 27.0k]
  ------------------
  467|      0|    set_seen_error(s);
  468|      0|    return s;
  469|      0|  }
  470|  27.0k|  TEST_KILL_RANDOM("WritableFileWriter::Sync:0");
  471|  27.0k|  if (!use_direct_io() && pending_sync_) {
  ------------------
  |  Branch (471:7): [True: 27.0k, False: 0]
  |  Branch (471:27): [True: 27.0k, False: 0]
  ------------------
  472|  27.0k|    s = SyncInternal(io_options, use_fsync);
  473|  27.0k|    if (!s.ok()) {
  ------------------
  |  Branch (473:9): [True: 0, False: 27.0k]
  ------------------
  474|      0|      set_seen_error(s);
  475|      0|      return s;
  476|      0|    }
  477|  27.0k|  }
  478|  27.0k|  TEST_KILL_RANDOM("WritableFileWriter::Sync:1");
  479|  27.0k|  pending_sync_ = false;
  480|  27.0k|  return IOStatus::OK();
  481|  27.0k|}
_ZN7rocksdb18WritableFileWriter12SyncInternalERKNS_9IOOptionsEb:
  504|  27.0k|                                          bool use_fsync) {
  505|       |  // Caller is supposed to check seen_error_
  506|  27.0k|  IOStatus s;
  507|  27.0k|  IOSTATS_TIMER_GUARD(fsync_nanos);
  ------------------
  |  |   36|  27.0k|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  27.0k|  iostats_step_timer_##metric.Start();
  ------------------
  508|  27.0k|  TEST_SYNC_POINT("WritableFileWriter::SyncInternal:0");
  509|  27.0k|  auto prev_perf_level = GetPerfLevel();
  510|       |
  511|  27.0k|  IOSTATS_CPU_TIMER_GUARD(cpu_write_nanos, clock_);
  ------------------
  |  |   41|  27.0k|  PerfStepTimer iostats_step_timer_##metric(           \
  |  |   42|  27.0k|      &(iostats_context.metric), clock, true,          \
  |  |   43|  27.0k|      PerfLevel::kEnableTimeAndCPUTimeExceptForMutex); \
  |  |   44|  27.0k|  iostats_step_timer_##metric.Start();
  ------------------
  512|       |
  513|  27.0k|  FileOperationInfo::StartTimePoint start_ts;
  514|  27.0k|  if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (514:7): [True: 0, False: 27.0k]
  ------------------
  515|      0|    start_ts = FileOperationInfo::StartNow();
  516|      0|  }
  517|       |
  518|  27.0k|  if (use_fsync) {
  ------------------
  |  Branch (518:7): [True: 9.02k, False: 18.0k]
  ------------------
  519|  9.02k|    s = writable_file_->Fsync(opts, nullptr);
  520|  18.0k|  } else {
  521|  18.0k|    s = writable_file_->Sync(opts, nullptr);
  522|  18.0k|  }
  523|  27.0k|  if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (523:7): [True: 0, False: 27.0k]
  ------------------
  524|      0|    auto finish_ts = std::chrono::steady_clock::now();
  525|      0|    NotifyOnFileSyncFinish(
  526|      0|        start_ts, finish_ts, s,
  527|      0|        use_fsync ? FileOperationType::kFsync : FileOperationType::kSync);
  ------------------
  |  Branch (527:9): [True: 0, False: 0]
  ------------------
  528|      0|    if (!s.ok()) {
  ------------------
  |  Branch (528:9): [True: 0, False: 0]
  ------------------
  529|      0|      NotifyOnIOError(
  530|      0|          s, (use_fsync ? FileOperationType::kFsync : FileOperationType::kSync),
  ------------------
  |  Branch (530:15): [True: 0, False: 0]
  ------------------
  531|      0|          file_name());
  532|      0|    }
  533|      0|  }
  534|  27.0k|  SetPerfLevel(prev_perf_level);
  535|       |
  536|       |  // The caller will be responsible to call set_seen_error(s) if s is not OK.
  537|  27.0k|  return s;
  538|  27.0k|}
_ZN7rocksdb18WritableFileWriter13WriteBufferedERKNS_9IOOptionsEPKcm:
  570|  1.49M|                                           const char* data, size_t size) {
  571|  1.49M|  if (seen_error()) {
  ------------------
  |  Branch (571:7): [True: 0, False: 1.49M]
  ------------------
  572|      0|    return GetWriterHasPreviousErrorStatus();
  573|      0|  }
  574|       |
  575|  1.49M|  IOStatus s;
  576|  1.49M|  assert(!use_direct_io());
  577|  1.49M|  const char* src = data;
  578|  1.49M|  size_t left = size;
  579|  1.49M|  DataVerificationInfo v_info;
  580|  1.49M|  char checksum_buf[sizeof(uint32_t)];
  581|  1.49M|  Env::IOPriority rate_limiter_priority_used = opts.rate_limiter_priority;
  582|       |
  583|  2.98M|  while (left > 0) {
  ------------------
  |  Branch (583:10): [True: 1.49M, False: 1.49M]
  ------------------
  584|  1.49M|    size_t allowed = left;
  585|  1.49M|    if (rate_limiter_ != nullptr &&
  ------------------
  |  Branch (585:9): [True: 0, False: 1.49M]
  ------------------
  586|  1.49M|        rate_limiter_priority_used != Env::IO_TOTAL) {
  ------------------
  |  Branch (586:9): [True: 0, False: 0]
  ------------------
  587|      0|      allowed = rate_limiter_->RequestToken(left, 0 /* alignment */,
  588|      0|                                            rate_limiter_priority_used, stats_,
  589|      0|                                            RateLimiter::OpType::kWrite);
  590|      0|    }
  591|       |
  592|  1.49M|    {
  593|  1.49M|      IOSTATS_TIMER_GUARD(write_nanos);
  ------------------
  |  |   36|  1.49M|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  1.49M|  iostats_step_timer_##metric.Start();
  ------------------
  594|  1.49M|      TEST_SYNC_POINT("WritableFileWriter::Flush:BeforeAppend");
  595|       |
  596|  1.49M|      FileOperationInfo::StartTimePoint start_ts;
  597|  1.49M|      uint64_t old_size = writable_file_->GetFileSize(opts, nullptr);
  598|  1.49M|      if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (598:11): [True: 0, False: 1.49M]
  ------------------
  599|      0|        start_ts = FileOperationInfo::StartNow();
  600|      0|        old_size = next_write_offset_;
  601|      0|      }
  602|  1.49M|      {
  603|  1.49M|        auto prev_perf_level = GetPerfLevel();
  604|       |
  605|  1.49M|        IOSTATS_CPU_TIMER_GUARD(cpu_write_nanos, clock_);
  ------------------
  |  |   41|  1.49M|  PerfStepTimer iostats_step_timer_##metric(           \
  |  |   42|  1.49M|      &(iostats_context.metric), clock, true,          \
  |  |   43|  1.49M|      PerfLevel::kEnableTimeAndCPUTimeExceptForMutex); \
  |  |   44|  1.49M|  iostats_step_timer_##metric.Start();
  ------------------
  606|  1.49M|        if (perform_data_verification_) {
  ------------------
  |  Branch (606:13): [True: 0, False: 1.49M]
  ------------------
  607|      0|          Crc32cHandoffChecksumCalculation(src, allowed, checksum_buf);
  608|      0|          v_info.checksum = Slice(checksum_buf, sizeof(uint32_t));
  609|      0|          s = writable_file_->Append(Slice(src, allowed), opts, v_info,
  610|      0|                                     nullptr);
  611|  1.49M|        } else {
  612|  1.49M|          s = writable_file_->Append(Slice(src, allowed), opts, nullptr);
  613|  1.49M|        }
  614|  1.49M|        if (!s.ok()) {
  ------------------
  |  Branch (614:13): [True: 0, False: 1.49M]
  ------------------
  615|       |          // If writable_file_->Append() failed, then the data may or may not
  616|       |          // exist in the underlying memory buffer, OS page cache, remote file
  617|       |          // system's buffer, etc. If WritableFileWriter keeps the data in
  618|       |          // buf_, then a future Close() or write retry may send the data to
  619|       |          // the underlying file again. If the data does exist in the
  620|       |          // underlying buffer and gets written to the file eventually despite
  621|       |          // returning error, the file may end up with two duplicate pieces of
  622|       |          // data. Therefore, clear the buf_ at the WritableFileWriter layer
  623|       |          // and let caller determine error handling.
  624|      0|          buf_.Size(0);
  625|      0|          buffered_data_crc32c_checksum_ = 0;
  626|      0|        }
  627|  1.49M|        SetPerfLevel(prev_perf_level);
  628|  1.49M|      }
  629|  1.49M|      if (ShouldNotifyListeners()) {
  ------------------
  |  Branch (629:11): [True: 0, False: 1.49M]
  ------------------
  630|      0|        auto finish_ts = std::chrono::steady_clock::now();
  631|      0|        NotifyOnFileWriteFinish(old_size, allowed, start_ts, finish_ts, s);
  632|      0|        if (!s.ok()) {
  ------------------
  |  Branch (632:13): [True: 0, False: 0]
  ------------------
  633|      0|          NotifyOnIOError(s, FileOperationType::kAppend, file_name(), allowed,
  634|      0|                          old_size);
  635|      0|        }
  636|      0|      }
  637|  1.49M|      if (!s.ok()) {
  ------------------
  |  Branch (637:11): [True: 0, False: 1.49M]
  ------------------
  638|      0|        set_seen_error(s);
  639|      0|        return s;
  640|      0|      }
  641|  1.49M|    }
  642|       |
  643|  1.49M|    IOSTATS_ADD(bytes_written, allowed);
  ------------------
  |  |   17|  1.49M|  if (!iostats_context.disable_iostats) { \
  |  |  ------------------
  |  |  |  Branch (17:7): [True: 1.42M, False: 67.6k]
  |  |  ------------------
  |  |   18|  1.42M|    iostats_context.metric += value;      \
  |  |   19|  1.42M|  }
  ------------------
  644|  1.49M|    TEST_KILL_RANDOM("WritableFileWriter::WriteBuffered:0");
  645|       |
  646|  1.49M|    left -= allowed;
  647|  1.49M|    src += allowed;
  648|  1.49M|    uint64_t cur_size = flushed_size_.load(std::memory_order_acquire);
  649|  1.49M|    flushed_size_.store(cur_size + allowed, std::memory_order_release);
  650|  1.49M|  }
  651|  1.49M|  buf_.Size(0);
  652|  1.49M|  buffered_data_crc32c_checksum_ = 0;
  653|  1.49M|  if (!s.ok()) {
  ------------------
  |  Branch (653:7): [True: 0, False: 1.49M]
  ------------------
  654|      0|    set_seen_error(s);
  655|      0|  }
  656|  1.49M|  return s;
  657|  1.49M|}
_ZN7rocksdb18WritableFileWriter18UpdateFileChecksumERKNS_5SliceE:
  749|  4.93M|void WritableFileWriter::UpdateFileChecksum(const Slice& data) {
  750|  4.93M|  if (checksum_generator_ != nullptr) {
  ------------------
  |  Branch (750:7): [True: 0, False: 4.93M]
  ------------------
  751|      0|    checksum_generator_->Update(data.data(), data.size());
  752|      0|  }
  753|  4.93M|}
_ZN7rocksdb18WritableFileWriter25DecideRateLimiterPriorityENS_3Env10IOPriorityES2_:
  984|  6.58M|    Env::IOPriority op_rate_limiter_priority) {
  985|  6.58M|  if (writable_file_io_priority == Env::IO_TOTAL &&
  ------------------
  |  Branch (985:7): [True: 6.51M, False: 72.8k]
  ------------------
  986|  6.58M|      op_rate_limiter_priority == Env::IO_TOTAL) {
  ------------------
  |  Branch (986:7): [True: 6.51M, False: 0]
  ------------------
  987|  6.51M|    return Env::IO_TOTAL;
  988|  6.51M|  } else if (writable_file_io_priority == Env::IO_TOTAL) {
  ------------------
  |  Branch (988:14): [True: 0, False: 72.8k]
  ------------------
  989|      0|    return op_rate_limiter_priority;
  990|  72.8k|  } else if (op_rate_limiter_priority == Env::IO_TOTAL) {
  ------------------
  |  Branch (990:14): [True: 0, False: 72.8k]
  ------------------
  991|      0|    return writable_file_io_priority;
  992|  72.8k|  } else {
  993|  72.8k|    return op_rate_limiter_priority;
  994|  72.8k|  }
  995|  6.58M|}
_ZNK7rocksdb18WritableFileWriter17FinalizeIOOptionsERKNS_9IOOptionsE:
  997|  6.62M|IOOptions WritableFileWriter::FinalizeIOOptions(const IOOptions& opts) const {
  998|  6.62M|  Env::IOPriority op_rate_limiter_priority = opts.rate_limiter_priority;
  999|  6.62M|  IOOptions io_options(opts);
 1000|  6.62M|  if (writable_file_.get() != nullptr) {
  ------------------
  |  Branch (1000:7): [True: 6.58M, False: 36.0k]
  ------------------
 1001|  6.58M|    io_options.rate_limiter_priority =
 1002|  6.58M|        WritableFileWriter::DecideRateLimiterPriority(
 1003|  6.58M|            writable_file_->GetIOPriority(), op_rate_limiter_priority);
 1004|  6.58M|  }
 1005|  6.62M|  return io_options;
 1006|  6.62M|}
_ZN7rocksdb22GetFileWriteHistogramsENS_10HistogramsENS_3Env10IOActivityE:
   29|  4.93M|                                         Env::IOActivity io_activity) {
   30|  4.93M|  if (file_writer_hist == Histograms::SST_WRITE_MICROS ||
  ------------------
  |  Branch (30:7): [True: 54.9k, False: 4.88M]
  ------------------
   31|  4.93M|      file_writer_hist == Histograms::BLOB_DB_BLOB_FILE_WRITE_MICROS) {
  ------------------
  |  Branch (31:7): [True: 0, False: 4.88M]
  ------------------
   32|  54.9k|    switch (io_activity) {
   33|      0|      case Env::IOActivity::kFlush:
  ------------------
  |  Branch (33:7): [True: 0, False: 54.9k]
  ------------------
   34|      0|        return Histograms::FILE_WRITE_FLUSH_MICROS;
   35|      0|      case Env::IOActivity::kCompaction:
  ------------------
  |  Branch (35:7): [True: 0, False: 54.9k]
  ------------------
   36|      0|        return Histograms::FILE_WRITE_COMPACTION_MICROS;
   37|  54.9k|      case Env::IOActivity::kDBOpen:
  ------------------
  |  Branch (37:7): [True: 54.9k, False: 0]
  ------------------
   38|  54.9k|        return Histograms::FILE_WRITE_DB_OPEN_MICROS;
   39|      0|      default:
  ------------------
  |  Branch (39:7): [True: 0, False: 54.9k]
  ------------------
   40|      0|        break;
   41|  54.9k|    }
   42|  54.9k|  }
   43|  4.88M|  return Histograms::HISTOGRAM_ENUM_MAX;
   44|  4.93M|}

_ZN7rocksdb18WritableFileWriter16reset_seen_errorEv:
  309|  2.02M|  void reset_seen_error() {
  310|  2.02M|    seen_error_.store(false, std::memory_order_relaxed);
  311|       |#ifndef NDEBUG
  312|       |    seen_injected_error_.store(false, std::memory_order_relaxed);
  313|       |#endif  // NDEBUG
  314|  2.02M|  }
_ZNK7rocksdb18WritableFileWriter21ShouldNotifyListenersEv:
  132|  6.28M|  bool ShouldNotifyListeners() const { return !listeners_.empty(); }
_ZN7rocksdb18WritableFileWriterC2EONSt3__110unique_ptrINS_14FSWritableFileENS1_14default_deleteIS3_EEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_11FileOptionsEPNS_11SystemClockERKNS1_10shared_ptrINS_8IOTracerEEEPNS_10StatisticsENS_10HistogramsERKNS1_6vectorINSL_INS_13EventListenerEEENSB_ISV_EEEEPNS_22FileChecksumGenFactoryEbb:
  202|  49.6k|        buffered_data_with_checksum_(buffered_data_with_checksum) {
  203|  49.6k|    temperature_ = options.temperature;
  204|  49.6k|    assert(!use_direct_io() || max_buffer_size_ > 0);
  205|  49.6k|    TEST_SYNC_POINT_CALLBACK("WritableFileWriter::WritableFileWriter:0",
  206|  49.6k|                             reinterpret_cast<void*>(max_buffer_size_));
  207|  49.6k|    buf_.Alignment(writable_file_->GetRequiredBufferAlignment());
  208|  49.6k|    buf_.AllocateNewBuffer(std::min((size_t)65536, max_buffer_size_));
  209|  49.6k|    std::for_each(listeners.begin(), listeners.end(),
  210|  49.6k|                  [this](const std::shared_ptr<EventListener>& e) {
  211|  49.6k|                    if (e->ShouldBeNotifiedOnFileIO()) {
  212|  49.6k|                      listeners_.emplace_back(e);
  213|  49.6k|                    }
  214|  49.6k|                  });
  215|  49.6k|    if (file_checksum_gen_factory != nullptr) {
  ------------------
  |  Branch (215:9): [True: 0, False: 49.6k]
  ------------------
  216|      0|      FileChecksumGenContext checksum_gen_context;
  217|      0|      checksum_gen_context.file_name = _file_name;
  218|      0|      checksum_generator_ =
  219|      0|          file_checksum_gen_factory->CreateFileChecksumGenerator(
  220|      0|              checksum_gen_context);
  221|      0|    }
  222|  49.6k|  }
_ZN7rocksdb18WritableFileWriterD2Ev:
  235|  49.6k|  ~WritableFileWriter() {
  236|  49.6k|    IOOptions io_options;
  237|       |#ifndef NDEBUG
  238|       |    // This is needed to pass the IOActivity related checks in stress test.
  239|       |    // See DbStressWritableFileWrapper.
  240|       |    ThreadStatus::OperationType op_type =
  241|       |        ThreadStatusUtil::GetThreadOperation();
  242|       |    io_options.io_activity =
  243|       |        ThreadStatusUtil::TEST_GetExpectedIOActivity(op_type);
  244|       |#endif
  245|  49.6k|    auto s = Close(io_options);
  246|  49.6k|    s.PermitUncheckedError();
  247|  49.6k|  }
_ZNK7rocksdb18WritableFileWriter11GetFileSizeEv:
  271|  4.94M|  uint64_t GetFileSize() const {
  272|  4.94M|    return filesize_.load(std::memory_order_acquire);
  273|  4.94M|  }
_ZN7rocksdb18WritableFileWriter13use_direct_ioEv:
  289|  13.0M|  bool use_direct_io() { return writable_file_->use_direct_io(); }
_ZNK7rocksdb18WritableFileWriter13BufferIsEmptyEv:
  291|  9.02k|  bool BufferIsEmpty() const { return buf_.CurrentSize() == 0; }
_ZNK7rocksdb18WritableFileWriter10seen_errorEv:
  304|  9.55M|  bool seen_error() const {
  305|  9.55M|    return seen_error_.load(std::memory_order_relaxed);
  306|  9.55M|  }

db_map_fuzzer.cc:_ZL17TestOneProtoInputR12DBOperations:
   39|  4.51k|DEFINE_PROTO_FUZZER(DBOperations& input) {
   40|  4.51k|  if (input.operations().empty()) {
  ------------------
  |  Branch (40:7): [True: 3, False: 4.51k]
  ------------------
   41|      3|    return;
   42|      3|  }
   43|       |
   44|  4.51k|  const std::string kDbPath = "/tmp/db_map_fuzzer_test";
   45|  4.51k|  auto fs = ROCKSDB_NAMESPACE::FileSystem::Default();
  ------------------
  |  |   15|  4.51k|#define ROCKSDB_NAMESPACE rocksdb
  ------------------
   46|  4.51k|  if (fs->FileExists(kDbPath, ROCKSDB_NAMESPACE::IOOptions(), /*dbg=*/nullptr)
  ------------------
  |  |   15|  4.51k|#define ROCKSDB_NAMESPACE rocksdb
  ------------------
  |  Branch (46:7): [True: 0, False: 4.51k]
  ------------------
   47|  4.51k|          .ok()) {
   48|      0|    std::cerr << "db path " << kDbPath << " already exists" << std::endl;
   49|      0|    abort();
   50|      0|  }
   51|       |
   52|  4.51k|  std::map<std::string, std::string> kv;
   53|  4.51k|  ROCKSDB_NAMESPACE::DB* db = nullptr;
  ------------------
  |  |   15|  4.51k|#define ROCKSDB_NAMESPACE rocksdb
  ------------------
   54|  4.51k|  ROCKSDB_NAMESPACE::Options options;
  ------------------
  |  |   15|  4.51k|#define ROCKSDB_NAMESPACE rocksdb
  ------------------
   55|  4.51k|  options.create_if_missing = true;
   56|  4.51k|  CHECK_OK(ROCKSDB_NAMESPACE::DB::Open(options, kDbPath, &db));
  ------------------
  |  |   10|  4.51k|  do {                                             \
  |  |   11|  4.51k|    auto status = (expression);                    \
  |  |   12|  4.51k|    if (!status.ok()) {                            \
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   13|      0|      std::cerr << status.ToString() << std::endl; \
  |  |   14|      0|      abort();                                     \
  |  |   15|      0|    }                                              \
  |  |   16|  4.51k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (16:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   57|       |
   58|  1.56M|  for (const DBOperation& op : input.operations()) {
  ------------------
  |  Branch (58:30): [True: 1.56M, False: 4.51k]
  ------------------
   59|  1.56M|    switch (op.type()) {
   60|   660k|      case OpType::PUT: {
  ------------------
  |  Branch (60:7): [True: 660k, False: 901k]
  ------------------
   61|   660k|        CHECK_OK(
  ------------------
  |  |   10|   660k|  do {                                             \
  |  |   11|   660k|    auto status = (expression);                    \
  |  |   12|   660k|    if (!status.ok()) {                            \
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 660k]
  |  |  ------------------
  |  |   13|      0|      std::cerr << status.ToString() << std::endl; \
  |  |   14|      0|      abort();                                     \
  |  |   15|      0|    }                                              \
  |  |   16|   660k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (16:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   62|   660k|            db->Put(ROCKSDB_NAMESPACE::WriteOptions(), op.key(), op.value()));
   63|   660k|        kv[op.key()] = op.value();
   64|   660k|        break;
   65|   660k|      }
   66|   200k|      case OpType::MERGE: {
  ------------------
  |  Branch (66:7): [True: 200k, False: 1.36M]
  ------------------
   67|   200k|        break;
   68|   660k|      }
   69|   186k|      case OpType::DELETE: {
  ------------------
  |  Branch (69:7): [True: 186k, False: 1.37M]
  ------------------
   70|   186k|        CHECK_OK(db->Delete(ROCKSDB_NAMESPACE::WriteOptions(), op.key()));
  ------------------
  |  |   10|   186k|  do {                                             \
  |  |   11|   186k|    auto status = (expression);                    \
  |  |   12|   186k|    if (!status.ok()) {                            \
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 186k]
  |  |  ------------------
  |  |   13|      0|      std::cerr << status.ToString() << std::endl; \
  |  |   14|      0|      abort();                                     \
  |  |   15|      0|    }                                              \
  |  |   16|   186k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (16:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   71|   186k|        kv.erase(op.key());
   72|   186k|        break;
   73|   186k|      }
   74|   515k|      case OpType::DELETE_RANGE: {
  ------------------
  |  Branch (74:7): [True: 515k, False: 1.04M]
  ------------------
   75|       |        // [op.key(), op.value()) corresponds to [begin, end).
   76|   515k|        CHECK_OK(db->DeleteRange(ROCKSDB_NAMESPACE::WriteOptions(),
  ------------------
  |  |   10|   515k|  do {                                             \
  |  |   11|   515k|    auto status = (expression);                    \
  |  |   12|   515k|    if (!status.ok()) {                            \
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 515k]
  |  |  ------------------
  |  |   13|      0|      std::cerr << status.ToString() << std::endl; \
  |  |   14|      0|      abort();                                     \
  |  |   15|      0|    }                                              \
  |  |   16|   515k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (16:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   77|   515k|                                 db->DefaultColumnFamily(), op.key(),
   78|   515k|                                 op.value()));
   79|   515k|        kv.erase(kv.lower_bound(op.key()), kv.lower_bound(op.value()));
   80|   515k|        break;
   81|   515k|      }
   82|      0|      default: {
  ------------------
  |  Branch (82:7): [True: 0, False: 1.56M]
  ------------------
   83|      0|        std::cerr << "Unsupported operation" << static_cast<int>(op.type());
   84|      0|        return;
   85|   515k|      }
   86|  1.56M|    }
   87|  1.56M|  }
   88|  4.51k|  CHECK_OK(db->Close());
  ------------------
  |  |   10|  4.51k|  do {                                             \
  |  |   11|  4.51k|    auto status = (expression);                    \
  |  |   12|  4.51k|    if (!status.ok()) {                            \
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   13|      0|      std::cerr << status.ToString() << std::endl; \
  |  |   14|      0|      abort();                                     \
  |  |   15|      0|    }                                              \
  |  |   16|  4.51k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (16:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   89|  4.51k|  delete db;
   90|  4.51k|  db = nullptr;
   91|       |
   92|  4.51k|  CHECK_OK(ROCKSDB_NAMESPACE::DB::Open(options, kDbPath, &db));
  ------------------
  |  |   10|  4.51k|  do {                                             \
  |  |   11|  4.51k|    auto status = (expression);                    \
  |  |   12|  4.51k|    if (!status.ok()) {                            \
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   13|      0|      std::cerr << status.ToString() << std::endl; \
  |  |   14|      0|      abort();                                     \
  |  |   15|      0|    }                                              \
  |  |   16|  4.51k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (16:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
   93|  4.51k|  auto kv_it = kv.begin();
   94|  4.51k|  ROCKSDB_NAMESPACE::Iterator* it =
  ------------------
  |  |   15|  4.51k|#define ROCKSDB_NAMESPACE rocksdb
  ------------------
   95|  4.51k|      db->NewIterator(ROCKSDB_NAMESPACE::ReadOptions());
  ------------------
  |  |   15|  4.51k|#define ROCKSDB_NAMESPACE rocksdb
  ------------------
   96|  34.1k|  for (it->SeekToFirst(); it->Valid(); it->Next(), kv_it++) {
  ------------------
  |  Branch (96:27): [True: 29.5k, False: 4.51k]
  ------------------
   97|  29.5k|    CHECK_TRUE(kv_it != kv.end());
  ------------------
  |  |   26|  29.5k|  if (!(cond)) {                                              \
  |  |  ------------------
  |  |  |  Branch (26:7): [True: 0, False: 29.5k]
  |  |  ------------------
  |  |   27|      0|    std::cerr << "\"" << #cond << "\" is false" << std::endl; \
  |  |   28|      0|    abort();                                                  \
  |  |   29|      0|  }
  ------------------
   98|  29.5k|    CHECK_EQ(it->key().ToString(), kv_it->first);
  ------------------
  |  |   19|  29.5k|  if (a != b) {                                                             \
  |  |  ------------------
  |  |  |  Branch (19:7): [True: 0, False: 29.5k]
  |  |  ------------------
  |  |   20|      0|    std::cerr << "(" << #a << "=" << a << ") != (" << #b << "=" << b << ")" \
  |  |   21|      0|              << std::endl;                                                 \
  |  |   22|      0|    abort();                                                                \
  |  |   23|      0|  }
  ------------------
   99|  29.5k|    CHECK_EQ(it->value().ToString(), kv_it->second);
  ------------------
  |  |   19|  29.5k|  if (a != b) {                                                             \
  |  |  ------------------
  |  |  |  Branch (19:7): [True: 0, False: 29.5k]
  |  |  ------------------
  |  |   20|      0|    std::cerr << "(" << #a << "=" << a << ") != (" << #b << "=" << b << ")" \
  |  |   21|      0|              << std::endl;                                                 \
  |  |   22|      0|    abort();                                                                \
  |  |   23|      0|  }
  ------------------
  100|  29.5k|  }
  101|  4.51k|  CHECK_TRUE(kv_it == kv.end());
  ------------------
  |  |   26|  4.51k|  if (!(cond)) {                                              \
  |  |  ------------------
  |  |  |  Branch (26:7): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   27|      0|    std::cerr << "\"" << #cond << "\" is false" << std::endl; \
  |  |   28|      0|    abort();                                                  \
  |  |   29|      0|  }
  ------------------
  102|  4.51k|  delete it;
  103|       |
  104|  4.51k|  CHECK_OK(db->Close());
  ------------------
  |  |   10|  4.51k|  do {                                             \
  |  |   11|  4.51k|    auto status = (expression);                    \
  |  |   12|  4.51k|    if (!status.ok()) {                            \
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   13|      0|      std::cerr << status.ToString() << std::endl; \
  |  |   14|      0|      abort();                                     \
  |  |   15|      0|    }                                              \
  |  |   16|  4.51k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (16:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  105|  4.51k|  delete db;
  106|  4.51k|  CHECK_OK(ROCKSDB_NAMESPACE::DestroyDB(kDbPath, options));
  ------------------
  |  |   10|  4.51k|  do {                                             \
  |  |   11|  4.51k|    auto status = (expression);                    \
  |  |   12|  4.51k|    if (!status.ok()) {                            \
  |  |  ------------------
  |  |  |  Branch (12:9): [True: 0, False: 4.51k]
  |  |  ------------------
  |  |   13|      0|      std::cerr << status.ToString() << std::endl; \
  |  |   14|      0|      abort();                                     \
  |  |   15|      0|    }                                              \
  |  |   16|  4.51k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (16:12): [Folded - Ignored]
  |  |  ------------------
  ------------------
  107|  4.51k|}
db_map_fuzzer.cc:_ZNK3$_0clEP12DBOperationsj:
   18|  4.51k|    [](DBOperations* input, unsigned int /* seed */) {
   19|  4.51k|      const ROCKSDB_NAMESPACE::Comparator* comparator =
   20|  4.51k|          ROCKSDB_NAMESPACE::BytewiseComparator();
  ------------------
  |  |   15|  4.51k|#define ROCKSDB_NAMESPACE rocksdb
  ------------------
   21|  4.51k|      auto ops = input->mutable_operations();
   22|       |      // Make sure begin <= end for DELETE_RANGE.
   23|  1.56M|      for (DBOperation& op : *ops) {
  ------------------
  |  Branch (23:28): [True: 1.56M, False: 4.51k]
  ------------------
   24|  1.56M|        if (op.type() == OpType::DELETE_RANGE) {
  ------------------
  |  Branch (24:13): [True: 515k, False: 1.04M]
  ------------------
   25|   515k|          auto begin = op.key();
   26|   515k|          auto end = op.value();
   27|   515k|          if (comparator->Compare(begin, end) > 0) {
  ------------------
  |  Branch (27:15): [True: 2.14k, False: 513k]
  ------------------
   28|  2.14k|            std::swap(begin, end);
   29|  2.14k|            op.set_key(begin);
   30|  2.14k|            op.set_value(end);
   31|  2.14k|          }
   32|   515k|        }
   33|  1.56M|      }
   34|  4.51k|    }};

_ZN11DBOperationC2EPN6google8protobuf5ArenaE:
  158|  1.56M|    : ::google::protobuf::Message(arena) {
  159|  1.56M|  SharedCtor(arena);
  160|       |  // @@protoc_insertion_point(arena_constructor:DBOperation)
  161|  1.56M|}
_ZN11DBOperationD2Ev:
  194|  1.56M|DBOperation::~DBOperation() {
  195|       |  // @@protoc_insertion_point(destructor:DBOperation)
  196|  1.56M|  _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  197|  1.56M|  SharedDtor();
  198|  1.56M|}
_ZNK11DBOperation12GetClassDataEv:
  207|  21.2M|DBOperation::GetClassData() const {
  208|  21.2M|  PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
  ------------------
  |  |  499|  21.2M|#  define PROTOBUF_CONSTINIT [[clang::require_constant_initialization]]
  ------------------
  209|  21.2M|      ClassDataFull _data_ = {
  210|  21.2M|          {
  211|  21.2M|              &_table_.header,
  212|  21.2M|              nullptr,  // OnDemandRegisterArenaDtor
  213|  21.2M|              DBOperation::IsInitializedImpl,
  214|  21.2M|              PROTOBUF_FIELD_OFFSET(DBOperation, _impl_._cached_size_),
  ------------------
  |  |  313|  21.2M|  _Pragma("clang diagnostic push")                           \
  |  |  314|  21.2M|  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  |  |  315|  21.2M|  __builtin_offsetof(TYPE, FIELD)                            \
  |  |  316|  21.2M|  _Pragma("clang diagnostic pop")
  ------------------
  215|  21.2M|              false,
  216|  21.2M|          },
  217|  21.2M|          &DBOperation::MergeImpl,
  218|  21.2M|          &DBOperation::kDescriptorMethods,
  219|  21.2M|          &descriptor_table_db_5foperation_2eproto,
  220|  21.2M|          nullptr,  // tracker
  221|  21.2M|      };
  222|  21.2M|  ::google::protobuf::internal::PrefetchToLocalCache(&_data_);
  223|  21.2M|  ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table);
  224|  21.2M|  return _data_.base();
  225|  21.2M|}
_ZN11DBOperation5ClearEv:
  277|  5.54k|PROTOBUF_NOINLINE void DBOperation::Clear() {
  278|       |// @@protoc_insertion_point(message_clear_start:DBOperation)
  279|  5.54k|  ::google::protobuf::internal::TSanWrite(&_impl_);
  280|  5.54k|  ::uint32_t cached_has_bits = 0;
  281|       |  // Prevent compiler warnings about cached_has_bits being unused
  282|  5.54k|  (void) cached_has_bits;
  283|       |
  284|  5.54k|  cached_has_bits = _impl_._has_bits_[0];
  285|  5.54k|  if (cached_has_bits & 0x00000003u) {
  ------------------
  |  Branch (285:7): [True: 5.12k, False: 415]
  ------------------
  286|  5.12k|    if (cached_has_bits & 0x00000001u) {
  ------------------
  |  Branch (286:9): [True: 4.80k, False: 318]
  ------------------
  287|  4.80k|      _impl_.key_.ClearNonDefaultToEmpty();
  288|  4.80k|    }
  289|  5.12k|    if (cached_has_bits & 0x00000002u) {
  ------------------
  |  Branch (289:9): [True: 2.40k, False: 2.71k]
  ------------------
  290|  2.40k|      _impl_.value_.ClearNonDefaultToEmpty();
  291|  2.40k|    }
  292|  5.12k|  }
  293|  5.54k|  _impl_.type_ = 0;
  294|  5.54k|  _impl_._has_bits_.Clear();
  295|  5.54k|  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  296|  5.54k|}
_ZN12DBOperationsC2EPN6google8protobuf5ArenaE:
  431|  4.61k|    : ::google::protobuf::Message(arena) {
  432|  4.61k|  SharedCtor(arena);
  433|       |  // @@protoc_insertion_point(arena_constructor:DBOperations)
  434|  4.61k|}
_ZN12DBOperationsD2Ev:
  462|  4.61k|DBOperations::~DBOperations() {
  463|       |  // @@protoc_insertion_point(destructor:DBOperations)
  464|  4.61k|  _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  465|  4.61k|  SharedDtor();
  466|  4.61k|}
_ZNK12DBOperations12GetClassDataEv:
  473|  4.73M|DBOperations::GetClassData() const {
  474|  4.73M|  PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite::
  ------------------
  |  |  499|  4.73M|#  define PROTOBUF_CONSTINIT [[clang::require_constant_initialization]]
  ------------------
  475|  4.73M|      ClassDataFull _data_ = {
  476|  4.73M|          {
  477|  4.73M|              &_table_.header,
  478|  4.73M|              nullptr,  // OnDemandRegisterArenaDtor
  479|  4.73M|              DBOperations::IsInitializedImpl,
  480|  4.73M|              PROTOBUF_FIELD_OFFSET(DBOperations, _impl_._cached_size_),
  ------------------
  |  |  313|  4.73M|  _Pragma("clang diagnostic push")                           \
  |  |  314|  4.73M|  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  |  |  315|  4.73M|  __builtin_offsetof(TYPE, FIELD)                            \
  |  |  316|  4.73M|  _Pragma("clang diagnostic pop")
  ------------------
  481|  4.73M|              false,
  482|  4.73M|          },
  483|  4.73M|          &DBOperations::MergeImpl,
  484|  4.73M|          &DBOperations::kDescriptorMethods,
  485|  4.73M|          &descriptor_table_db_5foperation_2eproto,
  486|  4.73M|          nullptr,  // tracker
  487|  4.73M|      };
  488|  4.73M|  ::google::protobuf::internal::PrefetchToLocalCache(&_data_);
  489|  4.73M|  ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table);
  490|  4.73M|  return _data_.base();
  491|  4.73M|}
_ZN12DBOperations5ClearEv:
  526|  9.31k|PROTOBUF_NOINLINE void DBOperations::Clear() {
  527|       |// @@protoc_insertion_point(message_clear_start:DBOperations)
  528|  9.31k|  ::google::protobuf::internal::TSanWrite(&_impl_);
  529|  9.31k|  ::uint32_t cached_has_bits = 0;
  530|       |  // Prevent compiler warnings about cached_has_bits being unused
  531|  9.31k|  (void) cached_has_bits;
  532|       |
  533|  9.31k|  _impl_.operations_.Clear();
  534|  9.31k|  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  535|  9.31k|}
_ZNK12DBOperations11GetMetadataEv:
  616|      2|::google::protobuf::Metadata DBOperations::GetMetadata() const {
  617|      2|  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
  618|      2|}
_ZN11DBOperation10SharedCtorEPN6google8protobuf5ArenaE:
  190|  1.56M|inline void DBOperation::SharedCtor(::_pb::Arena* arena) {
  191|  1.56M|  new (&_impl_) Impl_(internal_visibility(), arena);
  192|  1.56M|  _impl_.type_ = {};
  193|  1.56M|}
_ZN11DBOperation5Impl_C2EN6google8protobuf8internal18InternalVisibilityEPNS2_5ArenaE:
  188|  1.56M|        value_(arena) {}
_ZN11DBOperation10SharedDtorEv:
  199|  1.56M|inline void DBOperation::SharedDtor() {
  200|  1.56M|  ABSL_DCHECK(GetArena() == nullptr);
  ------------------
  |  |   47|  1.56M|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  1.56M|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  3.13M|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  1.56M|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  3.13M|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  3.13M|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|  1.56M|  _impl_.key_.Destroy();
  202|  1.56M|  _impl_.value_.Destroy();
  203|  1.56M|  _impl_.~Impl_();
  204|  1.56M|}
_ZN12DBOperations10SharedCtorEPN6google8protobuf5ArenaE:
  459|  4.61k|inline void DBOperations::SharedCtor(::_pb::Arena* arena) {
  460|  4.61k|  new (&_impl_) Impl_(internal_visibility(), arena);
  461|  4.61k|}
_ZN12DBOperations5Impl_C2EN6google8protobuf8internal18InternalVisibilityEPNS2_5ArenaE:
  457|  4.61k|        _cached_size_{0} {}
_ZN12DBOperations10SharedDtorEv:
  467|  4.61k|inline void DBOperations::SharedDtor() {
  468|  4.61k|  ABSL_DCHECK(GetArena() == nullptr);
  ------------------
  |  |   47|  4.61k|  ABSL_LOG_INTERNAL_DCHECK_IMPL((condition), #condition)
  |  |  ------------------
  |  |  |  |   43|  4.61k|  ABSL_LOG_INTERNAL_CHECK_IMPL(true || (condition), "true")
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  9.22k|  ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS,                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|  4.61k|  ABSL_LOG_INTERNAL_##type##_CONDITION(condition)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  9.22k|                                    ABSL_PREDICT_FALSE(!(condition))) \
  |  |  |  |  |  |   28|  9.22k|  ABSL_LOG_INTERNAL_CHECK(condition_text).InternalStream()
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   66|      0|  ::absl::log_internal::LogMessageFatal(__FILE__, __LINE__, failure_message)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  469|  4.61k|  _impl_.~Impl_();
  470|  4.61k|}

_ZN12DBOperationsC2Ev:
  320|  4.61k|  inline DBOperations() : DBOperations(nullptr) {}
_ZNK12DBOperations10operationsEv:
  724|  9.03k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  725|       |  // @@protoc_insertion_point(field_list:DBOperations.operations)
  726|  9.03k|  return _internal_operations();
  727|  9.03k|}
_ZNK12DBOperations20_internal_operationsEv:
  729|  9.03k|DBOperations::_internal_operations() const {
  730|  9.03k|  ::google::protobuf::internal::TSanRead(&_impl_);
  731|  9.03k|  return _impl_.operations_;
  732|  9.03k|}
_ZNK11DBOperation4typeEv:
  667|  3.12M|inline ::OpType DBOperation::type() const {
  668|       |  // @@protoc_insertion_point(field_get:DBOperation.type)
  669|  3.12M|  return _internal_type();
  670|  3.12M|}
_ZNK11DBOperation14_internal_typeEv:
  676|  3.12M|inline ::OpType DBOperation::_internal_type() const {
  677|  3.12M|  ::google::protobuf::internal::TSanRead(&_impl_);
  678|  3.12M|  return static_cast<::OpType>(_impl_.type_);
  679|  3.12M|}
_ZNK11DBOperation3keyEv:
  526|  3.23M|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  527|       |  // @@protoc_insertion_point(field_get:DBOperation.key)
  528|  3.23M|  return _internal_key();
  529|  3.23M|}
_ZNK11DBOperation13_internal_keyEv:
  543|  3.23M|inline const std::string& DBOperation::_internal_key() const {
  544|  3.23M|  ::google::protobuf::internal::TSanRead(&_impl_);
  545|  3.23M|  return _impl_.key_.Get();
  546|  3.23M|}
_ZNK11DBOperation5valueEv:
  597|  2.86M|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  598|       |  // @@protoc_insertion_point(field_get:DBOperation.value)
  599|  2.86M|  return _internal_value();
  600|  2.86M|}
_ZNK11DBOperation15_internal_valueEv:
  614|  2.86M|inline const std::string& DBOperation::_internal_value() const {
  615|  2.86M|  ::google::protobuf::internal::TSanRead(&_impl_);
  616|  2.86M|  return _impl_.value_.Get();
  617|  2.86M|}
_ZN12DBOperations18mutable_operationsEv:
  707|  4.51k|    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  708|       |  // @@protoc_insertion_point(field_mutable_list:DBOperations.operations)
  709|  4.51k|  ::google::protobuf::internal::TSanWrite(&_impl_);
  710|  4.51k|  return _internal_mutable_operations();
  711|  4.51k|}
_ZN12DBOperations28_internal_mutable_operationsEv:
  734|  4.51k|DBOperations::_internal_mutable_operations() {
  735|  4.51k|  ::google::protobuf::internal::TSanRead(&_impl_);
  736|  4.51k|  return &_impl_.operations_;
  737|  4.51k|}
_ZN11DBOperation7set_keyIRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEJEEEvOT_DpT0_:
  532|  2.14k|                                                     Args_... args) {
  533|  2.14k|  ::google::protobuf::internal::TSanWrite(&_impl_);
  534|  2.14k|  _impl_._has_bits_[0] |= 0x00000001u;
  535|  2.14k|  _impl_.key_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  536|       |  // @@protoc_insertion_point(field_set:DBOperation.key)
  537|  2.14k|}
_ZN11DBOperation9set_valueIRNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEJEEEvOT_DpT0_:
  603|  2.14k|                                                     Args_... args) {
  604|  2.14k|  ::google::protobuf::internal::TSanWrite(&_impl_);
  605|  2.14k|  _impl_._has_bits_[0] |= 0x00000002u;
  606|  2.14k|  _impl_.value_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
  607|       |  // @@protoc_insertion_point(field_set:DBOperation.value)
  608|  2.14k|}
_ZN12DBOperations10descriptorEv:
  356|      2|  static const ::google::protobuf::Descriptor* descriptor() {
  357|      2|    return GetDescriptor();
  358|      2|  }
_ZN12DBOperations13GetDescriptorEv:
  359|      2|  static const ::google::protobuf::Descriptor* GetDescriptor() {
  360|      2|    return default_instance().GetMetadata().descriptor;
  361|      2|  }
_ZN12DBOperations16default_instanceEv:
  365|      2|  static const DBOperations& default_instance() {
  366|      2|    return *internal_default_instance();
  367|      2|  }
_ZN12DBOperations25internal_default_instanceEv:
  368|      2|  static inline const DBOperations* internal_default_instance() {
  369|      2|    return reinterpret_cast<const DBOperations*>(
  370|      2|        &_DBOperations_default_instance_);
  371|      2|  }
_ZNK11DBOperation3NewEPN6google8protobuf5ArenaE:
  178|  1.56M|  DBOperation* New(::google::protobuf::Arena* arena = nullptr) const final {
  179|  1.56M|    return ::google::protobuf::Message::DefaultConstruct<DBOperation>(arena);
  180|  1.56M|  }

_ZN7rocksdb5Cache15CacheItemHelperC2Ev:
  151|      2|    CacheItemHelper() : CacheItemHelper(CacheEntryRole::kMisc) {}
_ZN7rocksdb5Cache15CacheItemHelperC2ENS_14CacheEntryRoleEPFvPvPNS_15MemoryAllocatorEE:
  155|     18|        : CacheItemHelper(_role, _del_cb, nullptr, nullptr, nullptr, this) {}
_ZN7rocksdb5Cache15CacheItemHelperC2ENS_14CacheEntryRoleEPFvPvPNS_15MemoryAllocatorEEPFmS3_EPFNS_6StatusES3_mmPcEPFSA_RKNS_5SliceENS_15CompressionTypeENS_9CacheTierEPNS0_13CreateContextES5_PS3_PmEPKS1_:
  167|     32|          without_secondary_compat(_without_secondary_compat) {
  168|       |      // Either all three secondary cache callbacks are non-nullptr or
  169|       |      // all three are nullptr
  170|     32|      assert((size_cb != nullptr) == (saveto_cb != nullptr));
  171|     32|      assert((size_cb != nullptr) == (create_cb != nullptr));
  172|       |      // without_secondary_compat points to equivalent but without
  173|       |      // secondary support
  174|     32|      assert(role == without_secondary_compat->role);
  175|     32|      assert(del_cb == without_secondary_compat->del_cb);
  176|     32|      assert(!without_secondary_compat->IsSecondaryCacheCompatible());
  177|     32|    }
_ZN7rocksdb5CacheD2Ev:
  191|   103k|  virtual ~Cache() {}
_ZNK7rocksdb5Cache14ReportProblemsERKNSt3__110shared_ptrINS_6LoggerEEE:
  425|     46|      const std::shared_ptr<Logger>& /*info_log*/) const {}
_ZN7rocksdb5CacheC2ENSt3__110shared_ptrINS_15MemoryAllocatorEEE:
  185|   103k|      : memory_allocator_(std::move(allocator)) {}
_ZN7rocksdb5Cache11BasicLookupERKNS_5SliceEPNS_10StatisticsE:
  296|  26.9k|  inline Handle* BasicLookup(const Slice& key, Statistics* stats) {
  297|  26.9k|    return Lookup(key, nullptr, nullptr, Priority::LOW, stats);
  298|  26.9k|  }
_ZNK7rocksdb5Cache16memory_allocatorEv:
  427|   145k|  MemoryAllocator* memory_allocator() const { return memory_allocator_.get(); }

_ZN7rocksdb21CompactionOptionsFIFOC2Ev:
  124|   139k|  CompactionOptionsFIFO() : max_table_files_size(1 * 1024 * 1024 * 1024) {}

_ZN7rocksdb19ShardedCacheOptionsC2Ev:
  192|   103k|  ShardedCacheOptions() {}
_ZN7rocksdb15LRUCacheOptionsC2Ev:
  246|   103k|  LRUCacheOptions() {}
_ZN7rocksdb11NewLRUCacheERKNS_15LRUCacheOptionsE:
  286|   103k|inline std::shared_ptr<Cache> NewLRUCache(const LRUCacheOptions& cache_opts) {
  287|   103k|  return cache_opts.MakeSharedCache();
  288|   103k|}
_ZN7rocksdb19ShardedCacheOptionsD2Ev:
  204|   207k|  virtual ~ShardedCacheOptions() = default;

_ZN7rocksdb9Cleanable5ResetEv:
   44|   899k|  inline void Reset() {
   45|   899k|    DoCleanup();
   46|   899k|    cleanup_.function = nullptr;
   47|   899k|    cleanup_.next = nullptr;
   48|   899k|  }
_ZN7rocksdb9Cleanable9DoCleanupEv:
   67|  1.01M|  inline void DoCleanup() {
   68|  1.01M|    if (cleanup_.function != nullptr) {
  ------------------
  |  Branch (68:9): [True: 20.7k, False: 993k]
  ------------------
   69|  20.7k|      (*cleanup_.function)(cleanup_.arg1, cleanup_.arg2);
   70|  20.7k|      for (Cleanup* c = cleanup_.next; c != nullptr;) {
  ------------------
  |  Branch (70:40): [True: 0, False: 20.7k]
  ------------------
   71|      0|        (*c->function)(c->arg1, c->arg2);
   72|      0|        Cleanup* next = c->next;
   73|      0|        delete c;
   74|      0|        c = next;
   75|      0|      }
   76|  20.7k|    }
   77|  1.01M|  }

_ZN7rocksdb16CompactionFilter4TypeEv:
  181|      1|  static const char* Type() { return "CompactionFilter"; }

_ZN7rocksdb16CompareInterfaceD2Ev:
   24|   145k|  virtual ~CompareInterface() {}
_ZN7rocksdb10ComparatorC2Ev:
   46|      1|  Comparator() : timestamp_size_(0) {}
_ZN7rocksdb10Comparator4TypeEv:
   64|      4|  static const char* Type() { return "Comparator"; }
_ZNK7rocksdb10Comparator14timestamp_sizeEv:
  121|  3.37M|  inline size_t timestamp_size() const { return timestamp_size_; }
_ZNK7rocksdb10Comparator23CompareWithoutTimestampERKNS_5SliceES3_:
  150|  77.7M|  int CompareWithoutTimestamp(const Slice& a, const Slice& b) const {
  151|  77.7M|    return CompareWithoutTimestamp(a, /*a_has_ts=*/true, b, /*b_has_ts=*/true);
  152|  77.7M|  }

_ZN7rocksdb12ConfigurableD2Ev:
   57|   428k|  virtual ~Configurable() {}
_ZNK7rocksdb12Configurable8ToStringERKNS_13ConfigOptionsE:
  175|  90.2k|  std::string ToString(const ConfigOptions& config_options) const {
  176|  90.2k|    return ToString(config_options, "");
  177|  90.2k|  }
_ZN7rocksdb12Configurable10GetOptionsINS_5CacheEEEPT_RKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
   81|  9.07k|  T* GetOptions(const std::string& name) {
   82|  9.07k|    return reinterpret_cast<T*>(const_cast<void*>(GetOptionsPtr(name)));
   83|  9.07k|  }
_ZN7rocksdb12Configurable15RegisterOptionsINS_16MutableCFOptionsEEEvPT_PKNSt3__113unordered_mapINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENS_14OptionTypeInfoENS5_4hashISC_EENS5_8equal_toISC_EENSA_INS5_4pairIKSC_SD_EEEEEE:
  374|  45.1k|      const std::unordered_map<std::string, OptionTypeInfo>* opt_map) {
  375|  45.1k|    RegisterOptions(T::kName(), opt_ptr, opt_map);
  376|  45.1k|  }
_ZN7rocksdb12Configurable15RegisterOptionsINS_18ImmutableCFOptionsEEEvPT_PKNSt3__113unordered_mapINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENS_14OptionTypeInfoENS5_4hashISC_EENS5_8equal_toISC_EENSA_INS5_4pairIKSC_SD_EEEEEE:
  374|  45.1k|      const std::unordered_map<std::string, OptionTypeInfo>* opt_map) {
  375|  45.1k|    RegisterOptions(T::kName(), opt_ptr, opt_map);
  376|  45.1k|  }
_ZN7rocksdb12Configurable10GetOptionsINS_22BlockBasedTableOptionsEEEPT_v:
   73|  45.1k|  T* GetOptions() {
   74|  45.1k|    return GetOptions<T>(T::kName());
   75|  45.1k|  }
_ZN7rocksdb12Configurable10GetOptionsINS_22BlockBasedTableOptionsEEEPT_RKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
   81|  45.1k|  T* GetOptions(const std::string& name) {
   82|  45.1k|    return reinterpret_cast<T*>(const_cast<void*>(GetOptionsPtr(name)));
   83|  45.1k|  }
_ZN7rocksdb12Configurable15RegisterOptionsINS_16MutableDBOptionsEEEvPT_PKNSt3__113unordered_mapINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENS_14OptionTypeInfoENS5_4hashISC_EENS5_8equal_toISC_EENSA_INS5_4pairIKSC_SD_EEEEEE:
  374|  45.1k|      const std::unordered_map<std::string, OptionTypeInfo>* opt_map) {
  375|  45.1k|    RegisterOptions(T::kName(), opt_ptr, opt_map);
  376|  45.1k|  }
_ZN7rocksdb12Configurable15RegisterOptionsINS_18ImmutableDBOptionsEEEvPT_PKNSt3__113unordered_mapINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENS_14OptionTypeInfoENS5_4hashISC_EENS5_8equal_toISC_EENSA_INS5_4pairIKSC_SD_EEEEEE:
  374|  45.1k|      const std::unordered_map<std::string, OptionTypeInfo>* opt_map) {
  375|  45.1k|    RegisterOptions(T::kName(), opt_ptr, opt_map);
  376|  45.1k|  }
_ZN7rocksdb12Configurable10GetOptionsINS_19ColumnFamilyOptionsEEEPT_RKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
   81|  9.02k|  T* GetOptions(const std::string& name) {
   82|  9.02k|    return reinterpret_cast<T*>(const_cast<void*>(GetOptionsPtr(name)));
   83|  9.02k|  }
_ZN7rocksdb12Configurable10GetOptionsINS_9DBOptionsEEEPT_RKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEE:
   81|  9.02k|  T* GetOptions(const std::string& name) {
   82|  9.02k|    return reinterpret_cast<T*>(const_cast<void*>(GetOptionsPtr(name)));
   83|  9.02k|  }
_ZN7rocksdb12Configurable15RegisterOptionsINS_22BlockBasedTableOptionsEEEvPT_PKNSt3__113unordered_mapINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENS_14OptionTypeInfoENS5_4hashISC_EENS5_8equal_toISC_EENSA_INS5_4pairIKSC_SD_EEEEEE:
  374|  94.7k|      const std::unordered_map<std::string, OptionTypeInfo>* opt_map) {
  375|  94.7k|    RegisterOptions(T::kName(), opt_ptr, opt_map);
  376|  94.7k|  }

_ZNK7rocksdb13ConfigOptions9IsShallowEv:
   96|  90.2k|  bool IsShallow() const { return depth == Depth::kDepthShallow; }
_ZNK7rocksdb13ConfigOptions10IsDetailedEv:
   97|  18.0k|  bool IsDetailed() const { return depth == Depth::kDepthDetailed; }
_ZNK7rocksdb13ConfigOptions15IsCheckDisabledEv:
   99|  36.1k|  bool IsCheckDisabled() const {
  100|  36.1k|    return sanity_level == SanityLevel::kSanityLevelNone;
  101|  36.1k|  }
_ZNK7rocksdb13ConfigOptions14IsCheckEnabledENS0_11SanityLevelE:
  103|  4.17M|  bool IsCheckEnabled(SanityLevel level) const {
  104|  4.17M|    return (level > SanityLevel::kSanityLevelNone && level <= sanity_level);
  ------------------
  |  Branch (104:13): [True: 3.65M, False: 514k]
  |  Branch (104:54): [True: 3.65M, False: 0]
  ------------------
  105|  4.17M|  }

_ZNK7rocksdb12Customizable5GetIdEv:
   66|   153k|  virtual std::string GetId() const {
   67|   153k|    std::string id = Name();
   68|   153k|    return id;
   69|   153k|  }
_ZNK7rocksdb12Customizable12IsInstanceOfERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   89|  76.7k|  virtual bool IsInstanceOf(const std::string& name) const {
   90|  76.7k|    if (name.empty()) {
  ------------------
  |  Branch (90:9): [True: 0, False: 76.7k]
  ------------------
   91|      0|      return false;
   92|  76.7k|    } else if (name == Name()) {
  ------------------
  |  Branch (92:16): [True: 76.7k, False: 0]
  ------------------
   93|  76.7k|      return true;
   94|  76.7k|    } else {
   95|      0|      const char* nickname = NickName();
   96|      0|      if (nickname != nullptr && name == nickname) {
  ------------------
  |  Branch (96:11): [True: 0, False: 0]
  |  Branch (96:34): [True: 0, False: 0]
  ------------------
   97|      0|        return true;
   98|      0|      } else {
   99|      0|        return false;
  100|      0|      }
  101|      0|    }
  102|  76.7k|  }
_ZNK7rocksdb12Customizable13GetOptionsPtrERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  104|  81.2k|  const void* GetOptionsPtr(const std::string& name) const override {
  105|  81.2k|    const void* ptr = Configurable::GetOptionsPtr(name);
  106|  81.2k|    if (ptr != nullptr) {
  ------------------
  |  Branch (106:9): [True: 81.2k, False: 0]
  ------------------
  107|  81.2k|      return ptr;
  108|  81.2k|    } else {
  109|      0|      const auto inner = Inner();
  110|      0|      if (inner != nullptr) {
  ------------------
  |  Branch (110:11): [True: 0, False: 0]
  ------------------
  111|      0|        return inner->GetOptionsPtr(name);
  112|      0|      } else {
  113|      0|        return nullptr;
  114|      0|      }
  115|      0|    }
  116|  81.2k|  }

_ZNK7rocksdb12SmallEnumSetINS_8FileTypeELS1_10EE8ContainsES1_:
   60|  49.6k|  bool Contains(const ENUM_TYPE e) const {
   61|  49.6k|    int value = static_cast<int>(e);
   62|  49.6k|    assert(value >= 0 && value <= kMaxValue);
   63|  49.6k|    StateT tmp = 1;
   64|  49.6k|    return state_ & (tmp << value);
   65|  49.6k|  }
_ZN7rocksdb12SmallEnumSetINS_8FileTypeELS1_10EEC2Ev:
   37|   212k|  SmallEnumSet() : state_(0) {}

_ZN7rocksdb22ColumnFamilyDescriptorC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_19ColumnFamilyOptionsE:
   77|  9.02k|      : name(_name), options(_options) {}
_ZN7rocksdb18ColumnFamilyHandleD2Ev:
   82|  27.0k|  virtual ~ColumnFamilyHandle() {}
_ZN7rocksdb2DBC2Ev:
  396|  9.02k|  DB() {}
_ZN7rocksdb2DB3PutERKNS_12WriteOptionsERKNS_5SliceES6_:
  462|   660k|                     const Slice& value) {
  463|   660k|    return Put(options, DefaultColumnFamily(), key, value);
  464|   660k|  }
_ZN7rocksdb2DB6DeleteERKNS_12WriteOptionsERKNS_5SliceE:
  493|   186k|  virtual Status Delete(const WriteOptions& options, const Slice& key) {
  494|   186k|    return Delete(options, DefaultColumnFamily(), key);
  495|   186k|  }
_ZN7rocksdb2DB11NewIteratorERKNS_11ReadOptionsE:
  999|  4.51k|  virtual Iterator* NewIterator(const ReadOptions& options) {
 1000|  4.51k|    return NewIterator(options, DefaultColumnFamily());
 1001|  4.51k|  }

_ZNK7rocksdb3Env22GetThreadStatusUpdaterEv:
  650|      2|  virtual ThreadStatusUpdater* GetThreadStatusUpdater() const {
  651|      2|    return thread_status_updater_;
  652|      2|  }
_ZNK7rocksdb3Env18SanitizeEnvOptionsEPNS_10EnvOptionsE:
  671|  94.7k|  virtual void SanitizeEnvOptions(EnvOptions* /*env_opts*/) const {}
_ZN7rocksdb6LoggerC2ENS_12InfoLogLevelE:
 1222|  13.5k|      : closed_(false), log_level_(log_level) {}
_ZN7rocksdb6Logger9LogHeaderEPKcP13__va_list_tag:
 1239|  1.84M|  virtual void LogHeader(const char* format, va_list ap) {
 1240|       |    // Default implementation does a simple INFO level log write.
 1241|       |    // Please override as per the logger class requirement.
 1242|  1.84M|    Logv(InfoLogLevel::INFO_LEVEL, format, ap);
 1243|  1.84M|  }
_ZNK7rocksdb6Logger15GetInfoLogLevelEv:
 1264|  1.91M|  virtual InfoLogLevel GetInfoLogLevel() const { return log_level_; }
_ZN7rocksdb6Logger15SetInfoLogLevelENS_12InfoLogLevelE:
 1265|  13.5k|  virtual void SetInfoLogLevel(const InfoLogLevel log_level) {
 1266|  13.5k|    log_level_ = log_level;
 1267|  13.5k|  }
_ZN7rocksdb8FileLockC2Ev:
 1284|  13.5k|  FileLock() {}

_ZN7rocksdb22FileChecksumGenFactory4TypeEv:
   78|      1|  static const char* Type() { return "FileChecksumGenFactory"; }

_ZN7rocksdb9IOOptionsC2Ev:
  145|  5.75M|  IOOptions() : IOOptions(false) {}
_ZN7rocksdb9IOOptionsC2Eb:
  154|  5.75M|        verify_and_reconstruct_read(false) {}
_ZN7rocksdb11FileOptionsC2Ev:
  195|  58.6k|  FileOptions() : EnvOptions(), handoff_checksum_type(ChecksumType::kCRC32c) {}
_ZN7rocksdb11FileOptionsC2ERKNS_9DBOptionsE:
  198|  9.02k|      : EnvOptions(opts), handoff_checksum_type(ChecksumType::kCRC32c) {}
_ZN7rocksdb11FileOptionsC2ERKNS_10EnvOptionsE:
  201|   112k|      : EnvOptions(opts), handoff_checksum_type(ChecksumType::kCRC32c) {}
_ZN7rocksdb11FileOptionsC2ERKS0_:
  207|   126k|        handoff_checksum_type(opts.handoff_checksum_type) {}
_ZN7rocksdb14IODebugContextC2Ev:
  241|   225k|  IODebugContext() {}
_ZN7rocksdb10FileSystem4TypeEv:
  299|      2|  static const char* Type() { return "FileSystem"; }
_ZN7rocksdb16FSSequentialFileC2Ev:
  739|  72.2k|  FSSequentialFile() {}
_ZN7rocksdb16FSSequentialFileD2Ev:
  741|  72.2k|  virtual ~FSSequentialFile() {}
_ZN7rocksdb18FSRandomAccessFileC2Ev:
  876|  17.9k|  FSRandomAccessFile() {}
_ZN7rocksdb18FSRandomAccessFileD2Ev:
  878|  17.9k|  virtual ~FSRandomAccessFile() {}
_ZN7rocksdb14FSWritableFileC2Ev:
 1035|  49.6k|        strict_bytes_per_sync_(false) {}
_ZN7rocksdb14FSWritableFileC2ERKNS_11FileOptionsE:
 1042|  72.1k|        strict_bytes_per_sync_(options.strict_bytes_per_sync) {}
_ZN7rocksdb14FSWritableFileD2Ev:
 1047|   121k|  virtual ~FSWritableFile() {}
_ZN7rocksdb14FSWritableFile13SetIOPriorityENS_3Env10IOPriorityE:
 1170|  4.48k|  virtual void SetIOPriority(Env::IOPriority pri) { io_priority_ = pri; }
_ZN7rocksdb14FSWritableFile13GetIOPriorityEv:
 1172|  6.58M|  virtual Env::IOPriority GetIOPriority() { return io_priority_; }
_ZN7rocksdb14FSWritableFile25SetPreallocationBlockSizeEm:
 1187|  22.5k|  virtual void SetPreallocationBlockSize(size_t size) {
 1188|  22.5k|    preallocation_block_size_ = size;
 1189|  22.5k|  }
_ZN7rocksdb14FSWritableFile22GetPreallocationStatusEPmS1_:
 1192|  72.1k|                                      size_t* last_allocated_block) {
 1193|  72.1k|    *last_allocated_block = last_preallocated_block_;
 1194|  72.1k|    *block_size = preallocation_block_size_;
 1195|  72.1k|  }
_ZN7rocksdb14FSWritableFile12PrepareWriteEmmRKNS_9IOOptionsEPNS_14IODebugContextE:
 1230|  4.93M|                            IODebugContext* dbg) {
 1231|  4.93M|    if (preallocation_block_size_ == 0) {
  ------------------
  |  Branch (1231:9): [True: 2.09M, False: 2.84M]
  ------------------
 1232|  2.09M|      return;
 1233|  2.09M|    }
 1234|       |    // If this write would cross one or more preallocation blocks,
 1235|       |    // determine what the last preallocation block necessary to
 1236|       |    // cover this write would be and Allocate to that point.
 1237|  2.84M|    const auto block_size = preallocation_block_size_;
 1238|  2.84M|    size_t new_last_preallocated_block =
 1239|  2.84M|        (offset + len + block_size - 1) / block_size;
 1240|  2.84M|    if (new_last_preallocated_block > last_preallocated_block_) {
  ------------------
  |  Branch (1240:9): [True: 18.0k, False: 2.82M]
  ------------------
 1241|  18.0k|      size_t num_spanned_blocks =
 1242|  18.0k|          new_last_preallocated_block - last_preallocated_block_;
 1243|  18.0k|      Allocate(block_size * last_preallocated_block_,
 1244|  18.0k|               block_size * num_spanned_blocks, options, dbg)
 1245|  18.0k|          .PermitUncheckedError();
 1246|  18.0k|      last_preallocated_block_ = new_last_preallocated_block;
 1247|  18.0k|    }
 1248|  2.84M|  }
_ZN7rocksdb11FSDirectoryD2Ev:
 1370|  31.5k|  virtual ~FSDirectory() {}
_ZN7rocksdb17FileSystemWrapperD2Ev:
 1433|  27.0k|  ~FileSystemWrapper() override {}
_ZN7rocksdb23FSSequentialFileWrapperC2EPNS_16FSSequentialFileE:
 1653|  22.5k|  explicit FSSequentialFileWrapper(FSSequentialFile* t) : target_(t) {}
_ZNK7rocksdb23FSSequentialFileWrapper6targetEv:
 1655|  66.1k|  FSSequentialFile* target() const { return target_; }
_ZN7rocksdb28FSSequentialFileOwnerWrapperC2EONSt3__110unique_ptrINS_16FSSequentialFileENS1_14default_deleteIS3_EEEE:
 1687|  22.5k|      : FSSequentialFileWrapper(t.get()), guard_(std::move(t)) {}
_ZN7rocksdb25FSRandomAccessFileWrapperC2EPNS_18FSRandomAccessFileE:
 1697|  4.48k|  explicit FSRandomAccessFileWrapper(FSRandomAccessFile* t) : target_(t) {}
_ZNK7rocksdb25FSRandomAccessFileWrapper6targetEv:
 1699|   129k|  FSRandomAccessFile* target() const { return target_; }
_ZN7rocksdb30FSRandomAccessFileOwnerWrapperC2EONSt3__110unique_ptrINS_18FSRandomAccessFileENS1_14default_deleteIS3_EEEE:
 1746|  4.48k|      : FSRandomAccessFileWrapper(t.get()), guard_(std::move(t)) {}
_ZN7rocksdb21FSWritableFileWrapperC2EPNS_14FSWritableFileE:
 1756|  49.6k|  explicit FSWritableFileWrapper(FSWritableFile* t) : target_(t) {}
_ZNK7rocksdb21FSWritableFileWrapper6targetEv:
 1758|  35.8M|  FSWritableFile* target() const { return target_; }
_ZN7rocksdb26FSWritableFileOwnerWrapperC2EONSt3__110unique_ptrINS_14FSWritableFileENS1_14default_deleteIS3_EEEE:
 1858|  49.6k|      : FSWritableFileWrapper(t.get()), guard_(std::move(t)) {}

_ZN7rocksdb16FlushBlockPolicyD2Ev:
   32|  4.48k|  virtual ~FlushBlockPolicy() {}
_ZN7rocksdb23FlushBlockPolicyFactory4TypeEv:
   37|  18.0k|  static const char* Type() { return "FlushBlockPolicyFactory"; }
_ZN7rocksdb29FlushBlockBySizePolicyFactory10kClassNameEv:
   63|  90.2k|  static const char* kClassName() { return "FlushBlockBySizePolicyFactory"; }
_ZNK7rocksdb29FlushBlockBySizePolicyFactory4NameEv:
   64|  90.2k|  const char* Name() const override { return kClassName(); }

_ZN7rocksdb8IOStatusC2Ev:
   41|  22.1M|  IOStatus() : IOStatus(kOk, kNone) {}
_ZN7rocksdb8IOStatus2OKEv:
   63|  8.00M|  static IOStatus OK() { return IOStatus(); }
_ZN7rocksdb8IOStatus8NotFoundENS_6Status7SubCodeE:
   77|  22.5k|  static IOStatus NotFound(SubCode msg = kNone) {
   78|  22.5k|    return IOStatus(kNotFound, msg);
   79|  22.5k|  }
_ZN7rocksdb8IOStatusC2ENS_6Status4CodeENS1_7SubCodeE:
  145|  22.2M|      : Status(_code, _subcode, false, false, kIOErrorScopeFileSystem) {}
_ZN7rocksdb8IOStatusaSERKS0_:
  180|  13.5k|inline IOStatus& IOStatus::operator=(const IOStatus& s) {
  181|       |  // The following condition catches both aliasing (when this == &s),
  182|       |  // and the common case where both s and *this are ok.
  183|  13.5k|  if (this != &s) {
  ------------------
  |  Branch (183:7): [True: 13.5k, False: 0]
  ------------------
  184|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
  185|       |    s.checked_ = true;
  186|       |    checked_ = false;
  187|       |#endif  // ROCKSDB_ASSERT_STATUS_CHECKED
  188|  13.5k|    code_ = s.code_;
  189|  13.5k|    subcode_ = s.subcode_;
  190|  13.5k|    retryable_ = s.retryable_;
  191|  13.5k|    data_loss_ = s.data_loss_;
  192|  13.5k|    scope_ = s.scope_;
  193|  13.5k|    state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_.get());
  ------------------
  |  Branch (193:14): [True: 13.5k, False: 0]
  ------------------
  194|  13.5k|  }
  195|  13.5k|  return *this;
  196|  13.5k|}
_ZN7rocksdb8IOStatusaSEOS0_:
  202|  17.7M|inline IOStatus& IOStatus::operator=(IOStatus&& s) noexcept {
  203|  17.7M|  if (this != &s) {
  ------------------
  |  Branch (203:7): [True: 17.7M, False: 0]
  ------------------
  204|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
  205|       |    s.checked_ = true;
  206|       |    checked_ = false;
  207|       |#endif  // ROCKSDB_ASSERT_STATUS_CHECKED
  208|  17.7M|    code_ = std::move(s.code_);
  209|  17.7M|    s.code_ = kOk;
  210|  17.7M|    subcode_ = std::move(s.subcode_);
  211|  17.7M|    s.subcode_ = kNone;
  212|  17.7M|    retryable_ = s.retryable_;
  213|  17.7M|    data_loss_ = s.data_loss_;
  214|  17.7M|    scope_ = s.scope_;
  215|  17.7M|    s.scope_ = kIOErrorScopeFileSystem;
  216|  17.7M|    state_ = std::move(s.state_);
  217|  17.7M|  }
  218|  17.7M|  return *this;
  219|  17.7M|}
_ZN7rocksdb19status_to_io_statusEONS_6StatusE:
  237|  1.40M|inline IOStatus status_to_io_status(Status&& status) {
  238|  1.40M|  IOStatus io_s;
  239|  1.40M|  Status& s = io_s;
  240|  1.40M|  s = std::move(status);
  241|  1.40M|  return io_s;
  242|  1.40M|}
_ZN7rocksdb8IOStatusC2ERKS0_:
  171|  25.2k|inline IOStatus::IOStatus(const IOStatus& s) : Status(s.code_, s.subcode_) {
  172|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
  173|       |  s.checked_ = true;
  174|       |#endif  // ROCKSDB_ASSERT_STATUS_CHECKED
  175|  25.2k|  retryable_ = s.retryable_;
  176|  25.2k|  data_loss_ = s.data_loss_;
  177|  25.2k|  scope_ = s.scope_;
  178|  25.2k|  state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_.get());
  ------------------
  |  Branch (178:12): [True: 25.2k, False: 0]
  ------------------
  179|  25.2k|}

_ZN7rocksdb8IteratorC2Ev:
   30|  9.02k|  Iterator() {}

_ZN7rocksdb12IteratorBaseC2Ev:
   16|  9.02k|  IteratorBase() {}
_ZN7rocksdb12IteratorBaseD2Ev:
   21|  9.02k|  virtual ~IteratorBase() {}

_ZNK7rocksdb11MemTableRep13KeyComparator10decode_keyEPKc:
   69|  2.53M|    virtual DecodedType decode_key(const char* key) const {
   70|       |      // The format of key is frozen and can be treated as a part of the API
   71|       |      // contract. Refer to MemTable::Add for details.
   72|  2.53M|      return GetLengthPrefixedSlice(key);
   73|  2.53M|    }
_ZN7rocksdb11MemTableRep13KeyComparatorD2Ev:
   83|  25.4k|    virtual ~KeyComparator() {}
_ZN7rocksdb11MemTableRepC2EPNS_9AllocatorE:
   86|  27.0k|  explicit MemTableRep(Allocator* allocator) : allocator_(allocator) {}
_ZN7rocksdb11MemTableRepD2Ev:
  217|  27.0k|  virtual ~MemTableRep() {}
_ZN7rocksdb11MemTableRep8IteratorD2Ev:
  225|  11.9k|    virtual ~Iterator() {}
_ZNK7rocksdb11MemTableRep19IsSnapshotSupportedEv:
  283|  9.02k|  virtual bool IsSnapshotSupported() const { return true; }
_ZN7rocksdb18MemTableRepFactory4TypeEv:
  299|  9.03k|  static const char* Type() { return "MemTableRepFactory"; }
_ZN7rocksdb18MemTableRepFactory17CreateMemTableRepERKNS_11MemTableRep13KeyComparatorEPNS_9AllocatorEPKNS_14SliceTransformEPNS_6LoggerEj:
  313|  27.0k|      uint32_t /* column_family_id */) {
  314|  27.0k|    return CreateMemTableRep(key_cmp, allocator, slice_transform, logger);
  315|  27.0k|  }
_ZN7rocksdb15SkipListFactory10kClassNameEv:
  342|  67.7k|  static const char* kClassName() { return "SkipListFactory"; }
_ZN7rocksdb15SkipListFactory9kNickNameEv:
  343|      1|  static const char* kNickName() { return "skip_list"; }
_ZNK7rocksdb15SkipListFactory4NameEv:
  344|  67.7k|  const char* Name() const override { return kClassName(); }
_ZNK7rocksdb15SkipListFactory29IsInsertConcurrentlySupportedEv:
  354|  9.02k|  bool IsInsertConcurrentlySupported() const override { return true; }
_ZN7rocksdb16VectorRepFactory10kClassNameEv:
  377|      1|  static const char* kClassName() { return "VectorRepFactory"; }
_ZN7rocksdb16VectorRepFactory9kNickNameEv:
  378|      1|  static const char* kNickName() { return "vector"; }

_ZN7rocksdb13MergeOperator4TypeEv:
   56|      8|  static const char* Type() { return "MergeOperator"; }

_ZN7rocksdb15SstFileMetaDataC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmS9_mmmS9_S9_mbNS_11TemperatureEmmmmRS7_SB_:
   98|  4.48k|        epoch_number(_epoch_number) {
   99|  4.48k|    if (!_file_name.empty()) {
  ------------------
  |  Branch (99:9): [True: 4.48k, False: 0]
  ------------------
  100|  4.48k|      if (_file_name[0] == '/') {
  ------------------
  |  Branch (100:11): [True: 4.48k, False: 0]
  ------------------
  101|  4.48k|        relative_filename = _file_name.substr(1);
  102|  4.48k|        name = _file_name;  // Deprecated field
  103|  4.48k|      } else {
  104|      0|        relative_filename = _file_name;
  105|      0|        name = std::string("/") + _file_name;  // Deprecated field
  106|      0|      }
  107|  4.48k|      assert(relative_filename.size() + 1 == name.size());
  108|  4.48k|      assert(relative_filename[0] != '/');
  109|  4.48k|      assert(name[0] == '/');
  110|  4.48k|    }
  111|  4.48k|    directory = _directory;
  112|  4.48k|    db_path = _directory;  // Deprecated field
  113|  4.48k|    file_number = _file_number;
  114|  4.48k|    file_type = kTableFile;
  115|  4.48k|    size = _size;
  116|  4.48k|    temperature = _temperature;
  117|  4.48k|    file_checksum = _file_checksum;
  118|  4.48k|    file_checksum_func_name = _file_checksum_func_name;
  119|  4.48k|  }
_ZN7rocksdb13LevelMetaDataC2EimOKNSt3__16vectorINS_15SstFileMetaDataENS1_9allocatorIS3_EEEE:
  216|  63.1k|      : level(_level), size(_size), files(_files) {}
_ZN7rocksdb20ColumnFamilyMetaDataC2Ev:
  229|  9.02k|  ColumnFamilyMetaData() : size(0), file_count(0), name("") {}

_ZN7rocksdb7OptionsC2Ev:
 1575|  49.6k|  Options() : DBOptions(), ColumnFamilyOptions() {}
_ZN7rocksdb12WriteOptionsC2Ev:
 1966|  2.75M|  WriteOptions() {}
_ZN7rocksdb11ReadOptionsC2Ev:
 1877|  17.9k|  ReadOptions() {}
_ZN7rocksdb6DbPathC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEm:
  447|  13.5k|  DbPath(const std::string& p, uint64_t t) : path(p), target_size(t) {}
_ZN7rocksdb7OptionsC2ERKNS_9DBOptionsERKNS_19ColumnFamilyOptionsE:
 1579|  4.51k|      : DBOptions(db_options), ColumnFamilyOptions(column_family_options) {}

_ZN7rocksdb11PerfContextC2Ev:
  283|  9.02k|  PerfContext() { Reset(); }

_ZN7rocksdb11RateLimiterC2ENS0_4ModeE:
   35|  9.02k|  explicit RateLimiter(Mode mode = Mode::kWritesOnly) : mode_(mode) {}
_ZN7rocksdb11RateLimiterD2Ev:
   37|  9.02k|  virtual ~RateLimiter() {}

_ZN7rocksdb5SliceC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   42|   272M|  Slice(const std::string& s) : data_(s.data()), size_(s.size()) {}
_ZN7rocksdb5SliceC2Ev:
   35|  21.5M|  Slice() : data_(""), size_(0) {}
_ZN7rocksdb5SliceC2EPKcm:
   38|   249M|  Slice(const char* d, size_t n) : data_(d), size_(n) {}
_ZN7rocksdb5SliceC2EPKc:
   50|  3.72M|  Slice(const char* s) : data_(s) { size_ = (s == nullptr) ? 0 : strlen(s); }
  ------------------
  |  Branch (50:45): [True: 0, False: 3.72M]
  ------------------
_ZNK7rocksdb5Slice4dataEv:
   57|   619M|  const char* data() const { return data_; }
_ZNK7rocksdb5Slice4sizeEv:
   60|   721M|  size_t size() const { return size_; }
_ZNK7rocksdb5Slice5emptyEv:
   63|  12.0M|  bool empty() const { return size_ == 0; }
_ZNK7rocksdb5SliceixEm:
   67|  10.3M|  char operator[](size_t n) const {
   68|  10.3M|    assert(n < size());
   69|  10.3M|    return data_[n];
   70|  10.3M|  }
_ZN7rocksdb5Slice5clearEv:
   73|  1.46M|  void clear() {
   74|  1.46M|    data_ = "";
   75|  1.46M|    size_ = 0;
   76|  1.46M|  }
_ZN7rocksdb5Slice13remove_prefixEm:
   79|  19.4M|  void remove_prefix(size_t n) {
   80|  19.4M|    assert(n <= size());
   81|  19.4M|    data_ += n;
   82|  19.4M|    size_ -= n;
   83|  19.4M|  }
_ZN7rocksdb5Slice13remove_suffixEm:
   85|  2.56M|  void remove_suffix(size_t n) {
   86|  2.56M|    assert(n <= size());
   87|  2.56M|    size_ -= n;
   88|  2.56M|  }
_ZNK7rocksdb5Slice11starts_withERKS0_:
  113|  1.65M|  bool starts_with(const Slice& x) const {
  114|  1.65M|    return ((size_ >= x.size_) && (memcmp(data_, x.data_, x.size_) == 0));
  ------------------
  |  Branch (114:13): [True: 1.51M, False: 144k]
  |  Branch (114:35): [True: 383k, False: 1.12M]
  ------------------
  115|  1.65M|  }
_ZNK7rocksdb5Slice9ends_withERKS0_:
  117|   117k|  bool ends_with(const Slice& x) const {
  118|   117k|    return ((size_ >= x.size_) &&
  ------------------
  |  Branch (118:13): [True: 117k, False: 0]
  ------------------
  119|   117k|            (memcmp(data_ + size_ - x.size_, x.data_, x.size_) == 0));
  ------------------
  |  Branch (119:13): [True: 0, False: 117k]
  ------------------
  120|   117k|  }
_ZN7rocksdb13PinnableSliceC2Ev:
  140|  8.99k|  PinnableSlice() { buf_ = &self_space_; }
_ZN7rocksdb13PinnableSlice5ResetEv:
  207|   880k|  void Reset() {
  208|   880k|    Cleanable::Reset();
  209|   880k|    pinned_ = false;
  210|   880k|    size_ = 0;
  211|   880k|  }
_ZN7rocksdbeqERKNS_5SliceES2_:
  235|  3.32M|inline bool operator==(const Slice& x, const Slice& y) {
  236|  3.32M|  return ((x.size() == y.size()) &&
  ------------------
  |  Branch (236:11): [True: 1.26M, False: 2.05M]
  ------------------
  237|  3.32M|          (memcmp(x.data(), y.data(), x.size()) == 0));
  ------------------
  |  Branch (237:11): [True: 1.21M, False: 56.6k]
  ------------------
  238|  3.32M|}
_ZN7rocksdbneERKNS_5SliceES2_:
  240|  13.5k|inline bool operator!=(const Slice& x, const Slice& y) { return !(x == y); }
_ZNK7rocksdb5Slice7compareERKS0_:
  242|  1.36G|inline int Slice::compare(const Slice& b) const {
  243|  1.36G|  assert(data_ != nullptr && b.data_ != nullptr);
  244|  1.36G|  const size_t min_len = (size_ < b.size_) ? size_ : b.size_;
  ------------------
  |  Branch (244:26): [True: 114M, False: 1.24G]
  ------------------
  245|  1.36G|  int r = memcmp(data_, b.data_, min_len);
  246|  1.36G|  if (r == 0) {
  ------------------
  |  Branch (246:7): [True: 1.14G, False: 219M]
  ------------------
  247|  1.14G|    if (size_ < b.size_)
  ------------------
  |  Branch (247:9): [True: 25.8M, False: 1.11G]
  ------------------
  248|  25.8M|      r = -1;
  249|  1.11G|    else if (size_ > b.size_)
  ------------------
  |  Branch (249:14): [True: 20.6M, False: 1.09G]
  ------------------
  250|  20.6M|      r = +1;
  251|  1.14G|  }
  252|  1.36G|  return r;
  253|  1.36G|}
_ZNK7rocksdb5Slice17difference_offsetERKS0_:
  255|   197k|inline size_t Slice::difference_offset(const Slice& b) const {
  256|   197k|  size_t off = 0;
  257|   197k|  const size_t len = (size_ < b.size_) ? size_ : b.size_;
  ------------------
  |  Branch (257:22): [True: 62.8k, False: 134k]
  ------------------
  258|  4.04M|  for (; off < len; off++) {
  ------------------
  |  Branch (258:10): [True: 4.01M, False: 32.8k]
  ------------------
  259|  4.01M|    if (data_[off] != b.data_[off]) break;
  ------------------
  |  Branch (259:9): [True: 164k, False: 3.84M]
  ------------------
  260|  4.01M|  }
  261|   197k|  return off;
  262|   197k|}

_ZN7rocksdb14SliceTransform4TypeEv:
   41|      5|  static const char* Type() { return "SliceTransform"; }

_ZN7rocksdb14SstFileManagerD2Ev:
   28|  13.5k|  virtual ~SstFileManager() {}

_ZN7rocksdb21SstPartitionerFactory4TypeEv:
   87|      1|  static const char* Type() { return "SstPartitionerFactory"; }
_ZN7rocksdb32SstPartitionerFixedPrefixFactory10kClassNameEv:
  129|      1|  static const char* kClassName() { return "SstPartitionerFixedPrefixFactory"; }

_ZNK7rocksdb6Status2okEv:
  320|   127M|  bool ok() const {
  321|   127M|    MarkChecked();
  322|   127M|    return code() == kOk;
  323|   127M|  }
_ZNK7rocksdb6Status11MarkCheckedEv:
  529|   344M|  inline void MarkChecked() const {
  530|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
  531|       |    checked_ = true;
  532|       |#endif  // ROCKSDB_ASSERT_STATUS_CHECKED
  533|   344M|  }
_ZNK7rocksdb6Status4codeEv:
   95|   145M|  Code code() const {
   96|   145M|    MarkChecked();
   97|   145M|    return code_;
   98|   145M|  }
_ZN7rocksdb6StatusD2Ev:
   46|  92.6M|  ~Status() {
   47|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
   48|       |    if (!checked_) {
   49|       |      fprintf(stderr, "Failed to check Status %p\n", this);
   50|       |      port::PrintStack();
   51|       |      std::abort();
   52|       |    }
   53|       |#endif  // ROCKSDB_ASSERT_STATUS_CHECKED
   54|  92.6M|  }
_ZN7rocksdb6StatusC2Ev:
   45|  67.3M|        state_(nullptr) {}
_ZNK7rocksdb6Status20PermitUncheckedErrorEv:
   67|  5.43M|  inline void PermitUncheckedError() const { MarkChecked(); }
_ZNK7rocksdb6Status9MustCheckEv:
   69|  41.9M|  inline void MustCheck() const {
   70|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
   71|       |    checked_ = false;
   72|       |#endif  // ROCKSDB_ASSERT_STATUS_CHECKED
   73|  41.9M|  }
_ZNK7rocksdb6Status7subcodeEv:
  121|  11.7k|  SubCode subcode() const {
  122|  11.7k|    MarkChecked();
  123|  11.7k|    return subcode_;
  124|  11.7k|  }
_ZN7rocksdb6Status2OKEv:
  174|  37.0M|  static Status OK() { return Status(); }
_ZN7rocksdb6Status10CorruptionERKNS_5SliceES3_:
  203|  63.1k|  static Status Corruption(const Slice& msg, const Slice& msg2 = Slice()) {
  204|  63.1k|    return Status(kCorruption, msg, msg2);
  205|  63.1k|  }
_ZNK7rocksdb6Status15IsOkOverwrittenEv:
  327|  11.7k|  bool IsOkOverwritten() const {
  328|  11.7k|    MarkChecked();
  329|  11.7k|    return code() == kOk && subcode() == kOverwritten;
  ------------------
  |  Branch (329:12): [True: 11.7k, False: 0]
  |  Branch (329:29): [True: 0, False: 11.7k]
  ------------------
  330|  11.7k|  }
_ZNK7rocksdb6Status10IsNotFoundEv:
  340|  2.04M|  bool IsNotFound() const {
  341|  2.04M|    MarkChecked();
  342|  2.04M|    return code() == kNotFound;
  343|  2.04M|  }
_ZNK7rocksdb6Status12IsCorruptionEv:
  346|   142k|  bool IsCorruption() const {
  347|   142k|    MarkChecked();
  348|   142k|    return code() == kCorruption;
  349|   142k|  }
_ZNK7rocksdb6Status14IsNotSupportedEv:
  352|  2.06M|  bool IsNotSupported() const {
  353|  2.06M|    MarkChecked();
  354|  2.06M|    return code() == kNotSupported;
  355|  2.06M|  }
_ZNK7rocksdb6Status12IsIncompleteEv:
  376|  8.96k|  bool IsIncomplete() const {
  377|  8.96k|    MarkChecked();
  378|  8.96k|    return code() == kIncomplete;
  379|  8.96k|  }
_ZNK7rocksdb6Status9IsAbortedEv:
  392|  9.02k|  bool IsAborted() const {
  393|  9.02k|    MarkChecked();
  394|  9.02k|    return code() == kAborted;
  395|  9.02k|  }
_ZNK7rocksdb6Status10IsTryAgainEv:
  423|  14.0M|  bool IsTryAgain() const {
  424|  14.0M|    MarkChecked();
  425|  14.0M|    return code() == kTryAgain;
  426|  14.0M|  }
_ZNK7rocksdb6Status14IsPathNotFoundEv:
  462|  18.0k|  bool IsPathNotFound() const {
  463|  18.0k|    MarkChecked();
  464|  18.0k|    return (code() == kIOError || code() == kNotFound) &&
  ------------------
  |  Branch (464:13): [True: 0, False: 18.0k]
  |  Branch (464:35): [True: 0, False: 18.0k]
  ------------------
  465|  18.0k|           (subcode() == kPathNotFound);
  ------------------
  |  Branch (465:12): [True: 0, False: 0]
  ------------------
  466|  18.0k|  }
_ZN7rocksdb6StatusC2ENS0_4CodeENS0_7SubCodeE:
  511|  25.2k|        scope_(0) {}
_ZN7rocksdb6StatusC2ENS0_4CodeENS0_7SubCodeEbbh:
  520|  22.2M|        scope_(scope) {}
_ZN7rocksdb6StatusC2ENS0_4CodeERKNS_5SliceES4_:
  525|  63.1k|      : Status(_code, kNone, msg, msg2) {}
_ZN7rocksdb6StatusaSERKS0_:
  556|  1.42M|inline Status& Status::operator=(const Status& s) {
  557|  1.42M|  if (this != &s) {
  ------------------
  |  Branch (557:7): [True: 1.42M, False: 0]
  ------------------
  558|  1.42M|    s.MarkChecked();
  559|  1.42M|    MustCheck();
  560|  1.42M|    code_ = s.code_;
  561|  1.42M|    subcode_ = s.subcode_;
  562|  1.42M|    sev_ = s.sev_;
  563|  1.42M|    retryable_ = s.retryable_;
  564|  1.42M|    data_loss_ = s.data_loss_;
  565|  1.42M|    scope_ = s.scope_;
  566|  1.42M|    state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_.get());
  ------------------
  |  Branch (566:14): [True: 1.42M, False: 0]
  ------------------
  567|  1.42M|  }
  568|  1.42M|  return *this;
  569|  1.42M|}
_ZN7rocksdb6StatusaSEOS0_:
  576|  40.4M|inline Status& Status::operator=(Status&& s) noexcept {
  577|  40.4M|  if (this != &s) {
  ------------------
  |  Branch (577:7): [True: 40.4M, False: 0]
  ------------------
  578|  40.4M|    s.MarkChecked();
  579|  40.4M|    MustCheck();
  580|  40.4M|    code_ = std::move(s.code_);
  581|  40.4M|    s.code_ = kOk;
  582|  40.4M|    subcode_ = std::move(s.subcode_);
  583|  40.4M|    s.subcode_ = kNone;
  584|  40.4M|    sev_ = std::move(s.sev_);
  585|  40.4M|    s.sev_ = kNoError;
  586|  40.4M|    retryable_ = std::move(s.retryable_);
  587|  40.4M|    s.retryable_ = false;
  588|  40.4M|    data_loss_ = std::move(s.data_loss_);
  589|  40.4M|    s.data_loss_ = false;
  590|  40.4M|    scope_ = std::move(s.scope_);
  591|  40.4M|    s.scope_ = 0;
  592|  40.4M|    state_ = std::move(s.state_);
  593|  40.4M|  }
  594|  40.4M|  return *this;
  595|  40.4M|}
_ZN7rocksdb6StatusC2EOS0_:
  571|  2.73M|inline Status::Status(Status&& s) noexcept : Status() {
  572|  2.73M|  s.MarkChecked();
  573|  2.73M|  *this = std::move(s);
  574|  2.73M|}
_ZN7rocksdb6StatusC2ERKS0_:
  542|  2.98M|      scope_(s.scope_) {
  543|  2.98M|  s.MarkChecked();
  544|  2.98M|  state_ = (s.state_ == nullptr) ? nullptr : CopyState(s.state_.get());
  ------------------
  |  Branch (544:12): [True: 2.98M, False: 0]
  ------------------
  545|  2.98M|}

_ZN7rocksdb22BlockBasedTableOptions5kNameEv:
  130|   139k|  static const char* kName() { return "BlockTableOptions"; }
_ZN7rocksdb12TableFactory15kBlockCacheOptsEv:
  850|  81.3k|  static const char* kBlockCacheOpts() { return "BlockCache"; }
_ZN7rocksdb12TableFactory20kBlockBasedTableNameEv:
  851|   767k|  static const char* kBlockBasedTableName() { return "BlockBasedTable"; }
_ZN7rocksdb12TableFactory15kPlainTableNameEv:
  852|      1|  static const char* kPlainTableName() { return "PlainTable"; }
_ZN7rocksdb12TableFactory16kCuckooTableNameEv:
  853|      1|  static const char* kCuckooTableName() { return "CuckooTable"; }
_ZN7rocksdb12TableFactory4TypeEv:
  860|  18.0k|  static const char* Type() { return "TableFactory"; }

_ZN7rocksdb31TablePropertiesCollectorFactory7ContextC2Ejiim:
  178|  4.48k|              _last_level_inclusive_max_seqno_threshold) {}

_ZN7rocksdb26CompactionOptionsUniversalC2Ev:
  124|   139k|        incremental(false) {}

flush_block_policy.cc:_ZN7rocksdbL16LoadSharedObjectINS_23FlushBlockPolicyFactoryEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10shared_ptrIT_EE:
  143|  18.0k|                               std::shared_ptr<T>* result) {
  144|  18.0k|  std::string id;
  145|  18.0k|  std::unordered_map<std::string, std::string> opt_map;
  146|       |
  147|  18.0k|  Status status = Customizable::GetOptionsMap(config_options, result->get(),
  148|  18.0k|                                              value, &id, &opt_map);
  149|  18.0k|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (149:7): [True: 0, False: 18.0k]
  ------------------
  150|      0|    return status;
  151|  18.0k|  } else {
  152|  18.0k|    return NewSharedObject(config_options, id, opt_map, result);
  153|  18.0k|  }
  154|  18.0k|}
flush_block_policy.cc:_ZN7rocksdbL15NewSharedObjectINS_23FlushBlockPolicyFactoryEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_13unordered_mapISC_SC_NS6_4hashISC_EENS6_8equal_toISC_EENSA_INS6_4pairISD_SC_EEEEEEPNS6_10shared_ptrIT_EE:
   49|  18.0k|    std::shared_ptr<T>* result) {
   50|  18.0k|  if (!id.empty()) {
  ------------------
  |  Branch (50:7): [True: 18.0k, False: 0]
  ------------------
   51|  18.0k|    Status status;
   52|  18.0k|    status = config_options.registry->NewSharedObject(id, result);
   53|  18.0k|    if (config_options.ignore_unsupported_options && status.IsNotSupported()) {
  ------------------
  |  Branch (53:9): [True: 18.0k, False: 0]
  |  Branch (53:54): [True: 0, False: 18.0k]
  ------------------
   54|      0|      status = Status::OK();
   55|  18.0k|    } else if (status.ok()) {
  ------------------
  |  Branch (55:16): [True: 18.0k, False: 0]
  ------------------
   56|  18.0k|      status = Customizable::ConfigureNewObject(config_options, result->get(),
   57|  18.0k|                                                opt_map);
   58|  18.0k|    }
   59|  18.0k|    return status;
   60|  18.0k|  } else if (opt_map.empty()) {
  ------------------
  |  Branch (60:14): [True: 0, False: 0]
  ------------------
   61|       |    // There was no ID and no map (everything empty), so reset/clear the result
   62|      0|    result->reset();
   63|      0|    return Status::OK();
   64|      0|  } else {
   65|      0|    return Status::NotSupported("Cannot reset object ");
   66|      0|  }
   67|  18.0k|}
plain_table_factory.cc:_ZN7rocksdbL15NewUniqueObjectINS_18MemTableRepFactoryEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_13unordered_mapISC_SC_NS6_4hashISC_EENS6_8equal_toISC_EENSA_INS6_4pairISD_SC_EEEEEEPNS6_10unique_ptrIT_NS6_14default_deleteISR_EEEE:
  217|  9.02k|    std::unique_ptr<T>* result) {
  218|  9.02k|  if (!id.empty()) {
  ------------------
  |  Branch (218:7): [True: 9.02k, False: 0]
  ------------------
  219|  9.02k|    Status status;
  220|  9.02k|    status = config_options.registry->NewUniqueObject(id, result);
  221|  9.02k|    if (config_options.ignore_unsupported_options && status.IsNotSupported()) {
  ------------------
  |  Branch (221:9): [True: 9.02k, False: 0]
  |  Branch (221:54): [True: 0, False: 9.02k]
  ------------------
  222|      0|      status = Status::OK();
  223|  9.02k|    } else if (status.ok()) {
  ------------------
  |  Branch (223:16): [True: 9.02k, False: 0]
  ------------------
  224|  9.02k|      status = Customizable::ConfigureNewObject(config_options, result->get(),
  225|  9.02k|                                                opt_map);
  226|  9.02k|    }
  227|  9.02k|    return status;
  228|  9.02k|  } else if (opt_map.empty()) {
  ------------------
  |  Branch (228:14): [True: 0, False: 0]
  ------------------
  229|       |    // There was no ID and no map (everything empty), so reset/clear the result
  230|      0|    result->reset();
  231|      0|    return Status::OK();
  232|      0|  } else {
  233|      0|    return Status::NotSupported("Cannot reset object ");
  234|      0|  }
  235|  9.02k|}
table_factory.cc:_ZN7rocksdbL16LoadSharedObjectINS_12TableFactoryEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10shared_ptrIT_EE:
  143|  18.0k|                               std::shared_ptr<T>* result) {
  144|  18.0k|  std::string id;
  145|  18.0k|  std::unordered_map<std::string, std::string> opt_map;
  146|       |
  147|  18.0k|  Status status = Customizable::GetOptionsMap(config_options, result->get(),
  148|  18.0k|                                              value, &id, &opt_map);
  149|  18.0k|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (149:7): [True: 0, False: 18.0k]
  ------------------
  150|      0|    return status;
  151|  18.0k|  } else {
  152|  18.0k|    return NewSharedObject(config_options, id, opt_map, result);
  153|  18.0k|  }
  154|  18.0k|}
table_factory.cc:_ZN7rocksdbL15NewSharedObjectINS_12TableFactoryEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_13unordered_mapISC_SC_NS6_4hashISC_EENS6_8equal_toISC_EENSA_INS6_4pairISD_SC_EEEEEEPNS6_10shared_ptrIT_EE:
   49|  18.0k|    std::shared_ptr<T>* result) {
   50|  18.0k|  if (!id.empty()) {
  ------------------
  |  Branch (50:7): [True: 18.0k, False: 0]
  ------------------
   51|  18.0k|    Status status;
   52|  18.0k|    status = config_options.registry->NewSharedObject(id, result);
   53|  18.0k|    if (config_options.ignore_unsupported_options && status.IsNotSupported()) {
  ------------------
  |  Branch (53:9): [True: 18.0k, False: 0]
  |  Branch (53:54): [True: 0, False: 18.0k]
  ------------------
   54|      0|      status = Status::OK();
   55|  18.0k|    } else if (status.ok()) {
  ------------------
  |  Branch (55:16): [True: 18.0k, False: 0]
  ------------------
   56|  18.0k|      status = Customizable::ConfigureNewObject(config_options, result->get(),
   57|  18.0k|                                                opt_map);
   58|  18.0k|    }
   59|  18.0k|    return status;
   60|  18.0k|  } else if (opt_map.empty()) {
  ------------------
  |  Branch (60:14): [True: 0, False: 0]
  ------------------
   61|       |    // There was no ID and no map (everything empty), so reset/clear the result
   62|      0|    result->reset();
   63|      0|    return Status::OK();
   64|      0|  } else {
   65|      0|    return Status::NotSupported("Cannot reset object ");
   66|      0|  }
   67|  18.0k|}
file_checksum_helper.cc:_ZN7rocksdbL16LoadSharedObjectINS_22FileChecksumGenFactoryEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10shared_ptrIT_EE:
  143|  9.02k|                               std::shared_ptr<T>* result) {
  144|  9.02k|  std::string id;
  145|  9.02k|  std::unordered_map<std::string, std::string> opt_map;
  146|       |
  147|  9.02k|  Status status = Customizable::GetOptionsMap(config_options, result->get(),
  148|  9.02k|                                              value, &id, &opt_map);
  149|  9.02k|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (149:7): [True: 0, False: 9.02k]
  ------------------
  150|      0|    return status;
  151|  9.02k|  } else {
  152|  9.02k|    return NewSharedObject(config_options, id, opt_map, result);
  153|  9.02k|  }
  154|  9.02k|}
file_checksum_helper.cc:_ZN7rocksdbL15NewSharedObjectINS_22FileChecksumGenFactoryEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_13unordered_mapISC_SC_NS6_4hashISC_EENS6_8equal_toISC_EENSA_INS6_4pairISD_SC_EEEEEEPNS6_10shared_ptrIT_EE:
   49|  9.02k|    std::shared_ptr<T>* result) {
   50|  9.02k|  if (!id.empty()) {
  ------------------
  |  Branch (50:7): [True: 0, False: 9.02k]
  ------------------
   51|      0|    Status status;
   52|      0|    status = config_options.registry->NewSharedObject(id, result);
   53|      0|    if (config_options.ignore_unsupported_options && status.IsNotSupported()) {
  ------------------
  |  Branch (53:9): [True: 0, False: 0]
  |  Branch (53:54): [True: 0, False: 0]
  ------------------
   54|      0|      status = Status::OK();
   55|      0|    } else if (status.ok()) {
  ------------------
  |  Branch (55:16): [True: 0, False: 0]
  ------------------
   56|      0|      status = Customizable::ConfigureNewObject(config_options, result->get(),
   57|      0|                                                opt_map);
   58|      0|    }
   59|      0|    return status;
   60|  9.02k|  } else if (opt_map.empty()) {
  ------------------
  |  Branch (60:14): [True: 9.02k, False: 0]
  ------------------
   61|       |    // There was no ID and no map (everything empty), so reset/clear the result
   62|  9.02k|    result->reset();
   63|  9.02k|    return Status::OK();
   64|  9.02k|  } else {
   65|      0|    return Status::NotSupported("Cannot reset object ");
   66|      0|  }
   67|  9.02k|}
compaction_filters.cc:_ZN7rocksdbL16LoadStaticObjectINS_16CompactionFilterEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPPT_:
  310|  9.02k|                               const std::string& value, T** result) {
  311|  9.02k|  std::string id;
  312|  9.02k|  std::unordered_map<std::string, std::string> opt_map;
  313|  9.02k|  Status status = Customizable::GetOptionsMap(config_options, *result, value,
  314|  9.02k|                                              &id, &opt_map);
  315|  9.02k|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (315:7): [True: 0, False: 9.02k]
  ------------------
  316|      0|    return status;
  317|  9.02k|  } else {
  318|  9.02k|    return NewStaticObject(config_options, id, opt_map, result);
  319|  9.02k|  }
  320|  9.02k|}
compaction_filters.cc:_ZN7rocksdbL15NewStaticObjectINS_16CompactionFilterEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_13unordered_mapISC_SC_NS6_4hashISC_EENS6_8equal_toISC_EENSA_INS6_4pairISD_SC_EEEEEEPPT_:
  278|  9.02k|    const std::unordered_map<std::string, std::string>& opt_map, T** result) {
  279|  9.02k|  if (!id.empty()) {
  ------------------
  |  Branch (279:7): [True: 0, False: 9.02k]
  ------------------
  280|      0|    Status status;
  281|      0|    status = config_options.registry->NewStaticObject(id, result);
  282|      0|    if (config_options.ignore_unsupported_options && status.IsNotSupported()) {
  ------------------
  |  Branch (282:9): [True: 0, False: 0]
  |  Branch (282:54): [True: 0, False: 0]
  ------------------
  283|      0|      status = Status::OK();
  284|      0|    } else if (status.ok()) {
  ------------------
  |  Branch (284:16): [True: 0, False: 0]
  ------------------
  285|      0|      status =
  286|      0|          Customizable::ConfigureNewObject(config_options, *result, opt_map);
  287|      0|    }
  288|      0|    return status;
  289|  9.02k|  } else if (opt_map.empty()) {
  ------------------
  |  Branch (289:14): [True: 9.02k, False: 0]
  ------------------
  290|       |    // There was no ID and no map (everything empty), so reset/clear the result
  291|  9.02k|    *result = nullptr;
  292|  9.02k|    return Status::OK();
  293|  9.02k|  } else {
  294|      0|    return Status::NotSupported("Cannot reset object ");
  295|      0|  }
  296|  9.02k|}
compaction_filters.cc:_ZN7rocksdbL16LoadSharedObjectINS_23CompactionFilterFactoryEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10shared_ptrIT_EE:
  143|  9.02k|                               std::shared_ptr<T>* result) {
  144|  9.02k|  std::string id;
  145|  9.02k|  std::unordered_map<std::string, std::string> opt_map;
  146|       |
  147|  9.02k|  Status status = Customizable::GetOptionsMap(config_options, result->get(),
  148|  9.02k|                                              value, &id, &opt_map);
  149|  9.02k|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (149:7): [True: 0, False: 9.02k]
  ------------------
  150|      0|    return status;
  151|  9.02k|  } else {
  152|  9.02k|    return NewSharedObject(config_options, id, opt_map, result);
  153|  9.02k|  }
  154|  9.02k|}
compaction_filters.cc:_ZN7rocksdbL15NewSharedObjectINS_23CompactionFilterFactoryEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_13unordered_mapISC_SC_NS6_4hashISC_EENS6_8equal_toISC_EENSA_INS6_4pairISD_SC_EEEEEEPNS6_10shared_ptrIT_EE:
   49|  9.02k|    std::shared_ptr<T>* result) {
   50|  9.02k|  if (!id.empty()) {
  ------------------
  |  Branch (50:7): [True: 0, False: 9.02k]
  ------------------
   51|      0|    Status status;
   52|      0|    status = config_options.registry->NewSharedObject(id, result);
   53|      0|    if (config_options.ignore_unsupported_options && status.IsNotSupported()) {
  ------------------
  |  Branch (53:9): [True: 0, False: 0]
  |  Branch (53:54): [True: 0, False: 0]
  ------------------
   54|      0|      status = Status::OK();
   55|      0|    } else if (status.ok()) {
  ------------------
  |  Branch (55:16): [True: 0, False: 0]
  ------------------
   56|      0|      status = Customizable::ConfigureNewObject(config_options, result->get(),
   57|      0|                                                opt_map);
   58|      0|    }
   59|      0|    return status;
   60|  9.02k|  } else if (opt_map.empty()) {
  ------------------
  |  Branch (60:14): [True: 9.02k, False: 0]
  ------------------
   61|       |    // There was no ID and no map (everything empty), so reset/clear the result
   62|  9.02k|    result->reset();
   63|  9.02k|    return Status::OK();
   64|  9.02k|  } else {
   65|      0|    return Status::NotSupported("Cannot reset object ");
   66|      0|  }
   67|  9.02k|}
merge_operators.cc:_ZN7rocksdbL16LoadSharedObjectINS_13MergeOperatorEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10shared_ptrIT_EE:
  143|  9.02k|                               std::shared_ptr<T>* result) {
  144|  9.02k|  std::string id;
  145|  9.02k|  std::unordered_map<std::string, std::string> opt_map;
  146|       |
  147|  9.02k|  Status status = Customizable::GetOptionsMap(config_options, result->get(),
  148|  9.02k|                                              value, &id, &opt_map);
  149|  9.02k|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (149:7): [True: 0, False: 9.02k]
  ------------------
  150|      0|    return status;
  151|  9.02k|  } else {
  152|  9.02k|    return NewSharedObject(config_options, id, opt_map, result);
  153|  9.02k|  }
  154|  9.02k|}
merge_operators.cc:_ZN7rocksdbL15NewSharedObjectINS_13MergeOperatorEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_13unordered_mapISC_SC_NS6_4hashISC_EENS6_8equal_toISC_EENSA_INS6_4pairISD_SC_EEEEEEPNS6_10shared_ptrIT_EE:
   49|  9.02k|    std::shared_ptr<T>* result) {
   50|  9.02k|  if (!id.empty()) {
  ------------------
  |  Branch (50:7): [True: 0, False: 9.02k]
  ------------------
   51|      0|    Status status;
   52|      0|    status = config_options.registry->NewSharedObject(id, result);
   53|      0|    if (config_options.ignore_unsupported_options && status.IsNotSupported()) {
  ------------------
  |  Branch (53:9): [True: 0, False: 0]
  |  Branch (53:54): [True: 0, False: 0]
  ------------------
   54|      0|      status = Status::OK();
   55|      0|    } else if (status.ok()) {
  ------------------
  |  Branch (55:16): [True: 0, False: 0]
  ------------------
   56|      0|      status = Customizable::ConfigureNewObject(config_options, result->get(),
   57|      0|                                                opt_map);
   58|      0|    }
   59|      0|    return status;
   60|  9.02k|  } else if (opt_map.empty()) {
  ------------------
  |  Branch (60:14): [True: 9.02k, False: 0]
  ------------------
   61|       |    // There was no ID and no map (everything empty), so reset/clear the result
   62|  9.02k|    result->reset();
   63|  9.02k|    return Status::OK();
   64|  9.02k|  } else {
   65|      0|    return Status::NotSupported("Cannot reset object ");
   66|      0|  }
   67|  9.02k|}
wal_filter.cc:_ZN7rocksdbL16LoadStaticObjectINS_9WalFilterEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPPT_:
  310|  9.02k|                               const std::string& value, T** result) {
  311|  9.02k|  std::string id;
  312|  9.02k|  std::unordered_map<std::string, std::string> opt_map;
  313|  9.02k|  Status status = Customizable::GetOptionsMap(config_options, *result, value,
  314|  9.02k|                                              &id, &opt_map);
  315|  9.02k|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (315:7): [True: 0, False: 9.02k]
  ------------------
  316|      0|    return status;
  317|  9.02k|  } else {
  318|  9.02k|    return NewStaticObject(config_options, id, opt_map, result);
  319|  9.02k|  }
  320|  9.02k|}
wal_filter.cc:_ZN7rocksdbL15NewStaticObjectINS_9WalFilterEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_13unordered_mapISC_SC_NS6_4hashISC_EENS6_8equal_toISC_EENSA_INS6_4pairISD_SC_EEEEEEPPT_:
  278|  9.02k|    const std::unordered_map<std::string, std::string>& opt_map, T** result) {
  279|  9.02k|  if (!id.empty()) {
  ------------------
  |  Branch (279:7): [True: 0, False: 9.02k]
  ------------------
  280|      0|    Status status;
  281|      0|    status = config_options.registry->NewStaticObject(id, result);
  282|      0|    if (config_options.ignore_unsupported_options && status.IsNotSupported()) {
  ------------------
  |  Branch (282:9): [True: 0, False: 0]
  |  Branch (282:54): [True: 0, False: 0]
  ------------------
  283|      0|      status = Status::OK();
  284|      0|    } else if (status.ok()) {
  ------------------
  |  Branch (284:16): [True: 0, False: 0]
  ------------------
  285|      0|      status =
  286|      0|          Customizable::ConfigureNewObject(config_options, *result, opt_map);
  287|      0|    }
  288|      0|    return status;
  289|  9.02k|  } else if (opt_map.empty()) {
  ------------------
  |  Branch (289:14): [True: 9.02k, False: 0]
  ------------------
  290|       |    // There was no ID and no map (everything empty), so reset/clear the result
  291|  9.02k|    *result = nullptr;
  292|  9.02k|    return Status::OK();
  293|  9.02k|  } else {
  294|      0|    return Status::NotSupported("Cannot reset object ");
  295|      0|  }
  296|  9.02k|}
sst_partitioner.cc:_ZN7rocksdbL16LoadSharedObjectINS_21SstPartitionerFactoryEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10shared_ptrIT_EE:
  143|  9.02k|                               std::shared_ptr<T>* result) {
  144|  9.02k|  std::string id;
  145|  9.02k|  std::unordered_map<std::string, std::string> opt_map;
  146|       |
  147|  9.02k|  Status status = Customizable::GetOptionsMap(config_options, result->get(),
  148|  9.02k|                                              value, &id, &opt_map);
  149|  9.02k|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (149:7): [True: 0, False: 9.02k]
  ------------------
  150|      0|    return status;
  151|  9.02k|  } else {
  152|  9.02k|    return NewSharedObject(config_options, id, opt_map, result);
  153|  9.02k|  }
  154|  9.02k|}
sst_partitioner.cc:_ZN7rocksdbL15NewSharedObjectINS_21SstPartitionerFactoryEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_13unordered_mapISC_SC_NS6_4hashISC_EENS6_8equal_toISC_EENSA_INS6_4pairISD_SC_EEEEEEPNS6_10shared_ptrIT_EE:
   49|  9.02k|    std::shared_ptr<T>* result) {
   50|  9.02k|  if (!id.empty()) {
  ------------------
  |  Branch (50:7): [True: 0, False: 9.02k]
  ------------------
   51|      0|    Status status;
   52|      0|    status = config_options.registry->NewSharedObject(id, result);
   53|      0|    if (config_options.ignore_unsupported_options && status.IsNotSupported()) {
  ------------------
  |  Branch (53:9): [True: 0, False: 0]
  |  Branch (53:54): [True: 0, False: 0]
  ------------------
   54|      0|      status = Status::OK();
   55|      0|    } else if (status.ok()) {
  ------------------
  |  Branch (55:16): [True: 0, False: 0]
  ------------------
   56|      0|      status = Customizable::ConfigureNewObject(config_options, result->get(),
   57|      0|                                                opt_map);
   58|      0|    }
   59|      0|    return status;
   60|  9.02k|  } else if (opt_map.empty()) {
  ------------------
  |  Branch (60:14): [True: 9.02k, False: 0]
  ------------------
   61|       |    // There was no ID and no map (everything empty), so reset/clear the result
   62|  9.02k|    result->reset();
   63|  9.02k|    return Status::OK();
   64|  9.02k|  } else {
   65|      0|    return Status::NotSupported("Cannot reset object ");
   66|      0|  }
   67|  9.02k|}

_ZN7rocksdb13ObjectLibrary5EntryD2Ev:
   48|     18|    virtual ~Entry() {}
_ZN7rocksdb13ObjectLibrary12PatternEntryC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEb:
   95|     32|        : name_(name), optional_(optional), slength_(0) {
   96|     32|      nlength_ = name_.size();
   97|     32|    }
_ZN7rocksdb13ObjectLibrary12PatternEntry12AddSeparatorERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEb:
  114|      2|                               bool at_least_one = true) {
  115|      2|      slength_ += separator.size();
  116|      2|      if (at_least_one) {
  ------------------
  |  Branch (116:11): [True: 0, False: 2]
  ------------------
  117|      0|        separators_.emplace_back(separator, kMatchAtLeastOne);
  118|      0|        ++slength_;
  119|      2|      } else {
  120|      2|        separators_.emplace_back(separator, kMatchZeroOrMore);
  121|      2|      }
  122|      2|      return *this;
  123|      2|    }
_ZN7rocksdb13ObjectLibrary12PatternEntry9AddNumberERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEb:
  127|      8|    PatternEntry& AddNumber(const std::string& separator, bool is_int = true) {
  128|      8|      separators_.emplace_back(separator,
  129|      8|                               (is_int) ? kMatchInteger : kMatchDecimal);
  ------------------
  |  Branch (129:32): [True: 8, False: 0]
  ------------------
  130|      8|      slength_ += separator.size() + 1;
  131|      8|      return *this;
  132|      8|    }
_ZN7rocksdb13ObjectLibrary12PatternEntry11AnotherNameERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  135|     11|    PatternEntry& AnotherName(const std::string& alt) {
  136|     11|      names_.emplace_back(alt);
  137|     11|      return *this;
  138|     11|    }
_ZN7rocksdb13ObjectLibraryC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  192|      2|  explicit ObjectLibrary(const std::string& id) { id_ = id; }
_ZN7rocksdb13ObjectLibrary15AddFactoryEntryEPKcONSt3__110unique_ptrINS0_5EntryENS3_14default_deleteIS5_EEEE:
  268|     32|  void AddFactoryEntry(const char* type, std::unique_ptr<Entry>&& entry) {
  269|     32|    std::unique_lock<std::mutex> lock(mu_);
  270|     32|    auto& factories = factories_[type];
  271|     32|    factories.emplace_back(std::move(entry));
  272|     32|  }
_ZN7rocksdb14ObjectRegistryC2ERKNSt3__110shared_ptrIS0_EE:
  294|  13.5k|      : parent_(parent) {}
_ZN7rocksdb13ObjectLibrary12FactoryEntryINS_10FileSystemEEC2EPNS0_5EntryENSt3__18functionIFPS2_RKNS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10unique_ptrIS2_NS6_14default_deleteIS2_EEEEPSE_EEE:
  174|      2|        : entry_(e), factory_(std::move(f)) {}
_ZN7rocksdb13ObjectLibrary10AddFactoryINS_10FileSystemEEERKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEERKNS0_12PatternEntryESO_:
  252|      2|                                   const FactoryFunc<T>& func) {
  253|      2|    std::unique_ptr<Entry> factory(
  254|      2|        new FactoryEntry<T>(new PatternEntry(entry), func));
  255|      2|    AddFactoryEntry(T::Type(), std::move(factory));
  256|      2|    return func;
  257|      2|  }
_ZN7rocksdb13ObjectLibrary10AddFactoryINS_23FlushBlockPolicyFactoryEEERKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_SO_:
  238|      2|                                   const FactoryFunc<T>& func) {
  239|      2|    std::unique_ptr<Entry> entry(
  240|      2|        new FactoryEntry<T>(new PatternEntry(name), func));
  241|      2|    AddFactoryEntry(T::Type(), std::move(entry));
  242|      2|    return func;
  243|      2|  }
_ZN7rocksdb13ObjectLibrary12FactoryEntryINS_23FlushBlockPolicyFactoryEEC2EPNS0_5EntryENSt3__18functionIFPS2_RKNS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10unique_ptrIS2_NS6_14default_deleteIS2_EEEEPSE_EEE:
  174|      2|        : entry_(e), factory_(std::move(f)) {}
_ZNK7rocksdb13ObjectLibrary12FactoryEntryINS_23FlushBlockPolicyFactoryEE7MatchesERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  175|  18.0k|    bool Matches(const std::string& target) const override {
  176|  18.0k|      return entry_->Matches(target);
  177|  18.0k|    }
_ZN7rocksdb14ObjectRegistry15NewSharedObjectINS_23FlushBlockPolicyFactoryEEENS_6StatusERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIT_EE:
  369|  18.0k|                         std::shared_ptr<T>* result) {
  370|  18.0k|    std::unique_ptr<T> guard;
  371|  18.0k|    T* ptr = nullptr;
  372|  18.0k|    Status s = NewObject(target, &ptr, &guard);
  373|  18.0k|    if (!s.ok()) {
  ------------------
  |  Branch (373:9): [True: 0, False: 18.0k]
  ------------------
  374|      0|      return s;
  375|  18.0k|    } else if (guard) {
  ------------------
  |  Branch (375:16): [True: 18.0k, False: 0]
  ------------------
  376|  18.0k|      result->reset(guard.release());
  377|  18.0k|      return Status::OK();
  378|  18.0k|    } else {
  379|      0|      return Status::InvalidArgument(std::string("Cannot make a shared ") +
  380|      0|                                         T::Type() + " from unguarded one ",
  381|      0|                                     target);
  382|      0|    }
  383|  18.0k|  }
_ZN7rocksdb14ObjectRegistry9NewObjectINS_23FlushBlockPolicyFactoryEEENS_6StatusERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPPT_PNS4_10unique_ptrISD_NS4_14default_deleteISD_EEEE:
  319|  18.0k|                   std::unique_ptr<T>* guard) {
  320|  18.0k|    assert(guard != nullptr);
  321|  18.0k|    guard->reset();
  322|  18.0k|    auto factory = FindFactory<T>(target);
  323|  18.0k|    if (factory != nullptr) {
  ------------------
  |  Branch (323:9): [True: 18.0k, False: 0]
  ------------------
  324|  18.0k|      std::string errmsg;
  325|  18.0k|      *object = factory(target, guard, &errmsg);
  326|  18.0k|      if (*object != nullptr) {
  ------------------
  |  Branch (326:11): [True: 18.0k, False: 0]
  ------------------
  327|  18.0k|        return Status::OK();
  328|  18.0k|      } else if (errmsg.empty()) {
  ------------------
  |  Branch (328:18): [True: 0, False: 0]
  ------------------
  329|      0|        return Status::InvalidArgument(
  330|      0|            std::string("Could not load ") + T::Type(), target);
  331|      0|      } else {
  332|      0|        return Status::InvalidArgument(errmsg, target);
  333|      0|      }
  334|  18.0k|    } else {
  335|      0|      return Status::NotSupported(std::string("Could not load ") + T::Type(),
  336|      0|                                  target);
  337|      0|    }
  338|  18.0k|  }
_ZNK7rocksdb14ObjectRegistry11FindFactoryINS_23FlushBlockPolicyFactoryEEEKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_:
  554|  36.1k|  const FactoryFunc<T> FindFactory(const std::string& name) const {
  555|  36.1k|    {
  556|  36.1k|      std::unique_lock<std::mutex> lock(library_mutex_);
  557|  36.1k|      for (auto iter = libraries_.crbegin(); iter != libraries_.crend();
  ------------------
  |  Branch (557:46): [True: 18.0k, False: 18.0k]
  ------------------
  558|  36.1k|           ++iter) {
  559|  18.0k|        const auto factory = iter->get()->FindFactory<T>(name);
  560|  18.0k|        if (factory != nullptr) {
  ------------------
  |  Branch (560:13): [True: 18.0k, False: 0]
  ------------------
  561|  18.0k|          return factory;
  562|  18.0k|        }
  563|  18.0k|      }
  564|  36.1k|    }
  565|  18.0k|    if (parent_ == nullptr) {
  ------------------
  |  Branch (565:9): [True: 0, False: 18.0k]
  ------------------
  566|      0|      return nullptr;
  567|  18.0k|    } else {
  568|  18.0k|      return parent_->FindFactory<T>(name);
  569|  18.0k|    }
  570|  18.0k|  }
_ZNK7rocksdb13ObjectLibrary11FindFactoryINS_23FlushBlockPolicyFactoryEEENSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_:
  200|  18.0k|  FactoryFunc<T> FindFactory(const std::string& target) const {
  201|  18.0k|    std::unique_lock<std::mutex> lock(mu_);
  202|  18.0k|    auto factories = factories_.find(T::Type());
  203|  18.0k|    if (factories != factories_.end()) {
  ------------------
  |  Branch (203:9): [True: 18.0k, False: 0]
  ------------------
  204|  18.0k|      for (const auto& e : factories->second) {
  ------------------
  |  Branch (204:26): [True: 18.0k, False: 0]
  ------------------
  205|  18.0k|        if (e->Matches(target)) {
  ------------------
  |  Branch (205:13): [True: 18.0k, False: 0]
  ------------------
  206|  18.0k|          const auto* fe =
  207|  18.0k|              static_cast<const ObjectLibrary::FactoryEntry<T>*>(e.get());
  208|  18.0k|          return fe->GetFactory();
  209|  18.0k|        }
  210|  18.0k|      }
  211|  18.0k|    }
  212|      0|    return nullptr;
  213|  18.0k|  }
_ZNK7rocksdb13ObjectLibrary12FactoryEntryINS_23FlushBlockPolicyFactoryEE10GetFactoryEv:
  185|  18.0k|    const FactoryFunc<T>& GetFactory() const { return factory_; }
_ZN7rocksdb13ObjectLibrary10AddFactoryINS_18MemTableRepFactoryEEERKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEERKNS0_12PatternEntryESO_:
  252|      4|                                   const FactoryFunc<T>& func) {
  253|      4|    std::unique_ptr<Entry> factory(
  254|      4|        new FactoryEntry<T>(new PatternEntry(entry), func));
  255|      4|    AddFactoryEntry(T::Type(), std::move(factory));
  256|      4|    return func;
  257|      4|  }
_ZN7rocksdb13ObjectLibrary12FactoryEntryINS_18MemTableRepFactoryEEC2EPNS0_5EntryENSt3__18functionIFPS2_RKNS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10unique_ptrIS2_NS6_14default_deleteIS2_EEEEPSE_EEE:
  174|      5|        : entry_(e), factory_(std::move(f)) {}
_ZNK7rocksdb13ObjectLibrary12FactoryEntryINS_18MemTableRepFactoryEE7MatchesERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  175|  18.0k|    bool Matches(const std::string& target) const override {
  176|  18.0k|      return entry_->Matches(target);
  177|  18.0k|    }
_ZN7rocksdb13ObjectLibrary10AddFactoryINS_18MemTableRepFactoryEEERKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_SO_:
  238|      1|                                   const FactoryFunc<T>& func) {
  239|      1|    std::unique_ptr<Entry> entry(
  240|      1|        new FactoryEntry<T>(new PatternEntry(name), func));
  241|      1|    AddFactoryEntry(T::Type(), std::move(entry));
  242|      1|    return func;
  243|      1|  }
_ZN7rocksdb14ObjectRegistry15NewUniqueObjectINS_18MemTableRepFactoryEEENS_6StatusERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10unique_ptrIT_NS4_14default_deleteISE_EEEE:
  346|  9.02k|                         std::unique_ptr<T>* result) {
  347|  9.02k|    T* ptr = nullptr;
  348|  9.02k|    std::unique_ptr<T> guard;
  349|  9.02k|    Status s = NewObject(target, &ptr, &guard);
  350|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (350:9): [True: 0, False: 9.02k]
  ------------------
  351|      0|      return s;
  352|  9.02k|    } else if (guard) {
  ------------------
  |  Branch (352:16): [True: 9.02k, False: 0]
  ------------------
  353|  9.02k|      result->reset(guard.release());
  354|  9.02k|      return Status::OK();
  355|  9.02k|    } else {
  356|      0|      return Status::InvalidArgument(std::string("Cannot make a unique ") +
  357|      0|                                         T::Type() + " from unguarded one ",
  358|      0|                                     target);
  359|      0|    }
  360|  9.02k|  }
_ZN7rocksdb14ObjectRegistry9NewObjectINS_18MemTableRepFactoryEEENS_6StatusERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPPT_PNS4_10unique_ptrISD_NS4_14default_deleteISD_EEEE:
  319|  9.02k|                   std::unique_ptr<T>* guard) {
  320|  9.02k|    assert(guard != nullptr);
  321|  9.02k|    guard->reset();
  322|  9.02k|    auto factory = FindFactory<T>(target);
  323|  9.02k|    if (factory != nullptr) {
  ------------------
  |  Branch (323:9): [True: 9.02k, False: 0]
  ------------------
  324|  9.02k|      std::string errmsg;
  325|  9.02k|      *object = factory(target, guard, &errmsg);
  326|  9.02k|      if (*object != nullptr) {
  ------------------
  |  Branch (326:11): [True: 9.02k, False: 0]
  ------------------
  327|  9.02k|        return Status::OK();
  328|  9.02k|      } else if (errmsg.empty()) {
  ------------------
  |  Branch (328:18): [True: 0, False: 0]
  ------------------
  329|      0|        return Status::InvalidArgument(
  330|      0|            std::string("Could not load ") + T::Type(), target);
  331|      0|      } else {
  332|      0|        return Status::InvalidArgument(errmsg, target);
  333|      0|      }
  334|  9.02k|    } else {
  335|      0|      return Status::NotSupported(std::string("Could not load ") + T::Type(),
  336|      0|                                  target);
  337|      0|    }
  338|  9.02k|  }
_ZNK7rocksdb14ObjectRegistry11FindFactoryINS_18MemTableRepFactoryEEEKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_:
  554|  18.0k|  const FactoryFunc<T> FindFactory(const std::string& name) const {
  555|  18.0k|    {
  556|  18.0k|      std::unique_lock<std::mutex> lock(library_mutex_);
  557|  18.0k|      for (auto iter = libraries_.crbegin(); iter != libraries_.crend();
  ------------------
  |  Branch (557:46): [True: 9.02k, False: 9.02k]
  ------------------
  558|  18.0k|           ++iter) {
  559|  9.02k|        const auto factory = iter->get()->FindFactory<T>(name);
  560|  9.02k|        if (factory != nullptr) {
  ------------------
  |  Branch (560:13): [True: 9.02k, False: 0]
  ------------------
  561|  9.02k|          return factory;
  562|  9.02k|        }
  563|  9.02k|      }
  564|  18.0k|    }
  565|  9.02k|    if (parent_ == nullptr) {
  ------------------
  |  Branch (565:9): [True: 0, False: 9.02k]
  ------------------
  566|      0|      return nullptr;
  567|  9.02k|    } else {
  568|  9.02k|      return parent_->FindFactory<T>(name);
  569|  9.02k|    }
  570|  9.02k|  }
_ZNK7rocksdb13ObjectLibrary11FindFactoryINS_18MemTableRepFactoryEEENSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_:
  200|  9.02k|  FactoryFunc<T> FindFactory(const std::string& target) const {
  201|  9.02k|    std::unique_lock<std::mutex> lock(mu_);
  202|  9.02k|    auto factories = factories_.find(T::Type());
  203|  9.02k|    if (factories != factories_.end()) {
  ------------------
  |  Branch (203:9): [True: 9.02k, False: 0]
  ------------------
  204|  18.0k|      for (const auto& e : factories->second) {
  ------------------
  |  Branch (204:26): [True: 18.0k, False: 0]
  ------------------
  205|  18.0k|        if (e->Matches(target)) {
  ------------------
  |  Branch (205:13): [True: 9.02k, False: 9.02k]
  ------------------
  206|  9.02k|          const auto* fe =
  207|  9.02k|              static_cast<const ObjectLibrary::FactoryEntry<T>*>(e.get());
  208|  9.02k|          return fe->GetFactory();
  209|  9.02k|        }
  210|  18.0k|      }
  211|  9.02k|    }
  212|      0|    return nullptr;
  213|  9.02k|  }
_ZNK7rocksdb13ObjectLibrary12FactoryEntryINS_18MemTableRepFactoryEE10GetFactoryEv:
  185|  9.02k|    const FactoryFunc<T>& GetFactory() const { return factory_; }
_ZN7rocksdb13ObjectLibrary10AddFactoryINS_12TableFactoryEEERKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_SO_:
  238|      3|                                   const FactoryFunc<T>& func) {
  239|      3|    std::unique_ptr<Entry> entry(
  240|      3|        new FactoryEntry<T>(new PatternEntry(name), func));
  241|      3|    AddFactoryEntry(T::Type(), std::move(entry));
  242|      3|    return func;
  243|      3|  }
_ZN7rocksdb13ObjectLibrary12FactoryEntryINS_12TableFactoryEEC2EPNS0_5EntryENSt3__18functionIFPS2_RKNS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10unique_ptrIS2_NS6_14default_deleteIS2_EEEEPSE_EEE:
  174|      3|        : entry_(e), factory_(std::move(f)) {}
_ZNK7rocksdb13ObjectLibrary12FactoryEntryINS_12TableFactoryEE7MatchesERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  175|  18.0k|    bool Matches(const std::string& target) const override {
  176|  18.0k|      return entry_->Matches(target);
  177|  18.0k|    }
_ZN7rocksdb14ObjectRegistry15NewSharedObjectINS_12TableFactoryEEENS_6StatusERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIT_EE:
  369|  18.0k|                         std::shared_ptr<T>* result) {
  370|  18.0k|    std::unique_ptr<T> guard;
  371|  18.0k|    T* ptr = nullptr;
  372|  18.0k|    Status s = NewObject(target, &ptr, &guard);
  373|  18.0k|    if (!s.ok()) {
  ------------------
  |  Branch (373:9): [True: 0, False: 18.0k]
  ------------------
  374|      0|      return s;
  375|  18.0k|    } else if (guard) {
  ------------------
  |  Branch (375:16): [True: 18.0k, False: 0]
  ------------------
  376|  18.0k|      result->reset(guard.release());
  377|  18.0k|      return Status::OK();
  378|  18.0k|    } else {
  379|      0|      return Status::InvalidArgument(std::string("Cannot make a shared ") +
  380|      0|                                         T::Type() + " from unguarded one ",
  381|      0|                                     target);
  382|      0|    }
  383|  18.0k|  }
_ZN7rocksdb14ObjectRegistry9NewObjectINS_12TableFactoryEEENS_6StatusERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPPT_PNS4_10unique_ptrISD_NS4_14default_deleteISD_EEEE:
  319|  18.0k|                   std::unique_ptr<T>* guard) {
  320|  18.0k|    assert(guard != nullptr);
  321|  18.0k|    guard->reset();
  322|  18.0k|    auto factory = FindFactory<T>(target);
  323|  18.0k|    if (factory != nullptr) {
  ------------------
  |  Branch (323:9): [True: 18.0k, False: 0]
  ------------------
  324|  18.0k|      std::string errmsg;
  325|  18.0k|      *object = factory(target, guard, &errmsg);
  326|  18.0k|      if (*object != nullptr) {
  ------------------
  |  Branch (326:11): [True: 18.0k, False: 0]
  ------------------
  327|  18.0k|        return Status::OK();
  328|  18.0k|      } else if (errmsg.empty()) {
  ------------------
  |  Branch (328:18): [True: 0, False: 0]
  ------------------
  329|      0|        return Status::InvalidArgument(
  330|      0|            std::string("Could not load ") + T::Type(), target);
  331|      0|      } else {
  332|      0|        return Status::InvalidArgument(errmsg, target);
  333|      0|      }
  334|  18.0k|    } else {
  335|      0|      return Status::NotSupported(std::string("Could not load ") + T::Type(),
  336|      0|                                  target);
  337|      0|    }
  338|  18.0k|  }
_ZNK7rocksdb14ObjectRegistry11FindFactoryINS_12TableFactoryEEEKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_:
  554|  36.1k|  const FactoryFunc<T> FindFactory(const std::string& name) const {
  555|  36.1k|    {
  556|  36.1k|      std::unique_lock<std::mutex> lock(library_mutex_);
  557|  36.1k|      for (auto iter = libraries_.crbegin(); iter != libraries_.crend();
  ------------------
  |  Branch (557:46): [True: 18.0k, False: 18.0k]
  ------------------
  558|  36.1k|           ++iter) {
  559|  18.0k|        const auto factory = iter->get()->FindFactory<T>(name);
  560|  18.0k|        if (factory != nullptr) {
  ------------------
  |  Branch (560:13): [True: 18.0k, False: 0]
  ------------------
  561|  18.0k|          return factory;
  562|  18.0k|        }
  563|  18.0k|      }
  564|  36.1k|    }
  565|  18.0k|    if (parent_ == nullptr) {
  ------------------
  |  Branch (565:9): [True: 0, False: 18.0k]
  ------------------
  566|      0|      return nullptr;
  567|  18.0k|    } else {
  568|  18.0k|      return parent_->FindFactory<T>(name);
  569|  18.0k|    }
  570|  18.0k|  }
_ZNK7rocksdb13ObjectLibrary11FindFactoryINS_12TableFactoryEEENSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_:
  200|  18.0k|  FactoryFunc<T> FindFactory(const std::string& target) const {
  201|  18.0k|    std::unique_lock<std::mutex> lock(mu_);
  202|  18.0k|    auto factories = factories_.find(T::Type());
  203|  18.0k|    if (factories != factories_.end()) {
  ------------------
  |  Branch (203:9): [True: 18.0k, False: 0]
  ------------------
  204|  18.0k|      for (const auto& e : factories->second) {
  ------------------
  |  Branch (204:26): [True: 18.0k, False: 0]
  ------------------
  205|  18.0k|        if (e->Matches(target)) {
  ------------------
  |  Branch (205:13): [True: 18.0k, False: 0]
  ------------------
  206|  18.0k|          const auto* fe =
  207|  18.0k|              static_cast<const ObjectLibrary::FactoryEntry<T>*>(e.get());
  208|  18.0k|          return fe->GetFactory();
  209|  18.0k|        }
  210|  18.0k|      }
  211|  18.0k|    }
  212|      0|    return nullptr;
  213|  18.0k|  }
_ZNK7rocksdb13ObjectLibrary12FactoryEntryINS_12TableFactoryEE10GetFactoryEv:
  185|  18.0k|    const FactoryFunc<T>& GetFactory() const { return factory_; }
_ZN7rocksdb13ObjectLibrary10AddFactoryIKNS_10ComparatorEEERKNSt3__18functionIFPT_RKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10unique_ptrIS6_NS4_14default_deleteIS6_EEEEPSD_EEESF_SP_:
  238|      4|                                   const FactoryFunc<T>& func) {
  239|      4|    std::unique_ptr<Entry> entry(
  240|      4|        new FactoryEntry<T>(new PatternEntry(name), func));
  241|      4|    AddFactoryEntry(T::Type(), std::move(entry));
  242|      4|    return func;
  243|      4|  }
_ZN7rocksdb13ObjectLibrary12FactoryEntryIKNS_10ComparatorEEC2EPNS0_5EntryENSt3__18functionIFPS3_RKNS7_12basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEPNS7_10unique_ptrIS3_NS7_14default_deleteIS3_EEEEPSF_EEE:
  174|      4|        : entry_(e), factory_(std::move(f)) {}
_ZN7rocksdb13ObjectLibrary10AddFactoryIKNS_14SliceTransformEEERKNSt3__18functionIFPT_RKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10unique_ptrIS6_NS4_14default_deleteIS6_EEEEPSD_EEESF_SP_:
  238|      1|                                   const FactoryFunc<T>& func) {
  239|      1|    std::unique_ptr<Entry> entry(
  240|      1|        new FactoryEntry<T>(new PatternEntry(name), func));
  241|      1|    AddFactoryEntry(T::Type(), std::move(entry));
  242|      1|    return func;
  243|      1|  }
_ZN7rocksdb13ObjectLibrary12FactoryEntryIKNS_14SliceTransformEEC2EPNS0_5EntryENSt3__18functionIFPS3_RKNS7_12basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEPNS7_10unique_ptrIS3_NS7_14default_deleteIS3_EEEEPSF_EEE:
  174|      5|        : entry_(e), factory_(std::move(f)) {}
_ZN7rocksdb13ObjectLibrary10AddFactoryIKNS_14SliceTransformEEERKNSt3__18functionIFPT_RKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10unique_ptrIS6_NS4_14default_deleteIS6_EEEEPSD_EEERKNS0_12PatternEntryESP_:
  252|      4|                                   const FactoryFunc<T>& func) {
  253|      4|    std::unique_ptr<Entry> factory(
  254|      4|        new FactoryEntry<T>(new PatternEntry(entry), func));
  255|      4|    AddFactoryEntry(T::Type(), std::move(factory));
  256|      4|    return func;
  257|      4|  }
_ZN7rocksdb13ObjectLibrary10AddFactoryINS_22FileChecksumGenFactoryEEERKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_SO_:
  238|      1|                                   const FactoryFunc<T>& func) {
  239|      1|    std::unique_ptr<Entry> entry(
  240|      1|        new FactoryEntry<T>(new PatternEntry(name), func));
  241|      1|    AddFactoryEntry(T::Type(), std::move(entry));
  242|      1|    return func;
  243|      1|  }
_ZN7rocksdb13ObjectLibrary12FactoryEntryINS_22FileChecksumGenFactoryEEC2EPNS0_5EntryENSt3__18functionIFPS2_RKNS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10unique_ptrIS2_NS6_14default_deleteIS2_EEEEPSE_EEE:
  174|      1|        : entry_(e), factory_(std::move(f)) {}
_ZN7rocksdb13ObjectLibrary10AddFactoryINS_16CompactionFilterEEERKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_SO_:
  238|      1|                                   const FactoryFunc<T>& func) {
  239|      1|    std::unique_ptr<Entry> entry(
  240|      1|        new FactoryEntry<T>(new PatternEntry(name), func));
  241|      1|    AddFactoryEntry(T::Type(), std::move(entry));
  242|      1|    return func;
  243|      1|  }
_ZN7rocksdb13ObjectLibrary12FactoryEntryINS_16CompactionFilterEEC2EPNS0_5EntryENSt3__18functionIFPS2_RKNS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10unique_ptrIS2_NS6_14default_deleteIS2_EEEEPSE_EEE:
  174|      1|        : entry_(e), factory_(std::move(f)) {}
_ZN7rocksdb13ObjectLibrary10AddFactoryINS_13MergeOperatorEEERKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEERKNS0_12PatternEntryESO_:
  252|      8|                                   const FactoryFunc<T>& func) {
  253|      8|    std::unique_ptr<Entry> factory(
  254|      8|        new FactoryEntry<T>(new PatternEntry(entry), func));
  255|      8|    AddFactoryEntry(T::Type(), std::move(factory));
  256|      8|    return func;
  257|      8|  }
_ZN7rocksdb13ObjectLibrary12FactoryEntryINS_13MergeOperatorEEC2EPNS0_5EntryENSt3__18functionIFPS2_RKNS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10unique_ptrIS2_NS6_14default_deleteIS2_EEEEPSE_EEE:
  174|      8|        : entry_(e), factory_(std::move(f)) {}
_ZN7rocksdb13ObjectLibrary10AddFactoryINS_21SstPartitionerFactoryEEERKNSt3__18functionIFPT_RKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS3_10unique_ptrIS5_NS3_14default_deleteIS5_EEEEPSC_EEESE_SO_:
  238|      1|                                   const FactoryFunc<T>& func) {
  239|      1|    std::unique_ptr<Entry> entry(
  240|      1|        new FactoryEntry<T>(new PatternEntry(name), func));
  241|      1|    AddFactoryEntry(T::Type(), std::move(entry));
  242|      1|    return func;
  243|      1|  }
_ZN7rocksdb13ObjectLibrary12FactoryEntryINS_21SstPartitionerFactoryEEC2EPNS0_5EntryENSt3__18functionIFPS2_RKNS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPNS6_10unique_ptrIS2_NS6_14default_deleteIS2_EEEEPSE_EEE:
  174|      1|        : entry_(e), factory_(std::move(f)) {}

_ZN7rocksdb14OptionTypeInfoC2EiNS_10OptionTypeENS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  262|    750|        flags_(flags) {}
_ZN7rocksdb14OptionTypeInfoC2EiNS_10OptionTypeE:
  252|     14|        flags_(OptionTypeFlags::kNone) {}
_ZN7rocksdb14OptionTypeInfoC2EiNS_10OptionTypeENS_22OptionVerificationTypeENS_15OptionTypeFlagsERKNSt3__18functionIFNS_6StatusERKNS_13ConfigOptionsERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESH_PvEEE:
  273|     20|        flags_(flags) {}
_ZN7rocksdb14OptionTypeInfoC2EiNS_10OptionTypeENS_22OptionVerificationTypeENS_15OptionTypeFlagsERKNSt3__18functionIFNS_6StatusERKNS_13ConfigOptionsERKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESH_PvEEERKNS5_IFS6_S9_SH_PKvPSF_EEERKNS5_IFbS9_SH_SO_SO_SP_EEE:
  286|     20|        flags_(flags) {}
_ZN7rocksdb14OptionTypeInfo6StructERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKNS1_13unordered_mapIS7_S0_NS1_4hashIS7_EENS1_8equal_toIS7_EENS5_INS1_4pairIS8_S0_EEEEEEiNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  374|     18|      int offset, OptionVerificationType verification, OptionTypeFlags flags) {
  375|     18|    OptionTypeInfo info(offset, OptionType::kStruct, verification, flags);
  376|     18|    info.SetParseFunc(
  377|       |        // Parses the struct and updates the fields at addr
  378|     18|        [struct_name, struct_map](const ConfigOptions& opts,
  379|     18|                                  const std::string& name,
  380|     18|                                  const std::string& value, void* addr) {
  381|     18|          return ParseStruct(opts, struct_name, struct_map, name, value, addr);
  382|     18|        });
  383|     18|    info.SetSerializeFunc(
  384|       |        // Serializes the struct options into value
  385|     18|        [struct_name, struct_map](const ConfigOptions& opts,
  386|     18|                                  const std::string& name, const void* addr,
  387|     18|                                  std::string* value) {
  388|     18|          return SerializeStruct(opts, struct_name, struct_map, name, addr,
  389|     18|                                 value);
  390|     18|        });
  391|     18|    info.SetEqualsFunc(
  392|       |        // Compares the struct fields of addr1 and addr2 for equality
  393|     18|        [struct_name, struct_map](const ConfigOptions& opts,
  394|     18|                                  const std::string& name, const void* addr1,
  395|     18|                                  const void* addr2, std::string* mismatch) {
  396|     18|          return StructsAreEqual(opts, struct_name, struct_map, name, addr1,
  397|     18|                                 addr2, mismatch);
  398|     18|        });
  399|     18|    return info;
  400|     18|  }
_ZN7rocksdb14OptionTypeInfo6StructERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKNS1_13unordered_mapIS7_S0_NS1_4hashIS7_EENS1_8equal_toIS7_EENS5_INS1_4pairIS8_S0_EEEEEEiNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKNS1_8functionIFNS_6StatusERKNS_13ConfigOptionsES9_S9_PvEEE:
  405|      4|      const ParseFunc& parse_func) {
  406|      4|    OptionTypeInfo info(
  407|      4|        Struct(struct_name, struct_map, offset, verification, flags));
  408|      4|    return info.SetParseFunc(parse_func);
  409|      4|  }
_ZN7rocksdb14OptionTypeInfo12SetParseFuncERKNSt3__18functionIFNS_6StatusERKNS_13ConfigOptionsERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEESE_PvEEE:
  591|    110|  OptionTypeInfo& SetParseFunc(const ParseFunc& f) {
  592|    110|    parse_func_ = f;
  593|    110|    return *this;
  594|    110|  }
_ZN7rocksdb14OptionTypeInfo16SetSerializeFuncERKNSt3__18functionIFNS_6StatusERKNS_13ConfigOptionsERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKvPSC_EEE:
  596|     60|  OptionTypeInfo& SetSerializeFunc(const SerializeFunc& f) {
  597|     60|    serialize_func_ = f;
  598|     60|    return *this;
  599|     60|  }
_ZN7rocksdb14OptionTypeInfo13SetEqualsFuncERKNSt3__18functionIFbRKNS_13ConfigOptionsERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKvSF_PSB_EEE:
  600|     60|  OptionTypeInfo& SetEqualsFunc(const EqualsFunc& f) {
  601|     60|    equals_func_ = f;
  602|     60|    return *this;
  603|     60|  }
_ZN7rocksdb14OptionTypeInfo14SetPrepareFuncERKNSt3__18functionIFNS_6StatusERKNS_13ConfigOptionsERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPvEEE:
  605|      4|  OptionTypeInfo& SetPrepareFunc(const PrepareFunc& f) {
  606|      4|    prepare_func_ = f;
  607|      4|    return *this;
  608|      4|  }
_ZN7rocksdb14OptionTypeInfo15SetValidateFuncERKNSt3__18functionIFNS_6StatusERKNS_9DBOptionsERKNS_19ColumnFamilyOptionsERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKvEEE:
  610|      4|  OptionTypeInfo& SetValidateFunc(const ValidateFunc& f) {
  611|      4|    validate_func_ = f;
  612|      4|    return *this;
  613|      4|  }
_ZNK7rocksdb14OptionTypeInfo9IsEnabledENS_15OptionTypeFlagsE:
  615|  17.0M|  bool IsEnabled(OptionTypeFlags otf) const { return (flags_ & otf) == otf; }
_ZNK7rocksdb14OptionTypeInfo9IsMutableEv:
  624|  2.54M|  bool IsMutable() const { return IsEnabled(OptionTypeFlags::kMutable); }
_ZNK7rocksdb14OptionTypeInfo12IsDeprecatedEv:
  626|  22.5M|  bool IsDeprecated() const {
  627|  22.5M|    return IsEnabled(OptionVerificationType::kDeprecated);
  628|  22.5M|  }
_ZNK7rocksdb14OptionTypeInfo7IsAliasEv:
  633|  12.8M|  bool IsAlias() const { return IsEnabled(OptionVerificationType::kAlias); }
_ZNK7rocksdb14OptionTypeInfo9IsEnabledENS_22OptionVerificationTypeE:
  635|  35.4M|  bool IsEnabled(OptionVerificationType ovf) const {
  636|  35.4M|    return verification_ == ovf;
  637|  35.4M|  }
_ZNK7rocksdb14OptionTypeInfo14GetSanityLevelEv:
  643|  4.17M|  ConfigOptions::SanityLevel GetSanityLevel() const {
  644|  4.17M|    if (IsDeprecated() || IsAlias()) {
  ------------------
  |  Branch (644:9): [True: 379k, False: 3.79M]
  |  Branch (644:27): [True: 27.0k, False: 3.76M]
  ------------------
  645|   406k|      return ConfigOptions::SanityLevel::kSanityLevelNone;
  646|  3.76M|    } else {
  647|  3.76M|      auto match = (flags_ & OptionTypeFlags::kCompareExact);
  648|  3.76M|      if (match == OptionTypeFlags::kCompareDefault) {
  ------------------
  |  Branch (648:11): [True: 3.58M, False: 180k]
  ------------------
  649|  3.58M|        return ConfigOptions::SanityLevel::kSanityLevelExactMatch;
  650|  3.58M|      } else {
  651|   180k|        return (ConfigOptions::SanityLevel)match;
  652|   180k|      }
  653|  3.76M|    }
  654|  4.17M|  }
_ZNK7rocksdb14OptionTypeInfo15ShouldSerializeEv:
  659|  6.30M|  bool ShouldSerialize() const {
  660|  6.30M|    if (IsDeprecated() || IsAlias()) {
  ------------------
  |  Branch (660:9): [True: 920k, False: 5.38M]
  |  Branch (660:27): [True: 54.1k, False: 5.32M]
  ------------------
  661|   975k|      return false;
  662|  5.32M|    } else if (IsEnabled(OptionTypeFlags::kDontSerialize)) {
  ------------------
  |  Branch (662:16): [True: 135k, False: 5.19M]
  ------------------
  663|   135k|      return false;
  664|  5.19M|    } else {
  665|  5.19M|      return true;
  666|  5.19M|    }
  667|  6.30M|  }
_ZNK7rocksdb14OptionTypeInfo13ShouldPrepareEv:
  669|  1.98M|  bool ShouldPrepare() const {
  670|  1.98M|    if (IsDeprecated() || IsAlias()) {
  ------------------
  |  Branch (670:9): [True: 315k, False: 1.67M]
  |  Branch (670:27): [True: 27.0k, False: 1.64M]
  ------------------
  671|   343k|      return false;
  672|  1.64M|    } else if (IsEnabled(OptionTypeFlags::kDontPrepare)) {
  ------------------
  |  Branch (672:16): [True: 9.02k, False: 1.63M]
  ------------------
  673|  9.02k|      return false;
  674|  1.63M|    } else {
  675|  1.63M|      return (prepare_func_ != nullptr || IsConfigurable());
  ------------------
  |  Branch (675:15): [True: 18.0k, False: 1.61M]
  |  Branch (675:43): [True: 198k, False: 1.41M]
  ------------------
  676|  1.63M|    }
  677|  1.98M|  }
_ZNK7rocksdb14OptionTypeInfo14ShouldValidateEv:
  679|  2.36M|  bool ShouldValidate() const {
  680|  2.36M|    if (IsDeprecated() || IsAlias()) {
  ------------------
  |  Branch (680:9): [True: 370k, False: 1.99M]
  |  Branch (680:27): [True: 27.0k, False: 1.96M]
  ------------------
  681|   397k|      return false;
  682|  1.96M|    } else {
  683|  1.96M|      return (validate_func_ != nullptr || IsConfigurable());
  ------------------
  |  Branch (683:15): [True: 18.0k, False: 1.95M]
  |  Branch (683:44): [True: 252k, False: 1.69M]
  ------------------
  684|  1.96M|    }
  685|  2.36M|  }
_ZNK7rocksdb14OptionTypeInfo9CanBeNullEv:
  690|   171k|  bool CanBeNull() const {
  691|   171k|    return (IsEnabled(OptionTypeFlags::kAllowNull) ||
  ------------------
  |  Branch (691:13): [True: 144k, False: 27.0k]
  ------------------
  692|   171k|            IsEnabled(OptionVerificationType::kByNameAllowNull) ||
  ------------------
  |  Branch (692:13): [True: 18.0k, False: 9.02k]
  ------------------
  693|   171k|            IsEnabled(OptionVerificationType::kByNameAllowFromNull));
  ------------------
  |  Branch (693:13): [True: 9.02k, False: 0]
  ------------------
  694|   171k|  }
_ZNK7rocksdb14OptionTypeInfo11IsSharedPtrEv:
  696|   920k|  bool IsSharedPtr() const { return IsEnabled(OptionTypeFlags::kShared); }
_ZNK7rocksdb14OptionTypeInfo11IsUniquePtrEv:
  698|   920k|  bool IsUniquePtr() const { return IsEnabled(OptionTypeFlags::kUnique); }
_ZNK7rocksdb14OptionTypeInfo8IsRawPtrEv:
  700|   171k|  bool IsRawPtr() const { return IsEnabled(OptionTypeFlags::kRawPointer); }
_ZNK7rocksdb14OptionTypeInfo14IsConfigurableEv:
  710|  9.75M|  bool IsConfigurable() const {
  711|  9.75M|    return (type_ == OptionType::kConfigurable ||
  ------------------
  |  Branch (711:13): [True: 0, False: 9.75M]
  ------------------
  712|  9.75M|            type_ == OptionType::kCustomizable);
  ------------------
  |  Branch (712:13): [True: 866k, False: 8.89M]
  ------------------
  713|  9.75M|  }
_ZNK7rocksdb14OptionTypeInfo14IsCustomizableEv:
  715|  6.71M|  bool IsCustomizable() const { return (type_ == OptionType::kCustomizable); }
_ZNK7rocksdb14OptionTypeInfo9GetOffsetEPKv:
  717|  9.60M|  inline const void* GetOffset(const void* base) const {
  718|  9.60M|    return static_cast<const char*>(base) + offset_;
  719|  9.60M|  }
_ZNK7rocksdb14OptionTypeInfo9GetOffsetEPv:
  721|  2.69M|  inline void* GetOffset(void* base) const {
  722|  2.69M|    return static_cast<char*>(base) + offset_;
  723|  2.69M|  }
_ZN7rocksdb14OptionTypeInfo11kIdPropNameEv:
  926|   135k|  constexpr static const char* kIdPropName() { return "id"; }
_ZN7rocksdborERKNS_15OptionTypeFlagsES2_:
  116|     82|                                 const OptionTypeFlags& b) {
  117|     82|  return static_cast<OptionTypeFlags>(static_cast<uint32_t>(a) |
  118|     82|                                      static_cast<uint32_t>(b));
  119|     82|}
_ZN7rocksdbanERKNS_15OptionTypeFlagsES2_:
  122|  20.8M|                                 const OptionTypeFlags& b) {
  123|  20.8M|  return static_cast<OptionTypeFlags>(static_cast<uint32_t>(a) &
  124|  20.8M|                                      static_cast<uint32_t>(b));
  125|  20.8M|}
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_11SystemClockEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      4|                                          OptionTypeFlags flags) {
  486|      4|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      4|                        flags | OptionTypeFlags::kShared);
  488|      4|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      4|                                const std::string& name,
  490|      4|                                const std::string& value, void* addr) {
  491|      4|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      4|      if (name == kIdPropName() && value.empty()) {
  493|      4|        shared->reset();
  494|      4|        return Status::OK();
  495|      4|      } else {
  496|      4|        return T::CreateFromString(opts, value, shared);
  497|      4|      }
  498|      4|    });
  499|      4|  }
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_10FileSystemEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      4|                                          OptionTypeFlags flags) {
  486|      4|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      4|                        flags | OptionTypeFlags::kShared);
  488|      4|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      4|                                const std::string& name,
  490|      4|                                const std::string& value, void* addr) {
  491|      4|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      4|      if (name == kIdPropName() && value.empty()) {
  493|      4|        shared->reset();
  494|      4|        return Status::OK();
  495|      4|      } else {
  496|      4|        return T::CreateFromString(opts, value, shared);
  497|      4|      }
  498|      4|    });
  499|      4|  }
_ZZN7rocksdb14OptionTypeInfo6StructERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKNS1_13unordered_mapIS7_S0_NS1_4hashIS7_EENS1_8equal_toIS7_EENS5_INS1_4pairIS8_S0_EEEEEEiNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsES9_S9_PvE_clESP_S9_S9_SQ_:
  380|  27.0k|                                  const std::string& value, void* addr) {
  381|  27.0k|          return ParseStruct(opts, struct_name, struct_map, name, value, addr);
  382|  27.0k|        });
_ZZN7rocksdb14OptionTypeInfo6StructERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKNS1_13unordered_mapIS7_S0_NS1_4hashIS7_EENS1_8equal_toIS7_EENS5_INS1_4pairIS8_S0_EEEEEEiNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsES9_PKvPS7_E_clESP_S9_SR_SS_:
  387|   117k|                                  std::string* value) {
  388|   117k|          return SerializeStruct(opts, struct_name, struct_map, name, addr,
  389|   117k|                                 value);
  390|   117k|        });
_ZZN7rocksdb14OptionTypeInfo6StructERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPKNS1_13unordered_mapIS7_S0_NS1_4hashIS7_EENS1_8equal_toIS7_EENS5_INS1_4pairIS8_S0_EEEEEEiNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsES9_PKvSR_PS7_E_clESP_S9_SR_SR_SS_:
  395|  27.0k|                                  const void* addr2, std::string* mismatch) {
  396|  27.0k|          return StructsAreEqual(opts, struct_name, struct_map, name, addr1,
  397|  27.0k|                                 addr2, mismatch);
  398|  27.0k|        });
_ZNK7rocksdb14OptionTypeInfo12AsRawPointerINS_12ConfigurableEEEPKT_PKv:
  740|   415k|  const T* AsRawPointer(const void* const base_addr) const {
  741|   415k|    if (base_addr == nullptr) {
  ------------------
  |  Branch (741:9): [True: 0, False: 415k]
  ------------------
  742|      0|      return nullptr;
  743|      0|    }
  744|   415k|    if (IsUniquePtr()) {
  ------------------
  |  Branch (744:9): [True: 0, False: 415k]
  ------------------
  745|      0|      const auto ptr = GetOffsetAs<std::unique_ptr<T>>(base_addr);
  746|      0|      return ptr->get();
  747|   415k|    } else if (IsSharedPtr()) {
  ------------------
  |  Branch (747:16): [True: 334k, False: 81.2k]
  ------------------
  748|   334k|      const auto ptr = GetOffsetAs<std::shared_ptr<T>>(base_addr);
  749|   334k|      return ptr->get();
  750|   334k|    } else if (IsRawPtr()) {
  ------------------
  |  Branch (750:16): [True: 81.2k, False: 0]
  ------------------
  751|  81.2k|      const T* const* ptr = GetOffsetAs<T* const>(base_addr);
  752|  81.2k|      return *ptr;
  753|  81.2k|    } else {
  754|      0|      return GetOffsetAs<T>(base_addr);
  755|      0|    }
  756|   415k|  }
_ZNK7rocksdb14OptionTypeInfo11GetOffsetAsINSt3__110shared_ptrINS_12ConfigurableEEEEEPKT_PKv:
  726|   334k|  const T* GetOffsetAs(const void* base) const {
  727|   334k|    const void* addr = GetOffset(base);
  728|   334k|    return static_cast<const T*>(addr);
  729|   334k|  }
_ZNK7rocksdb14OptionTypeInfo11GetOffsetAsIKPNS_12ConfigurableEEEPKT_PKv:
  726|  81.2k|  const T* GetOffsetAs(const void* base) const {
  727|  81.2k|    const void* addr = GetOffset(base);
  728|  81.2k|    return static_cast<const T*>(addr);
  729|  81.2k|  }
_ZN7rocksdb14OptionTypeInfo6VectorINS_18FileTemperatureAgeEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_c:
  448|      2|                               char separator = ':') {
  449|      2|    OptionTypeInfo info(_offset, OptionType::kVector, _verification, _flags);
  450|      2|    info.SetParseFunc([elem_info, separator](
  451|      2|                          const ConfigOptions& opts, const std::string& name,
  452|      2|                          const std::string& value, void* addr) {
  453|      2|      auto result = static_cast<std::vector<T>*>(addr);
  454|      2|      return ParseVector<T>(opts, elem_info, separator, name, value, result);
  455|      2|    });
  456|      2|    info.SetSerializeFunc([elem_info, separator](const ConfigOptions& opts,
  457|      2|                                                 const std::string& name,
  458|      2|                                                 const void* addr,
  459|      2|                                                 std::string* value) {
  460|      2|      const auto& vec = *(static_cast<const std::vector<T>*>(addr));
  461|      2|      return SerializeVector<T>(opts, elem_info, separator, name, vec, value);
  462|      2|    });
  463|      2|    info.SetEqualsFunc([elem_info](const ConfigOptions& opts,
  464|      2|                                   const std::string& name, const void* addr1,
  465|      2|                                   const void* addr2, std::string* mismatch) {
  466|      2|      const auto& vec1 = *(static_cast<const std::vector<T>*>(addr1));
  467|      2|      const auto& vec2 = *(static_cast<const std::vector<T>*>(addr2));
  468|      2|      return VectorsAreEqual<T>(opts, elem_info, name, vec1, vec2, mismatch);
  469|      2|    });
  470|      2|    return info;
  471|      2|  }
_ZZN7rocksdb14OptionTypeInfo6VectorINS_18FileTemperatureAgeEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_cENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNSA_11char_traitsIcEENSA_9allocatorIcEEEESI_PvE_clES9_SI_SI_SJ_:
  452|  9.02k|                          const std::string& value, void* addr) {
  453|  9.02k|      auto result = static_cast<std::vector<T>*>(addr);
  454|  9.02k|      return ParseVector<T>(opts, elem_info, separator, name, value, result);
  455|  9.02k|    });
_ZN7rocksdb11ParseVectorINS_18FileTemperatureAgeEEENS_6StatusERKNS_13ConfigOptionsERKNS_14OptionTypeInfoEcRKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEESH_PNS9_6vectorIT_NSD_ISJ_EEEE:
 1108|  9.02k|                   std::vector<T>* result) {
 1109|  9.02k|  result->clear();
 1110|  9.02k|  Status status;
 1111|       |
 1112|       |  // Turn off ignore_unknown_objects so we can tell if the returned
 1113|       |  // object is valid or not.
 1114|  9.02k|  ConfigOptions copy = config_options;
 1115|  9.02k|  copy.ignore_unsupported_options = false;
 1116|  9.02k|  for (size_t start = 0, end = 0;
 1117|  9.02k|       status.ok() && start < value.size() && end != std::string::npos;
  ------------------
  |  Branch (1117:8): [True: 9.02k, False: 0]
  |  Branch (1117:23): [True: 0, False: 9.02k]
  |  Branch (1117:47): [True: 0, False: 0]
  ------------------
 1118|  9.02k|       start = end + 1) {
 1119|      0|    std::string token;
 1120|      0|    status = OptionTypeInfo::NextToken(value, separator, start, &end, &token);
 1121|      0|    if (status.ok()) {
  ------------------
  |  Branch (1121:9): [True: 0, False: 0]
  ------------------
 1122|      0|      T elem;
 1123|      0|      status = elem_info.Parse(copy, name, token, &elem);
 1124|      0|      if (status.ok()) {
  ------------------
  |  Branch (1124:11): [True: 0, False: 0]
  ------------------
 1125|      0|        result->emplace_back(elem);
 1126|      0|      } else if (config_options.ignore_unsupported_options &&
  ------------------
  |  Branch (1126:18): [True: 0, False: 0]
  ------------------
 1127|      0|                 status.IsNotSupported()) {
  ------------------
  |  Branch (1127:18): [True: 0, False: 0]
  ------------------
 1128|       |        // If we were ignoring unsupported options and this one should be
 1129|       |        // ignored, ignore it by setting the status to OK
 1130|      0|        status = Status::OK();
 1131|      0|      }
 1132|      0|    }
 1133|      0|  }
 1134|  9.02k|  return status;
 1135|  9.02k|}
_ZZN7rocksdb14OptionTypeInfo6VectorINS_18FileTemperatureAgeEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_cENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNSA_11char_traitsIcEENSA_9allocatorIcEEEEPKvPSG_E_clES9_SI_SK_SL_:
  459|  18.0k|                                                 std::string* value) {
  460|  18.0k|      const auto& vec = *(static_cast<const std::vector<T>*>(addr));
  461|  18.0k|      return SerializeVector<T>(opts, elem_info, separator, name, vec, value);
  462|  18.0k|    });
_ZN7rocksdb15SerializeVectorINS_18FileTemperatureAgeEEENS_6StatusERKNS_13ConfigOptionsERKNS_14OptionTypeInfoEcRKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEERKNS9_6vectorIT_NSD_ISJ_EEEEPSF_:
 1159|  18.0k|                       std::string* value) {
 1160|  18.0k|  std::string result;
 1161|  18.0k|  ConfigOptions embedded = config_options;
 1162|  18.0k|  embedded.delimiter = ";";
 1163|  18.0k|  int printed = 0;
 1164|  18.0k|  for (const auto& elem : vec) {
  ------------------
  |  Branch (1164:25): [True: 0, False: 18.0k]
  ------------------
 1165|      0|    std::string elem_str;
 1166|      0|    Status s = elem_info.Serialize(embedded, name, &elem, &elem_str);
 1167|      0|    if (!s.ok()) {
  ------------------
  |  Branch (1167:9): [True: 0, False: 0]
  ------------------
 1168|      0|      return s;
 1169|      0|    } else if (!elem_str.empty()) {
  ------------------
  |  Branch (1169:16): [True: 0, False: 0]
  ------------------
 1170|      0|      if (printed++ > 0) {
  ------------------
  |  Branch (1170:11): [True: 0, False: 0]
  ------------------
 1171|      0|        result += separator;
 1172|      0|      }
 1173|       |      // If the element contains embedded separators, put it inside of brackets
 1174|      0|      if (elem_str.find(separator) != std::string::npos) {
  ------------------
  |  Branch (1174:11): [True: 0, False: 0]
  ------------------
 1175|      0|        result += "{" + elem_str + "}";
 1176|      0|      } else {
 1177|      0|        result += elem_str;
 1178|      0|      }
 1179|      0|    }
 1180|      0|  }
 1181|  18.0k|  if (result.find("=") != std::string::npos) {
  ------------------
  |  Branch (1181:7): [True: 0, False: 18.0k]
  ------------------
 1182|      0|    *value = "{" + result + "}";
 1183|  18.0k|  } else if (printed > 1 && result.at(0) == '{') {
  ------------------
  |  Branch (1183:14): [True: 0, False: 18.0k]
  |  Branch (1183:29): [True: 0, False: 0]
  ------------------
 1184|      0|    *value = "{" + result + "}";
 1185|  18.0k|  } else {
 1186|  18.0k|    *value = result;
 1187|  18.0k|  }
 1188|  18.0k|  return Status::OK();
 1189|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo6VectorINS_18FileTemperatureAgeEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_cENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNSA_11char_traitsIcEENSA_9allocatorIcEEEEPKvSK_PSG_E_clES9_SI_SK_SK_SL_:
  465|  9.02k|                                   const void* addr2, std::string* mismatch) {
  466|  9.02k|      const auto& vec1 = *(static_cast<const std::vector<T>*>(addr1));
  467|  9.02k|      const auto& vec2 = *(static_cast<const std::vector<T>*>(addr2));
  468|  9.02k|      return VectorsAreEqual<T>(opts, elem_info, name, vec1, vec2, mismatch);
  469|  9.02k|    });
_ZN7rocksdb15VectorsAreEqualINS_18FileTemperatureAgeEEEbRKNS_13ConfigOptionsERKNS_14OptionTypeInfoERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEERKNS8_6vectorIT_NSC_ISI_EEEESM_PSE_:
 1207|  9.02k|                     std::string* mismatch) {
 1208|  9.02k|  if (vec1.size() != vec2.size()) {
  ------------------
  |  Branch (1208:7): [True: 0, False: 9.02k]
  ------------------
 1209|      0|    *mismatch = name;
 1210|      0|    return false;
 1211|  9.02k|  } else {
 1212|  9.02k|    for (size_t i = 0; i < vec1.size(); ++i) {
  ------------------
  |  Branch (1212:24): [True: 0, False: 9.02k]
  ------------------
 1213|      0|      if (!elem_info.AreEqual(
  ------------------
  |  Branch (1213:11): [True: 0, False: 0]
  ------------------
 1214|      0|              config_options, name, reinterpret_cast<const char*>(&vec1[i]),
 1215|      0|              reinterpret_cast<const char*>(&vec2[i]), mismatch)) {
 1216|      0|        return false;
 1217|      0|      }
 1218|      0|    }
 1219|  9.02k|    return true;
 1220|  9.02k|  }
 1221|  9.02k|}
_ZN7rocksdb14OptionTypeInfo6VectorIiEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_c:
  448|      2|                               char separator = ':') {
  449|      2|    OptionTypeInfo info(_offset, OptionType::kVector, _verification, _flags);
  450|      2|    info.SetParseFunc([elem_info, separator](
  451|      2|                          const ConfigOptions& opts, const std::string& name,
  452|      2|                          const std::string& value, void* addr) {
  453|      2|      auto result = static_cast<std::vector<T>*>(addr);
  454|      2|      return ParseVector<T>(opts, elem_info, separator, name, value, result);
  455|      2|    });
  456|      2|    info.SetSerializeFunc([elem_info, separator](const ConfigOptions& opts,
  457|      2|                                                 const std::string& name,
  458|      2|                                                 const void* addr,
  459|      2|                                                 std::string* value) {
  460|      2|      const auto& vec = *(static_cast<const std::vector<T>*>(addr));
  461|      2|      return SerializeVector<T>(opts, elem_info, separator, name, vec, value);
  462|      2|    });
  463|      2|    info.SetEqualsFunc([elem_info](const ConfigOptions& opts,
  464|      2|                                   const std::string& name, const void* addr1,
  465|      2|                                   const void* addr2, std::string* mismatch) {
  466|      2|      const auto& vec1 = *(static_cast<const std::vector<T>*>(addr1));
  467|      2|      const auto& vec2 = *(static_cast<const std::vector<T>*>(addr2));
  468|      2|      return VectorsAreEqual<T>(opts, elem_info, name, vec1, vec2, mismatch);
  469|      2|    });
  470|      2|    return info;
  471|      2|  }
_ZZN7rocksdb14OptionTypeInfo6VectorIiEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_cENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEESH_PvE_clES8_SH_SH_SI_:
  452|  9.02k|                          const std::string& value, void* addr) {
  453|  9.02k|      auto result = static_cast<std::vector<T>*>(addr);
  454|  9.02k|      return ParseVector<T>(opts, elem_info, separator, name, value, result);
  455|  9.02k|    });
_ZN7rocksdb11ParseVectorIiEENS_6StatusERKNS_13ConfigOptionsERKNS_14OptionTypeInfoEcRKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEESG_PNS8_6vectorIT_NSC_ISI_EEEE:
 1108|  9.02k|                   std::vector<T>* result) {
 1109|  9.02k|  result->clear();
 1110|  9.02k|  Status status;
 1111|       |
 1112|       |  // Turn off ignore_unknown_objects so we can tell if the returned
 1113|       |  // object is valid or not.
 1114|  9.02k|  ConfigOptions copy = config_options;
 1115|  9.02k|  copy.ignore_unsupported_options = false;
 1116|  9.02k|  for (size_t start = 0, end = 0;
 1117|  72.2k|       status.ok() && start < value.size() && end != std::string::npos;
  ------------------
  |  Branch (1117:8): [True: 72.2k, False: 0]
  |  Branch (1117:23): [True: 72.2k, False: 0]
  |  Branch (1117:47): [True: 63.1k, False: 9.02k]
  ------------------
 1118|  63.1k|       start = end + 1) {
 1119|  63.1k|    std::string token;
 1120|  63.1k|    status = OptionTypeInfo::NextToken(value, separator, start, &end, &token);
 1121|  63.1k|    if (status.ok()) {
  ------------------
  |  Branch (1121:9): [True: 63.1k, False: 0]
  ------------------
 1122|  63.1k|      T elem;
 1123|  63.1k|      status = elem_info.Parse(copy, name, token, &elem);
 1124|  63.1k|      if (status.ok()) {
  ------------------
  |  Branch (1124:11): [True: 63.1k, False: 0]
  ------------------
 1125|  63.1k|        result->emplace_back(elem);
 1126|  63.1k|      } else if (config_options.ignore_unsupported_options &&
  ------------------
  |  Branch (1126:18): [True: 0, False: 0]
  ------------------
 1127|      0|                 status.IsNotSupported()) {
  ------------------
  |  Branch (1127:18): [True: 0, False: 0]
  ------------------
 1128|       |        // If we were ignoring unsupported options and this one should be
 1129|       |        // ignored, ignore it by setting the status to OK
 1130|      0|        status = Status::OK();
 1131|      0|      }
 1132|  63.1k|    }
 1133|  63.1k|  }
 1134|  9.02k|  return status;
 1135|  9.02k|}
_ZZN7rocksdb14OptionTypeInfo6VectorIiEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_cENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEEPKvPSF_E_clES8_SH_SJ_SK_:
  459|  18.0k|                                                 std::string* value) {
  460|  18.0k|      const auto& vec = *(static_cast<const std::vector<T>*>(addr));
  461|  18.0k|      return SerializeVector<T>(opts, elem_info, separator, name, vec, value);
  462|  18.0k|    });
_ZN7rocksdb15SerializeVectorIiEENS_6StatusERKNS_13ConfigOptionsERKNS_14OptionTypeInfoEcRKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEERKNS8_6vectorIT_NSC_ISI_EEEEPSE_:
 1159|  18.0k|                       std::string* value) {
 1160|  18.0k|  std::string result;
 1161|  18.0k|  ConfigOptions embedded = config_options;
 1162|  18.0k|  embedded.delimiter = ";";
 1163|  18.0k|  int printed = 0;
 1164|   126k|  for (const auto& elem : vec) {
  ------------------
  |  Branch (1164:25): [True: 126k, False: 18.0k]
  ------------------
 1165|   126k|    std::string elem_str;
 1166|   126k|    Status s = elem_info.Serialize(embedded, name, &elem, &elem_str);
 1167|   126k|    if (!s.ok()) {
  ------------------
  |  Branch (1167:9): [True: 0, False: 126k]
  ------------------
 1168|      0|      return s;
 1169|   126k|    } else if (!elem_str.empty()) {
  ------------------
  |  Branch (1169:16): [True: 126k, False: 0]
  ------------------
 1170|   126k|      if (printed++ > 0) {
  ------------------
  |  Branch (1170:11): [True: 108k, False: 18.0k]
  ------------------
 1171|   108k|        result += separator;
 1172|   108k|      }
 1173|       |      // If the element contains embedded separators, put it inside of brackets
 1174|   126k|      if (elem_str.find(separator) != std::string::npos) {
  ------------------
  |  Branch (1174:11): [True: 0, False: 126k]
  ------------------
 1175|      0|        result += "{" + elem_str + "}";
 1176|   126k|      } else {
 1177|   126k|        result += elem_str;
 1178|   126k|      }
 1179|   126k|    }
 1180|   126k|  }
 1181|  18.0k|  if (result.find("=") != std::string::npos) {
  ------------------
  |  Branch (1181:7): [True: 0, False: 18.0k]
  ------------------
 1182|      0|    *value = "{" + result + "}";
 1183|  18.0k|  } else if (printed > 1 && result.at(0) == '{') {
  ------------------
  |  Branch (1183:14): [True: 18.0k, False: 0]
  |  Branch (1183:29): [True: 0, False: 18.0k]
  ------------------
 1184|      0|    *value = "{" + result + "}";
 1185|  18.0k|  } else {
 1186|  18.0k|    *value = result;
 1187|  18.0k|  }
 1188|  18.0k|  return Status::OK();
 1189|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo6VectorIiEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_cENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEEPKvSJ_PSF_E_clES8_SH_SJ_SJ_SK_:
  465|  9.02k|                                   const void* addr2, std::string* mismatch) {
  466|  9.02k|      const auto& vec1 = *(static_cast<const std::vector<T>*>(addr1));
  467|  9.02k|      const auto& vec2 = *(static_cast<const std::vector<T>*>(addr2));
  468|  9.02k|      return VectorsAreEqual<T>(opts, elem_info, name, vec1, vec2, mismatch);
  469|  9.02k|    });
_ZN7rocksdb15VectorsAreEqualIiEEbRKNS_13ConfigOptionsERKNS_14OptionTypeInfoERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEERKNS7_6vectorIT_NSB_ISH_EEEESL_PSD_:
 1207|  9.02k|                     std::string* mismatch) {
 1208|  9.02k|  if (vec1.size() != vec2.size()) {
  ------------------
  |  Branch (1208:7): [True: 0, False: 9.02k]
  ------------------
 1209|      0|    *mismatch = name;
 1210|      0|    return false;
 1211|  9.02k|  } else {
 1212|  72.2k|    for (size_t i = 0; i < vec1.size(); ++i) {
  ------------------
  |  Branch (1212:24): [True: 63.1k, False: 9.02k]
  ------------------
 1213|  63.1k|      if (!elem_info.AreEqual(
  ------------------
  |  Branch (1213:11): [True: 0, False: 63.1k]
  ------------------
 1214|  63.1k|              config_options, name, reinterpret_cast<const char*>(&vec1[i]),
 1215|  63.1k|              reinterpret_cast<const char*>(&vec2[i]), mismatch)) {
 1216|      0|        return false;
 1217|      0|      }
 1218|  63.1k|    }
 1219|  9.02k|    return true;
 1220|  9.02k|  }
 1221|  9.02k|}
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrIKNS_14SliceTransformEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      4|                                          OptionTypeFlags flags) {
  486|      4|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      4|                        flags | OptionTypeFlags::kShared);
  488|      4|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      4|                                const std::string& name,
  490|      4|                                const std::string& value, void* addr) {
  491|      4|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      4|      if (name == kIdPropName() && value.empty()) {
  493|      4|        shared->reset();
  494|      4|        return Status::OK();
  495|      4|      } else {
  496|      4|        return T::CreateFromString(opts, value, shared);
  497|      4|      }
  498|      4|    });
  499|      4|  }
_ZZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrIKNS_14SliceTransformEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEESH_PvE_clES8_SH_SH_SI_:
  490|  18.0k|                                const std::string& value, void* addr) {
  491|  18.0k|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|  18.0k|      if (name == kIdPropName() && value.empty()) {
  ------------------
  |  Branch (492:11): [True: 0, False: 18.0k]
  |  Branch (492:36): [True: 0, False: 0]
  ------------------
  493|      0|        shared->reset();
  494|      0|        return Status::OK();
  495|  18.0k|      } else {
  496|  18.0k|        return T::CreateFromString(opts, value, shared);
  497|  18.0k|      }
  498|  18.0k|    });
_ZN7rocksdb14OptionTypeInfo4EnumINS_20PrepopulateBlobCacheEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeE:
  303|      2|      OptionVerificationType verification = OptionVerificationType::kNormal) {
  304|      2|    OptionTypeInfo info(offset, OptionType::kEnum, verification, flags);
  305|      2|    info.SetParseFunc(
  306|       |        // Uses the map argument to convert the input string into
  307|       |        // its corresponding enum value.  If value is found in the map,
  308|       |        // addr is updated to the corresponding map entry.
  309|       |        // @return OK if the value is found in the map
  310|       |        // @return InvalidArgument if the value is not found in the map
  311|      2|        [map](const ConfigOptions&, const std::string& name,
  312|      2|              const std::string& value, void* addr) {
  313|      2|          if (map == nullptr) {
  314|      2|            return Status::NotSupported("No enum mapping ", name);
  315|      2|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  316|      2|            return Status::OK();
  317|      2|          } else {
  318|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      2|          }
  320|      2|        });
  321|      2|    info.SetSerializeFunc(
  322|       |        // Uses the map argument to convert the input enum into
  323|       |        // its corresponding string value.  If enum value is found in the map,
  324|       |        // value is updated to the corresponding string value in the map.
  325|       |        // @return OK if the enum is found in the map
  326|       |        // @return InvalidArgument if the enum is not found in the map
  327|      2|        [map](const ConfigOptions&, const std::string& name, const void* addr,
  328|      2|              std::string* value) {
  329|      2|          if (map == nullptr) {
  330|      2|            return Status::NotSupported("No enum mapping ", name);
  331|      2|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  332|      2|                                      value)) {
  333|      2|            return Status::OK();
  334|      2|          } else {
  335|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      2|          }
  337|      2|        });
  338|      2|    info.SetEqualsFunc(
  339|       |        // Casts addr1 and addr2 to the enum type and returns true if
  340|       |        // they are equal, false otherwise.
  341|      2|        [](const ConfigOptions&, const std::string&, const void* addr1,
  342|      2|           const void* addr2, std::string*) {
  343|      2|          return (*static_cast<const T*>(addr1) ==
  344|      2|                  *static_cast<const T*>(addr2));
  345|      2|        });
  346|      2|    return info;
  347|      2|  }  // End OptionTypeInfo::Enum
_ZZN7rocksdb14OptionTypeInfo4EnumINS_20PrepopulateBlobCacheEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_SS_PvE_clESR_SS_SS_ST_:
  312|  9.02k|              const std::string& value, void* addr) {
  313|  9.02k|          if (map == nullptr) {
  ------------------
  |  Branch (313:15): [True: 0, False: 9.02k]
  ------------------
  314|      0|            return Status::NotSupported("No enum mapping ", name);
  315|  9.02k|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  ------------------
  |  Branch (315:22): [True: 9.02k, False: 0]
  ------------------
  316|  9.02k|            return Status::OK();
  317|  9.02k|          } else {
  318|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      0|          }
  320|  9.02k|        });
_ZN7rocksdb9ParseEnumINS_20PrepopulateBlobCacheEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERSG_PSA_:
  134|  9.02k|               const std::string& type, T* value) {
  135|  9.02k|  auto iter = type_map.find(type);
  136|  9.02k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 9.02k, False: 0]
  ------------------
  137|  9.02k|    *value = iter->second;
  138|  9.02k|    return true;
  139|  9.02k|  }
  140|      0|  return false;
  141|  9.02k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_20PrepopulateBlobCacheEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_PKvPSA_E_clESR_SS_SU_SV_:
  328|  18.0k|              std::string* value) {
  329|  18.0k|          if (map == nullptr) {
  ------------------
  |  Branch (329:15): [True: 0, False: 18.0k]
  ------------------
  330|      0|            return Status::NotSupported("No enum mapping ", name);
  331|  18.0k|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  ------------------
  |  Branch (331:22): [True: 18.0k, False: 0]
  ------------------
  332|  18.0k|                                      value)) {
  333|  18.0k|            return Status::OK();
  334|  18.0k|          } else {
  335|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      0|          }
  337|  18.0k|        });
_ZN7rocksdb13SerializeEnumINS_20PrepopulateBlobCacheEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERKSA_PS9_:
  150|  18.0k|                   const T& type, std::string* value) {
  151|  36.1k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 36.1k, False: 0]
  ------------------
  152|  36.1k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 18.0k, False: 18.0k]
  ------------------
  153|  18.0k|      *value = pair.first;
  154|  18.0k|      return true;
  155|  18.0k|    }
  156|  36.1k|  }
  157|      0|  return false;
  158|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_20PrepopulateBlobCacheEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_PKvSU_PSA_E_clESR_SS_SU_SU_SV_:
  342|  9.02k|           const void* addr2, std::string*) {
  343|  9.02k|          return (*static_cast<const T*>(addr1) ==
  344|  9.02k|                  *static_cast<const T*>(addr2));
  345|  9.02k|        });
_ZN7rocksdb14OptionTypeInfo6VectorINS_15CompressionTypeEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_c:
  448|      2|                               char separator = ':') {
  449|      2|    OptionTypeInfo info(_offset, OptionType::kVector, _verification, _flags);
  450|      2|    info.SetParseFunc([elem_info, separator](
  451|      2|                          const ConfigOptions& opts, const std::string& name,
  452|      2|                          const std::string& value, void* addr) {
  453|      2|      auto result = static_cast<std::vector<T>*>(addr);
  454|      2|      return ParseVector<T>(opts, elem_info, separator, name, value, result);
  455|      2|    });
  456|      2|    info.SetSerializeFunc([elem_info, separator](const ConfigOptions& opts,
  457|      2|                                                 const std::string& name,
  458|      2|                                                 const void* addr,
  459|      2|                                                 std::string* value) {
  460|      2|      const auto& vec = *(static_cast<const std::vector<T>*>(addr));
  461|      2|      return SerializeVector<T>(opts, elem_info, separator, name, vec, value);
  462|      2|    });
  463|      2|    info.SetEqualsFunc([elem_info](const ConfigOptions& opts,
  464|      2|                                   const std::string& name, const void* addr1,
  465|      2|                                   const void* addr2, std::string* mismatch) {
  466|      2|      const auto& vec1 = *(static_cast<const std::vector<T>*>(addr1));
  467|      2|      const auto& vec2 = *(static_cast<const std::vector<T>*>(addr2));
  468|      2|      return VectorsAreEqual<T>(opts, elem_info, name, vec1, vec2, mismatch);
  469|      2|    });
  470|      2|    return info;
  471|      2|  }
_ZZN7rocksdb14OptionTypeInfo6VectorINS_15CompressionTypeEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_cENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNSA_11char_traitsIcEENSA_9allocatorIcEEEEPKvPSG_E_clES9_SI_SK_SL_:
  459|  18.0k|                                                 std::string* value) {
  460|  18.0k|      const auto& vec = *(static_cast<const std::vector<T>*>(addr));
  461|  18.0k|      return SerializeVector<T>(opts, elem_info, separator, name, vec, value);
  462|  18.0k|    });
_ZN7rocksdb15SerializeVectorINS_15CompressionTypeEEENS_6StatusERKNS_13ConfigOptionsERKNS_14OptionTypeInfoEcRKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEERKNS9_6vectorIT_NSD_ISJ_EEEEPSF_:
 1159|  18.0k|                       std::string* value) {
 1160|  18.0k|  std::string result;
 1161|  18.0k|  ConfigOptions embedded = config_options;
 1162|  18.0k|  embedded.delimiter = ";";
 1163|  18.0k|  int printed = 0;
 1164|  18.0k|  for (const auto& elem : vec) {
  ------------------
  |  Branch (1164:25): [True: 0, False: 18.0k]
  ------------------
 1165|      0|    std::string elem_str;
 1166|      0|    Status s = elem_info.Serialize(embedded, name, &elem, &elem_str);
 1167|      0|    if (!s.ok()) {
  ------------------
  |  Branch (1167:9): [True: 0, False: 0]
  ------------------
 1168|      0|      return s;
 1169|      0|    } else if (!elem_str.empty()) {
  ------------------
  |  Branch (1169:16): [True: 0, False: 0]
  ------------------
 1170|      0|      if (printed++ > 0) {
  ------------------
  |  Branch (1170:11): [True: 0, False: 0]
  ------------------
 1171|      0|        result += separator;
 1172|      0|      }
 1173|       |      // If the element contains embedded separators, put it inside of brackets
 1174|      0|      if (elem_str.find(separator) != std::string::npos) {
  ------------------
  |  Branch (1174:11): [True: 0, False: 0]
  ------------------
 1175|      0|        result += "{" + elem_str + "}";
 1176|      0|      } else {
 1177|      0|        result += elem_str;
 1178|      0|      }
 1179|      0|    }
 1180|      0|  }
 1181|  18.0k|  if (result.find("=") != std::string::npos) {
  ------------------
  |  Branch (1181:7): [True: 0, False: 18.0k]
  ------------------
 1182|      0|    *value = "{" + result + "}";
 1183|  18.0k|  } else if (printed > 1 && result.at(0) == '{') {
  ------------------
  |  Branch (1183:14): [True: 0, False: 18.0k]
  |  Branch (1183:29): [True: 0, False: 0]
  ------------------
 1184|      0|    *value = "{" + result + "}";
 1185|  18.0k|  } else {
 1186|  18.0k|    *value = result;
 1187|  18.0k|  }
 1188|  18.0k|  return Status::OK();
 1189|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo6VectorINS_15CompressionTypeEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_cENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNSA_11char_traitsIcEENSA_9allocatorIcEEEEPKvSK_PSG_E_clES9_SI_SK_SK_SL_:
  465|  9.02k|                                   const void* addr2, std::string* mismatch) {
  466|  9.02k|      const auto& vec1 = *(static_cast<const std::vector<T>*>(addr1));
  467|  9.02k|      const auto& vec2 = *(static_cast<const std::vector<T>*>(addr2));
  468|  9.02k|      return VectorsAreEqual<T>(opts, elem_info, name, vec1, vec2, mismatch);
  469|  9.02k|    });
_ZN7rocksdb15VectorsAreEqualINS_15CompressionTypeEEEbRKNS_13ConfigOptionsERKNS_14OptionTypeInfoERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEERKNS8_6vectorIT_NSC_ISI_EEEESM_PSE_:
 1207|  9.02k|                     std::string* mismatch) {
 1208|  9.02k|  if (vec1.size() != vec2.size()) {
  ------------------
  |  Branch (1208:7): [True: 0, False: 9.02k]
  ------------------
 1209|      0|    *mismatch = name;
 1210|      0|    return false;
 1211|  9.02k|  } else {
 1212|  9.02k|    for (size_t i = 0; i < vec1.size(); ++i) {
  ------------------
  |  Branch (1212:24): [True: 0, False: 9.02k]
  ------------------
 1213|      0|      if (!elem_info.AreEqual(
  ------------------
  |  Branch (1213:11): [True: 0, False: 0]
  ------------------
 1214|      0|              config_options, name, reinterpret_cast<const char*>(&vec1[i]),
 1215|      0|              reinterpret_cast<const char*>(&vec2[i]), mismatch)) {
 1216|      0|        return false;
 1217|      0|      }
 1218|      0|    }
 1219|  9.02k|    return true;
 1220|  9.02k|  }
 1221|  9.02k|}
_ZN7rocksdb14OptionTypeInfo14AsCustomRawPtrIKNS_10ComparatorEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  564|      2|                                       OptionTypeFlags flags) {
  565|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  566|      2|                        flags | OptionTypeFlags::kRawPointer);
  567|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  568|      2|                                const std::string& name,
  569|      2|                                const std::string& value, void* addr) {
  570|      2|      auto** pointer = static_cast<T**>(addr);
  571|      2|      if (name == kIdPropName() && value.empty()) {
  572|      2|        *pointer = nullptr;
  573|      2|        return Status::OK();
  574|      2|      } else {
  575|      2|        return T::CreateFromString(opts, value, pointer);
  576|      2|      }
  577|      2|    });
  578|      2|  }
_ZZN7rocksdb14OptionTypeInfo14AsCustomRawPtrIKNS_10ComparatorEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEESH_PvE_clES8_SH_SH_SI_:
  569|  9.02k|                                const std::string& value, void* addr) {
  570|  9.02k|      auto** pointer = static_cast<T**>(addr);
  571|  9.02k|      if (name == kIdPropName() && value.empty()) {
  ------------------
  |  Branch (571:11): [True: 0, False: 9.02k]
  |  Branch (571:36): [True: 0, False: 0]
  ------------------
  572|      0|        *pointer = nullptr;
  573|      0|        return Status::OK();
  574|  9.02k|      } else {
  575|  9.02k|        return T::CreateFromString(opts, value, pointer);
  576|  9.02k|      }
  577|  9.02k|    });
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_12TableFactoryEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      2|                                          OptionTypeFlags flags) {
  486|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      2|                        flags | OptionTypeFlags::kShared);
  488|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      2|                                const std::string& name,
  490|      2|                                const std::string& value, void* addr) {
  491|      2|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      2|      if (name == kIdPropName() && value.empty()) {
  493|      2|        shared->reset();
  494|      2|        return Status::OK();
  495|      2|      } else {
  496|      2|        return T::CreateFromString(opts, value, shared);
  497|      2|      }
  498|      2|    });
  499|      2|  }
_ZZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_12TableFactoryEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEESG_PvE_clES7_SG_SG_SH_:
  490|  9.02k|                                const std::string& value, void* addr) {
  491|  9.02k|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|  9.02k|      if (name == kIdPropName() && value.empty()) {
  ------------------
  |  Branch (492:11): [True: 0, False: 9.02k]
  |  Branch (492:36): [True: 0, False: 0]
  ------------------
  493|      0|        shared->reset();
  494|      0|        return Status::OK();
  495|  9.02k|      } else {
  496|  9.02k|        return T::CreateFromString(opts, value, shared);
  497|  9.02k|      }
  498|  9.02k|    });
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_31TablePropertiesCollectorFactoryEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      2|                                          OptionTypeFlags flags) {
  486|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      2|                        flags | OptionTypeFlags::kShared);
  488|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      2|                                const std::string& name,
  490|      2|                                const std::string& value, void* addr) {
  491|      2|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      2|      if (name == kIdPropName() && value.empty()) {
  493|      2|        shared->reset();
  494|      2|        return Status::OK();
  495|      2|      } else {
  496|      2|        return T::CreateFromString(opts, value, shared);
  497|      2|      }
  498|      2|    });
  499|      2|  }
_ZN7rocksdb14OptionTypeInfo6VectorINSt3__110shared_ptrINS_31TablePropertiesCollectorFactoryEEEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_c:
  448|      2|                               char separator = ':') {
  449|      2|    OptionTypeInfo info(_offset, OptionType::kVector, _verification, _flags);
  450|      2|    info.SetParseFunc([elem_info, separator](
  451|      2|                          const ConfigOptions& opts, const std::string& name,
  452|      2|                          const std::string& value, void* addr) {
  453|      2|      auto result = static_cast<std::vector<T>*>(addr);
  454|      2|      return ParseVector<T>(opts, elem_info, separator, name, value, result);
  455|      2|    });
  456|      2|    info.SetSerializeFunc([elem_info, separator](const ConfigOptions& opts,
  457|      2|                                                 const std::string& name,
  458|      2|                                                 const void* addr,
  459|      2|                                                 std::string* value) {
  460|      2|      const auto& vec = *(static_cast<const std::vector<T>*>(addr));
  461|      2|      return SerializeVector<T>(opts, elem_info, separator, name, vec, value);
  462|      2|    });
  463|      2|    info.SetEqualsFunc([elem_info](const ConfigOptions& opts,
  464|      2|                                   const std::string& name, const void* addr1,
  465|      2|                                   const void* addr2, std::string* mismatch) {
  466|      2|      const auto& vec1 = *(static_cast<const std::vector<T>*>(addr1));
  467|      2|      const auto& vec2 = *(static_cast<const std::vector<T>*>(addr2));
  468|      2|      return VectorsAreEqual<T>(opts, elem_info, name, vec1, vec2, mismatch);
  469|      2|    });
  470|      2|    return info;
  471|      2|  }
_ZZN7rocksdb14OptionTypeInfo6VectorINSt3__110shared_ptrINS_31TablePropertiesCollectorFactoryEEEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_cENKUlRKNS_13ConfigOptionsERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPKvPSI_E_clESC_SK_SM_SN_:
  459|  18.0k|                                                 std::string* value) {
  460|  18.0k|      const auto& vec = *(static_cast<const std::vector<T>*>(addr));
  461|  18.0k|      return SerializeVector<T>(opts, elem_info, separator, name, vec, value);
  462|  18.0k|    });
_ZN7rocksdb15SerializeVectorINSt3__110shared_ptrINS_31TablePropertiesCollectorFactoryEEEEENS_6StatusERKNS_13ConfigOptionsERKNS_14OptionTypeInfoEcRKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_6vectorIT_NSF_ISL_EEEEPSH_:
 1159|  18.0k|                       std::string* value) {
 1160|  18.0k|  std::string result;
 1161|  18.0k|  ConfigOptions embedded = config_options;
 1162|  18.0k|  embedded.delimiter = ";";
 1163|  18.0k|  int printed = 0;
 1164|  18.0k|  for (const auto& elem : vec) {
  ------------------
  |  Branch (1164:25): [True: 0, False: 18.0k]
  ------------------
 1165|      0|    std::string elem_str;
 1166|      0|    Status s = elem_info.Serialize(embedded, name, &elem, &elem_str);
 1167|      0|    if (!s.ok()) {
  ------------------
  |  Branch (1167:9): [True: 0, False: 0]
  ------------------
 1168|      0|      return s;
 1169|      0|    } else if (!elem_str.empty()) {
  ------------------
  |  Branch (1169:16): [True: 0, False: 0]
  ------------------
 1170|      0|      if (printed++ > 0) {
  ------------------
  |  Branch (1170:11): [True: 0, False: 0]
  ------------------
 1171|      0|        result += separator;
 1172|      0|      }
 1173|       |      // If the element contains embedded separators, put it inside of brackets
 1174|      0|      if (elem_str.find(separator) != std::string::npos) {
  ------------------
  |  Branch (1174:11): [True: 0, False: 0]
  ------------------
 1175|      0|        result += "{" + elem_str + "}";
 1176|      0|      } else {
 1177|      0|        result += elem_str;
 1178|      0|      }
 1179|      0|    }
 1180|      0|  }
 1181|  18.0k|  if (result.find("=") != std::string::npos) {
  ------------------
  |  Branch (1181:7): [True: 0, False: 18.0k]
  ------------------
 1182|      0|    *value = "{" + result + "}";
 1183|  18.0k|  } else if (printed > 1 && result.at(0) == '{') {
  ------------------
  |  Branch (1183:14): [True: 0, False: 18.0k]
  |  Branch (1183:29): [True: 0, False: 0]
  ------------------
 1184|      0|    *value = "{" + result + "}";
 1185|  18.0k|  } else {
 1186|  18.0k|    *value = result;
 1187|  18.0k|  }
 1188|  18.0k|  return Status::OK();
 1189|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo6VectorINSt3__110shared_ptrINS_31TablePropertiesCollectorFactoryEEEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_cENKUlRKNS_13ConfigOptionsERKNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEPKvSM_PSI_E_clESC_SK_SM_SM_SN_:
  465|  9.02k|                                   const void* addr2, std::string* mismatch) {
  466|  9.02k|      const auto& vec1 = *(static_cast<const std::vector<T>*>(addr1));
  467|  9.02k|      const auto& vec2 = *(static_cast<const std::vector<T>*>(addr2));
  468|  9.02k|      return VectorsAreEqual<T>(opts, elem_info, name, vec1, vec2, mismatch);
  469|  9.02k|    });
_ZN7rocksdb15VectorsAreEqualINSt3__110shared_ptrINS_31TablePropertiesCollectorFactoryEEEEEbRKNS_13ConfigOptionsERKNS_14OptionTypeInfoERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_6vectorIT_NSE_ISK_EEEESO_PSG_:
 1207|  9.02k|                     std::string* mismatch) {
 1208|  9.02k|  if (vec1.size() != vec2.size()) {
  ------------------
  |  Branch (1208:7): [True: 0, False: 9.02k]
  ------------------
 1209|      0|    *mismatch = name;
 1210|      0|    return false;
 1211|  9.02k|  } else {
 1212|  9.02k|    for (size_t i = 0; i < vec1.size(); ++i) {
  ------------------
  |  Branch (1212:24): [True: 0, False: 9.02k]
  ------------------
 1213|      0|      if (!elem_info.AreEqual(
  ------------------
  |  Branch (1213:11): [True: 0, False: 0]
  ------------------
 1214|      0|              config_options, name, reinterpret_cast<const char*>(&vec1[i]),
 1215|      0|              reinterpret_cast<const char*>(&vec2[i]), mismatch)) {
 1216|      0|        return false;
 1217|      0|      }
 1218|      0|    }
 1219|  9.02k|    return true;
 1220|  9.02k|  }
 1221|  9.02k|}
_ZN7rocksdb14OptionTypeInfo14AsCustomRawPtrIKNS_16CompactionFilterEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  564|      2|                                       OptionTypeFlags flags) {
  565|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  566|      2|                        flags | OptionTypeFlags::kRawPointer);
  567|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  568|      2|                                const std::string& name,
  569|      2|                                const std::string& value, void* addr) {
  570|      2|      auto** pointer = static_cast<T**>(addr);
  571|      2|      if (name == kIdPropName() && value.empty()) {
  572|      2|        *pointer = nullptr;
  573|      2|        return Status::OK();
  574|      2|      } else {
  575|      2|        return T::CreateFromString(opts, value, pointer);
  576|      2|      }
  577|      2|    });
  578|      2|  }
_ZZN7rocksdb14OptionTypeInfo14AsCustomRawPtrIKNS_16CompactionFilterEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEESH_PvE_clES8_SH_SH_SI_:
  569|  9.02k|                                const std::string& value, void* addr) {
  570|  9.02k|      auto** pointer = static_cast<T**>(addr);
  571|  9.02k|      if (name == kIdPropName() && value.empty()) {
  ------------------
  |  Branch (571:11): [True: 0, False: 9.02k]
  |  Branch (571:36): [True: 0, False: 0]
  ------------------
  572|      0|        *pointer = nullptr;
  573|      0|        return Status::OK();
  574|  9.02k|      } else {
  575|  9.02k|        return T::CreateFromString(opts, value, pointer);
  576|  9.02k|      }
  577|  9.02k|    });
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_23CompactionFilterFactoryEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      2|                                          OptionTypeFlags flags) {
  486|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      2|                        flags | OptionTypeFlags::kShared);
  488|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      2|                                const std::string& name,
  490|      2|                                const std::string& value, void* addr) {
  491|      2|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      2|      if (name == kIdPropName() && value.empty()) {
  493|      2|        shared->reset();
  494|      2|        return Status::OK();
  495|      2|      } else {
  496|      2|        return T::CreateFromString(opts, value, shared);
  497|      2|      }
  498|      2|    });
  499|      2|  }
_ZZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_23CompactionFilterFactoryEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEESG_PvE_clES7_SG_SG_SH_:
  490|  9.02k|                                const std::string& value, void* addr) {
  491|  9.02k|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|  9.02k|      if (name == kIdPropName() && value.empty()) {
  ------------------
  |  Branch (492:11): [True: 0, False: 9.02k]
  |  Branch (492:36): [True: 0, False: 0]
  ------------------
  493|      0|        shared->reset();
  494|      0|        return Status::OK();
  495|  9.02k|      } else {
  496|  9.02k|        return T::CreateFromString(opts, value, shared);
  497|  9.02k|      }
  498|  9.02k|    });
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_13MergeOperatorEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      2|                                          OptionTypeFlags flags) {
  486|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      2|                        flags | OptionTypeFlags::kShared);
  488|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      2|                                const std::string& name,
  490|      2|                                const std::string& value, void* addr) {
  491|      2|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      2|      if (name == kIdPropName() && value.empty()) {
  493|      2|        shared->reset();
  494|      2|        return Status::OK();
  495|      2|      } else {
  496|      2|        return T::CreateFromString(opts, value, shared);
  497|      2|      }
  498|      2|    });
  499|      2|  }
_ZZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_13MergeOperatorEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEESG_PvE_clES7_SG_SG_SH_:
  490|  9.02k|                                const std::string& value, void* addr) {
  491|  9.02k|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|  9.02k|      if (name == kIdPropName() && value.empty()) {
  ------------------
  |  Branch (492:11): [True: 0, False: 9.02k]
  |  Branch (492:36): [True: 0, False: 0]
  ------------------
  493|      0|        shared->reset();
  494|      0|        return Status::OK();
  495|  9.02k|      } else {
  496|  9.02k|        return T::CreateFromString(opts, value, shared);
  497|  9.02k|      }
  498|  9.02k|    });
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_21SstPartitionerFactoryEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      2|                                          OptionTypeFlags flags) {
  486|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      2|                        flags | OptionTypeFlags::kShared);
  488|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      2|                                const std::string& name,
  490|      2|                                const std::string& value, void* addr) {
  491|      2|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      2|      if (name == kIdPropName() && value.empty()) {
  493|      2|        shared->reset();
  494|      2|        return Status::OK();
  495|      2|      } else {
  496|      2|        return T::CreateFromString(opts, value, shared);
  497|      2|      }
  498|      2|    });
  499|      2|  }
_ZZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_21SstPartitionerFactoryEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEESG_PvE_clES7_SG_SG_SH_:
  490|  9.02k|                                const std::string& value, void* addr) {
  491|  9.02k|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|  9.02k|      if (name == kIdPropName() && value.empty()) {
  ------------------
  |  Branch (492:11): [True: 0, False: 9.02k]
  |  Branch (492:36): [True: 0, False: 0]
  ------------------
  493|      0|        shared->reset();
  494|      0|        return Status::OK();
  495|  9.02k|      } else {
  496|  9.02k|        return T::CreateFromString(opts, value, shared);
  497|  9.02k|      }
  498|  9.02k|    });
_ZNK7rocksdb14OptionTypeInfo12AsRawPointerINS_12CustomizableEEEPT_Pv:
  761|   135k|  T* AsRawPointer(void* base_addr) const {
  762|   135k|    if (base_addr == nullptr) {
  ------------------
  |  Branch (762:9): [True: 0, False: 135k]
  ------------------
  763|      0|      return nullptr;
  764|      0|    }
  765|   135k|    if (IsUniquePtr()) {
  ------------------
  |  Branch (765:9): [True: 0, False: 135k]
  ------------------
  766|      0|      auto ptr = GetOffsetAs<std::unique_ptr<T>>(base_addr);
  767|      0|      return ptr->get();
  768|   135k|    } else if (IsSharedPtr()) {
  ------------------
  |  Branch (768:16): [True: 108k, False: 27.0k]
  ------------------
  769|   108k|      auto ptr = GetOffsetAs<std::shared_ptr<T>>(base_addr);
  770|   108k|      return ptr->get();
  771|   108k|    } else if (IsRawPtr()) {
  ------------------
  |  Branch (771:16): [True: 27.0k, False: 0]
  ------------------
  772|  27.0k|      auto ptr = GetOffsetAs<T*>(base_addr);
  773|  27.0k|      return *ptr;
  774|  27.0k|    } else {
  775|      0|      return GetOffsetAs<T>(base_addr);
  776|      0|    }
  777|   135k|  }
_ZNK7rocksdb14OptionTypeInfo11GetOffsetAsINSt3__110shared_ptrINS_12CustomizableEEEEEPT_Pv:
  732|   108k|  T* GetOffsetAs(void* base) const {
  733|   108k|    void* addr = GetOffset(base);
  734|   108k|    return static_cast<T*>(addr);
  735|   108k|  }
_ZNK7rocksdb14OptionTypeInfo11GetOffsetAsIPNS_12CustomizableEEEPT_Pv:
  732|  27.0k|  T* GetOffsetAs(void* base) const {
  733|  27.0k|    void* addr = GetOffset(base);
  734|  27.0k|    return static_cast<T*>(addr);
  735|  27.0k|  }
_ZNK7rocksdb14OptionTypeInfo12AsRawPointerINS_12ConfigurableEEEPT_Pv:
  761|  99.3k|  T* AsRawPointer(void* base_addr) const {
  762|  99.3k|    if (base_addr == nullptr) {
  ------------------
  |  Branch (762:9): [True: 0, False: 99.3k]
  ------------------
  763|      0|      return nullptr;
  764|      0|    }
  765|  99.3k|    if (IsUniquePtr()) {
  ------------------
  |  Branch (765:9): [True: 0, False: 99.3k]
  ------------------
  766|      0|      auto ptr = GetOffsetAs<std::unique_ptr<T>>(base_addr);
  767|      0|      return ptr->get();
  768|  99.3k|    } else if (IsSharedPtr()) {
  ------------------
  |  Branch (768:16): [True: 72.2k, False: 27.0k]
  ------------------
  769|  72.2k|      auto ptr = GetOffsetAs<std::shared_ptr<T>>(base_addr);
  770|  72.2k|      return ptr->get();
  771|  72.2k|    } else if (IsRawPtr()) {
  ------------------
  |  Branch (771:16): [True: 27.0k, False: 0]
  ------------------
  772|  27.0k|      auto ptr = GetOffsetAs<T*>(base_addr);
  773|  27.0k|      return *ptr;
  774|  27.0k|    } else {
  775|      0|      return GetOffsetAs<T>(base_addr);
  776|      0|    }
  777|  99.3k|  }
_ZNK7rocksdb14OptionTypeInfo11GetOffsetAsINSt3__110shared_ptrINS_12ConfigurableEEEEEPT_Pv:
  732|  72.2k|  T* GetOffsetAs(void* base) const {
  733|  72.2k|    void* addr = GetOffset(base);
  734|  72.2k|    return static_cast<T*>(addr);
  735|  72.2k|  }
_ZNK7rocksdb14OptionTypeInfo11GetOffsetAsIPNS_12ConfigurableEEEPT_Pv:
  732|  27.0k|  T* GetOffsetAs(void* base) const {
  733|  27.0k|    void* addr = GetOffset(base);
  734|  27.0k|    return static_cast<T*>(addr);
  735|  27.0k|  }
_ZN7rocksdb14OptionTypeInfo14AsCustomRawPtrINS_9WalFilterEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  564|      2|                                       OptionTypeFlags flags) {
  565|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  566|      2|                        flags | OptionTypeFlags::kRawPointer);
  567|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  568|      2|                                const std::string& name,
  569|      2|                                const std::string& value, void* addr) {
  570|      2|      auto** pointer = static_cast<T**>(addr);
  571|      2|      if (name == kIdPropName() && value.empty()) {
  572|      2|        *pointer = nullptr;
  573|      2|        return Status::OK();
  574|      2|      } else {
  575|      2|        return T::CreateFromString(opts, value, pointer);
  576|      2|      }
  577|      2|    });
  578|      2|  }
_ZZN7rocksdb14OptionTypeInfo14AsCustomRawPtrINS_9WalFilterEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEESG_PvE_clES7_SG_SG_SH_:
  569|  9.02k|                                const std::string& value, void* addr) {
  570|  9.02k|      auto** pointer = static_cast<T**>(addr);
  571|  9.02k|      if (name == kIdPropName() && value.empty()) {
  ------------------
  |  Branch (571:11): [True: 0, False: 9.02k]
  |  Branch (571:36): [True: 0, False: 0]
  ------------------
  572|      0|        *pointer = nullptr;
  573|      0|        return Status::OK();
  574|  9.02k|      } else {
  575|  9.02k|        return T::CreateFromString(opts, value, pointer);
  576|  9.02k|      }
  577|  9.02k|    });
_ZN7rocksdb14OptionTypeInfo4EnumINS_15WALRecoveryModeEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeE:
  303|      2|      OptionVerificationType verification = OptionVerificationType::kNormal) {
  304|      2|    OptionTypeInfo info(offset, OptionType::kEnum, verification, flags);
  305|      2|    info.SetParseFunc(
  306|       |        // Uses the map argument to convert the input string into
  307|       |        // its corresponding enum value.  If value is found in the map,
  308|       |        // addr is updated to the corresponding map entry.
  309|       |        // @return OK if the value is found in the map
  310|       |        // @return InvalidArgument if the value is not found in the map
  311|      2|        [map](const ConfigOptions&, const std::string& name,
  312|      2|              const std::string& value, void* addr) {
  313|      2|          if (map == nullptr) {
  314|      2|            return Status::NotSupported("No enum mapping ", name);
  315|      2|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  316|      2|            return Status::OK();
  317|      2|          } else {
  318|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      2|          }
  320|      2|        });
  321|      2|    info.SetSerializeFunc(
  322|       |        // Uses the map argument to convert the input enum into
  323|       |        // its corresponding string value.  If enum value is found in the map,
  324|       |        // value is updated to the corresponding string value in the map.
  325|       |        // @return OK if the enum is found in the map
  326|       |        // @return InvalidArgument if the enum is not found in the map
  327|      2|        [map](const ConfigOptions&, const std::string& name, const void* addr,
  328|      2|              std::string* value) {
  329|      2|          if (map == nullptr) {
  330|      2|            return Status::NotSupported("No enum mapping ", name);
  331|      2|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  332|      2|                                      value)) {
  333|      2|            return Status::OK();
  334|      2|          } else {
  335|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      2|          }
  337|      2|        });
  338|      2|    info.SetEqualsFunc(
  339|       |        // Casts addr1 and addr2 to the enum type and returns true if
  340|       |        // they are equal, false otherwise.
  341|      2|        [](const ConfigOptions&, const std::string&, const void* addr1,
  342|      2|           const void* addr2, std::string*) {
  343|      2|          return (*static_cast<const T*>(addr1) ==
  344|      2|                  *static_cast<const T*>(addr2));
  345|      2|        });
  346|      2|    return info;
  347|      2|  }  // End OptionTypeInfo::Enum
_ZZN7rocksdb14OptionTypeInfo4EnumINS_15WALRecoveryModeEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_SS_PvE_clESR_SS_SS_ST_:
  312|  9.02k|              const std::string& value, void* addr) {
  313|  9.02k|          if (map == nullptr) {
  ------------------
  |  Branch (313:15): [True: 0, False: 9.02k]
  ------------------
  314|      0|            return Status::NotSupported("No enum mapping ", name);
  315|  9.02k|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  ------------------
  |  Branch (315:22): [True: 9.02k, False: 0]
  ------------------
  316|  9.02k|            return Status::OK();
  317|  9.02k|          } else {
  318|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      0|          }
  320|  9.02k|        });
_ZN7rocksdb9ParseEnumINS_15WALRecoveryModeEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERSG_PSA_:
  134|  9.02k|               const std::string& type, T* value) {
  135|  9.02k|  auto iter = type_map.find(type);
  136|  9.02k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 9.02k, False: 0]
  ------------------
  137|  9.02k|    *value = iter->second;
  138|  9.02k|    return true;
  139|  9.02k|  }
  140|      0|  return false;
  141|  9.02k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_15WALRecoveryModeEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_PKvPSA_E_clESR_SS_SU_SV_:
  328|  18.0k|              std::string* value) {
  329|  18.0k|          if (map == nullptr) {
  ------------------
  |  Branch (329:15): [True: 0, False: 18.0k]
  ------------------
  330|      0|            return Status::NotSupported("No enum mapping ", name);
  331|  18.0k|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  ------------------
  |  Branch (331:22): [True: 18.0k, False: 0]
  ------------------
  332|  18.0k|                                      value)) {
  333|  18.0k|            return Status::OK();
  334|  18.0k|          } else {
  335|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      0|          }
  337|  18.0k|        });
_ZN7rocksdb13SerializeEnumINS_15WALRecoveryModeEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERKSA_PS9_:
  150|  18.0k|                   const T& type, std::string* value) {
  151|  36.1k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 36.1k, False: 0]
  ------------------
  152|  36.1k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 18.0k, False: 18.0k]
  ------------------
  153|  18.0k|      *value = pair.first;
  154|  18.0k|      return true;
  155|  18.0k|    }
  156|  36.1k|  }
  157|      0|  return false;
  158|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_15WALRecoveryModeEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_PKvSU_PSA_E_clESR_SS_SU_SU_SV_:
  342|  9.02k|           const void* addr2, std::string*) {
  343|  9.02k|          return (*static_cast<const T*>(addr1) ==
  344|  9.02k|                  *static_cast<const T*>(addr2));
  345|  9.02k|        });
_ZN7rocksdb14OptionTypeInfo4EnumIbEES0_iPKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeE:
  303|      2|      OptionVerificationType verification = OptionVerificationType::kNormal) {
  304|      2|    OptionTypeInfo info(offset, OptionType::kEnum, verification, flags);
  305|      2|    info.SetParseFunc(
  306|       |        // Uses the map argument to convert the input string into
  307|       |        // its corresponding enum value.  If value is found in the map,
  308|       |        // addr is updated to the corresponding map entry.
  309|       |        // @return OK if the value is found in the map
  310|       |        // @return InvalidArgument if the value is not found in the map
  311|      2|        [map](const ConfigOptions&, const std::string& name,
  312|      2|              const std::string& value, void* addr) {
  313|      2|          if (map == nullptr) {
  314|      2|            return Status::NotSupported("No enum mapping ", name);
  315|      2|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  316|      2|            return Status::OK();
  317|      2|          } else {
  318|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      2|          }
  320|      2|        });
  321|      2|    info.SetSerializeFunc(
  322|       |        // Uses the map argument to convert the input enum into
  323|       |        // its corresponding string value.  If enum value is found in the map,
  324|       |        // value is updated to the corresponding string value in the map.
  325|       |        // @return OK if the enum is found in the map
  326|       |        // @return InvalidArgument if the enum is not found in the map
  327|      2|        [map](const ConfigOptions&, const std::string& name, const void* addr,
  328|      2|              std::string* value) {
  329|      2|          if (map == nullptr) {
  330|      2|            return Status::NotSupported("No enum mapping ", name);
  331|      2|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  332|      2|                                      value)) {
  333|      2|            return Status::OK();
  334|      2|          } else {
  335|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      2|          }
  337|      2|        });
  338|      2|    info.SetEqualsFunc(
  339|       |        // Casts addr1 and addr2 to the enum type and returns true if
  340|       |        // they are equal, false otherwise.
  341|      2|        [](const ConfigOptions&, const std::string&, const void* addr1,
  342|      2|           const void* addr2, std::string*) {
  343|      2|          return (*static_cast<const T*>(addr1) ==
  344|      2|                  *static_cast<const T*>(addr2));
  345|      2|        });
  346|      2|    return info;
  347|      2|  }  // End OptionTypeInfo::Enum
_ZN7rocksdb14OptionTypeInfo4EnumINS_12InfoLogLevelEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeE:
  303|      2|      OptionVerificationType verification = OptionVerificationType::kNormal) {
  304|      2|    OptionTypeInfo info(offset, OptionType::kEnum, verification, flags);
  305|      2|    info.SetParseFunc(
  306|       |        // Uses the map argument to convert the input string into
  307|       |        // its corresponding enum value.  If value is found in the map,
  308|       |        // addr is updated to the corresponding map entry.
  309|       |        // @return OK if the value is found in the map
  310|       |        // @return InvalidArgument if the value is not found in the map
  311|      2|        [map](const ConfigOptions&, const std::string& name,
  312|      2|              const std::string& value, void* addr) {
  313|      2|          if (map == nullptr) {
  314|      2|            return Status::NotSupported("No enum mapping ", name);
  315|      2|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  316|      2|            return Status::OK();
  317|      2|          } else {
  318|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      2|          }
  320|      2|        });
  321|      2|    info.SetSerializeFunc(
  322|       |        // Uses the map argument to convert the input enum into
  323|       |        // its corresponding string value.  If enum value is found in the map,
  324|       |        // value is updated to the corresponding string value in the map.
  325|       |        // @return OK if the enum is found in the map
  326|       |        // @return InvalidArgument if the enum is not found in the map
  327|      2|        [map](const ConfigOptions&, const std::string& name, const void* addr,
  328|      2|              std::string* value) {
  329|      2|          if (map == nullptr) {
  330|      2|            return Status::NotSupported("No enum mapping ", name);
  331|      2|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  332|      2|                                      value)) {
  333|      2|            return Status::OK();
  334|      2|          } else {
  335|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      2|          }
  337|      2|        });
  338|      2|    info.SetEqualsFunc(
  339|       |        // Casts addr1 and addr2 to the enum type and returns true if
  340|       |        // they are equal, false otherwise.
  341|      2|        [](const ConfigOptions&, const std::string&, const void* addr1,
  342|      2|           const void* addr2, std::string*) {
  343|      2|          return (*static_cast<const T*>(addr1) ==
  344|      2|                  *static_cast<const T*>(addr2));
  345|      2|        });
  346|      2|    return info;
  347|      2|  }  // End OptionTypeInfo::Enum
_ZZN7rocksdb14OptionTypeInfo4EnumINS_12InfoLogLevelEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_SS_PvE_clESR_SS_SS_ST_:
  312|  9.02k|              const std::string& value, void* addr) {
  313|  9.02k|          if (map == nullptr) {
  ------------------
  |  Branch (313:15): [True: 0, False: 9.02k]
  ------------------
  314|      0|            return Status::NotSupported("No enum mapping ", name);
  315|  9.02k|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  ------------------
  |  Branch (315:22): [True: 9.02k, False: 0]
  ------------------
  316|  9.02k|            return Status::OK();
  317|  9.02k|          } else {
  318|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      0|          }
  320|  9.02k|        });
_ZN7rocksdb9ParseEnumINS_12InfoLogLevelEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERSG_PSA_:
  134|  9.02k|               const std::string& type, T* value) {
  135|  9.02k|  auto iter = type_map.find(type);
  136|  9.02k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 9.02k, False: 0]
  ------------------
  137|  9.02k|    *value = iter->second;
  138|  9.02k|    return true;
  139|  9.02k|  }
  140|      0|  return false;
  141|  9.02k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_12InfoLogLevelEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_PKvPSA_E_clESR_SS_SU_SV_:
  328|  18.0k|              std::string* value) {
  329|  18.0k|          if (map == nullptr) {
  ------------------
  |  Branch (329:15): [True: 0, False: 18.0k]
  ------------------
  330|      0|            return Status::NotSupported("No enum mapping ", name);
  331|  18.0k|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  ------------------
  |  Branch (331:22): [True: 18.0k, False: 0]
  ------------------
  332|  18.0k|                                      value)) {
  333|  18.0k|            return Status::OK();
  334|  18.0k|          } else {
  335|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      0|          }
  337|  18.0k|        });
_ZN7rocksdb13SerializeEnumINS_12InfoLogLevelEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERKSA_PS9_:
  150|  18.0k|                   const T& type, std::string* value) {
  151|  72.2k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 72.2k, False: 0]
  ------------------
  152|  72.2k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 18.0k, False: 54.1k]
  ------------------
  153|  18.0k|      *value = pair.first;
  154|  18.0k|      return true;
  155|  18.0k|    }
  156|  72.2k|  }
  157|      0|  return false;
  158|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_12InfoLogLevelEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_PKvSU_PSA_E_clESR_SS_SU_SU_SV_:
  342|  9.02k|           const void* addr2, std::string*) {
  343|  9.02k|          return (*static_cast<const T*>(addr1) ==
  344|  9.02k|                  *static_cast<const T*>(addr2));
  345|  9.02k|        });
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_22FileChecksumGenFactoryEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      2|                                          OptionTypeFlags flags) {
  486|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      2|                        flags | OptionTypeFlags::kShared);
  488|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      2|                                const std::string& name,
  490|      2|                                const std::string& value, void* addr) {
  491|      2|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      2|      if (name == kIdPropName() && value.empty()) {
  493|      2|        shared->reset();
  494|      2|        return Status::OK();
  495|      2|      } else {
  496|      2|        return T::CreateFromString(opts, value, shared);
  497|      2|      }
  498|      2|    });
  499|      2|  }
_ZZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_22FileChecksumGenFactoryEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEESG_PvE_clES7_SG_SG_SH_:
  490|  9.02k|                                const std::string& value, void* addr) {
  491|  9.02k|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|  9.02k|      if (name == kIdPropName() && value.empty()) {
  ------------------
  |  Branch (492:11): [True: 0, False: 9.02k]
  |  Branch (492:36): [True: 0, False: 0]
  ------------------
  493|      0|        shared->reset();
  494|      0|        return Status::OK();
  495|  9.02k|      } else {
  496|  9.02k|        return T::CreateFromString(opts, value, shared);
  497|  9.02k|      }
  498|  9.02k|    });
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_10StatisticsEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      4|                                          OptionTypeFlags flags) {
  486|      4|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      4|                        flags | OptionTypeFlags::kShared);
  488|      4|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      4|                                const std::string& name,
  490|      4|                                const std::string& value, void* addr) {
  491|      4|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      4|      if (name == kIdPropName() && value.empty()) {
  493|      4|        shared->reset();
  494|      4|        return Status::OK();
  495|      4|      } else {
  496|      4|        return T::CreateFromString(opts, value, shared);
  497|      4|      }
  498|      4|    });
  499|      4|  }
_ZN7rocksdb14OptionTypeInfo4EnumINS_9CacheTierEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeE:
  303|      2|      OptionVerificationType verification = OptionVerificationType::kNormal) {
  304|      2|    OptionTypeInfo info(offset, OptionType::kEnum, verification, flags);
  305|      2|    info.SetParseFunc(
  306|       |        // Uses the map argument to convert the input string into
  307|       |        // its corresponding enum value.  If value is found in the map,
  308|       |        // addr is updated to the corresponding map entry.
  309|       |        // @return OK if the value is found in the map
  310|       |        // @return InvalidArgument if the value is not found in the map
  311|      2|        [map](const ConfigOptions&, const std::string& name,
  312|      2|              const std::string& value, void* addr) {
  313|      2|          if (map == nullptr) {
  314|      2|            return Status::NotSupported("No enum mapping ", name);
  315|      2|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  316|      2|            return Status::OK();
  317|      2|          } else {
  318|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      2|          }
  320|      2|        });
  321|      2|    info.SetSerializeFunc(
  322|       |        // Uses the map argument to convert the input enum into
  323|       |        // its corresponding string value.  If enum value is found in the map,
  324|       |        // value is updated to the corresponding string value in the map.
  325|       |        // @return OK if the enum is found in the map
  326|       |        // @return InvalidArgument if the enum is not found in the map
  327|      2|        [map](const ConfigOptions&, const std::string& name, const void* addr,
  328|      2|              std::string* value) {
  329|      2|          if (map == nullptr) {
  330|      2|            return Status::NotSupported("No enum mapping ", name);
  331|      2|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  332|      2|                                      value)) {
  333|      2|            return Status::OK();
  334|      2|          } else {
  335|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      2|          }
  337|      2|        });
  338|      2|    info.SetEqualsFunc(
  339|       |        // Casts addr1 and addr2 to the enum type and returns true if
  340|       |        // they are equal, false otherwise.
  341|      2|        [](const ConfigOptions&, const std::string&, const void* addr1,
  342|      2|           const void* addr2, std::string*) {
  343|      2|          return (*static_cast<const T*>(addr1) ==
  344|      2|                  *static_cast<const T*>(addr2));
  345|      2|        });
  346|      2|    return info;
  347|      2|  }  // End OptionTypeInfo::Enum
_ZZN7rocksdb14OptionTypeInfo4EnumINS_9CacheTierEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_SS_PvE_clESR_SS_SS_ST_:
  312|  9.02k|              const std::string& value, void* addr) {
  313|  9.02k|          if (map == nullptr) {
  ------------------
  |  Branch (313:15): [True: 0, False: 9.02k]
  ------------------
  314|      0|            return Status::NotSupported("No enum mapping ", name);
  315|  9.02k|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  ------------------
  |  Branch (315:22): [True: 9.02k, False: 0]
  ------------------
  316|  9.02k|            return Status::OK();
  317|  9.02k|          } else {
  318|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      0|          }
  320|  9.02k|        });
_ZN7rocksdb9ParseEnumINS_9CacheTierEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERSG_PSA_:
  134|  9.02k|               const std::string& type, T* value) {
  135|  9.02k|  auto iter = type_map.find(type);
  136|  9.02k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 9.02k, False: 0]
  ------------------
  137|  9.02k|    *value = iter->second;
  138|  9.02k|    return true;
  139|  9.02k|  }
  140|      0|  return false;
  141|  9.02k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_9CacheTierEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_PKvPSA_E_clESR_SS_SU_SV_:
  328|  18.0k|              std::string* value) {
  329|  18.0k|          if (map == nullptr) {
  ------------------
  |  Branch (329:15): [True: 0, False: 18.0k]
  ------------------
  330|      0|            return Status::NotSupported("No enum mapping ", name);
  331|  18.0k|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  ------------------
  |  Branch (331:22): [True: 18.0k, False: 0]
  ------------------
  332|  18.0k|                                      value)) {
  333|  18.0k|            return Status::OK();
  334|  18.0k|          } else {
  335|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      0|          }
  337|  18.0k|        });
_ZN7rocksdb13SerializeEnumINS_9CacheTierEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERKSA_PS9_:
  150|  18.0k|                   const T& type, std::string* value) {
  151|  18.0k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 18.0k, False: 0]
  ------------------
  152|  18.0k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 18.0k, False: 0]
  ------------------
  153|  18.0k|      *value = pair.first;
  154|  18.0k|      return true;
  155|  18.0k|    }
  156|  18.0k|  }
  157|      0|  return false;
  158|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_9CacheTierEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_PKvSU_PSA_E_clESR_SS_SU_SU_SV_:
  342|  9.02k|           const void* addr2, std::string*) {
  343|  9.02k|          return (*static_cast<const T*>(addr1) ==
  344|  9.02k|                  *static_cast<const T*>(addr2));
  345|  9.02k|        });
_ZN7rocksdb9ParseEnumINS_15CompactionStyleEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERSG_PSA_:
  134|  9.02k|               const std::string& type, T* value) {
  135|  9.02k|  auto iter = type_map.find(type);
  136|  9.02k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 9.02k, False: 0]
  ------------------
  137|  9.02k|    *value = iter->second;
  138|  9.02k|    return true;
  139|  9.02k|  }
  140|      0|  return false;
  141|  9.02k|}
_ZN7rocksdb9ParseEnumINS_13CompactionPriEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERSG_PSA_:
  134|  9.02k|               const std::string& type, T* value) {
  135|  9.02k|  auto iter = type_map.find(type);
  136|  9.02k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 9.02k, False: 0]
  ------------------
  137|  9.02k|    *value = iter->second;
  138|  9.02k|    return true;
  139|  9.02k|  }
  140|      0|  return false;
  141|  9.02k|}
_ZN7rocksdb9ParseEnumINS_15CompressionTypeEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERSG_PSA_:
  134|  36.1k|               const std::string& type, T* value) {
  135|  36.1k|  auto iter = type_map.find(type);
  136|  36.1k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 36.1k, False: 0]
  ------------------
  137|  36.1k|    *value = iter->second;
  138|  36.1k|    return true;
  139|  36.1k|  }
  140|      0|  return false;
  141|  36.1k|}
_ZN7rocksdb9ParseEnumINS_12ChecksumTypeEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERSG_PSA_:
  134|  18.0k|               const std::string& type, T* value) {
  135|  18.0k|  auto iter = type_map.find(type);
  136|  18.0k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 18.0k, False: 0]
  ------------------
  137|  18.0k|    *value = iter->second;
  138|  18.0k|    return true;
  139|  18.0k|  }
  140|      0|  return false;
  141|  18.0k|}
_ZN7rocksdb9ParseEnumINS_19CompactionStopStyleEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERSG_PSA_:
  134|  9.02k|               const std::string& type, T* value) {
  135|  9.02k|  auto iter = type_map.find(type);
  136|  9.02k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 9.02k, False: 0]
  ------------------
  137|  9.02k|    *value = iter->second;
  138|  9.02k|    return true;
  139|  9.02k|  }
  140|      0|  return false;
  141|  9.02k|}
_ZN7rocksdb9ParseEnumINS_11TemperatureEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERSG_PSA_:
  134|  27.0k|               const std::string& type, T* value) {
  135|  27.0k|  auto iter = type_map.find(type);
  136|  27.0k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 27.0k, False: 0]
  ------------------
  137|  27.0k|    *value = iter->second;
  138|  27.0k|    return true;
  139|  27.0k|  }
  140|      0|  return false;
  141|  27.0k|}
_ZN7rocksdb13SerializeEnumINS_15CompactionStyleEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERKSA_PS9_:
  150|  18.0k|                   const T& type, std::string* value) {
  151|  72.2k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 72.2k, False: 0]
  ------------------
  152|  72.2k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 18.0k, False: 54.1k]
  ------------------
  153|  18.0k|      *value = pair.first;
  154|  18.0k|      return true;
  155|  18.0k|    }
  156|  72.2k|  }
  157|      0|  return false;
  158|  18.0k|}
_ZN7rocksdb13SerializeEnumINS_13CompactionPriEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERKSA_PS9_:
  150|  18.0k|                   const T& type, std::string* value) {
  151|  18.0k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 18.0k, False: 0]
  ------------------
  152|  18.0k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 18.0k, False: 0]
  ------------------
  153|  18.0k|      *value = pair.first;
  154|  18.0k|      return true;
  155|  18.0k|    }
  156|  18.0k|  }
  157|      0|  return false;
  158|  18.0k|}
_ZN7rocksdb13SerializeEnumINS_15CompressionTypeEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERKSA_PS9_:
  150|  72.2k|                   const T& type, std::string* value) {
  151|   595k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 595k, False: 0]
  ------------------
  152|   595k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 72.2k, False: 523k]
  ------------------
  153|  72.2k|      *value = pair.first;
  154|  72.2k|      return true;
  155|  72.2k|    }
  156|   595k|  }
  157|      0|  return false;
  158|  72.2k|}
_ZN7rocksdb13SerializeEnumINS_12ChecksumTypeEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERKSA_PS9_:
  150|  54.1k|                   const T& type, std::string* value) {
  151|  54.1k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 54.1k, False: 0]
  ------------------
  152|  54.1k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 54.1k, False: 0]
  ------------------
  153|  54.1k|      *value = pair.first;
  154|  54.1k|      return true;
  155|  54.1k|    }
  156|  54.1k|  }
  157|      0|  return false;
  158|  54.1k|}
_ZN7rocksdb13SerializeEnumINS_19CompactionStopStyleEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERKSA_PS9_:
  150|  18.0k|                   const T& type, std::string* value) {
  151|  18.0k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 18.0k, False: 0]
  ------------------
  152|  18.0k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 18.0k, False: 0]
  ------------------
  153|  18.0k|      *value = pair.first;
  154|  18.0k|      return true;
  155|  18.0k|    }
  156|  18.0k|  }
  157|      0|  return false;
  158|  18.0k|}
_ZN7rocksdb13SerializeEnumINS_11TemperatureEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERKSA_PS9_:
  150|  54.1k|                   const T& type, std::string* value) {
  151|   216k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 216k, False: 0]
  ------------------
  152|   216k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 54.1k, False: 162k]
  ------------------
  153|  54.1k|      *value = pair.first;
  154|  54.1k|      return true;
  155|  54.1k|    }
  156|   216k|  }
  157|      0|  return false;
  158|  54.1k|}
_ZNK7rocksdb14OptionTypeInfo12AsRawPointerINS_12CustomizableEEEPKT_PKv:
  740|   270k|  const T* AsRawPointer(const void* const base_addr) const {
  741|   270k|    if (base_addr == nullptr) {
  ------------------
  |  Branch (741:9): [True: 0, False: 270k]
  ------------------
  742|      0|      return nullptr;
  743|      0|    }
  744|   270k|    if (IsUniquePtr()) {
  ------------------
  |  Branch (744:9): [True: 0, False: 270k]
  ------------------
  745|      0|      const auto ptr = GetOffsetAs<std::unique_ptr<T>>(base_addr);
  746|      0|      return ptr->get();
  747|   270k|    } else if (IsSharedPtr()) {
  ------------------
  |  Branch (747:16): [True: 234k, False: 36.1k]
  ------------------
  748|   234k|      const auto ptr = GetOffsetAs<std::shared_ptr<T>>(base_addr);
  749|   234k|      return ptr->get();
  750|   234k|    } else if (IsRawPtr()) {
  ------------------
  |  Branch (750:16): [True: 36.1k, False: 0]
  ------------------
  751|  36.1k|      const T* const* ptr = GetOffsetAs<T* const>(base_addr);
  752|  36.1k|      return *ptr;
  753|  36.1k|    } else {
  754|      0|      return GetOffsetAs<T>(base_addr);
  755|      0|    }
  756|   270k|  }
_ZNK7rocksdb14OptionTypeInfo11GetOffsetAsINSt3__110shared_ptrINS_12CustomizableEEEEEPKT_PKv:
  726|   234k|  const T* GetOffsetAs(const void* base) const {
  727|   234k|    const void* addr = GetOffset(base);
  728|   234k|    return static_cast<const T*>(addr);
  729|   234k|  }
_ZNK7rocksdb14OptionTypeInfo11GetOffsetAsIKPNS_12CustomizableEEEPKT_PKv:
  726|  36.1k|  const T* GetOffsetAs(const void* base) const {
  727|  36.1k|    const void* addr = GetOffset(base);
  728|  36.1k|    return static_cast<const T*>(addr);
  729|  36.1k|  }
_ZN7rocksdb14OptionTypeInfo4EnumINS_11PinningTierEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeE:
  303|      6|      OptionVerificationType verification = OptionVerificationType::kNormal) {
  304|      6|    OptionTypeInfo info(offset, OptionType::kEnum, verification, flags);
  305|      6|    info.SetParseFunc(
  306|       |        // Uses the map argument to convert the input string into
  307|       |        // its corresponding enum value.  If value is found in the map,
  308|       |        // addr is updated to the corresponding map entry.
  309|       |        // @return OK if the value is found in the map
  310|       |        // @return InvalidArgument if the value is not found in the map
  311|      6|        [map](const ConfigOptions&, const std::string& name,
  312|      6|              const std::string& value, void* addr) {
  313|      6|          if (map == nullptr) {
  314|      6|            return Status::NotSupported("No enum mapping ", name);
  315|      6|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  316|      6|            return Status::OK();
  317|      6|          } else {
  318|      6|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      6|          }
  320|      6|        });
  321|      6|    info.SetSerializeFunc(
  322|       |        // Uses the map argument to convert the input enum into
  323|       |        // its corresponding string value.  If enum value is found in the map,
  324|       |        // value is updated to the corresponding string value in the map.
  325|       |        // @return OK if the enum is found in the map
  326|       |        // @return InvalidArgument if the enum is not found in the map
  327|      6|        [map](const ConfigOptions&, const std::string& name, const void* addr,
  328|      6|              std::string* value) {
  329|      6|          if (map == nullptr) {
  330|      6|            return Status::NotSupported("No enum mapping ", name);
  331|      6|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  332|      6|                                      value)) {
  333|      6|            return Status::OK();
  334|      6|          } else {
  335|      6|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      6|          }
  337|      6|        });
  338|      6|    info.SetEqualsFunc(
  339|       |        // Casts addr1 and addr2 to the enum type and returns true if
  340|       |        // they are equal, false otherwise.
  341|      6|        [](const ConfigOptions&, const std::string&, const void* addr1,
  342|      6|           const void* addr2, std::string*) {
  343|      6|          return (*static_cast<const T*>(addr1) ==
  344|      6|                  *static_cast<const T*>(addr2));
  345|      6|        });
  346|      6|    return info;
  347|      6|  }  // End OptionTypeInfo::Enum
_ZZN7rocksdb14OptionTypeInfo4EnumINS_11PinningTierEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_SS_PvE_clESR_SS_SS_ST_:
  312|  54.1k|              const std::string& value, void* addr) {
  313|  54.1k|          if (map == nullptr) {
  ------------------
  |  Branch (313:15): [True: 0, False: 54.1k]
  ------------------
  314|      0|            return Status::NotSupported("No enum mapping ", name);
  315|  54.1k|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  ------------------
  |  Branch (315:22): [True: 54.1k, False: 0]
  ------------------
  316|  54.1k|            return Status::OK();
  317|  54.1k|          } else {
  318|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      0|          }
  320|  54.1k|        });
_ZN7rocksdb9ParseEnumINS_11PinningTierEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERSG_PSA_:
  134|  54.1k|               const std::string& type, T* value) {
  135|  54.1k|  auto iter = type_map.find(type);
  136|  54.1k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 54.1k, False: 0]
  ------------------
  137|  54.1k|    *value = iter->second;
  138|  54.1k|    return true;
  139|  54.1k|  }
  140|      0|  return false;
  141|  54.1k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_11PinningTierEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_PKvPSA_E_clESR_SS_SU_SV_:
  328|   135k|              std::string* value) {
  329|   135k|          if (map == nullptr) {
  ------------------
  |  Branch (329:15): [True: 0, False: 135k]
  ------------------
  330|      0|            return Status::NotSupported("No enum mapping ", name);
  331|   135k|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  ------------------
  |  Branch (331:22): [True: 135k, False: 0]
  ------------------
  332|   135k|                                      value)) {
  333|   135k|            return Status::OK();
  334|   135k|          } else {
  335|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      0|          }
  337|   135k|        });
_ZN7rocksdb13SerializeEnumINS_11PinningTierEEEbRKNSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_NS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_SA_EEEEEERKSA_PS9_:
  150|   135k|                   const T& type, std::string* value) {
  151|   541k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 541k, False: 0]
  ------------------
  152|   541k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 135k, False: 406k]
  ------------------
  153|   135k|      *value = pair.first;
  154|   135k|      return true;
  155|   135k|    }
  156|   541k|  }
  157|      0|  return false;
  158|   135k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_11PinningTierEEES0_iPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSH_PKvSU_PSA_E_clESR_SS_SU_SU_SV_:
  342|  27.0k|           const void* addr2, std::string*) {
  343|  27.0k|          return (*static_cast<const T*>(addr1) ==
  344|  27.0k|                  *static_cast<const T*>(addr2));
  345|  27.0k|        });
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_23FlushBlockPolicyFactoryEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      2|                                          OptionTypeFlags flags) {
  486|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      2|                        flags | OptionTypeFlags::kShared);
  488|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      2|                                const std::string& name,
  490|      2|                                const std::string& value, void* addr) {
  491|      2|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      2|      if (name == kIdPropName() && value.empty()) {
  493|      2|        shared->reset();
  494|      2|        return Status::OK();
  495|      2|      } else {
  496|      2|        return T::CreateFromString(opts, value, shared);
  497|      2|      }
  498|      2|    });
  499|      2|  }
_ZZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_23FlushBlockPolicyFactoryEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEESG_PvE_clES7_SG_SG_SH_:
  490|  18.0k|                                const std::string& value, void* addr) {
  491|  18.0k|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|  18.0k|      if (name == kIdPropName() && value.empty()) {
  ------------------
  |  Branch (492:11): [True: 0, False: 18.0k]
  |  Branch (492:36): [True: 0, False: 0]
  ------------------
  493|      0|        shared->reset();
  494|      0|        return Status::OK();
  495|  18.0k|      } else {
  496|  18.0k|        return T::CreateFromString(opts, value, shared);
  497|  18.0k|      }
  498|  18.0k|    });
_ZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions9IndexTypeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeE:
  303|      2|      OptionVerificationType verification = OptionVerificationType::kNormal) {
  304|      2|    OptionTypeInfo info(offset, OptionType::kEnum, verification, flags);
  305|      2|    info.SetParseFunc(
  306|       |        // Uses the map argument to convert the input string into
  307|       |        // its corresponding enum value.  If value is found in the map,
  308|       |        // addr is updated to the corresponding map entry.
  309|       |        // @return OK if the value is found in the map
  310|       |        // @return InvalidArgument if the value is not found in the map
  311|      2|        [map](const ConfigOptions&, const std::string& name,
  312|      2|              const std::string& value, void* addr) {
  313|      2|          if (map == nullptr) {
  314|      2|            return Status::NotSupported("No enum mapping ", name);
  315|      2|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  316|      2|            return Status::OK();
  317|      2|          } else {
  318|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      2|          }
  320|      2|        });
  321|      2|    info.SetSerializeFunc(
  322|       |        // Uses the map argument to convert the input enum into
  323|       |        // its corresponding string value.  If enum value is found in the map,
  324|       |        // value is updated to the corresponding string value in the map.
  325|       |        // @return OK if the enum is found in the map
  326|       |        // @return InvalidArgument if the enum is not found in the map
  327|      2|        [map](const ConfigOptions&, const std::string& name, const void* addr,
  328|      2|              std::string* value) {
  329|      2|          if (map == nullptr) {
  330|      2|            return Status::NotSupported("No enum mapping ", name);
  331|      2|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  332|      2|                                      value)) {
  333|      2|            return Status::OK();
  334|      2|          } else {
  335|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      2|          }
  337|      2|        });
  338|      2|    info.SetEqualsFunc(
  339|       |        // Casts addr1 and addr2 to the enum type and returns true if
  340|       |        // they are equal, false otherwise.
  341|      2|        [](const ConfigOptions&, const std::string&, const void* addr1,
  342|      2|           const void* addr2, std::string*) {
  343|      2|          return (*static_cast<const T*>(addr1) ==
  344|      2|                  *static_cast<const T*>(addr2));
  345|      2|        });
  346|      2|    return info;
  347|      2|  }  // End OptionTypeInfo::Enum
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions9IndexTypeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_ST_PvE_clESS_ST_ST_SU_:
  312|  18.0k|              const std::string& value, void* addr) {
  313|  18.0k|          if (map == nullptr) {
  ------------------
  |  Branch (313:15): [True: 0, False: 18.0k]
  ------------------
  314|      0|            return Status::NotSupported("No enum mapping ", name);
  315|  18.0k|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  ------------------
  |  Branch (315:22): [True: 18.0k, False: 0]
  ------------------
  316|  18.0k|            return Status::OK();
  317|  18.0k|          } else {
  318|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      0|          }
  320|  18.0k|        });
_ZN7rocksdb9ParseEnumINS_22BlockBasedTableOptions9IndexTypeEEEbRKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEERSH_PSB_:
  134|  18.0k|               const std::string& type, T* value) {
  135|  18.0k|  auto iter = type_map.find(type);
  136|  18.0k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 18.0k, False: 0]
  ------------------
  137|  18.0k|    *value = iter->second;
  138|  18.0k|    return true;
  139|  18.0k|  }
  140|      0|  return false;
  141|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions9IndexTypeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_PKvPSB_E_clESS_ST_SV_SW_:
  328|  45.1k|              std::string* value) {
  329|  45.1k|          if (map == nullptr) {
  ------------------
  |  Branch (329:15): [True: 0, False: 45.1k]
  ------------------
  330|      0|            return Status::NotSupported("No enum mapping ", name);
  331|  45.1k|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  ------------------
  |  Branch (331:22): [True: 45.1k, False: 0]
  ------------------
  332|  45.1k|                                      value)) {
  333|  45.1k|            return Status::OK();
  334|  45.1k|          } else {
  335|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      0|          }
  337|  45.1k|        });
_ZN7rocksdb13SerializeEnumINS_22BlockBasedTableOptions9IndexTypeEEEbRKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEERKSB_PSA_:
  150|  45.1k|                   const T& type, std::string* value) {
  151|   180k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 180k, False: 0]
  ------------------
  152|   180k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 45.1k, False: 135k]
  ------------------
  153|  45.1k|      *value = pair.first;
  154|  45.1k|      return true;
  155|  45.1k|    }
  156|   180k|  }
  157|      0|  return false;
  158|  45.1k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions9IndexTypeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_PKvSV_PSB_E_clESS_ST_SV_SV_SW_:
  342|  9.02k|           const void* addr2, std::string*) {
  343|  9.02k|          return (*static_cast<const T*>(addr1) ==
  344|  9.02k|                  *static_cast<const T*>(addr2));
  345|  9.02k|        });
_ZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions18DataBlockIndexTypeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeE:
  303|      2|      OptionVerificationType verification = OptionVerificationType::kNormal) {
  304|      2|    OptionTypeInfo info(offset, OptionType::kEnum, verification, flags);
  305|      2|    info.SetParseFunc(
  306|       |        // Uses the map argument to convert the input string into
  307|       |        // its corresponding enum value.  If value is found in the map,
  308|       |        // addr is updated to the corresponding map entry.
  309|       |        // @return OK if the value is found in the map
  310|       |        // @return InvalidArgument if the value is not found in the map
  311|      2|        [map](const ConfigOptions&, const std::string& name,
  312|      2|              const std::string& value, void* addr) {
  313|      2|          if (map == nullptr) {
  314|      2|            return Status::NotSupported("No enum mapping ", name);
  315|      2|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  316|      2|            return Status::OK();
  317|      2|          } else {
  318|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      2|          }
  320|      2|        });
  321|      2|    info.SetSerializeFunc(
  322|       |        // Uses the map argument to convert the input enum into
  323|       |        // its corresponding string value.  If enum value is found in the map,
  324|       |        // value is updated to the corresponding string value in the map.
  325|       |        // @return OK if the enum is found in the map
  326|       |        // @return InvalidArgument if the enum is not found in the map
  327|      2|        [map](const ConfigOptions&, const std::string& name, const void* addr,
  328|      2|              std::string* value) {
  329|      2|          if (map == nullptr) {
  330|      2|            return Status::NotSupported("No enum mapping ", name);
  331|      2|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  332|      2|                                      value)) {
  333|      2|            return Status::OK();
  334|      2|          } else {
  335|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      2|          }
  337|      2|        });
  338|      2|    info.SetEqualsFunc(
  339|       |        // Casts addr1 and addr2 to the enum type and returns true if
  340|       |        // they are equal, false otherwise.
  341|      2|        [](const ConfigOptions&, const std::string&, const void* addr1,
  342|      2|           const void* addr2, std::string*) {
  343|      2|          return (*static_cast<const T*>(addr1) ==
  344|      2|                  *static_cast<const T*>(addr2));
  345|      2|        });
  346|      2|    return info;
  347|      2|  }  // End OptionTypeInfo::Enum
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions18DataBlockIndexTypeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_ST_PvE_clESS_ST_ST_SU_:
  312|  18.0k|              const std::string& value, void* addr) {
  313|  18.0k|          if (map == nullptr) {
  ------------------
  |  Branch (313:15): [True: 0, False: 18.0k]
  ------------------
  314|      0|            return Status::NotSupported("No enum mapping ", name);
  315|  18.0k|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  ------------------
  |  Branch (315:22): [True: 18.0k, False: 0]
  ------------------
  316|  18.0k|            return Status::OK();
  317|  18.0k|          } else {
  318|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      0|          }
  320|  18.0k|        });
_ZN7rocksdb9ParseEnumINS_22BlockBasedTableOptions18DataBlockIndexTypeEEEbRKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEERSH_PSB_:
  134|  18.0k|               const std::string& type, T* value) {
  135|  18.0k|  auto iter = type_map.find(type);
  136|  18.0k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 18.0k, False: 0]
  ------------------
  137|  18.0k|    *value = iter->second;
  138|  18.0k|    return true;
  139|  18.0k|  }
  140|      0|  return false;
  141|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions18DataBlockIndexTypeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_PKvPSB_E_clESS_ST_SV_SW_:
  328|  45.1k|              std::string* value) {
  329|  45.1k|          if (map == nullptr) {
  ------------------
  |  Branch (329:15): [True: 0, False: 45.1k]
  ------------------
  330|      0|            return Status::NotSupported("No enum mapping ", name);
  331|  45.1k|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  ------------------
  |  Branch (331:22): [True: 45.1k, False: 0]
  ------------------
  332|  45.1k|                                      value)) {
  333|  45.1k|            return Status::OK();
  334|  45.1k|          } else {
  335|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      0|          }
  337|  45.1k|        });
_ZN7rocksdb13SerializeEnumINS_22BlockBasedTableOptions18DataBlockIndexTypeEEEbRKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEERKSB_PSA_:
  150|  45.1k|                   const T& type, std::string* value) {
  151|  90.2k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 90.2k, False: 0]
  ------------------
  152|  90.2k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 45.1k, False: 45.1k]
  ------------------
  153|  45.1k|      *value = pair.first;
  154|  45.1k|      return true;
  155|  45.1k|    }
  156|  90.2k|  }
  157|      0|  return false;
  158|  45.1k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions18DataBlockIndexTypeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_PKvSV_PSB_E_clESS_ST_SV_SV_SW_:
  342|  9.02k|           const void* addr2, std::string*) {
  343|  9.02k|          return (*static_cast<const T*>(addr1) ==
  344|  9.02k|                  *static_cast<const T*>(addr2));
  345|  9.02k|        });
_ZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions19IndexShorteningModeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeE:
  303|      2|      OptionVerificationType verification = OptionVerificationType::kNormal) {
  304|      2|    OptionTypeInfo info(offset, OptionType::kEnum, verification, flags);
  305|      2|    info.SetParseFunc(
  306|       |        // Uses the map argument to convert the input string into
  307|       |        // its corresponding enum value.  If value is found in the map,
  308|       |        // addr is updated to the corresponding map entry.
  309|       |        // @return OK if the value is found in the map
  310|       |        // @return InvalidArgument if the value is not found in the map
  311|      2|        [map](const ConfigOptions&, const std::string& name,
  312|      2|              const std::string& value, void* addr) {
  313|      2|          if (map == nullptr) {
  314|      2|            return Status::NotSupported("No enum mapping ", name);
  315|      2|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  316|      2|            return Status::OK();
  317|      2|          } else {
  318|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      2|          }
  320|      2|        });
  321|      2|    info.SetSerializeFunc(
  322|       |        // Uses the map argument to convert the input enum into
  323|       |        // its corresponding string value.  If enum value is found in the map,
  324|       |        // value is updated to the corresponding string value in the map.
  325|       |        // @return OK if the enum is found in the map
  326|       |        // @return InvalidArgument if the enum is not found in the map
  327|      2|        [map](const ConfigOptions&, const std::string& name, const void* addr,
  328|      2|              std::string* value) {
  329|      2|          if (map == nullptr) {
  330|      2|            return Status::NotSupported("No enum mapping ", name);
  331|      2|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  332|      2|                                      value)) {
  333|      2|            return Status::OK();
  334|      2|          } else {
  335|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      2|          }
  337|      2|        });
  338|      2|    info.SetEqualsFunc(
  339|       |        // Casts addr1 and addr2 to the enum type and returns true if
  340|       |        // they are equal, false otherwise.
  341|      2|        [](const ConfigOptions&, const std::string&, const void* addr1,
  342|      2|           const void* addr2, std::string*) {
  343|      2|          return (*static_cast<const T*>(addr1) ==
  344|      2|                  *static_cast<const T*>(addr2));
  345|      2|        });
  346|      2|    return info;
  347|      2|  }  // End OptionTypeInfo::Enum
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions19IndexShorteningModeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_ST_PvE_clESS_ST_ST_SU_:
  312|  18.0k|              const std::string& value, void* addr) {
  313|  18.0k|          if (map == nullptr) {
  ------------------
  |  Branch (313:15): [True: 0, False: 18.0k]
  ------------------
  314|      0|            return Status::NotSupported("No enum mapping ", name);
  315|  18.0k|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  ------------------
  |  Branch (315:22): [True: 18.0k, False: 0]
  ------------------
  316|  18.0k|            return Status::OK();
  317|  18.0k|          } else {
  318|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      0|          }
  320|  18.0k|        });
_ZN7rocksdb9ParseEnumINS_22BlockBasedTableOptions19IndexShorteningModeEEEbRKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEERSH_PSB_:
  134|  18.0k|               const std::string& type, T* value) {
  135|  18.0k|  auto iter = type_map.find(type);
  136|  18.0k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 18.0k, False: 0]
  ------------------
  137|  18.0k|    *value = iter->second;
  138|  18.0k|    return true;
  139|  18.0k|  }
  140|      0|  return false;
  141|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions19IndexShorteningModeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_PKvPSB_E_clESS_ST_SV_SW_:
  328|  45.1k|              std::string* value) {
  329|  45.1k|          if (map == nullptr) {
  ------------------
  |  Branch (329:15): [True: 0, False: 45.1k]
  ------------------
  330|      0|            return Status::NotSupported("No enum mapping ", name);
  331|  45.1k|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  ------------------
  |  Branch (331:22): [True: 45.1k, False: 0]
  ------------------
  332|  45.1k|                                      value)) {
  333|  45.1k|            return Status::OK();
  334|  45.1k|          } else {
  335|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      0|          }
  337|  45.1k|        });
_ZN7rocksdb13SerializeEnumINS_22BlockBasedTableOptions19IndexShorteningModeEEEbRKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEERKSB_PSA_:
  150|  45.1k|                   const T& type, std::string* value) {
  151|  90.2k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 90.2k, False: 0]
  ------------------
  152|  90.2k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 45.1k, False: 45.1k]
  ------------------
  153|  45.1k|      *value = pair.first;
  154|  45.1k|      return true;
  155|  45.1k|    }
  156|  90.2k|  }
  157|      0|  return false;
  158|  45.1k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions19IndexShorteningModeEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_PKvSV_PSB_E_clESS_ST_SV_SV_SW_:
  342|  9.02k|           const void* addr2, std::string*) {
  343|  9.02k|          return (*static_cast<const T*>(addr1) ==
  344|  9.02k|                  *static_cast<const T*>(addr2));
  345|  9.02k|        });
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrIKNS_12FilterPolicyEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      2|                                          OptionTypeFlags flags) {
  486|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      2|                        flags | OptionTypeFlags::kShared);
  488|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      2|                                const std::string& name,
  490|      2|                                const std::string& value, void* addr) {
  491|      2|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      2|      if (name == kIdPropName() && value.empty()) {
  493|      2|        shared->reset();
  494|      2|        return Status::OK();
  495|      2|      } else {
  496|      2|        return T::CreateFromString(opts, value, shared);
  497|      2|      }
  498|      2|    });
  499|      2|  }
_ZZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrIKNS_12FilterPolicyEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsEENKUlRKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEESH_PvE_clES8_SH_SH_SI_:
  490|  18.0k|                                const std::string& value, void* addr) {
  491|  18.0k|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|  18.0k|      if (name == kIdPropName() && value.empty()) {
  ------------------
  |  Branch (492:11): [True: 0, False: 18.0k]
  |  Branch (492:36): [True: 0, False: 0]
  ------------------
  493|      0|        shared->reset();
  494|      0|        return Status::OK();
  495|  18.0k|      } else {
  496|  18.0k|        return T::CreateFromString(opts, value, shared);
  497|  18.0k|      }
  498|  18.0k|    });
_ZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions21PrepopulateBlockCacheEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeE:
  303|      2|      OptionVerificationType verification = OptionVerificationType::kNormal) {
  304|      2|    OptionTypeInfo info(offset, OptionType::kEnum, verification, flags);
  305|      2|    info.SetParseFunc(
  306|       |        // Uses the map argument to convert the input string into
  307|       |        // its corresponding enum value.  If value is found in the map,
  308|       |        // addr is updated to the corresponding map entry.
  309|       |        // @return OK if the value is found in the map
  310|       |        // @return InvalidArgument if the value is not found in the map
  311|      2|        [map](const ConfigOptions&, const std::string& name,
  312|      2|              const std::string& value, void* addr) {
  313|      2|          if (map == nullptr) {
  314|      2|            return Status::NotSupported("No enum mapping ", name);
  315|      2|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  316|      2|            return Status::OK();
  317|      2|          } else {
  318|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      2|          }
  320|      2|        });
  321|      2|    info.SetSerializeFunc(
  322|       |        // Uses the map argument to convert the input enum into
  323|       |        // its corresponding string value.  If enum value is found in the map,
  324|       |        // value is updated to the corresponding string value in the map.
  325|       |        // @return OK if the enum is found in the map
  326|       |        // @return InvalidArgument if the enum is not found in the map
  327|      2|        [map](const ConfigOptions&, const std::string& name, const void* addr,
  328|      2|              std::string* value) {
  329|      2|          if (map == nullptr) {
  330|      2|            return Status::NotSupported("No enum mapping ", name);
  331|      2|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  332|      2|                                      value)) {
  333|      2|            return Status::OK();
  334|      2|          } else {
  335|      2|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      2|          }
  337|      2|        });
  338|      2|    info.SetEqualsFunc(
  339|       |        // Casts addr1 and addr2 to the enum type and returns true if
  340|       |        // they are equal, false otherwise.
  341|      2|        [](const ConfigOptions&, const std::string&, const void* addr1,
  342|      2|           const void* addr2, std::string*) {
  343|      2|          return (*static_cast<const T*>(addr1) ==
  344|      2|                  *static_cast<const T*>(addr2));
  345|      2|        });
  346|      2|    return info;
  347|      2|  }  // End OptionTypeInfo::Enum
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions21PrepopulateBlockCacheEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_ST_PvE_clESS_ST_ST_SU_:
  312|  18.0k|              const std::string& value, void* addr) {
  313|  18.0k|          if (map == nullptr) {
  ------------------
  |  Branch (313:15): [True: 0, False: 18.0k]
  ------------------
  314|      0|            return Status::NotSupported("No enum mapping ", name);
  315|  18.0k|          } else if (ParseEnum<T>(*map, value, static_cast<T*>(addr))) {
  ------------------
  |  Branch (315:22): [True: 18.0k, False: 0]
  ------------------
  316|  18.0k|            return Status::OK();
  317|  18.0k|          } else {
  318|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  319|      0|          }
  320|  18.0k|        });
_ZN7rocksdb9ParseEnumINS_22BlockBasedTableOptions21PrepopulateBlockCacheEEEbRKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEERSH_PSB_:
  134|  18.0k|               const std::string& type, T* value) {
  135|  18.0k|  auto iter = type_map.find(type);
  136|  18.0k|  if (iter != type_map.end()) {
  ------------------
  |  Branch (136:7): [True: 18.0k, False: 0]
  ------------------
  137|  18.0k|    *value = iter->second;
  138|  18.0k|    return true;
  139|  18.0k|  }
  140|      0|  return false;
  141|  18.0k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions21PrepopulateBlockCacheEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_PKvPSB_E_clESS_ST_SV_SW_:
  328|  45.1k|              std::string* value) {
  329|  45.1k|          if (map == nullptr) {
  ------------------
  |  Branch (329:15): [True: 0, False: 45.1k]
  ------------------
  330|      0|            return Status::NotSupported("No enum mapping ", name);
  331|  45.1k|          } else if (SerializeEnum<T>(*map, (*static_cast<const T*>(addr)),
  ------------------
  |  Branch (331:22): [True: 45.1k, False: 0]
  ------------------
  332|  45.1k|                                      value)) {
  333|  45.1k|            return Status::OK();
  334|  45.1k|          } else {
  335|      0|            return Status::InvalidArgument("No mapping for enum ", name);
  336|      0|          }
  337|  45.1k|        });
_ZN7rocksdb13SerializeEnumINS_22BlockBasedTableOptions21PrepopulateBlockCacheEEEbRKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEET_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SB_EEEEEERKSB_PSA_:
  150|  45.1k|                   const T& type, std::string* value) {
  151|  90.2k|  for (const auto& pair : type_map) {
  ------------------
  |  Branch (151:25): [True: 90.2k, False: 0]
  ------------------
  152|  90.2k|    if (pair.second == type) {
  ------------------
  |  Branch (152:9): [True: 45.1k, False: 45.1k]
  ------------------
  153|  45.1k|      *value = pair.first;
  154|  45.1k|      return true;
  155|  45.1k|    }
  156|  90.2k|  }
  157|      0|  return false;
  158|  45.1k|}
_ZZN7rocksdb14OptionTypeInfo4EnumINS_22BlockBasedTableOptions21PrepopulateBlockCacheEEES0_iPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEET_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SC_EEEEEENS_15OptionTypeFlagsENS_22OptionVerificationTypeEENKUlRKNS_13ConfigOptionsERSI_PKvSV_PSB_E_clESS_ST_SV_SV_SW_:
  342|  9.02k|           const void* addr2, std::string*) {
  343|  9.02k|          return (*static_cast<const T*>(addr1) ==
  344|  9.02k|                  *static_cast<const T*>(addr2));
  345|  9.02k|        });
_ZN7rocksdb14OptionTypeInfo6VectorImEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_c:
  448|      2|                               char separator = ':') {
  449|      2|    OptionTypeInfo info(_offset, OptionType::kVector, _verification, _flags);
  450|      2|    info.SetParseFunc([elem_info, separator](
  451|      2|                          const ConfigOptions& opts, const std::string& name,
  452|      2|                          const std::string& value, void* addr) {
  453|      2|      auto result = static_cast<std::vector<T>*>(addr);
  454|      2|      return ParseVector<T>(opts, elem_info, separator, name, value, result);
  455|      2|    });
  456|      2|    info.SetSerializeFunc([elem_info, separator](const ConfigOptions& opts,
  457|      2|                                                 const std::string& name,
  458|      2|                                                 const void* addr,
  459|      2|                                                 std::string* value) {
  460|      2|      const auto& vec = *(static_cast<const std::vector<T>*>(addr));
  461|      2|      return SerializeVector<T>(opts, elem_info, separator, name, vec, value);
  462|      2|    });
  463|      2|    info.SetEqualsFunc([elem_info](const ConfigOptions& opts,
  464|      2|                                   const std::string& name, const void* addr1,
  465|      2|                                   const void* addr2, std::string* mismatch) {
  466|      2|      const auto& vec1 = *(static_cast<const std::vector<T>*>(addr1));
  467|      2|      const auto& vec2 = *(static_cast<const std::vector<T>*>(addr2));
  468|      2|      return VectorsAreEqual<T>(opts, elem_info, name, vec1, vec2, mismatch);
  469|      2|    });
  470|      2|    return info;
  471|      2|  }
_ZN7rocksdb14OptionTypeInfo6VectorINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_c:
  448|      2|                               char separator = ':') {
  449|      2|    OptionTypeInfo info(_offset, OptionType::kVector, _verification, _flags);
  450|      2|    info.SetParseFunc([elem_info, separator](
  451|      2|                          const ConfigOptions& opts, const std::string& name,
  452|      2|                          const std::string& value, void* addr) {
  453|      2|      auto result = static_cast<std::vector<T>*>(addr);
  454|      2|      return ParseVector<T>(opts, elem_info, separator, name, value, result);
  455|      2|    });
  456|      2|    info.SetSerializeFunc([elem_info, separator](const ConfigOptions& opts,
  457|      2|                                                 const std::string& name,
  458|      2|                                                 const void* addr,
  459|      2|                                                 std::string* value) {
  460|      2|      const auto& vec = *(static_cast<const std::vector<T>*>(addr));
  461|      2|      return SerializeVector<T>(opts, elem_info, separator, name, vec, value);
  462|      2|    });
  463|      2|    info.SetEqualsFunc([elem_info](const ConfigOptions& opts,
  464|      2|                                   const std::string& name, const void* addr1,
  465|      2|                                   const void* addr2, std::string* mismatch) {
  466|      2|      const auto& vec1 = *(static_cast<const std::vector<T>*>(addr1));
  467|      2|      const auto& vec2 = *(static_cast<const std::vector<T>*>(addr2));
  468|      2|      return VectorsAreEqual<T>(opts, elem_info, name, vec1, vec2, mismatch);
  469|      2|    });
  470|      2|    return info;
  471|      2|  }
_ZN7rocksdb14OptionTypeInfo5ArrayImLm2EEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_c:
  415|      2|                              char separator = ':') {
  416|      2|    OptionTypeInfo info(_offset, OptionType::kArray, _verification, _flags);
  417|      2|    info.SetParseFunc([elem_info, separator](
  418|      2|                          const ConfigOptions& opts, const std::string& name,
  419|      2|                          const std::string& value, void* addr) {
  420|      2|      auto result = static_cast<std::array<T, kSize>*>(addr);
  421|      2|      return ParseArray<T, kSize>(opts, elem_info, separator, name, value,
  422|      2|                                  result);
  423|      2|    });
  424|      2|    info.SetSerializeFunc([elem_info, separator](const ConfigOptions& opts,
  425|      2|                                                 const std::string& name,
  426|      2|                                                 const void* addr,
  427|      2|                                                 std::string* value) {
  428|      2|      const auto& array = *(static_cast<const std::array<T, kSize>*>(addr));
  429|      2|      return SerializeArray<T, kSize>(opts, elem_info, separator, name, array,
  430|      2|                                      value);
  431|      2|    });
  432|      2|    info.SetEqualsFunc([elem_info](const ConfigOptions& opts,
  433|      2|                                   const std::string& name, const void* addr1,
  434|      2|                                   const void* addr2, std::string* mismatch) {
  435|      2|      const auto& array1 = *(static_cast<const std::array<T, kSize>*>(addr1));
  436|      2|      const auto& array2 = *(static_cast<const std::array<T, kSize>*>(addr2));
  437|      2|      return ArraysAreEqual<T, kSize>(opts, elem_info, name, array1, array2,
  438|      2|                                      mismatch);
  439|      2|    });
  440|      2|    return info;
  441|      2|  }
_ZN7rocksdb14OptionTypeInfo6VectorINS_27CompactionServiceOutputFileEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsERKS0_c:
  448|      2|                               char separator = ':') {
  449|      2|    OptionTypeInfo info(_offset, OptionType::kVector, _verification, _flags);
  450|      2|    info.SetParseFunc([elem_info, separator](
  451|      2|                          const ConfigOptions& opts, const std::string& name,
  452|      2|                          const std::string& value, void* addr) {
  453|      2|      auto result = static_cast<std::vector<T>*>(addr);
  454|      2|      return ParseVector<T>(opts, elem_info, separator, name, value, result);
  455|      2|    });
  456|      2|    info.SetSerializeFunc([elem_info, separator](const ConfigOptions& opts,
  457|      2|                                                 const std::string& name,
  458|      2|                                                 const void* addr,
  459|      2|                                                 std::string* value) {
  460|      2|      const auto& vec = *(static_cast<const std::vector<T>*>(addr));
  461|      2|      return SerializeVector<T>(opts, elem_info, separator, name, vec, value);
  462|      2|    });
  463|      2|    info.SetEqualsFunc([elem_info](const ConfigOptions& opts,
  464|      2|                                   const std::string& name, const void* addr1,
  465|      2|                                   const void* addr2, std::string* mismatch) {
  466|      2|      const auto& vec1 = *(static_cast<const std::vector<T>*>(addr1));
  467|      2|      const auto& vec2 = *(static_cast<const std::vector<T>*>(addr2));
  468|      2|      return VectorsAreEqual<T>(opts, elem_info, name, vec1, vec2, mismatch);
  469|      2|    });
  470|      2|    return info;
  471|      2|  }
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_18EncryptionProviderEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      2|                                          OptionTypeFlags flags) {
  486|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      2|                        flags | OptionTypeFlags::kShared);
  488|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      2|                                const std::string& name,
  490|      2|                                const std::string& value, void* addr) {
  491|      2|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      2|      if (name == kIdPropName() && value.empty()) {
  493|      2|        shared->reset();
  494|      2|        return Status::OK();
  495|      2|      } else {
  496|      2|        return T::CreateFromString(opts, value, shared);
  497|      2|      }
  498|      2|    });
  499|      2|  }
_ZN7rocksdb14OptionTypeInfo17AsCustomSharedPtrINS_11BlockCipherEEES0_iNS_22OptionVerificationTypeENS_15OptionTypeFlagsE:
  485|      2|                                          OptionTypeFlags flags) {
  486|      2|    OptionTypeInfo info(offset, OptionType::kCustomizable, ovt,
  487|      2|                        flags | OptionTypeFlags::kShared);
  488|      2|    return info.SetParseFunc([](const ConfigOptions& opts,
  489|      2|                                const std::string& name,
  490|      2|                                const std::string& value, void* addr) {
  491|      2|      auto* shared = static_cast<std::shared_ptr<T>*>(addr);
  492|      2|      if (name == kIdPropName() && value.empty()) {
  493|      2|        shared->reset();
  494|      2|        return Status::OK();
  495|      2|      } else {
  496|      2|        return T::CreateFromString(opts, value, shared);
  497|      2|      }
  498|      2|    });
  499|      2|  }

_ZN7rocksdb10WideColumnC2IRKNS_5SliceES4_EEOT_OT0_:
   37|  29.5k|      : name_(std::forward<N>(name)), value_(std::forward<V>(value)) {}

_ZN7rocksdb9SavePointC2Ev:
   50|  2.74M|  SavePoint() : size(0), count(0), content_flags(0) {}
_ZN7rocksdb9SavePointC2Emjj:
   53|  1.36M|      : size(_size), count(_count), content_flags(_flags) {}
_ZNK7rocksdb9SavePoint10is_clearedEv:
   61|  1.36M|  bool is_cleared() const { return (size | count | content_flags) == 0; }
_ZN7rocksdb10WriteBatchC2Emm:
   67|  1.37M|      : WriteBatch(reserved_bytes, max_bytes, 0, 0) {}
_ZNK7rocksdb10WriteBatch11GetDataSizeEv:
  383|  1.36M|  size_t GetDataSize() const { return rep_.size(); }
_ZNK7rocksdb10WriteBatch22GetWalTerminationPointEv:
  461|  1.36M|  const SavePoint& GetWalTerminationPoint() const { return wal_term_point_; }

_ZN7rocksdb14WriteBatchBaseD2Ev:
   29|  2.74M|  virtual ~WriteBatchBase() {}

_ZN7rocksdb14StallInterfaceD2Ev:
   30|  9.02k|  virtual ~StallInterface() {}
_ZNK7rocksdb18WriteBufferManager7enabledEv:
   61|  1.42M|  bool enabled() const { return buffer_size() > 0; }
_ZNK7rocksdb18WriteBufferManager13cost_to_cacheEv:
   64|  40.5k|  bool cost_to_cache() const { return cache_res_mgr_ != nullptr; }
_ZNK7rocksdb18WriteBufferManager11buffer_sizeEv:
   80|  1.42M|  size_t buffer_size() const {
   81|  1.42M|    return buffer_size_.load(std::memory_order_relaxed);
   82|  1.42M|  }
_ZNK7rocksdb18WriteBufferManager11ShouldFlushEv:
  101|  1.36M|  bool ShouldFlush() const {
  102|  1.36M|    if (enabled()) {
  ------------------
  |  Branch (102:9): [True: 0, False: 1.36M]
  ------------------
  103|      0|      if (mutable_memtable_memory_usage() >
  ------------------
  |  Branch (103:11): [True: 0, False: 0]
  ------------------
  104|      0|          mutable_limit_.load(std::memory_order_relaxed)) {
  105|      0|        return true;
  106|      0|      }
  107|      0|      size_t local_size = buffer_size();
  108|      0|      if (memory_usage() >= local_size &&
  ------------------
  |  Branch (108:11): [True: 0, False: 0]
  ------------------
  109|      0|          mutable_memtable_memory_usage() >= local_size / 2) {
  ------------------
  |  Branch (109:11): [True: 0, False: 0]
  ------------------
  110|       |        // If the memory exceeds the buffer size, we trigger more aggressive
  111|       |        // flush. But if already more than half memory is being flushed,
  112|       |        // triggering more flush may not help. We will hold it instead.
  113|      0|        return true;
  114|      0|      }
  115|      0|    }
  116|  1.36M|    return false;
  117|  1.36M|  }
_ZNK7rocksdb18WriteBufferManager11ShouldStallEv:
  126|  1.36M|  bool ShouldStall() const {
  127|  1.36M|    if (!allow_stall_.load(std::memory_order_relaxed) || !enabled()) {
  ------------------
  |  Branch (127:9): [True: 1.36M, False: 0]
  |  Branch (127:58): [True: 0, False: 0]
  ------------------
  128|  1.36M|      return false;
  129|  1.36M|    }
  130|       |
  131|      0|    return IsStallActive() || IsStallThresholdExceeded();
  ------------------
  |  Branch (131:12): [True: 0, False: 0]
  |  Branch (131:31): [True: 0, False: 0]
  ------------------
  132|  1.36M|  }

_ZN7rocksdb23CreateLoggerFromOptionsERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_9DBOptionsEPNS0_10shared_ptrINS_6LoggerEEE:
  272|  13.5k|                               std::shared_ptr<Logger>* logger) {
  273|  13.5k|  if (options.info_log) {
  ------------------
  |  Branch (273:7): [True: 0, False: 13.5k]
  ------------------
  274|      0|    *logger = options.info_log;
  275|      0|    return Status::OK();
  276|      0|  }
  277|       |
  278|  13.5k|  Env* env = options.env;
  279|  13.5k|  std::string db_absolute_path;
  280|  13.5k|  Status s = env->GetAbsolutePath(dbname, &db_absolute_path);
  281|  13.5k|  TEST_SYNC_POINT_CALLBACK("rocksdb::CreateLoggerFromOptions:AfterGetPath", &s);
  282|  13.5k|  if (!s.ok()) {
  ------------------
  |  Branch (282:7): [True: 0, False: 13.5k]
  ------------------
  283|      0|    return s;
  284|      0|  }
  285|  13.5k|  std::string fname =
  286|  13.5k|      InfoLogFileName(dbname, db_absolute_path, options.db_log_dir);
  287|       |
  288|  13.5k|  const auto& clock = env->GetSystemClock();
  289|       |  // In case it does not exist.
  290|  13.5k|  s = env->CreateDirIfMissing(dbname);
  291|  13.5k|  if (!s.ok()) {
  ------------------
  |  Branch (291:7): [True: 0, False: 13.5k]
  ------------------
  292|      0|    if (options.db_log_dir.empty()) {
  ------------------
  |  Branch (292:9): [True: 0, False: 0]
  ------------------
  293|      0|      return s;
  294|      0|    } else {
  295|       |      // Ignore the error returned during creation of dbname because dbname and
  296|       |      // db_log_dir can be on different filesystems in which case dbname will
  297|       |      // not exist and error should be ignored. db_log_dir creation will handle
  298|       |      // the error in case there is any error in the creation of dbname on same
  299|       |      // filesystem.
  300|      0|      s = Status::OK();
  301|      0|    }
  302|      0|  }
  303|  13.5k|  assert(s.ok());
  304|       |
  305|  13.5k|  if (!options.db_log_dir.empty()) {
  ------------------
  |  Branch (305:7): [True: 0, False: 13.5k]
  ------------------
  306|      0|    s = env->CreateDirIfMissing(options.db_log_dir);
  307|      0|    if (!s.ok()) {
  ------------------
  |  Branch (307:9): [True: 0, False: 0]
  ------------------
  308|      0|      return s;
  309|      0|    }
  310|      0|  }
  311|       |  // Currently we only support roll by time-to-roll and log size
  312|  13.5k|  if (options.log_file_time_to_roll > 0 || options.max_log_file_size > 0) {
  ------------------
  |  Branch (312:7): [True: 0, False: 13.5k]
  |  Branch (312:44): [True: 0, False: 13.5k]
  ------------------
  313|      0|    AutoRollLogger* result = new AutoRollLogger(
  314|      0|        env->GetFileSystem(), clock, dbname, options.db_log_dir,
  315|      0|        options.max_log_file_size, options.log_file_time_to_roll,
  316|      0|        options.keep_log_file_num, options.info_log_level);
  317|      0|    s = result->GetStatus();
  318|      0|    if (!s.ok()) {
  ------------------
  |  Branch (318:9): [True: 0, False: 0]
  ------------------
  319|      0|      delete result;
  320|      0|    } else {
  321|      0|      logger->reset(result);
  322|      0|    }
  323|      0|    return s;
  324|      0|  }
  325|       |  // Open a log file in the same directory as the db
  326|  13.5k|  s = env->FileExists(fname);
  327|  13.5k|  if (s.ok()) {
  ------------------
  |  Branch (327:7): [True: 9.02k, False: 4.51k]
  ------------------
  328|  9.02k|    s = env->RenameFile(
  329|  9.02k|        fname, OldInfoLogFileName(dbname, clock->NowMicros(), db_absolute_path,
  330|  9.02k|                                  options.db_log_dir));
  331|       |
  332|       |    // The operation sequence of "FileExists -> Rename" is not atomic. It's
  333|       |    // possible that FileExists returns OK but file gets deleted before Rename.
  334|       |    // This can cause Rename to return IOError with subcode PathNotFound.
  335|       |    // Although it may be a rare case and applications should be discouraged
  336|       |    // to not concurrently modifying the contents of the directories accessed
  337|       |    // by the database instance, it is still helpful if we can perform some
  338|       |    // simple handling of this case. Therefore, we do the following:
  339|       |    // 1. if Rename() returns IOError with PathNotFound subcode, then we check
  340|       |    //    whether the source file, i.e. LOG, exists.
  341|       |    // 2. if LOG exists, it means Rename() failed due to something else. Then
  342|       |    //    we report error.
  343|       |    // 3. if LOG does not exist, it means it may have been removed/renamed by
  344|       |    //    someone else. Since it does not exist, we can reset Status to OK so
  345|       |    //    that this caller can try creating a new LOG file. If this succeeds,
  346|       |    //    we should still allow it.
  347|  9.02k|    if (s.IsPathNotFound()) {
  ------------------
  |  Branch (347:9): [True: 0, False: 9.02k]
  ------------------
  348|      0|      s = env->FileExists(fname);
  349|      0|      if (s.IsNotFound()) {
  ------------------
  |  Branch (349:11): [True: 0, False: 0]
  ------------------
  350|      0|        s = Status::OK();
  351|      0|      }
  352|      0|    }
  353|  9.02k|  } else if (s.IsNotFound()) {
  ------------------
  |  Branch (353:14): [True: 4.51k, False: 0]
  ------------------
  354|       |    // "LOG" is not required to exist since this could be a new DB.
  355|  4.51k|    s = Status::OK();
  356|  4.51k|  }
  357|  13.5k|  if (s.ok()) {
  ------------------
  |  Branch (357:7): [True: 13.5k, False: 0]
  ------------------
  358|  13.5k|    s = env->NewLogger(fname, logger);
  359|  13.5k|  }
  360|  13.5k|  if (s.ok() && logger->get() != nullptr) {
  ------------------
  |  Branch (360:7): [True: 13.5k, False: 0]
  |  Branch (360:17): [True: 13.5k, False: 0]
  ------------------
  361|  13.5k|    (*logger)->SetInfoLogLevel(options.info_log_level);
  362|  13.5k|  }
  363|  13.5k|  return s;
  364|  13.5k|}

_ZN7rocksdb9EnvLoggerC2EONSt3__110unique_ptrINS_14FSWritableFileENS1_14default_deleteIS3_EEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_10EnvOptionsEPNS_3EnvENS_12InfoLogLevelE:
   41|  13.5k|        flush_pending_(false) {}
_ZN7rocksdb9EnvLoggerD2Ev:
   43|  13.5k|  ~EnvLogger() {
   44|  13.5k|    if (!closed_) {
  ------------------
  |  Branch (44:9): [True: 4.51k, False: 9.02k]
  ------------------
   45|  4.51k|      closed_ = true;
   46|  4.51k|      CloseHelper().PermitUncheckedError();
   47|  4.51k|    }
   48|  13.5k|  }
_ZN7rocksdb9EnvLogger11CloseHelperEv:
   94|  13.5k|  Status CloseHelper() {
   95|  13.5k|    FileOpGuard guard(*this);
   96|  13.5k|    const auto close_status = file_.Close(IOOptions());
   97|       |
   98|  13.5k|    if (close_status.ok()) {
  ------------------
  |  Branch (98:9): [True: 13.5k, False: 0]
  ------------------
   99|  13.5k|      return close_status;
  100|  13.5k|    }
  101|      0|    return Status::IOError("Close of log file failed with error:" +
  102|      0|                           (close_status.getState()
  ------------------
  |  Branch (102:29): [True: 0, False: 0]
  ------------------
  103|      0|                                ? std::string(close_status.getState())
  104|      0|                                : std::string()));
  105|  13.5k|  }
_ZN7rocksdb9EnvLogger11FileOpGuardC2ERS0_:
   56|  2.02M|        : logger_(logger), prev_perf_level_(GetPerfLevel()) {
   57|       |      // Preserve iostats not to pollute writes from user writes. We might
   58|       |      // need a better solution than this.
   59|  2.02M|      SetPerfLevel(PerfLevel::kDisable);
   60|  2.02M|      IOSTATS_SET_DISABLE(true);
  ------------------
  |  |   46|  2.02M|#define IOSTATS_SET_DISABLE(disable) (iostats_context.disable_iostats = disable)
  ------------------
   61|  2.02M|      logger.mutex_.Lock();
   62|  2.02M|    }
_ZN7rocksdb9EnvLogger11FileOpGuardD2Ev:
   63|  2.02M|    ~FileOpGuard() {
   64|  2.02M|      logger_.mutex_.Unlock();
   65|  2.02M|      IOSTATS_SET_DISABLE(false);
  ------------------
  |  |   46|  2.02M|#define IOSTATS_SET_DISABLE(disable) (iostats_context.disable_iostats = disable)
  ------------------
   66|  2.02M|      SetPerfLevel(prev_perf_level_);
   67|  2.02M|    }
_ZN7rocksdb9EnvLogger4LogvEPKcP13__va_list_tag:
  108|  1.96M|  void Logv(const char* format, va_list ap) override {
  109|  1.96M|    IOSTATS_TIMER_GUARD(logger_nanos);
  ------------------
  |  |   36|  1.96M|  PerfStepTimer iostats_step_timer_##metric(&(iostats_context.metric)); \
  |  |   37|  1.96M|  iostats_step_timer_##metric.Start();
  ------------------
  110|       |
  111|  1.96M|    const uint64_t thread_id = env_->GetThreadID();
  112|       |
  113|       |    // We try twice: the first time with a fixed-size stack allocated buffer,
  114|       |    // and the second time with a much larger dynamically allocated buffer.
  115|  1.96M|    char buffer[500];
  116|  1.97M|    for (int iter = 0; iter < 2; iter++) {
  ------------------
  |  Branch (116:24): [True: 1.97M, False: 0]
  ------------------
  117|  1.97M|      char* base;
  118|  1.97M|      int bufsize;
  119|  1.97M|      if (iter == 0) {
  ------------------
  |  Branch (119:11): [True: 1.96M, False: 13.5k]
  ------------------
  120|  1.96M|        bufsize = sizeof(buffer);
  121|  1.96M|        base = buffer;
  122|  1.96M|      } else {
  123|  13.5k|        bufsize = 65536;
  124|  13.5k|        base = new char[bufsize];
  125|  13.5k|      }
  126|  1.97M|      char* p = base;
  127|  1.97M|      char* limit = base + bufsize;
  128|       |
  129|  1.97M|      port::TimeVal now_tv;
  130|  1.97M|      port::GetTimeOfDay(&now_tv, nullptr);
  131|  1.97M|      const time_t seconds = now_tv.tv_sec;
  132|  1.97M|      struct tm t;
  133|  1.97M|      port::LocalTimeR(&seconds, &t);
  134|  1.97M|      p += snprintf(p, limit - p, "%04d/%02d/%02d-%02d:%02d:%02d.%06d %llu ",
  135|  1.97M|                    t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour,
  136|  1.97M|                    t.tm_min, t.tm_sec, static_cast<int>(now_tv.tv_usec),
  137|  1.97M|                    static_cast<long long unsigned int>(thread_id));
  138|       |
  139|       |      // Print the message
  140|  1.97M|      if (p < limit) {
  ------------------
  |  Branch (140:11): [True: 1.97M, False: 0]
  ------------------
  141|  1.97M|        va_list backup_ap;
  142|  1.97M|        va_copy(backup_ap, ap);
  143|  1.97M|        p += vsnprintf(p, limit - p, format, backup_ap);
  144|  1.97M|        va_end(backup_ap);
  145|  1.97M|      }
  146|       |
  147|       |      // Truncate to available space if necessary
  148|  1.97M|      if (p >= limit) {
  ------------------
  |  Branch (148:11): [True: 13.5k, False: 1.96M]
  ------------------
  149|  13.5k|        if (iter == 0) {
  ------------------
  |  Branch (149:13): [True: 13.5k, False: 0]
  ------------------
  150|  13.5k|          continue;  // Try again with larger buffer
  151|  13.5k|        } else {
  152|      0|          p = limit - 1;
  153|      0|        }
  154|  13.5k|      }
  155|       |
  156|       |      // Add newline if necessary
  157|  1.96M|      if (p == base || p[-1] != '\n') {
  ------------------
  |  Branch (157:11): [True: 0, False: 1.96M]
  |  Branch (157:24): [True: 1.82M, False: 135k]
  ------------------
  158|  1.82M|        *p++ = '\n';
  159|  1.82M|      }
  160|       |
  161|  1.96M|      assert(p <= limit);
  162|  1.96M|      {
  163|  1.96M|        FileOpGuard guard(*this);
  164|       |        // We will ignore any error returned by Append().
  165|  1.96M|        file_.Append(IOOptions(), Slice(base, p - base)).PermitUncheckedError();
  166|  1.96M|        file_.reset_seen_error();
  167|  1.96M|        flush_pending_ = true;
  168|  1.96M|        const uint64_t now_micros = clock_->NowMicros();
  169|  1.96M|        if (now_micros - last_flush_micros_ >= flush_every_seconds_ * 1000000) {
  ------------------
  |  Branch (169:13): [True: 13.5k, False: 1.95M]
  ------------------
  170|  13.5k|          FlushLocked();
  171|  13.5k|        }
  172|  1.96M|      }
  173|  1.96M|      if (base != buffer) {
  ------------------
  |  Branch (173:11): [True: 13.5k, False: 1.95M]
  ------------------
  174|  13.5k|        delete[] base;
  175|  13.5k|      }
  176|  1.96M|      break;
  177|  1.97M|    }
  178|  1.96M|  }
_ZN7rocksdb9EnvLogger11FlushLockedEv:
   74|  64.0k|  void FlushLocked() {
   75|  64.0k|    mutex_.AssertHeld();
   76|  64.0k|    if (flush_pending_) {
  ------------------
  |  Branch (76:9): [True: 63.1k, False: 902]
  ------------------
   77|  63.1k|      flush_pending_ = false;
   78|  63.1k|      file_.Flush(IOOptions()).PermitUncheckedError();
   79|  63.1k|      file_.reset_seen_error();
   80|  63.1k|    }
   81|  64.0k|    last_flush_micros_ = clock_->NowMicros();
   82|  64.0k|  }
_ZN7rocksdb9EnvLogger5FlushEv:
   84|  50.5k|  void Flush() override {
   85|  50.5k|    TEST_SYNC_POINT("EnvLogger::Flush:Begin1");
   86|  50.5k|    TEST_SYNC_POINT("EnvLogger::Flush:Begin2");
   87|       |
   88|  50.5k|    FileOpGuard guard(*this);
   89|  50.5k|    FlushLocked();
   90|  50.5k|  }
_ZN7rocksdb9EnvLogger9CloseImplEv:
   92|  9.02k|  Status CloseImpl() override { return CloseHelper(); }

_ZN7rocksdb17EventLoggerStreamC2EPNS_6LoggerE:
   21|  9.02k|      json_writer_(nullptr) {}
_ZN7rocksdb17EventLoggerStreamD2Ev:
   30|  9.02k|EventLoggerStream::~EventLoggerStream() {
   31|  9.02k|  if (json_writer_) {
  ------------------
  |  Branch (31:7): [True: 9.02k, False: 0]
  ------------------
   32|  9.02k|    json_writer_->EndObject();
   33|       |#ifdef ROCKSDB_PRINT_EVENTS_TO_STDOUT
   34|       |    printf("%s\n", json_writer_->Get().c_str());
   35|       |#else
   36|  9.02k|    if (logger_) {
  ------------------
  |  Branch (36:9): [True: 9.02k, False: 0]
  ------------------
   37|  9.02k|      EventLogger::Log(logger_, *json_writer_);
   38|  9.02k|    } else if (log_buffer_) {
  ------------------
  |  Branch (38:16): [True: 0, False: 0]
  ------------------
   39|      0|      assert(max_log_size_);
   40|      0|      EventLogger::LogToBuffer(log_buffer_, *json_writer_, max_log_size_);
   41|      0|    }
   42|  9.02k|#endif
   43|  9.02k|    delete json_writer_;
   44|  9.02k|  }
   45|  9.02k|}
_ZN7rocksdb11EventLogger3LogERKNS_10JSONWriterE:
   47|  4.48k|void EventLogger::Log(const JSONWriter& jwriter) { Log(logger_, jwriter); }
_ZN7rocksdb11EventLogger3LogEPNS_6LoggerERKNS_10JSONWriterE:
   49|  13.5k|void EventLogger::Log(Logger* logger, const JSONWriter& jwriter) {
   50|       |#ifdef ROCKSDB_PRINT_EVENTS_TO_STDOUT
   51|       |  printf("%s\n", jwriter.Get().c_str());
   52|       |#else
   53|  13.5k|  ROCKSDB_NAMESPACE::Log(logger, "%s %s", Prefix(), jwriter.Get().c_str());
  ------------------
  |  |   15|  13.5k|#define ROCKSDB_NAMESPACE rocksdb
  ------------------
   54|  13.5k|#endif
   55|  13.5k|}

_ZN7rocksdb11EventLoggerC2EPNS_6LoggerE:
  183|  9.02k|  explicit EventLogger(Logger* logger) : logger_(logger) {}
_ZN7rocksdb10JSONWriterC2Ev:
   20|  13.5k|  JSONWriter() : state_(kExpectKey), first_element_(true), in_array_(false) {
   21|  13.5k|    stream_ << "{";
   22|  13.5k|  }
_ZN7rocksdb10JSONWriter6AddKeyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   24|   251k|  void AddKey(const std::string& key) {
   25|   251k|    assert(state_ == kExpectKey);
   26|   251k|    if (!first_element_) {
  ------------------
  |  Branch (26:9): [True: 233k, False: 17.9k]
  ------------------
   27|   233k|      stream_ << ", ";
   28|   233k|    }
   29|   251k|    stream_ << "\"" << key << "\": ";
   30|   251k|    state_ = kExpectValue;
   31|   251k|    first_element_ = false;
   32|   251k|  }
_ZN7rocksdb10JSONWriter8AddValueEPKc:
   34|  76.2k|  void AddValue(const char* value) {
   35|  76.2k|    assert(state_ == kExpectValue || state_ == kInArray);
   36|  76.2k|    if (state_ == kInArray && !first_element_) {
  ------------------
  |  Branch (36:9): [True: 0, False: 76.2k]
  |  Branch (36:31): [True: 0, False: 0]
  ------------------
   37|      0|      stream_ << ", ";
   38|      0|    }
   39|  76.2k|    stream_ << "\"" << value << "\"";
   40|  76.2k|    if (state_ != kInArray) {
  ------------------
  |  Branch (40:9): [True: 76.2k, False: 0]
  ------------------
   41|  76.2k|      state_ = kExpectKey;
   42|  76.2k|    }
   43|  76.2k|    first_element_ = false;
   44|  76.2k|  }
_ZN7rocksdb10JSONWriter10StartArrayEv:
   59|  4.51k|  void StartArray() {
   60|  4.51k|    assert(state_ == kExpectValue);
   61|  4.51k|    state_ = kInArray;
   62|  4.51k|    in_array_ = true;
   63|  4.51k|    stream_ << "[";
   64|  4.51k|    first_element_ = true;
   65|  4.51k|  }
_ZN7rocksdb10JSONWriter8EndArrayEv:
   67|  4.51k|  void EndArray() {
   68|  4.51k|    assert(state_ == kInArray);
   69|  4.51k|    state_ = kExpectKey;
   70|  4.51k|    in_array_ = false;
   71|  4.51k|    stream_ << "]";
   72|  4.51k|    first_element_ = false;
   73|  4.51k|  }
_ZN7rocksdb10JSONWriter11StartObjectEv:
   75|  4.48k|  void StartObject() {
   76|  4.48k|    assert(state_ == kExpectValue);
   77|  4.48k|    state_ = kExpectKey;
   78|  4.48k|    stream_ << "{";
   79|  4.48k|    first_element_ = true;
   80|  4.48k|  }
_ZN7rocksdb10JSONWriter9EndObjectEv:
   82|  17.9k|  void EndObject() {
   83|  17.9k|    assert(state_ == kExpectKey);
   84|  17.9k|    stream_ << "}";
   85|  17.9k|    first_element_ = false;
   86|  17.9k|  }
_ZNK7rocksdb10JSONWriter3GetEv:
  103|  13.5k|  std::string Get() const { return stream_.str(); }
_ZN7rocksdb10JSONWriterlsEPKc:
  105|   327k|  JSONWriter& operator<<(const char* val) {
  106|   327k|    if (state_ == kExpectKey) {
  ------------------
  |  Branch (106:9): [True: 251k, False: 76.2k]
  ------------------
  107|   251k|      AddKey(val);
  108|   251k|    } else {
  109|  76.2k|      AddValue(val);
  110|  76.2k|    }
  111|   327k|    return *this;
  112|   327k|  }
_ZN7rocksdb10JSONWriterlsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  114|  58.2k|  JSONWriter& operator<<(const std::string& val) {
  115|  58.2k|    return *this << val.c_str();
  116|  58.2k|  }
_ZN7rocksdb17EventLoggerStream10StartArrayEv:
  147|  4.51k|  void StartArray() { json_writer_->StartArray(); }
_ZN7rocksdb17EventLoggerStream8EndArrayEv:
  148|  4.51k|  void EndArray() { json_writer_->EndArray(); }
_ZN7rocksdb17EventLoggerStream10MakeStreamEv:
  155|  63.1k|  void MakeStream() {
  156|  63.1k|    if (!json_writer_) {
  ------------------
  |  Branch (156:9): [True: 9.02k, False: 54.1k]
  ------------------
  157|  9.02k|      json_writer_ = new JSONWriter();
  158|  9.02k|      *this << "time_micros"
  159|  9.02k|            << std::chrono::duration_cast<std::chrono::microseconds>(
  160|  9.02k|                   std::chrono::system_clock::now().time_since_epoch())
  161|  9.02k|                   .count();
  162|  9.02k|    }
  163|  63.1k|  }
_ZN7rocksdb11EventLogger6PrefixEv:
  181|  13.5k|  static const char* Prefix() { return "EVENT_LOG_v1"; }
_ZN7rocksdb11EventLogger3LogEv:
  184|  9.02k|  EventLoggerStream Log() { return EventLoggerStream(logger_); }
_ZN7rocksdb17EventLoggerStreamlsIA12_cEERS0_RKT_:
  141|  9.02k|  EventLoggerStream& operator<<(const T& val) {
  142|  9.02k|    MakeStream();
  143|  9.02k|    *json_writer_ << val;
  144|  9.02k|    return *this;
  145|  9.02k|  }
_ZN7rocksdb17EventLoggerStreamlsIxEERS0_RKT_:
  141|  9.02k|  EventLoggerStream& operator<<(const T& val) {
  142|  9.02k|    MakeStream();
  143|  9.02k|    *json_writer_ << val;
  144|  9.02k|    return *this;
  145|  9.02k|  }
_ZN7rocksdb10JSONWriterlsIxEERS0_RKT_:
  119|  13.5k|  JSONWriter& operator<<(const T& val) {
  120|  13.5k|    assert(state_ != kExpectKey);
  121|  13.5k|    AddValue(val);
  122|  13.5k|    return *this;
  123|  13.5k|  }
_ZN7rocksdb10JSONWriter8AddValueIxEEvRKT_:
   47|  13.5k|  void AddValue(const T& value) {
   48|  13.5k|    assert(state_ == kExpectValue || state_ == kInArray);
   49|  13.5k|    if (state_ == kInArray && !first_element_) {
  ------------------
  |  Branch (49:9): [True: 0, False: 13.5k]
  |  Branch (49:31): [True: 0, False: 0]
  ------------------
   50|      0|      stream_ << ", ";
   51|      0|    }
   52|  13.5k|    stream_ << value;
   53|  13.5k|    if (state_ != kInArray) {
  ------------------
  |  Branch (53:9): [True: 13.5k, False: 0]
  ------------------
   54|  13.5k|      state_ = kExpectKey;
   55|  13.5k|    }
   56|  13.5k|    first_element_ = false;
   57|  13.5k|  }
_ZN7rocksdb17EventLoggerStreamlsIA4_cEERS0_RKT_:
  141|  9.02k|  EventLoggerStream& operator<<(const T& val) {
  142|  9.02k|    MakeStream();
  143|  9.02k|    *json_writer_ << val;
  144|  9.02k|    return *this;
  145|  9.02k|  }
_ZN7rocksdb17EventLoggerStreamlsIiEERS0_RKT_:
  141|  9.02k|  EventLoggerStream& operator<<(const T& val) {
  142|  9.02k|    MakeStream();
  143|  9.02k|    *json_writer_ << val;
  144|  9.02k|    return *this;
  145|  9.02k|  }
_ZN7rocksdb10JSONWriterlsIiEERS0_RKT_:
  119|  13.5k|  JSONWriter& operator<<(const T& val) {
  120|  13.5k|    assert(state_ != kExpectKey);
  121|  13.5k|    AddValue(val);
  122|  13.5k|    return *this;
  123|  13.5k|  }
_ZN7rocksdb10JSONWriter8AddValueIiEEvRKT_:
   47|  13.5k|  void AddValue(const T& value) {
   48|  13.5k|    assert(state_ == kExpectValue || state_ == kInArray);
   49|  13.5k|    if (state_ == kInArray && !first_element_) {
  ------------------
  |  Branch (49:9): [True: 0, False: 13.5k]
  |  Branch (49:31): [True: 0, False: 0]
  ------------------
   50|      0|      stream_ << ", ";
   51|      0|    }
   52|  13.5k|    stream_ << value;
   53|  13.5k|    if (state_ != kInArray) {
  ------------------
  |  Branch (53:9): [True: 13.5k, False: 0]
  ------------------
   54|  13.5k|      state_ = kExpectKey;
   55|  13.5k|    }
   56|  13.5k|    first_element_ = false;
   57|  13.5k|  }
_ZN7rocksdb17EventLoggerStreamlsIA6_cEERS0_RKT_:
  141|  9.02k|  EventLoggerStream& operator<<(const T& val) {
  142|  9.02k|    MakeStream();
  143|  9.02k|    *json_writer_ << val;
  144|  9.02k|    return *this;
  145|  9.02k|  }
_ZN7rocksdb17EventLoggerStreamlsIA18_cEERS0_RKT_:
  141|  4.51k|  EventLoggerStream& operator<<(const T& val) {
  142|  4.51k|    MakeStream();
  143|  4.51k|    *json_writer_ << val;
  144|  4.51k|    return *this;
  145|  4.51k|  }
_ZN7rocksdb17EventLoggerStreamlsIA17_cEERS0_RKT_:
  141|  4.51k|  EventLoggerStream& operator<<(const T& val) {
  142|  4.51k|    MakeStream();
  143|  4.51k|    *json_writer_ << val;
  144|  4.51k|    return *this;
  145|  4.51k|  }
_ZN7rocksdb17EventLoggerStreamlsIA10_cEERS0_RKT_:
  141|  4.51k|  EventLoggerStream& operator<<(const T& val) {
  142|  4.51k|    MakeStream();
  143|  4.51k|    *json_writer_ << val;
  144|  4.51k|    return *this;
  145|  4.51k|  }
_ZN7rocksdb17EventLoggerStreamlsImEERS0_RKT_:
  141|  4.51k|  EventLoggerStream& operator<<(const T& val) {
  142|  4.51k|    MakeStream();
  143|  4.51k|    *json_writer_ << val;
  144|  4.51k|    return *this;
  145|  4.51k|  }
_ZN7rocksdb10JSONWriterlsImEERS0_RKT_:
  119|   143k|  JSONWriter& operator<<(const T& val) {
  120|   143k|    assert(state_ != kExpectKey);
  121|   143k|    AddValue(val);
  122|   143k|    return *this;
  123|   143k|  }
_ZN7rocksdb10JSONWriter8AddValueImEEvRKT_:
   47|   143k|  void AddValue(const T& value) {
   48|   143k|    assert(state_ == kExpectValue || state_ == kInArray);
   49|   143k|    if (state_ == kInArray && !first_element_) {
  ------------------
  |  Branch (49:9): [True: 4.51k, False: 139k]
  |  Branch (49:31): [True: 0, False: 4.51k]
  ------------------
   50|      0|      stream_ << ", ";
   51|      0|    }
   52|   143k|    stream_ << value;
   53|   143k|    if (state_ != kInArray) {
  ------------------
  |  Branch (53:9): [True: 139k, False: 4.51k]
  ------------------
   54|   139k|      state_ = kExpectKey;
   55|   139k|    }
   56|   143k|    first_element_ = false;
   57|   143k|  }

_Z23RocksLogShorterFileNamePKc:
   21|   126k|inline const char* RocksLogShorterFileName(const char* file) {
   22|       |  // 18 is the length of "logging/logging.h".
   23|       |  // If the name of this file changed, please change this number, too.
   24|   126k|  return file + (sizeof(__FILE__) > 18 ? sizeof(__FILE__) - 18 : 0);
  ------------------
  |  Branch (24:18): [Folded - Ignored]
  ------------------
   25|   126k|}

_ZN7rocksdb9AllocatorD2Ev:
   25|  72.1k|  virtual ~Allocator() {}

_ZN7rocksdb5Arena17OptimizeBlockSizeEm:
   23|  72.1k|size_t Arena::OptimizeBlockSize(size_t block_size) {
   24|       |  // Make sure block_size is in optimal range
   25|  72.1k|  block_size = std::max(Arena::kMinBlockSize, block_size);
   26|  72.1k|  block_size = std::min(Arena::kMaxBlockSize, block_size);
   27|       |
   28|       |  // make sure block_size is the multiple of kAlignUnit
   29|  72.1k|  if (block_size % kAlignUnit != 0) {
  ------------------
  |  Branch (29:7): [True: 0, False: 72.1k]
  ------------------
   30|      0|    block_size = (1 + block_size / kAlignUnit) * kAlignUnit;
   31|      0|  }
   32|       |
   33|  72.1k|  return block_size;
   34|  72.1k|}
_ZN7rocksdb5ArenaC2EmPNS_12AllocTrackerEm:
   37|  58.6k|    : kBlockSize(OptimizeBlockSize(block_size)), tracker_(tracker) {
   38|  58.6k|  assert(kBlockSize >= kMinBlockSize && kBlockSize <= kMaxBlockSize &&
   39|  58.6k|         kBlockSize % kAlignUnit == 0);
   40|  58.6k|  TEST_SYNC_POINT_CALLBACK("Arena::Arena:0", const_cast<size_t*>(&kBlockSize));
   41|  58.6k|  alloc_bytes_remaining_ = sizeof(inline_block_);
   42|  58.6k|  blocks_memory_ += alloc_bytes_remaining_;
   43|  58.6k|  aligned_alloc_ptr_ = inline_block_;
   44|  58.6k|  unaligned_alloc_ptr_ = inline_block_ + alloc_bytes_remaining_;
   45|  58.6k|  if (MemMapping::kHugePageSupported) {
  ------------------
  |  Branch (45:7): [Folded - Ignored]
  ------------------
   46|  58.6k|    hugetlb_size_ = huge_page_size;
   47|  58.6k|    if (hugetlb_size_ && kBlockSize > hugetlb_size_) {
  ------------------
  |  Branch (47:9): [True: 0, False: 58.6k]
  |  Branch (47:26): [True: 0, False: 0]
  ------------------
   48|      0|      hugetlb_size_ = ((kBlockSize - 1U) / hugetlb_size_ + 1U) * hugetlb_size_;
   49|      0|    }
   50|  58.6k|  }
   51|  58.6k|  if (tracker_ != nullptr) {
  ------------------
  |  Branch (51:7): [True: 0, False: 58.6k]
  ------------------
   52|      0|    tracker_->Allocate(kInlineSize);
   53|      0|  }
   54|  58.6k|}
_ZN7rocksdb5ArenaD2Ev:
   56|  58.6k|Arena::~Arena() {
   57|  58.6k|  if (tracker_ != nullptr) {
  ------------------
  |  Branch (57:7): [True: 0, False: 58.6k]
  ------------------
   58|      0|    assert(tracker_->is_freed());
   59|      0|    tracker_->FreeMem();
   60|      0|  }
   61|  58.6k|}
_ZN7rocksdb5Arena16AllocateFallbackEmb:
   63|  5.36k|char* Arena::AllocateFallback(size_t bytes, bool aligned) {
   64|  5.36k|  if (bytes > kBlockSize / 4) {
  ------------------
  |  Branch (64:7): [True: 616, False: 4.75k]
  ------------------
   65|    616|    ++irregular_block_num;
   66|       |    // Object is more than a quarter of our block size.  Allocate it separately
   67|       |    // to avoid wasting too much space in leftover bytes.
   68|    616|    return AllocateNewBlock(bytes);
   69|    616|  }
   70|       |
   71|       |  // We waste the remaining space in the current block.
   72|  4.75k|  size_t size = 0;
   73|  4.75k|  char* block_head = nullptr;
   74|  4.75k|  if (MemMapping::kHugePageSupported && hugetlb_size_ > 0) {
  ------------------
  |  Branch (74:7): [Folded - Ignored]
  |  Branch (74:41): [True: 0, False: 4.75k]
  ------------------
   75|      0|    size = hugetlb_size_;
   76|      0|    block_head = AllocateFromHugePage(size);
   77|      0|  }
   78|  4.75k|  if (!block_head) {
  ------------------
  |  Branch (78:7): [True: 4.75k, False: 0]
  ------------------
   79|  4.75k|    size = kBlockSize;
   80|  4.75k|    block_head = AllocateNewBlock(size);
   81|  4.75k|  }
   82|  4.75k|  alloc_bytes_remaining_ = size - bytes;
   83|       |
   84|  4.75k|  if (aligned) {
  ------------------
  |  Branch (84:7): [True: 4.75k, False: 0]
  ------------------
   85|  4.75k|    aligned_alloc_ptr_ = block_head + bytes;
   86|  4.75k|    unaligned_alloc_ptr_ = block_head + size;
   87|  4.75k|    return block_head;
   88|  4.75k|  } else {
   89|      0|    aligned_alloc_ptr_ = block_head;
   90|      0|    unaligned_alloc_ptr_ = block_head + size - bytes;
   91|      0|    return unaligned_alloc_ptr_;
   92|      0|  }
   93|  4.75k|}
_ZN7rocksdb5Arena15AllocateAlignedEmmPNS_6LoggerE:
  109|  2.63M|                             Logger* logger) {
  110|  2.63M|  if (MemMapping::kHugePageSupported && hugetlb_size_ > 0 &&
  ------------------
  |  Branch (110:7): [Folded - Ignored]
  |  Branch (110:41): [True: 0, False: 2.63M]
  ------------------
  111|  2.63M|      huge_page_size > 0 && bytes > 0) {
  ------------------
  |  Branch (111:7): [True: 0, False: 0]
  |  Branch (111:29): [True: 0, False: 0]
  ------------------
  112|       |    // Allocate from a huge page TLB table.
  113|      0|    size_t reserved_size =
  114|      0|        ((bytes - 1U) / huge_page_size + 1U) * huge_page_size;
  115|      0|    assert(reserved_size >= bytes);
  116|       |
  117|      0|    char* addr = AllocateFromHugePage(reserved_size);
  118|      0|    if (addr == nullptr) {
  ------------------
  |  Branch (118:9): [True: 0, False: 0]
  ------------------
  119|      0|      ROCKS_LOG_WARN(logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  121|      0|                     errnoStr(errno).c_str());
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  120|      0|                     "AllocateAligned fail to allocate huge TLB pages: %s",
  121|      0|                     errnoStr(errno).c_str());
  122|       |      // fail back to malloc
  123|      0|    } else {
  124|      0|      return addr;
  125|      0|    }
  126|      0|  }
  127|       |
  128|  2.63M|  size_t current_mod =
  129|  2.63M|      reinterpret_cast<uintptr_t>(aligned_alloc_ptr_) & (kAlignUnit - 1);
  130|  2.63M|  size_t slop = (current_mod == 0 ? 0 : kAlignUnit - current_mod);
  ------------------
  |  Branch (130:18): [True: 951k, False: 1.68M]
  ------------------
  131|  2.63M|  size_t needed = bytes + slop;
  132|  2.63M|  char* result;
  133|  2.63M|  if (needed <= alloc_bytes_remaining_) {
  ------------------
  |  Branch (133:7): [True: 2.62M, False: 5.36k]
  ------------------
  134|  2.62M|    result = aligned_alloc_ptr_ + slop;
  135|  2.62M|    aligned_alloc_ptr_ += needed;
  136|  2.62M|    alloc_bytes_remaining_ -= needed;
  137|  2.62M|  } else {
  138|       |    // AllocateFallback always returns aligned memory
  139|  5.36k|    result = AllocateFallback(bytes, true /* aligned */);
  140|  5.36k|  }
  141|  2.63M|  assert((reinterpret_cast<uintptr_t>(result) & (kAlignUnit - 1)) == 0);
  142|  2.63M|  return result;
  143|  2.63M|}
_ZN7rocksdb5Arena16AllocateNewBlockEm:
  145|  5.36k|char* Arena::AllocateNewBlock(size_t block_bytes) {
  146|       |  // NOTE: std::make_unique zero-initializes the block so is not appropriate
  147|       |  // here
  148|  5.36k|  char* block = new char[block_bytes];
  149|  5.36k|  blocks_.push_back(std::unique_ptr<char[]>(block));
  150|       |
  151|  5.36k|  size_t allocated_size;
  152|  5.36k|#ifdef ROCKSDB_MALLOC_USABLE_SIZE
  153|  5.36k|  allocated_size = malloc_usable_size(block);
  154|       |#ifndef NDEBUG
  155|       |  // It's hard to predict what malloc_usable_size() returns.
  156|       |  // A callback can allow users to change the costed size.
  157|       |  std::pair<size_t*, size_t*> pair(&allocated_size, &block_bytes);
  158|       |  TEST_SYNC_POINT_CALLBACK("Arena::AllocateNewBlock:0", &pair);
  159|       |#endif  // NDEBUG
  160|       |#else
  161|       |  allocated_size = block_bytes;
  162|       |#endif  // ROCKSDB_MALLOC_USABLE_SIZE
  163|  5.36k|  blocks_memory_ += allocated_size;
  164|  5.36k|  if (tracker_ != nullptr) {
  ------------------
  |  Branch (164:7): [True: 0, False: 5.36k]
  ------------------
  165|      0|    tracker_->Allocate(allocated_size);
  166|      0|  }
  167|  5.36k|  return block;
  168|  5.36k|}

_ZNK7rocksdb5Arena20MemoryAllocatedBytesEv:
   71|  2.60M|  size_t MemoryAllocatedBytes() const { return blocks_memory_; }
_ZNK7rocksdb5Arena18AllocatedAndUnusedEv:
   73|  2.60M|  size_t AllocatedAndUnused() const { return alloc_bytes_remaining_; }
_ZNK7rocksdb5Arena17IrregularBlockNumEv:
   77|  2.60M|  size_t IrregularBlockNum() const { return irregular_block_num; }
_ZN7rocksdb9DestroyerINS_20InternalIteratorBaseINS_5SliceEEEEclEPS3_:
  138|  4.48k|  void operator()(T* ptr) { ptr->~T(); }

_ZN7rocksdb15ConcurrentArenaC2EmPNS_12AllocTrackerEm:
   33|  13.5k|      arena_(block_size, tracker, huge_page_size) {
   34|  13.5k|  Fixup();
   35|  13.5k|}

_ZN7rocksdb15ConcurrentArena15AllocateAlignedEmmPNS_6LoggerE:
   58|  2.58M|                        Logger* logger = nullptr) override {
   59|  2.58M|    size_t rounded_up = ((bytes - 1) | (sizeof(void*) - 1)) + 1;
   60|  2.58M|    assert(rounded_up >= bytes && rounded_up < bytes + sizeof(void*) &&
   61|  2.58M|           (rounded_up % sizeof(void*)) == 0);
   62|       |
   63|  2.58M|    return AllocateImpl(rounded_up, huge_page_size != 0 /*force_arena*/,
   64|  2.58M|                        [this, rounded_up, huge_page_size, logger]() {
   65|  2.58M|                          return arena_.AllocateAligned(rounded_up,
   66|  2.58M|                                                        huge_page_size, logger);
   67|  2.58M|                        });
   68|  2.58M|  }
_ZNK7rocksdb15ConcurrentArena20MemoryAllocatedBytesEv:
   76|  2.54M|  size_t MemoryAllocatedBytes() const {
   77|  2.54M|    return memory_allocated_bytes_.load(std::memory_order_relaxed);
   78|  2.54M|  }
_ZN7rocksdb15ConcurrentArena5ShardC2Ev:
   98|   432k|    Shard() : free_begin_(nullptr), allocated_and_unused_(0) {}
_ZN7rocksdb15ConcurrentArena5FixupEv:
  202|  2.60M|  void Fixup() {
  203|  2.60M|    arena_allocated_and_unused_.store(arena_.AllocatedAndUnused(),
  204|  2.60M|                                      std::memory_order_relaxed);
  205|  2.60M|    memory_allocated_bytes_.store(arena_.MemoryAllocatedBytes(),
  206|  2.60M|                                  std::memory_order_relaxed);
  207|  2.60M|    irregular_block_num_.store(arena_.IrregularBlockNum(),
  208|  2.60M|                               std::memory_order_relaxed);
  209|  2.60M|  }
_ZN7rocksdb15ConcurrentArena12AllocateImplIZNS0_15AllocateAlignedEmmPNS_6LoggerEEUlvE_EEPcmbRKT_:
  129|  2.58M|  char* AllocateImpl(size_t bytes, bool force_arena, const Func& func) {
  130|  2.58M|    size_t cpu;
  131|       |
  132|       |    // Go directly to the arena if the allocation is too large, or if
  133|       |    // we've never needed to Repick() and the arena mutex is available
  134|       |    // with no waiting.  This keeps the fragmentation penalty of
  135|       |    // concurrency zero unless it might actually confer an advantage.
  136|  2.58M|    std::unique_lock<SpinMutex> arena_lock(arena_mutex_, std::defer_lock);
  137|  2.58M|    if (bytes > shard_block_size_ / 4 || force_arena ||
  ------------------
  |  Branch (137:9): [True: 3.21k, False: 2.58M]
  |  Branch (137:42): [True: 0, False: 2.58M]
  ------------------
  138|  2.58M|        ((cpu = tls_cpuid) == 0 &&
  ------------------
  |  Branch (138:10): [True: 2.58M, False: 0]
  ------------------
  139|  2.58M|         !shards_.AccessAtCore(0)->allocated_and_unused_.load(
  ------------------
  |  Branch (139:10): [True: 2.58M, False: 0]
  ------------------
  140|  2.58M|             std::memory_order_relaxed) &&
  141|  2.58M|         arena_lock.try_lock())) {
  ------------------
  |  Branch (141:10): [True: 2.58M, False: 0]
  ------------------
  142|  2.58M|      if (!arena_lock.owns_lock()) {
  ------------------
  |  Branch (142:11): [True: 3.21k, False: 2.58M]
  ------------------
  143|  3.21k|        arena_lock.lock();
  144|  3.21k|      }
  145|  2.58M|      auto rv = func();
  146|  2.58M|      Fixup();
  147|  2.58M|      return rv;
  148|  2.58M|    }
  149|       |
  150|       |    // pick a shard from which to allocate
  151|      0|    Shard* s = shards_.AccessAtCore(cpu & (shards_.Size() - 1));
  152|      0|    if (!s->mutex.try_lock()) {
  ------------------
  |  Branch (152:9): [True: 0, False: 0]
  ------------------
  153|      0|      s = Repick();
  154|      0|      s->mutex.lock();
  155|      0|    }
  156|      0|    std::unique_lock<SpinMutex> lock(s->mutex, std::adopt_lock);
  157|       |
  158|      0|    size_t avail = s->allocated_and_unused_.load(std::memory_order_relaxed);
  159|      0|    if (avail < bytes) {
  ------------------
  |  Branch (159:9): [True: 0, False: 0]
  ------------------
  160|       |      // reload
  161|      0|      std::lock_guard<SpinMutex> reload_lock(arena_mutex_);
  162|       |
  163|       |      // If the arena's current block is within a factor of 2 of the right
  164|       |      // size, we adjust our request to avoid arena waste.
  165|      0|      auto exact = arena_allocated_and_unused_.load(std::memory_order_relaxed);
  166|      0|      assert(exact == arena_.AllocatedAndUnused());
  167|       |
  168|      0|      if (exact >= bytes && arena_.IsInInlineBlock()) {
  ------------------
  |  Branch (168:11): [True: 0, False: 0]
  |  Branch (168:29): [True: 0, False: 0]
  ------------------
  169|       |        // If we haven't exhausted arena's inline block yet, allocate from arena
  170|       |        // directly. This ensures that we'll do the first few small allocations
  171|       |        // without allocating any blocks.
  172|       |        // In particular this prevents empty memtables from using
  173|       |        // disproportionately large amount of memory: a memtable allocates on
  174|       |        // the order of 1 KB of memory when created; we wouldn't want to
  175|       |        // allocate a full arena block (typically a few megabytes) for that,
  176|       |        // especially if there are thousands of empty memtables.
  177|      0|        auto rv = func();
  178|      0|        Fixup();
  179|      0|        return rv;
  180|      0|      }
  181|       |
  182|      0|      avail = exact >= shard_block_size_ / 2 && exact < shard_block_size_ * 2
  ------------------
  |  Branch (182:15): [True: 0, False: 0]
  |  Branch (182:49): [True: 0, False: 0]
  ------------------
  183|      0|                  ? exact
  184|      0|                  : shard_block_size_;
  185|      0|      s->free_begin_ = arena_.AllocateAligned(avail);
  186|      0|      Fixup();
  187|      0|    }
  188|      0|    s->allocated_and_unused_.store(avail - bytes, std::memory_order_relaxed);
  189|       |
  190|      0|    char* rv;
  191|      0|    if ((bytes % sizeof(void*)) == 0) {
  ------------------
  |  Branch (191:9): [True: 0, False: 0]
  ------------------
  192|       |      // aligned allocation from the beginning
  193|      0|      rv = s->free_begin_;
  194|      0|      s->free_begin_ += bytes;
  195|      0|    } else {
  196|       |      // unaligned from the end
  197|      0|      rv = s->free_begin_ + avail - bytes;
  198|      0|    }
  199|      0|    return rv;
  200|      0|  }
_ZZN7rocksdb15ConcurrentArena15AllocateAlignedEmmPNS_6LoggerEENKUlvE_clEv:
   64|  2.58M|                        [this, rounded_up, huge_page_size, logger]() {
   65|  2.58M|                          return arena_.AllocateAligned(rounded_up,
   66|  2.58M|                                                        huge_page_size, logger);
   67|  2.58M|                        });

_ZN7rocksdb13CustomDeleterC2EPNS_15MemoryAllocatorE:
   16|   149k|  CustomDeleter(MemoryAllocator* a = nullptr) : allocator(a) {}
_ZN7rocksdb13AllocateBlockEmPNS_15MemoryAllocatorE:
   32|  25.2k|                                        MemoryAllocator* allocator) {
   33|  25.2k|  if (allocator) {
  ------------------
  |  Branch (33:7): [True: 0, False: 25.2k]
  ------------------
   34|      0|    auto block = reinterpret_cast<char*>(allocator->Allocate(size));
   35|      0|    return CacheAllocationPtr(block, allocator);
   36|      0|  }
   37|  25.2k|  return CacheAllocationPtr(new char[size]);
   38|  25.2k|}
_ZNK7rocksdb13CustomDeleterclEPc:
   18|  25.2k|  void operator()(char* ptr) const {
   19|  25.2k|    if (allocator) {
  ------------------
  |  Branch (19:9): [True: 0, False: 25.2k]
  ------------------
   20|      0|      allocator->Deallocate(ptr);
   21|  25.2k|    } else {
   22|  25.2k|      delete[] ptr;
   23|  25.2k|    }
   24|  25.2k|  }

_ZN7rocksdb12AllocTrackerC2EPNS_18WriteBufferManagerE:
   22|  13.5k|      freed_(false) {}
_ZN7rocksdb12AllocTrackerD2Ev:
   24|  13.5k|AllocTracker::~AllocTracker() { FreeMem(); }
_ZN7rocksdb12AllocTracker14DoneAllocatingEv:
   35|  13.5k|void AllocTracker::DoneAllocating() {
   36|  13.5k|  if (write_buffer_manager_ != nullptr && !done_allocating_) {
  ------------------
  |  Branch (36:7): [True: 13.5k, False: 0]
  |  Branch (36:43): [True: 13.5k, False: 0]
  ------------------
   37|  13.5k|    if (write_buffer_manager_->enabled() ||
  ------------------
  |  Branch (37:9): [True: 0, False: 13.5k]
  ------------------
   38|  13.5k|        write_buffer_manager_->cost_to_cache()) {
  ------------------
  |  Branch (38:9): [True: 0, False: 13.5k]
  ------------------
   39|      0|      write_buffer_manager_->ScheduleFreeMem(
   40|      0|          bytes_allocated_.load(std::memory_order_relaxed));
   41|  13.5k|    } else {
   42|  13.5k|      assert(bytes_allocated_.load(std::memory_order_relaxed) == 0);
   43|  13.5k|    }
   44|  13.5k|    done_allocating_ = true;
   45|  13.5k|  }
   46|  13.5k|}
_ZN7rocksdb12AllocTracker7FreeMemEv:
   48|  27.0k|void AllocTracker::FreeMem() {
   49|  27.0k|  if (!done_allocating_) {
  ------------------
  |  Branch (49:7): [True: 13.5k, False: 13.5k]
  ------------------
   50|  13.5k|    DoneAllocating();
   51|  13.5k|  }
   52|  27.0k|  if (write_buffer_manager_ != nullptr && !freed_) {
  ------------------
  |  Branch (52:7): [True: 27.0k, False: 0]
  |  Branch (52:43): [True: 13.5k, False: 13.5k]
  ------------------
   53|  13.5k|    if (write_buffer_manager_->enabled() ||
  ------------------
  |  Branch (53:9): [True: 0, False: 13.5k]
  ------------------
   54|  13.5k|        write_buffer_manager_->cost_to_cache()) {
  ------------------
  |  Branch (54:9): [True: 0, False: 13.5k]
  ------------------
   55|      0|      write_buffer_manager_->FreeMem(
   56|      0|          bytes_allocated_.load(std::memory_order_relaxed));
   57|  13.5k|    } else {
   58|  13.5k|      assert(bytes_allocated_.load(std::memory_order_relaxed) == 0);
   59|  13.5k|    }
   60|  13.5k|    freed_ = true;
   61|  13.5k|  }
   62|  27.0k|}

_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEEC2ES4_PNS_9AllocatorEii:
  656|  27.0k|      seq_splice_(AllocateSplice()) {
  657|  27.0k|  assert(max_height > 0 && kMaxHeight_ == static_cast<uint32_t>(max_height));
  658|  27.0k|  assert(branching_factor > 1 &&
  659|  27.0k|         kBranching_ == static_cast<uint32_t>(branching_factor));
  660|  27.0k|  assert(kScaledInverseBranching_ > 0);
  661|       |
  662|   351k|  for (int i = 0; i < kMaxHeight_; ++i) {
  ------------------
  |  Branch (662:19): [True: 324k, False: 27.0k]
  ------------------
  663|   324k|    head_->SetNext(i, nullptr);
  664|   324k|  }
  665|  27.0k|}
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE12AllocateNodeEmi:
  674|  2.56M|InlineSkipList<Comparator>::AllocateNode(size_t key_size, int height) {
  675|  2.56M|  auto prefix = sizeof(std::atomic<Node*>) * (height - 1);
  676|       |
  677|       |  // prefix is space for the height - 1 pointers that we store before
  678|       |  // the Node instance (next_[-(height - 1) .. -1]).  Node starts at
  679|       |  // raw + prefix, and holds the bottom-mode (level 0) skip list pointer
  680|       |  // next_[0].  key_size is the bytes for the key, which comes just after
  681|       |  // the Node.
  682|  2.56M|  char* raw = allocator_->AllocateAligned(prefix + sizeof(Node) + key_size);
  683|  2.56M|  Node* x = reinterpret_cast<Node*>(raw + prefix);
  684|       |
  685|       |  // Once we've linked the node into the skip list we don't actually need
  686|       |  // to know its height, because we can implicitly use the fact that we
  687|       |  // traversed into a node at level h to known that h is a valid level
  688|       |  // for that node.  We need to convey the height to the Insert step,
  689|       |  // however, so that it can perform the proper links.  Since we're not
  690|       |  // using the pointers at the moment, StashHeight temporarily borrow
  691|       |  // storage from next_[0] for that purpose.
  692|  2.56M|  x->StashHeight(height);
  693|  2.56M|  return x;
  694|  2.56M|}
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE4Node11StashHeightEi:
  303|  2.56M|  void StashHeight(const int height) {
  304|  2.56M|    assert(sizeof(int) <= sizeof(next_[0]));
  305|  2.56M|    memcpy(static_cast<void*>(&next_[0]), &height, sizeof(int));
  306|  2.56M|  }
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE14AllocateSpliceEv:
  698|  27.0k|InlineSkipList<Comparator>::AllocateSplice() {
  699|       |  // size of prev_ and next_
  700|  27.0k|  size_t array_size = sizeof(Node*) * (kMaxHeight_ + 1);
  701|  27.0k|  char* raw = allocator_->AllocateAligned(sizeof(Splice) + array_size * 2);
  702|  27.0k|  Splice* splice = reinterpret_cast<Splice*>(raw);
  703|  27.0k|  splice->height_ = 0;
  704|  27.0k|  splice->prev_ = reinterpret_cast<Node**>(raw + sizeof(Splice));
  705|  27.0k|  splice->next_ = reinterpret_cast<Node**>(raw + sizeof(Splice) + array_size);
  706|  27.0k|  return splice;
  707|  27.0k|}
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE4Node7SetNextEiPS6_:
  328|  3.70M|  void SetNext(int n, Node* x) {
  329|  3.70M|    assert(n >= 0);
  330|       |    // Use a 'release store' so that anybody who reads through this
  331|       |    // pointer observes a fully initialized version of the inserted node.
  332|  3.70M|    (&next_[0] - n)->store(x, std::memory_order_release);
  333|  3.70M|  }
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE11AllocateKeyEm:
  668|  2.53M|char* InlineSkipList<Comparator>::AllocateKey(size_t key_size) {
  669|  2.53M|  return const_cast<char*>(AllocateNode(key_size, RandomHeight())->Key());
  670|  2.53M|}
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE12RandomHeightEv:
  442|  2.53M|int InlineSkipList<Comparator>::RandomHeight() {
  443|  2.53M|  auto rnd = Random::GetTLSInstance();
  444|       |
  445|       |  // Increase height with probability 1 in kBranching
  446|  2.53M|  int height = 1;
  447|  3.38M|  while (height < kMaxHeight_ && height < kMaxPossibleHeight &&
  ------------------
  |  Branch (447:10): [True: 3.38M, False: 1]
  |  Branch (447:34): [True: 3.38M, False: 0]
  ------------------
  448|  3.38M|         rnd->Next() < kScaledInverseBranching_) {
  ------------------
  |  Branch (448:10): [True: 846k, False: 2.53M]
  ------------------
  449|   846k|    height++;
  450|   846k|  }
  451|  2.53M|  assert(height > 0);
  452|  2.53M|  assert(height <= kMaxHeight_);
  453|  2.53M|  assert(height <= kMaxPossibleHeight);
  454|  2.53M|  return height;
  455|  2.53M|}
_ZNK7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE4Node3KeyEv:
  316|  36.8M|  const char* Key() const { return reinterpret_cast<const char*>(&next_[1]); }
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE6InsertEPKc:
  722|  2.53M|bool InlineSkipList<Comparator>::Insert(const char* key) {
  723|  2.53M|  return Insert<false>(key, seq_splice_, false);
  724|  2.53M|}
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE6InsertILb0EEEbPKcPNS5_6SpliceEb:
  803|  2.53M|                                        bool allow_partial_splice_fix) {
  804|  2.53M|  Node* x = reinterpret_cast<Node*>(const_cast<char*>(key)) - 1;
  805|  2.53M|  const DecodedKey key_decoded = compare_.decode_key(key);
  806|  2.53M|  int height = x->UnstashHeight();
  807|  2.53M|  assert(height >= 1 && height <= kMaxHeight_);
  808|       |
  809|  2.53M|  int max_height = max_height_.load(std::memory_order_relaxed);
  810|  2.53M|  while (height > max_height) {
  ------------------
  |  Branch (810:10): [True: 19.0k, False: 2.51M]
  ------------------
  811|  19.0k|    if (max_height_.compare_exchange_weak(max_height, height)) {
  ------------------
  |  Branch (811:9): [True: 19.0k, False: 0]
  ------------------
  812|       |      // successfully updated it
  813|  19.0k|      max_height = height;
  814|  19.0k|      break;
  815|  19.0k|    }
  816|       |    // else retry, possibly exiting the loop because somebody else
  817|       |    // increased it
  818|  19.0k|  }
  819|  2.53M|  assert(max_height <= kMaxPossibleHeight);
  820|       |
  821|  2.53M|  int recompute_height = 0;
  822|  2.53M|  if (splice->height_ < max_height) {
  ------------------
  |  Branch (822:7): [True: 29.5k, False: 2.50M]
  ------------------
  823|       |    // Either splice has never been used or max_height has grown since
  824|       |    // last use.  We could potentially fix it in the latter case, but
  825|       |    // that is tricky.
  826|  29.5k|    splice->prev_[max_height] = head_;
  827|  29.5k|    splice->next_[max_height] = nullptr;
  828|  29.5k|    splice->height_ = max_height;
  829|  29.5k|    recompute_height = max_height;
  830|  2.50M|  } else {
  831|       |    // Splice is a valid proper-height splice that brackets some
  832|       |    // key, but does it bracket this one?  We need to validate it and
  833|       |    // recompute a portion of the splice (levels 0..recompute_height-1)
  834|       |    // that is a superset of all levels that don't bracket the new key.
  835|       |    // Several choices are reasonable, because we have to balance the work
  836|       |    // saved against the extra comparisons required to validate the Splice.
  837|       |    //
  838|       |    // One strategy is just to recompute all of orig_splice_height if the
  839|       |    // bottom level isn't bracketing.  This pessimistically assumes that
  840|       |    // we will either get a perfect Splice hit (increasing sequential
  841|       |    // inserts) or have no locality.
  842|       |    //
  843|       |    // Another strategy is to walk up the Splice's levels until we find
  844|       |    // a level that brackets the key.  This strategy lets the Splice
  845|       |    // hint help for other cases: it turns insertion from O(log N) into
  846|       |    // O(log D), where D is the number of nodes in between the key that
  847|       |    // produced the Splice and the current insert (insertion is aided
  848|       |    // whether the new key is before or after the splice).  If you have
  849|       |    // a way of using a prefix of the key to map directly to the closest
  850|       |    // Splice out of O(sqrt(N)) Splices and we make it so that splices
  851|       |    // can also be used as hints during read, then we end up with Oshman's
  852|       |    // and Shavit's SkipTrie, which has O(log log N) lookup and insertion
  853|       |    // (compare to O(log N) for skip list).
  854|       |    //
  855|       |    // We control the pessimistic strategy with allow_partial_splice_fix.
  856|       |    // A good strategy is probably to be pessimistic for seq_splice_,
  857|       |    // optimistic if the caller actually went to the work of providing
  858|       |    // a Splice.
  859|  4.99M|    while (recompute_height < max_height) {
  ------------------
  |  Branch (859:12): [True: 2.50M, False: 2.49M]
  ------------------
  860|  2.50M|      if (splice->prev_[recompute_height]->Next(recompute_height) !=
  ------------------
  |  Branch (860:11): [True: 0, False: 2.50M]
  ------------------
  861|  2.50M|          splice->next_[recompute_height]) {
  862|       |        // splice isn't tight at this level, there must have been some inserts
  863|       |        // to this
  864|       |        // location that didn't update the splice.  We might only be a little
  865|       |        // stale, but if
  866|       |        // the splice is very stale it would be O(N) to fix it.  We haven't used
  867|       |        // up any of
  868|       |        // our budget of comparisons, so always move up even if we are
  869|       |        // pessimistic about
  870|       |        // our chances of success.
  871|      0|        ++recompute_height;
  872|  2.50M|      } else if (splice->prev_[recompute_height] != head_ &&
  ------------------
  |  Branch (872:18): [True: 2.50M, False: 0]
  ------------------
  873|  2.50M|                 !KeyIsAfterNode(key_decoded,
  ------------------
  |  Branch (873:18): [True: 1.79M, False: 710k]
  ------------------
  874|  2.50M|                                 splice->prev_[recompute_height])) {
  875|       |        // key is from before splice
  876|  1.79M|        if (allow_partial_splice_fix) {
  ------------------
  |  Branch (876:13): [True: 0, False: 1.79M]
  ------------------
  877|       |          // skip all levels with the same node without more comparisons
  878|      0|          Node* bad = splice->prev_[recompute_height];
  879|      0|          while (splice->prev_[recompute_height] == bad) {
  ------------------
  |  Branch (879:18): [True: 0, False: 0]
  ------------------
  880|      0|            ++recompute_height;
  881|      0|          }
  882|  1.79M|        } else {
  883|       |          // we're pessimistic, recompute everything
  884|  1.79M|          recompute_height = max_height;
  885|  1.79M|        }
  886|  1.79M|      } else if (KeyIsAfterNode(key_decoded, splice->next_[recompute_height])) {
  ------------------
  |  Branch (886:18): [True: 695k, False: 14.7k]
  ------------------
  887|       |        // key is from after splice
  888|   695k|        if (allow_partial_splice_fix) {
  ------------------
  |  Branch (888:13): [True: 0, False: 695k]
  ------------------
  889|      0|          Node* bad = splice->next_[recompute_height];
  890|      0|          while (splice->next_[recompute_height] == bad) {
  ------------------
  |  Branch (890:18): [True: 0, False: 0]
  ------------------
  891|      0|            ++recompute_height;
  892|      0|          }
  893|   695k|        } else {
  894|   695k|          recompute_height = max_height;
  895|   695k|        }
  896|   695k|      } else {
  897|       |        // this level brackets the key, we won!
  898|  14.7k|        break;
  899|  14.7k|      }
  900|  2.50M|    }
  901|  2.50M|  }
  902|  2.53M|  assert(recompute_height <= max_height);
  903|  2.53M|  if (recompute_height > 0) {
  ------------------
  |  Branch (903:7): [True: 2.51M, False: 14.7k]
  ------------------
  904|  2.51M|    RecomputeSpliceLevels(key_decoded, splice, recompute_height);
  905|  2.51M|  }
  906|       |
  907|  2.53M|  bool splice_is_valid = true;
  908|  2.53M|  if (UseCAS) {
  ------------------
  |  Branch (908:7): [Folded - Ignored]
  ------------------
  909|      0|    for (int i = 0; i < height; ++i) {
  ------------------
  |  Branch (909:21): [True: 0, False: 0]
  ------------------
  910|      0|      while (true) {
  ------------------
  |  Branch (910:14): [Folded - Ignored]
  ------------------
  911|       |        // Checking for duplicate keys on the level 0 is sufficient
  912|      0|        if (UNLIKELY(i == 0 && splice->next_[i] != nullptr &&
  ------------------
  |  |   14|      0|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  913|      0|                     compare_(x->Key(), splice->next_[i]->Key()) >= 0)) {
  914|       |          // duplicate key
  915|      0|          return false;
  916|      0|        }
  917|      0|        if (UNLIKELY(i == 0 && splice->prev_[i] != head_ &&
  ------------------
  |  |   14|      0|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  918|      0|                     compare_(splice->prev_[i]->Key(), x->Key()) >= 0)) {
  919|       |          // duplicate key
  920|      0|          return false;
  921|      0|        }
  922|      0|        assert(splice->next_[i] == nullptr ||
  923|      0|               compare_(x->Key(), splice->next_[i]->Key()) < 0);
  924|      0|        assert(splice->prev_[i] == head_ ||
  925|      0|               compare_(splice->prev_[i]->Key(), x->Key()) < 0);
  926|      0|        x->NoBarrier_SetNext(i, splice->next_[i]);
  927|      0|        if (splice->prev_[i]->CASNext(i, splice->next_[i], x)) {
  ------------------
  |  Branch (927:13): [True: 0, False: 0]
  ------------------
  928|       |          // success
  929|      0|          break;
  930|      0|        }
  931|       |        // CAS failed, we need to recompute prev and next. It is unlikely
  932|       |        // to be helpful to try to use a different level as we redo the
  933|       |        // search, because it should be unlikely that lots of nodes have
  934|       |        // been inserted between prev[i] and next[i]. No point in using
  935|       |        // next[i] as the after hint, because we know it is stale.
  936|      0|        FindSpliceForLevel<false>(key_decoded, splice->prev_[i], nullptr, i,
  937|      0|                                  &splice->prev_[i], &splice->next_[i]);
  938|       |
  939|       |        // Since we've narrowed the bracket for level i, we might have
  940|       |        // violated the Splice constraint between i and i-1.  Make sure
  941|       |        // we recompute the whole thing next time.
  942|      0|        if (i > 0) {
  ------------------
  |  Branch (942:13): [True: 0, False: 0]
  ------------------
  943|      0|          splice_is_valid = false;
  944|      0|        }
  945|      0|      }
  946|      0|    }
  947|  2.53M|  } else {
  948|  5.91M|    for (int i = 0; i < height; ++i) {
  ------------------
  |  Branch (948:21): [True: 3.38M, False: 2.53M]
  ------------------
  949|  3.38M|      if (i >= recompute_height &&
  ------------------
  |  Branch (949:11): [True: 18.0k, False: 3.36M]
  ------------------
  950|  3.38M|          splice->prev_[i]->Next(i) != splice->next_[i]) {
  ------------------
  |  Branch (950:11): [True: 0, False: 18.0k]
  ------------------
  951|      0|        FindSpliceForLevel<false>(key_decoded, splice->prev_[i], nullptr, i,
  952|      0|                                  &splice->prev_[i], &splice->next_[i]);
  953|      0|      }
  954|       |      // Checking for duplicate keys on the level 0 is sufficient
  955|  3.38M|      if (UNLIKELY(i == 0 && splice->next_[i] != nullptr &&
  ------------------
  |  |   14|  11.7M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 3.38M]
  |  |  |  Branch (14:40): [True: 2.53M, False: 846k]
  |  |  |  Branch (14:40): [True: 2.49M, False: 38.4k]
  |  |  |  Branch (14:40): [True: 0, False: 2.49M]
  |  |  ------------------
  ------------------
  956|  3.38M|                   compare_(x->Key(), splice->next_[i]->Key()) >= 0)) {
  957|       |        // duplicate key
  958|      0|        return false;
  959|      0|      }
  960|  3.38M|      if (UNLIKELY(i == 0 && splice->prev_[i] != head_ &&
  ------------------
  |  |   14|  10.2M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 3.38M]
  |  |  |  Branch (14:40): [True: 2.53M, False: 846k]
  |  |  |  Branch (14:40): [True: 928k, False: 1.60M]
  |  |  |  Branch (14:40): [True: 0, False: 928k]
  |  |  ------------------
  ------------------
  961|  3.38M|                   compare_(splice->prev_[i]->Key(), x->Key()) >= 0)) {
  962|       |        // duplicate key
  963|      0|        return false;
  964|      0|      }
  965|  3.38M|      assert(splice->next_[i] == nullptr ||
  966|  3.38M|             compare_(x->Key(), splice->next_[i]->Key()) < 0);
  967|  3.38M|      assert(splice->prev_[i] == head_ ||
  968|  3.38M|             compare_(splice->prev_[i]->Key(), x->Key()) < 0);
  969|  3.38M|      assert(splice->prev_[i]->Next(i) == splice->next_[i]);
  970|  3.38M|      x->NoBarrier_SetNext(i, splice->next_[i]);
  971|  3.38M|      splice->prev_[i]->SetNext(i, x);
  972|  3.38M|    }
  973|  2.53M|  }
  974|  2.53M|  if (splice_is_valid) {
  ------------------
  |  Branch (974:7): [True: 2.53M, False: 0]
  ------------------
  975|  5.91M|    for (int i = 0; i < height; ++i) {
  ------------------
  |  Branch (975:21): [True: 3.38M, False: 2.53M]
  ------------------
  976|  3.38M|      splice->prev_[i] = x;
  977|  3.38M|    }
  978|  2.53M|    assert(splice->prev_[splice->height_] == head_);
  979|  2.53M|    assert(splice->next_[splice->height_] == nullptr);
  980|  15.8M|    for (int i = 0; i < splice->height_; ++i) {
  ------------------
  |  Branch (980:21): [True: 13.3M, False: 2.53M]
  ------------------
  981|  13.3M|      assert(splice->next_[i] == nullptr ||
  982|  13.3M|             compare_(key, splice->next_[i]->Key()) < 0);
  983|  13.3M|      assert(splice->prev_[i] == head_ ||
  984|  13.3M|             compare_(splice->prev_[i]->Key(), key) <= 0);
  985|  13.3M|      assert(splice->prev_[i + 1] == splice->prev_[i] ||
  986|  13.3M|             splice->prev_[i + 1] == head_ ||
  987|  13.3M|             compare_(splice->prev_[i + 1]->Key(), splice->prev_[i]->Key()) <
  988|  13.3M|                 0);
  989|  13.3M|      assert(splice->next_[i + 1] == splice->next_[i] ||
  990|  13.3M|             splice->next_[i + 1] == nullptr ||
  991|  13.3M|             compare_(splice->next_[i]->Key(), splice->next_[i + 1]->Key()) <
  992|  13.3M|                 0);
  993|  13.3M|    }
  994|  2.53M|  } else {
  995|      0|    splice->height_ = 0;
  996|      0|  }
  997|  2.53M|  return true;
  998|  2.53M|}
_ZNK7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE4Node13UnstashHeightEv:
  310|  2.53M|  int UnstashHeight() const {
  311|  2.53M|    int rv;
  312|  2.53M|    memcpy(&rv, &next_[0], sizeof(int));
  313|  2.53M|    return rv;
  314|  2.53M|  }
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE4Node4NextEi:
  321|  69.4M|  Node* Next(int n) {
  322|  69.4M|    assert(n >= 0);
  323|       |    // Use an 'acquire load' so that we observe a fully initialized
  324|       |    // version of the returned Node.
  325|  69.4M|    return ((&next_[0] - n)->load(std::memory_order_acquire));
  326|  69.4M|  }
_ZNK7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE14KeyIsAfterNodeERKNS_5SliceEPNS5_4NodeE:
  467|  23.2M|                                                Node* n) const {
  468|       |  // nullptr n is considered infinite
  469|  23.2M|  assert(n != head_);
  470|  23.2M|  return (n != nullptr) && (compare_(n->Key(), key) < 0);
  ------------------
  |  Branch (470:10): [True: 23.2M, False: 4.54k]
  |  Branch (470:28): [True: 12.4M, False: 10.8M]
  ------------------
  471|  23.2M|}
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE21RecomputeSpliceLevelsERKNS_5SliceEPNS5_6SpliceEi:
  791|  2.51M|                                                       int recompute_level) {
  792|  2.51M|  assert(recompute_level > 0);
  793|  2.51M|  assert(recompute_level <= splice->height_);
  794|  15.8M|  for (int i = recompute_level - 1; i >= 0; --i) {
  ------------------
  |  Branch (794:37): [True: 13.2M, False: 2.51M]
  ------------------
  795|  13.2M|    FindSpliceForLevel<true>(key, splice->prev_[i + 1], splice->next_[i + 1], i,
  796|  13.2M|                             &splice->prev_[i], &splice->next_[i]);
  797|  13.2M|  }
  798|  2.51M|}
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE18FindSpliceForLevelILb1EEEvRKNS_5SliceEPNS5_4NodeESB_iPSB_SC_:
  764|  13.2M|                                                    Node** out_next) {
  765|  24.2M|  while (true) {
  ------------------
  |  Branch (765:10): [Folded - Ignored]
  ------------------
  766|  24.2M|    Node* next = before->Next(level);
  767|  24.2M|    if (next != nullptr) {
  ------------------
  |  Branch (767:9): [True: 23.0M, False: 1.24M]
  ------------------
  768|  23.0M|      PREFETCH(next->Next(level), 0, 1);
  ------------------
  |  |  226|  23.0M|#define PREFETCH(addr, rw, locality) __builtin_prefetch(addr, rw, locality)
  ------------------
  769|  23.0M|    }
  770|  24.2M|    if (prefetch_before == true) {
  ------------------
  |  Branch (770:9): [Folded - Ignored]
  ------------------
  771|  24.2M|      if (next != nullptr && level > 0) {
  ------------------
  |  Branch (771:11): [True: 23.0M, False: 1.24M]
  |  Branch (771:30): [True: 17.8M, False: 5.18M]
  ------------------
  772|  17.8M|        PREFETCH(next->Next(level - 1), 0, 1);
  ------------------
  |  |  226|  17.8M|#define PREFETCH(addr, rw, locality) __builtin_prefetch(addr, rw, locality)
  ------------------
  773|  17.8M|      }
  774|  24.2M|    }
  775|  24.2M|    assert(before == head_ || next == nullptr ||
  776|  24.2M|           KeyIsAfterNode(next->Key(), before));
  777|  24.2M|    assert(before == head_ || KeyIsAfterNode(key, before));
  778|  24.2M|    if (next == after || !KeyIsAfterNode(key, next)) {
  ------------------
  |  Branch (778:9): [True: 4.25M, False: 20.0M]
  |  Branch (778:26): [True: 9.03M, False: 11.0M]
  ------------------
  779|       |      // found it
  780|  13.2M|      *out_prev = before;
  781|  13.2M|      *out_next = next;
  782|  13.2M|      return;
  783|  13.2M|    }
  784|  11.0M|    before = next;
  785|  11.0M|  }
  786|  13.2M|}
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE4Node17NoBarrier_SetNextEiPS6_:
  346|  3.38M|  void NoBarrier_SetNext(int n, Node* x) {
  347|  3.38M|    assert(n >= 0);
  348|  3.38M|    (&next_[0] - n)->store(x, std::memory_order_relaxed);
  349|  3.38M|  }
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE8IteratorC2EPKS5_:
  367|  11.9k|    const InlineSkipList* list) {
  368|  11.9k|  SetList(list);
  369|  11.9k|}
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE8Iterator7SetListEPKS5_:
  373|  11.9k|    const InlineSkipList* list) {
  374|  11.9k|  list_ = list;
  375|  11.9k|  node_ = nullptr;
  376|  11.9k|}
_ZNK7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE8Iterator5ValidEv:
  379|  1.70M|inline bool InlineSkipList<Comparator>::Iterator::Valid() const {
  380|  1.70M|  return node_ != nullptr;
  381|  1.70M|}
_ZNK7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE8Iterator3keyEv:
  384|  4.21M|inline const char* InlineSkipList<Comparator>::Iterator::key() const {
  385|  4.21M|  assert(Valid());
  386|  4.21M|  return node_->Key();
  387|  4.21M|}
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE8Iterator11SeekToFirstEv:
  429|  14.8k|inline void InlineSkipList<Comparator>::Iterator::SeekToFirst() {
  430|  14.8k|  node_ = list_->head_->Next(0);
  431|  14.8k|}
_ZN7rocksdb14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEE8Iterator4NextEv:
  390|  1.68M|inline void InlineSkipList<Comparator>::Iterator::Next() {
  391|  1.68M|  assert(Valid());
  392|  1.68M|  node_ = node_->Next(0);
  393|  1.68M|}

_ZN7rocksdb15SkipListFactoryC2Em:
  349|  99.2k|SkipListFactory::SkipListFactory(size_t lookahead) : lookahead_(lookahead) {
  350|  99.2k|  RegisterOptions("SkipListFactoryOptions", &lookahead_,
  351|  99.2k|                  &skiplist_factory_info);
  352|  99.2k|}
_ZNK7rocksdb15SkipListFactory5GetIdEv:
  354|  36.1k|std::string SkipListFactory::GetId() const {
  355|  36.1k|  std::string id = Name();
  356|  36.1k|  if (lookahead_ > 0) {
  ------------------
  |  Branch (356:7): [True: 0, False: 36.1k]
  ------------------
  357|      0|    id.append(":").append(std::to_string(lookahead_));
  358|      0|  }
  359|  36.1k|  return id;
  360|  36.1k|}
_ZN7rocksdb15SkipListFactory17CreateMemTableRepERKNS_11MemTableRep13KeyComparatorEPNS_9AllocatorEPKNS_14SliceTransformEPNS_6LoggerE:
  364|  27.0k|    const SliceTransform* transform, Logger* /*logger*/) {
  365|  27.0k|  return new SkipListRep(compare, allocator, transform, lookahead_);
  366|  27.0k|}
skiplistrep.cc:_ZN7rocksdb12_GLOBAL__N_111SkipListRepC2ERKNS_11MemTableRep13KeyComparatorEPNS_9AllocatorEPKNS_14SliceTransformEm:
   33|  27.0k|        lookahead_(lookahead) {}
skiplistrep.cc:_ZN7rocksdb12_GLOBAL__N_111SkipListRep8AllocateEmPPc:
   35|  2.53M|  KeyHandle Allocate(const size_t len, char** buf) override {
   36|  2.53M|    *buf = skip_list_.AllocateKey(len);
   37|  2.53M|    return static_cast<KeyHandle>(*buf);
   38|  2.53M|  }
skiplistrep.cc:_ZN7rocksdb12_GLOBAL__N_111SkipListRep9InsertKeyEPv:
   46|  2.53M|  bool InsertKey(KeyHandle handle) override {
   47|  2.53M|    return skip_list_.Insert(static_cast<char*>(handle));
   48|  2.53M|  }
skiplistrep.cc:_ZN7rocksdb12_GLOBAL__N_111SkipListRep8IteratorC2EPKNS_14InlineSkipListIRKNS_11MemTableRep13KeyComparatorEEE:
  175|  11.9k|        : iter_(list) {}
skiplistrep.cc:_ZN7rocksdb12_GLOBAL__N_111SkipListRep8Iterator11SeekToFirstEv:
  216|  14.8k|    void SeekToFirst() override { iter_.SeekToFirst(); }
skiplistrep.cc:_ZNK7rocksdb12_GLOBAL__N_111SkipListRep8Iterator5ValidEv:
  180|  1.70M|    bool Valid() const override { return iter_.Valid(); }
skiplistrep.cc:_ZNK7rocksdb12_GLOBAL__N_111SkipListRep8Iterator3keyEv:
  184|  4.21M|    const char* key() const override { return iter_.key(); }
skiplistrep.cc:_ZN7rocksdb12_GLOBAL__N_111SkipListRep8Iterator4NextEv:
  188|  1.68M|    void Next() override { iter_.Next(); }
skiplistrep.cc:_ZN7rocksdb12_GLOBAL__N_111SkipListRep8IteratorD2Ev:
  177|  11.9k|    ~Iterator() override = default;
skiplistrep.cc:_ZN7rocksdb12_GLOBAL__N_111SkipListRep22ApproximateMemoryUsageEv:
   80|  5.09M|  size_t ApproximateMemoryUsage() override {
   81|       |    // All memory is allocated through allocator; nothing to report here
   82|  5.09M|    return 0;
   83|  5.09M|  }
skiplistrep.cc:_ZN7rocksdb12_GLOBAL__N_111SkipListRep11GetIteratorEPNS_5ArenaE:
  326|  11.9k|  MemTableRep::Iterator* GetIterator(Arena* arena = nullptr) override {
  327|  11.9k|    if (lookahead_ > 0) {
  ------------------
  |  Branch (327:9): [True: 0, False: 11.9k]
  ------------------
  328|      0|      void* mem =
  329|      0|          arena ? arena->AllocateAligned(sizeof(SkipListRep::LookaheadIterator))
  ------------------
  |  Branch (329:11): [True: 0, False: 0]
  ------------------
  330|      0|                :
  331|      0|                operator new(sizeof(SkipListRep::LookaheadIterator));
  332|      0|      return new (mem) SkipListRep::LookaheadIterator(*this);
  333|  11.9k|    } else {
  334|  11.9k|      void* mem = arena ? arena->AllocateAligned(sizeof(SkipListRep::Iterator))
  ------------------
  |  Branch (334:19): [True: 8.99k, False: 2.90k]
  ------------------
  335|  11.9k|                        :
  336|  11.9k|                        operator new(sizeof(SkipListRep::Iterator));
  337|  11.9k|      return new (mem) SkipListRep::Iterator(&skip_list_);
  338|  11.9k|    }
  339|  11.9k|  }

_ZN7rocksdb18WriteBufferManagerC2EmNSt3__110shared_ptrINS_5CacheEEEb:
   30|  13.5k|      stall_active_(false) {
   31|  13.5k|  if (cache) {
  ------------------
  |  Branch (31:7): [True: 0, False: 13.5k]
  ------------------
   32|       |    // Memtable's memory usage tends to fluctuate frequently
   33|       |    // therefore we set delayed_decrease = true to save some dummy entry
   34|       |    // insertion on memory increase right after memory decrease
   35|      0|    cache_res_mgr_ = std::make_shared<
   36|      0|        CacheReservationManagerImpl<CacheEntryRole::kWriteBuffer>>(
   37|      0|        cache, true /* delayed_decrease */);
   38|      0|  }
   39|  13.5k|}
_ZN7rocksdb18WriteBufferManagerD2Ev:
   41|  13.5k|WriteBufferManager::~WriteBufferManager() {
   42|       |#ifndef NDEBUG
   43|       |  std::unique_lock<std::mutex> lock(mu_);
   44|       |  assert(queue_.empty());
   45|       |#endif
   46|  13.5k|}
_ZN7rocksdb18WriteBufferManager17RemoveDBFromQueueEPNS_14StallInterfaceE:
  166|  9.02k|void WriteBufferManager::RemoveDBFromQueue(StallInterface* wbm_stall) {
  167|  9.02k|  assert(wbm_stall != nullptr);
  168|       |
  169|       |  // Deallocate the removed nodes outside of the lock.
  170|  9.02k|  std::list<StallInterface*> cleanup;
  171|       |
  172|  9.02k|  if (enabled() && allow_stall_.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (172:7): [True: 0, False: 9.02k]
  |  Branch (172:20): [True: 0, False: 0]
  ------------------
  173|      0|    std::unique_lock<std::mutex> lock(mu_);
  174|      0|    for (auto it = queue_.begin(); it != queue_.end();) {
  ------------------
  |  Branch (174:36): [True: 0, False: 0]
  ------------------
  175|      0|      auto next = std::next(it);
  176|      0|      if (*it == wbm_stall) {
  ------------------
  |  Branch (176:11): [True: 0, False: 0]
  ------------------
  177|      0|        cleanup.splice(cleanup.end(), queue_, std::move(it));
  178|      0|      }
  179|      0|      it = next;
  180|      0|    }
  181|      0|  }
  182|  9.02k|  wbm_stall->Signal();
  183|  9.02k|}

_ZN7rocksdb20sample_file_read_incEPNS_12FileMetaDataE:
   19|      7|inline void sample_file_read_inc(FileMetaData* meta) {
   20|      7|  meta->stats.num_reads_sampled.fetch_add(kFileReadSampleRate,
   21|      7|                                          std::memory_order_relaxed);
   22|      7|}
_ZN7rocksdb23should_sample_file_readEv:
   15|  4.48k|inline bool should_sample_file_read() {
   16|  4.48k|  return (Random::GetTLSInstance()->Next() % kFileReadSampleRate == 307);
   17|  4.48k|}

_ZN7rocksdb21HistogramBucketMapperC2Ev:
   23|      2|HistogramBucketMapper::HistogramBucketMapper() {
   24|       |  // If you change this, you also need to change
   25|       |  // size of array buckets_ in HistogramImpl
   26|      2|  bucketValues_ = {1, 2};
   27|      2|  double bucket_val = static_cast<double>(bucketValues_.back());
   28|    216|  while ((bucket_val = 1.5 * bucket_val) <=
  ------------------
  |  Branch (28:10): [True: 214, False: 2]
  ------------------
   29|    216|         static_cast<double>(std::numeric_limits<uint64_t>::max())) {
   30|    214|    bucketValues_.push_back(static_cast<uint64_t>(bucket_val));
   31|       |    // Extracts two most significant digits to make histogram buckets more
   32|       |    // human-readable. E.g., 172 becomes 170.
   33|    214|    uint64_t pow_of_ten = 1;
   34|  1.99k|    while (bucketValues_.back() / 10 > 10) {
  ------------------
  |  Branch (34:12): [True: 1.77k, False: 214]
  ------------------
   35|  1.77k|      bucketValues_.back() /= 10;
   36|  1.77k|      pow_of_ten *= 10;
   37|  1.77k|    }
   38|    214|    bucketValues_.back() *= pow_of_ten;
   39|    214|  }
   40|      2|  maxBucketValue_ = bucketValues_.back();
   41|      2|  minBucketValue_ = bucketValues_.front();
   42|      2|}
_ZN7rocksdb13HistogramStatC2Ev:
   58|  72.2k|HistogramStat::HistogramStat() : num_buckets_(bucketMapper.BucketCount()) {
   59|  72.2k|  assert(num_buckets_ == sizeof(buckets_) / sizeof(*buckets_));
   60|  72.2k|  Clear();
   61|  72.2k|}
_ZN7rocksdb13HistogramStat5ClearEv:
   63|   144k|void HistogramStat::Clear() {
   64|   144k|  min_.store(bucketMapper.LastValue(), std::memory_order_relaxed);
   65|   144k|  max_.store(0, std::memory_order_relaxed);
   66|   144k|  num_.store(0, std::memory_order_relaxed);
   67|   144k|  sum_.store(0, std::memory_order_relaxed);
   68|   144k|  sum_squares_.store(0, std::memory_order_relaxed);
   69|  15.8M|  for (unsigned int b = 0; b < num_buckets_; b++) {
  ------------------
  |  Branch (69:28): [True: 15.7M, False: 144k]
  ------------------
   70|  15.7M|    buckets_[b].store(0, std::memory_order_relaxed);
   71|  15.7M|  }
   72|   144k|}
_ZNK7rocksdb13HistogramStat5EmptyEv:
   74|    368|bool HistogramStat::Empty() const { return num() == 0; }
_ZN7rocksdb13HistogramImpl5ClearEv:
  244|  72.2k|void HistogramImpl::Clear() {
  245|  72.2k|  std::lock_guard<std::mutex> lock(mutex_);
  246|  72.2k|  stats_.Clear();
  247|  72.2k|}
_ZNK7rocksdb13HistogramImpl5EmptyEv:
  249|    368|bool HistogramImpl::Empty() const { return stats_.Empty(); }

_ZNK7rocksdb21HistogramBucketMapper11BucketCountEv:
   29|  72.2k|  size_t BucketCount() const { return bucketValues_.size(); }
_ZNK7rocksdb21HistogramBucketMapper9LastValueEv:
   31|   144k|  uint64_t LastValue() const { return maxBucketValue_; }
_ZN7rocksdb13HistogramStatD2Ev:
   48|  72.2k|  ~HistogramStat() {}
_ZNK7rocksdb13HistogramStat3numEv:
   60|    368|  inline uint64_t num() const { return num_.load(std::memory_order_relaxed); }
_ZN7rocksdb9HistogramC2Ev:
   90|  72.2k|  Histogram() {}
_ZN7rocksdb9HistogramD2Ev:
   91|  72.2k|  virtual ~Histogram(){}
_ZN7rocksdb13HistogramImplC2Ev:
  112|  72.2k|  HistogramImpl() { Clear(); }
_ZN7rocksdb13HistogramImplD2Ev:
  134|  72.2k|  virtual ~HistogramImpl() {}

_ZN7rocksdb17InstrumentedMutex4LockEv:
   27|  1.88M|void InstrumentedMutex::Lock() {
   28|  1.88M|  PERF_CONDITIONAL_TIMER_FOR_MUTEX_GUARD(
  ------------------
  |  |   63|  1.88M|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric), nullptr,      \
  |  |   64|  1.88M|                                         false, PerfLevel::kEnableTime, stats, \
  |  |   65|  1.88M|                                         ticker_type);                         \
  |  |   66|  1.88M|  if (condition) {                                                             \
  |  |  ------------------
  |  |  |  Branch (66:7): [True: 225k, False: 1.66M]
  |  |  ------------------
  |  |   67|   225k|    perf_step_timer_##metric.Start();                                          \
  |  |   68|   225k|  }
  ------------------
   29|  1.88M|      db_mutex_lock_nanos, stats_code_ == DB_MUTEX_WAIT_MICROS,
   30|  1.88M|      stats_for_report(clock_, stats_), stats_code_);
   31|  1.88M|  LockInternal();
   32|  1.88M|}
_ZN7rocksdb17InstrumentedMutex12LockInternalEv:
   34|  1.88M|void InstrumentedMutex::LockInternal() {
   35|       |#ifndef NDEBUG
   36|       |  ThreadStatusUtil::TEST_StateDelay(ThreadStatus::STATE_MUTEX_WAIT);
   37|       |#endif
   38|       |#ifdef COERCE_CONTEXT_SWITCH
   39|       |  if (stats_code_ == DB_MUTEX_WAIT_MICROS) {
   40|       |    thread_local Random rnd(301);
   41|       |    if (rnd.OneIn(2)) {
   42|       |      if (bg_cv_) {
   43|       |        bg_cv_->SignalAll();
   44|       |      }
   45|       |      sched_yield();
   46|       |    } else {
   47|       |      uint32_t sleep_us = rnd.Uniform(11) * 1000;
   48|       |      if (bg_cv_) {
   49|       |        bg_cv_->SignalAll();
   50|       |      }
   51|       |      SystemClock::Default()->SleepForMicroseconds(sleep_us);
   52|       |    }
   53|       |  }
   54|       |#endif
   55|  1.88M|  mutex_.Lock();
   56|  1.88M|}
_ZN7rocksdb19InstrumentedCondVar4WaitEv:
   58|     23|void InstrumentedCondVar::Wait() {
   59|     23|  PERF_CONDITIONAL_TIMER_FOR_MUTEX_GUARD(
  ------------------
  |  |   63|     23|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric), nullptr,      \
  |  |   64|     23|                                         false, PerfLevel::kEnableTime, stats, \
  |  |   65|     23|                                         ticker_type);                         \
  |  |   66|     23|  if (condition) {                                                             \
  |  |  ------------------
  |  |  |  Branch (66:7): [True: 0, False: 23]
  |  |  ------------------
  |  |   67|      0|    perf_step_timer_##metric.Start();                                          \
  |  |   68|      0|  }
  ------------------
   60|     23|      db_condition_wait_nanos, stats_code_ == DB_MUTEX_WAIT_MICROS,
   61|     23|      stats_for_report(clock_, stats_), stats_code_);
   62|     23|  WaitInternal();
   63|     23|}
_ZN7rocksdb19InstrumentedCondVar12WaitInternalEv:
   65|     23|void InstrumentedCondVar::WaitInternal() {
   66|       |#ifndef NDEBUG
   67|       |  ThreadStatusUtil::TEST_StateDelay(ThreadStatus::STATE_MUTEX_WAIT);
   68|       |#endif
   69|     23|  cond_.Wait();
   70|     23|}
_ZN7rocksdb19InstrumentedCondVar9TimedWaitEm:
   72|  9.03k|bool InstrumentedCondVar::TimedWait(uint64_t abs_time_us) {
   73|  9.03k|  PERF_CONDITIONAL_TIMER_FOR_MUTEX_GUARD(
  ------------------
  |  |   63|  9.03k|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric), nullptr,      \
  |  |   64|  9.03k|                                         false, PerfLevel::kEnableTime, stats, \
  |  |   65|  9.03k|                                         ticker_type);                         \
  |  |   66|  9.03k|  if (condition) {                                                             \
  |  |  ------------------
  |  |  |  Branch (66:7): [True: 0, False: 9.03k]
  |  |  ------------------
  |  |   67|      0|    perf_step_timer_##metric.Start();                                          \
  |  |   68|      0|  }
  ------------------
   74|  9.03k|      db_condition_wait_nanos, stats_code_ == DB_MUTEX_WAIT_MICROS,
   75|  9.03k|      stats_for_report(clock_, stats_), stats_code_);
   76|  9.03k|  return TimedWaitInternal(abs_time_us);
   77|  9.03k|}
_ZN7rocksdb19InstrumentedCondVar17TimedWaitInternalEm:
   79|  9.03k|bool InstrumentedCondVar::TimedWaitInternal(uint64_t abs_time_us) {
   80|       |#ifndef NDEBUG
   81|       |  ThreadStatusUtil::TEST_StateDelay(ThreadStatus::STATE_MUTEX_WAIT);
   82|       |#endif
   83|       |
   84|  9.03k|  TEST_SYNC_POINT_CALLBACK("InstrumentedCondVar::TimedWaitInternal",
   85|  9.03k|                           &abs_time_us);
   86|       |
   87|  9.03k|  return cond_.TimedWait(abs_time_us);
   88|  9.03k|}
instrumented_mutex.cc:_ZN7rocksdb12_GLOBAL__N_116stats_for_reportEPNS_11SystemClockEPNS_10StatisticsE:
   16|  1.89M|Statistics* stats_for_report(SystemClock* clock, Statistics* stats) {
   17|  1.89M|  if (clock != nullptr && stats != nullptr &&
  ------------------
  |  Branch (17:7): [True: 389k, False: 1.50M]
  |  Branch (17:27): [True: 0, False: 389k]
  ------------------
   18|  1.89M|      stats->get_stats_level() > kExceptTimeForMutex) {
  ------------------
  |  Branch (18:7): [True: 0, False: 0]
  ------------------
   19|      0|    return stats;
   20|  1.89M|  } else {
   21|  1.89M|    return nullptr;
   22|  1.89M|  }
   23|  1.89M|}

_ZN7rocksdb17InstrumentedMutexC2Eb:
   23|  90.2k|      : mutex_(adaptive), stats_(nullptr), clock_(nullptr), stats_code_(0) {}
_ZN7rocksdb17InstrumentedMutexC2EPNS_10StatisticsEPNS_11SystemClockEib:
   33|  9.02k|        stats_code_(stats_code) {}
_ZN7rocksdb19InstrumentedCondVarC2EPNS_17InstrumentedMutexE:
  107|  58.6k|        stats_code_(instrumented_mutex->stats_code_) {}
_ZN7rocksdb21InstrumentedMutexLockC2EPNS_17InstrumentedMutexE:
   73|  1.70M|  explicit InstrumentedMutexLock(InstrumentedMutex* mutex) : mutex_(mutex) {
   74|  1.70M|    mutex_->Lock();
   75|  1.70M|  }
_ZN7rocksdb17InstrumentedMutex6UnlockEv:
   47|  1.88M|  void Unlock() { mutex_.Unlock(); }
_ZN7rocksdb21InstrumentedMutexLockD2Ev:
   77|  1.70M|  ~InstrumentedMutexLock() { mutex_->Unlock(); }
_ZNK7rocksdb17InstrumentedMutex10AssertHeldEv:
   49|   279k|  void AssertHeld() const { mutex_.AssertHeld(); }
_ZN7rocksdb19InstrumentedCondVar9SignalAllEv:
  115|  77.6k|  void SignalAll() { cond_.SignalAll(); }
_ZN7rocksdb23InstrumentedMutexUnlockC2EPNS_17InstrumentedMutexE:
   89|     46|  explicit InstrumentedMutexUnlock(InstrumentedMutex* mutex) : mutex_(mutex) {
   90|     46|    mutex_->Unlock();
   91|     46|  }
_ZN7rocksdb23InstrumentedMutexUnlockD2Ev:
   93|     46|  ~InstrumentedMutexUnlock() { mutex_->Lock(); }
_ZN7rocksdb17InstrumentedMutexC2EPNS_11SystemClockEb:
   26|      1|      : mutex_(adaptive), stats_(nullptr), clock_(clock), stats_code_(0) {}

_ZN7rocksdb11PerfContextD2Ev:
  198|  9.02k|PerfContext::~PerfContext() {
  199|  9.02k|#if !defined(NPERF_CONTEXT) && !defined(OS_SOLARIS)
  200|  9.02k|  ClearPerLevelPerfContext();
  201|  9.02k|#endif
  202|  9.02k|}
_ZN7rocksdb11PerfContext5ResetEv:
  247|  9.02k|void PerfContext::Reset() {
  248|  9.02k|#ifndef NPERF_CONTEXT
  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  ------------------
  |  |   52|  9.02k|  defCmd(user_key_comparison_count)                \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   53|  9.02k|  defCmd(block_cache_hit_count)                    \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|  9.02k|  defCmd(block_read_count)                         \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   55|  9.02k|  defCmd(block_read_byte)                          \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  9.02k|  defCmd(block_read_time)                          \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   57|  9.02k|  defCmd(block_read_cpu_time)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  9.02k|  defCmd(block_cache_index_hit_count)              \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   59|  9.02k|  defCmd(block_cache_standalone_handle_count)      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|  9.02k|  defCmd(block_cache_real_handle_count)            \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   61|  9.02k|  defCmd(index_block_read_count)                   \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   62|  9.02k|  defCmd(block_cache_filter_hit_count)             \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   63|  9.02k|  defCmd(filter_block_read_count)                  \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   64|  9.02k|  defCmd(compression_dict_block_read_count)        \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   65|  9.02k|  defCmd(block_cache_index_read_byte)              \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   66|  9.02k|  defCmd(block_cache_filter_read_byte)             \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   67|  9.02k|  defCmd(block_cache_compression_dict_read_byte)   \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   68|  9.02k|  defCmd(block_cache_read_byte)                    \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   69|  9.02k|  defCmd(secondary_cache_hit_count)                \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   70|  9.02k|  defCmd(compressed_sec_cache_insert_real_count)   \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   71|  9.02k|  defCmd(compressed_sec_cache_insert_dummy_count)  \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   72|  9.02k|  defCmd(compressed_sec_cache_uncompressed_bytes)  \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   73|  9.02k|  defCmd(compressed_sec_cache_compressed_bytes)    \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   74|  9.02k|  defCmd(block_checksum_time)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   75|  9.02k|  defCmd(block_decompress_time)                    \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   76|  9.02k|  defCmd(get_read_bytes)                           \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|  9.02k|  defCmd(multiget_read_bytes)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   78|  9.02k|  defCmd(iter_read_bytes)                          \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   79|  9.02k|  defCmd(blob_cache_hit_count)                     \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   80|  9.02k|  defCmd(blob_read_count)                          \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   81|  9.02k|  defCmd(blob_read_byte)                           \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   82|  9.02k|  defCmd(blob_read_time)                           \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   83|  9.02k|  defCmd(blob_checksum_time)                       \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   84|  9.02k|  defCmd(blob_decompress_time)                     \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   85|  9.02k|  defCmd(internal_key_skipped_count)               \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   86|  9.02k|  defCmd(internal_delete_skipped_count)            \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   87|  9.02k|  defCmd(internal_recent_skipped_count)            \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   88|  9.02k|  defCmd(internal_merge_count)                     \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   89|  9.02k|  defCmd(internal_merge_point_lookup_count)        \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   90|  9.02k|  defCmd(internal_range_del_reseek_count)          \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|  9.02k|  defCmd(get_snapshot_time)                        \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   92|  9.02k|  defCmd(get_from_memtable_time)                   \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   93|  9.02k|  defCmd(get_from_memtable_count)                  \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   94|  9.02k|  defCmd(get_post_process_time)                    \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   95|  9.02k|  defCmd(get_from_output_files_time)               \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   96|  9.02k|  defCmd(seek_on_memtable_time)                    \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   97|  9.02k|  defCmd(seek_on_memtable_count)                   \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   98|  9.02k|  defCmd(next_on_memtable_count)                   \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   99|  9.02k|  defCmd(prev_on_memtable_count)                   \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  100|  9.02k|  defCmd(seek_child_seek_time)                     \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  101|  9.02k|  defCmd(seek_child_seek_count)                    \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  102|  9.02k|  defCmd(seek_min_heap_time)                       \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  103|  9.02k|  defCmd(seek_max_heap_time)                       \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  104|  9.02k|  defCmd(seek_internal_seek_time)                  \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  105|  9.02k|  defCmd(find_next_user_entry_time)                \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  106|  9.02k|  defCmd(write_wal_time)                           \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  107|  9.02k|  defCmd(write_memtable_time)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  108|  9.02k|  defCmd(write_delay_time)                         \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  109|  9.02k|  defCmd(write_scheduling_flushes_compactions_time)\
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  110|  9.02k|  defCmd(write_pre_and_post_process_time)          \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  9.02k|  defCmd(write_thread_wait_nanos)                  \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  112|  9.02k|  defCmd(db_mutex_lock_nanos)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  113|  9.02k|  defCmd(db_condition_wait_nanos)                  \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  114|  9.02k|  defCmd(merge_operator_time_nanos)                \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  115|  9.02k|  defCmd(read_index_block_nanos)                   \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  116|  9.02k|  defCmd(read_filter_block_nanos)                  \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  117|  9.02k|  defCmd(new_table_block_iter_nanos)               \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  118|  9.02k|  defCmd(new_table_iterator_nanos)                 \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  119|  9.02k|  defCmd(block_seek_nanos)                         \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  120|  9.02k|  defCmd(find_table_nanos)                         \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  121|  9.02k|  defCmd(bloom_memtable_hit_count)                 \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  122|  9.02k|  defCmd(bloom_memtable_miss_count)                \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  123|  9.02k|  defCmd(bloom_sst_hit_count)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  124|  9.02k|  defCmd(bloom_sst_miss_count)                     \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  125|  9.02k|  defCmd(key_lock_wait_time)                       \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  126|  9.02k|  defCmd(key_lock_wait_count)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  127|  9.02k|  defCmd(env_new_sequential_file_nanos)            \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  128|  9.02k|  defCmd(env_new_random_access_file_nanos)         \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  129|  9.02k|  defCmd(env_new_writable_file_nanos)              \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  130|  9.02k|  defCmd(env_reuse_writable_file_nanos)            \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  131|  9.02k|  defCmd(env_new_random_rw_file_nanos)             \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  132|  9.02k|  defCmd(env_new_directory_nanos)                  \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  133|  9.02k|  defCmd(env_file_exists_nanos)                    \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  134|  9.02k|  defCmd(env_get_children_nanos)                   \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  135|  9.02k|  defCmd(env_get_children_file_attributes_nanos)   \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  136|  9.02k|  defCmd(env_delete_file_nanos)                    \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  137|  9.02k|  defCmd(env_create_dir_nanos)                     \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  138|  9.02k|  defCmd(env_create_dir_if_missing_nanos)          \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  139|  9.02k|  defCmd(env_delete_dir_nanos)                     \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  140|  9.02k|  defCmd(env_get_file_size_nanos)                  \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  141|  9.02k|  defCmd(env_get_file_modification_time_nanos)     \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  142|  9.02k|  defCmd(env_rename_file_nanos)                    \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  143|  9.02k|  defCmd(env_link_file_nanos)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  144|  9.02k|  defCmd(env_lock_file_nanos)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  9.02k|  defCmd(env_unlock_file_nanos)                    \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  146|  9.02k|  defCmd(env_new_logger_nanos)                     \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  147|  9.02k|  defCmd(get_cpu_nanos)                            \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|  9.02k|  defCmd(iter_next_cpu_nanos)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  149|  9.02k|  defCmd(iter_prev_cpu_nanos)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  9.02k|  defCmd(iter_seek_cpu_nanos)                      \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  151|  9.02k|  defCmd(iter_next_count)                          \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  152|  9.02k|  defCmd(iter_prev_count)                          \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  153|  9.02k|  defCmd(iter_seek_count)                          \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  154|  9.02k|  defCmd(encrypt_data_nanos)                       \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  9.02k|  defCmd(decrypt_data_nanos)                       \
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  156|  9.02k|  defCmd(number_async_seek)
  |  |  ------------------
  |  |  |  |  250|  9.02k|  DEF_PERF_CONTEXT_METRICS(EMIT_FIELDS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  249|  9.02k|#define EMIT_FIELDS(x) x = 0;
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  251|  9.02k|#undef EMIT_FIELDS
  252|  9.02k|  if (per_level_perf_context_enabled && level_to_perf_context) {
  ------------------
  |  Branch (252:7): [True: 0, False: 9.02k]
  |  Branch (252:41): [True: 0, False: 0]
  ------------------
  253|      0|    for (auto& kv : *level_to_perf_context) {
  ------------------
  |  Branch (253:19): [True: 0, False: 0]
  ------------------
  254|      0|      kv.second.Reset();
  255|      0|    }
  256|      0|  }
  257|  9.02k|#endif
  258|  9.02k|}
_ZN7rocksdb11PerfContext24ClearPerLevelPerfContextEv:
  308|  9.02k|void PerfContext::ClearPerLevelPerfContext() {
  309|  9.02k|  if (level_to_perf_context != nullptr) {
  ------------------
  |  Branch (309:7): [True: 0, False: 9.02k]
  ------------------
  310|      0|    level_to_perf_context->clear();
  311|      0|    delete level_to_perf_context;
  312|      0|    level_to_perf_context = nullptr;
  313|      0|  }
  314|  9.02k|  per_level_perf_context_enabled = false;
  315|  9.02k|}

_ZN7rocksdb12SetPerfLevelENS_9PerfLevelE:
   15|  5.60M|void SetPerfLevel(PerfLevel level) {
   16|  5.60M|  assert(level > kUninitialized);
   17|  5.60M|  assert(level < kOutOfBounds);
   18|  5.60M|  perf_level = level;
   19|  5.60M|}
_ZN7rocksdb12GetPerfLevelEv:
   21|  3.57M|PerfLevel GetPerfLevel() { return perf_level; }

_ZN7rocksdb13PerfStepTimerC2EPmPNS_11SystemClockEbNS_9PerfLevelEPNS_10StatisticsEj:
   27|  19.1M|        statistics_(statistics) {}
_ZN7rocksdb13PerfStepTimerD2Ev:
   29|  19.1M|  ~PerfStepTimer() { Stop(); }
_ZN7rocksdb13PerfStepTimer5StartEv:
   31|  20.1M|  void Start() {
   32|  20.1M|    if (perf_counter_enabled_ || statistics_ != nullptr) {
  ------------------
  |  Branch (32:9): [True: 18.4E, False: 20.1M]
  |  Branch (32:34): [True: 2, False: 20.1M]
  ------------------
   33|      0|      start_ = time_now();
   34|      0|    }
   35|  20.1M|  }
_ZN7rocksdb13PerfStepTimer4StopEv:
   45|  23.2M|  void Stop() {
   46|  23.2M|    if (start_) {
  ------------------
  |  Branch (46:9): [True: 0, False: 23.2M]
  ------------------
   47|      0|      uint64_t duration = time_now() - start_;
   48|      0|      if (perf_counter_enabled_) {
  ------------------
  |  Branch (48:11): [True: 0, False: 0]
  ------------------
   49|      0|        *metric_ += duration;
   50|      0|      }
   51|       |
   52|      0|      if (statistics_ != nullptr) {
  ------------------
  |  Branch (52:11): [True: 0, False: 0]
  ------------------
   53|      0|        RecordTick(statistics_, ticker_type_, duration);
   54|      0|      }
   55|      0|      start_ = 0;
   56|      0|    }
   57|  23.2M|  }

_ZN7rocksdb17RecordInHistogramEPNS_10StatisticsEjm:
  116|  1.36M|                              uint64_t value) {
  117|  1.36M|  if (statistics) {
  ------------------
  |  Branch (117:7): [True: 0, False: 1.36M]
  ------------------
  118|      0|    statistics->recordInHistogram(histogram_type, value);
  119|      0|  }
  120|  1.36M|}
_ZN7rocksdb10RecordTickEPNS_10StatisticsEjm:
  130|  7.06M|                       uint64_t count = 1) {
  131|  7.06M|  if (statistics) {
  ------------------
  |  Branch (131:7): [True: 0, False: 7.06M]
  ------------------
  132|      0|    statistics->recordTick(ticker_type, count);
  133|      0|  }
  134|  7.06M|}

_ZN7rocksdb19ThreadStatusUpdater14RegisterThreadENS_12ThreadStatus10ThreadTypeEm:
   23|      2|                                         uint64_t thread_id) {
   24|      2|  if (UNLIKELY(thread_status_data_ == nullptr)) {
  ------------------
  |  |   14|      2|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 2, False: 0]
  |  |  ------------------
  ------------------
   25|      2|    thread_status_data_ = new ThreadStatusData();
   26|      2|    thread_status_data_->thread_type = ttype;
   27|      2|    thread_status_data_->thread_id = thread_id;
   28|      2|    std::lock_guard<std::mutex> lck(thread_list_mutex_);
   29|      2|    thread_data_set_.insert(thread_status_data_);
   30|      2|  }
   31|       |
   32|      2|  ClearThreadOperationProperties();
   33|      2|}
_ZN7rocksdb19ThreadStatusUpdater16UnregisterThreadEv:
   35|      2|void ThreadStatusUpdater::UnregisterThread() {
   36|      2|  if (thread_status_data_ != nullptr) {
  ------------------
  |  Branch (36:7): [True: 2, False: 0]
  ------------------
   37|      2|    std::lock_guard<std::mutex> lck(thread_list_mutex_);
   38|      2|    thread_data_set_.erase(thread_status_data_);
   39|      2|    delete thread_status_data_;
   40|      2|    thread_status_data_ = nullptr;
   41|      2|  }
   42|      2|}
_ZN7rocksdb19ThreadStatusUpdater30ClearThreadOperationPropertiesEv:
  138|      2|void ThreadStatusUpdater::ClearThreadOperationProperties() {
  139|      2|  auto* data = GetLocalThreadStatus();
  140|      2|  if (data == nullptr) {
  ------------------
  |  Branch (140:7): [True: 2, False: 0]
  ------------------
  141|      2|    return;
  142|      2|  }
  143|      0|  for (int i = 0; i < ThreadStatus::kNumOperationProperties; ++i) {
  ------------------
  |  Branch (143:19): [True: 0, False: 0]
  ------------------
  144|      0|    data->op_properties[i].store(0, std::memory_order_relaxed);
  145|      0|  }
  146|      0|}
_ZN7rocksdb19ThreadStatusUpdater20GetLocalThreadStatusEv:
  222|      2|ThreadStatusData* ThreadStatusUpdater::GetLocalThreadStatus() {
  223|      2|  if (thread_status_data_ == nullptr) {
  ------------------
  |  Branch (223:7): [True: 0, False: 2]
  ------------------
  224|      0|    return nullptr;
  225|      0|  }
  226|      2|  if (!thread_status_data_->enable_tracking.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (226:7): [True: 2, False: 0]
  ------------------
  227|      2|    return nullptr;
  228|      2|  }
  229|      0|  return thread_status_data_;
  230|      2|}

_ZN7rocksdb16ThreadStatusDataC2Ev:
   65|      2|  explicit ThreadStatusData() {
   66|      2|    enable_tracking.store(false);
   67|      2|    thread_id.store(0);
   68|      2|    thread_type.store(ThreadStatus::USER);
   69|      2|    cf_key.store(nullptr);
   70|      2|    operation_type.store(ThreadStatus::OP_UNKNOWN);
   71|      2|    op_start_time.store(0);
   72|      2|    state_type.store(ThreadStatus::STATE_UNKNOWN);
   73|      2|  }
_ZN7rocksdb19ThreadStatusUpdaterC2Ev:
  102|      1|  ThreadStatusUpdater() {}

_ZN7rocksdb16ThreadStatusUtil14RegisterThreadEPKNS_3EnvENS_12ThreadStatus10ThreadTypeE:
   20|      2|                                      ThreadStatus::ThreadType thread_type) {
   21|      2|  if (!MaybeInitThreadLocalUpdater(env)) {
  ------------------
  |  Branch (21:7): [True: 0, False: 2]
  ------------------
   22|      0|    return;
   23|      0|  }
   24|      2|  assert(thread_updater_local_cache_);
   25|      2|  thread_updater_local_cache_->RegisterThread(thread_type, env->GetThreadID());
   26|      2|}
_ZN7rocksdb16ThreadStatusUtil16UnregisterThreadEv:
   28|      2|void ThreadStatusUtil::UnregisterThread() {
   29|      2|  thread_updater_initialized_ = false;
   30|      2|  if (thread_updater_local_cache_ != nullptr) {
  ------------------
  |  Branch (30:7): [True: 2, False: 0]
  ------------------
   31|      2|    thread_updater_local_cache_->UnregisterThread();
   32|      2|    thread_updater_local_cache_ = nullptr;
   33|      2|  }
   34|      2|}
_ZN7rocksdb16ThreadStatusUtil17SetEnableTrackingEb:
   36|  9.02k|void ThreadStatusUtil::SetEnableTracking(bool enable_tracking) {
   37|  9.02k|  if (thread_updater_local_cache_ == nullptr) {
  ------------------
  |  Branch (37:7): [True: 9.02k, False: 0]
  ------------------
   38|  9.02k|    return;
   39|  9.02k|  }
   40|      0|  thread_updater_local_cache_->SetEnableTracking(enable_tracking);
   41|      0|}
_ZN7rocksdb16ThreadStatusUtil18SetThreadOperationENS_12ThreadStatus13OperationTypeE:
   51|  81.2k|void ThreadStatusUtil::SetThreadOperation(ThreadStatus::OperationType op) {
   52|  81.2k|  if (thread_updater_local_cache_ == nullptr) {
  ------------------
  |  Branch (52:7): [True: 81.2k, False: 0]
  ------------------
   53|  81.2k|    return;
   54|  81.2k|  }
   55|       |
   56|      0|  if (op != ThreadStatus::OP_UNKNOWN) {
  ------------------
  |  Branch (56:7): [True: 0, False: 0]
  ------------------
   57|      0|    uint64_t current_time = SystemClock::Default()->NowMicros();
   58|      0|    thread_updater_local_cache_->SetOperationStartTime(current_time);
   59|      0|  } else {
   60|       |    // TDOO(yhchiang): we could report the time when we set operation to
   61|       |    // OP_UNKNOWN once the whole instrumentation has been done.
   62|      0|    thread_updater_local_cache_->SetOperationStartTime(0);
   63|      0|  }
   64|      0|  thread_updater_local_cache_->SetThreadOperation(op);
   65|      0|}
_ZN7rocksdb16ThreadStatusUtil18GetThreadOperationEv:
   67|  36.1k|ThreadStatus::OperationType ThreadStatusUtil::GetThreadOperation() {
   68|  36.1k|  if (thread_updater_local_cache_ == nullptr) {
  ------------------
  |  Branch (68:7): [True: 36.1k, False: 0]
  ------------------
   69|  36.1k|    return ThreadStatus::OperationType::OP_UNKNOWN;
   70|  36.1k|  }
   71|      0|  return thread_updater_local_cache_->GetThreadOperation();
   72|  36.1k|}
_ZN7rocksdb16ThreadStatusUtil26SetThreadOperationPropertyEim:
   85|  34.6k|void ThreadStatusUtil::SetThreadOperationProperty(int code, uint64_t value) {
   86|  34.6k|  if (thread_updater_local_cache_ == nullptr) {
  ------------------
  |  Branch (86:7): [True: 34.6k, False: 0]
  ------------------
   87|       |    // thread_updater_local_cache_ must be set in SetColumnFamily
   88|       |    // or other ThreadStatusUtil functions.
   89|  34.6k|    return;
   90|  34.6k|  }
   91|       |
   92|      0|  thread_updater_local_cache_->SetThreadOperationProperty(code, value);
   93|      0|}
_ZN7rocksdb16ThreadStatusUtil17ResetThreadStatusEv:
  116|  9.02k|void ThreadStatusUtil::ResetThreadStatus() {
  117|  9.02k|  if (thread_updater_local_cache_ == nullptr) {
  ------------------
  |  Branch (117:7): [True: 9.02k, False: 0]
  ------------------
  118|  9.02k|    return;
  119|  9.02k|  }
  120|      0|  thread_updater_local_cache_->ResetThreadStatus();
  121|      0|}
_ZN7rocksdb16ThreadStatusUtil27MaybeInitThreadLocalUpdaterEPKNS_3EnvE:
  152|      2|bool ThreadStatusUtil::MaybeInitThreadLocalUpdater(const Env* env) {
  153|      2|  if (!thread_updater_initialized_ && env != nullptr) {
  ------------------
  |  Branch (153:7): [True: 2, False: 0]
  |  Branch (153:39): [True: 2, False: 0]
  ------------------
  154|      2|    thread_updater_initialized_ = true;
  155|      2|    thread_updater_local_cache_ = env->GetThreadStatusUpdater();
  156|      2|  }
  157|      2|  return (thread_updater_local_cache_ != nullptr);
  158|      2|}

_ZN7rocksdb23CFOptionsAsConfigurableERKNS_19ColumnFamilyOptionsEPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SA_EEEEEE:
  929|  45.1k|    const std::unordered_map<std::string, std::string>* opt_map) {
  930|  45.1k|  std::unique_ptr<Configurable> ptr(new ConfigurableCFOptions(opts, opt_map));
  931|  45.1k|  return ptr;
  932|  45.1k|}
_ZN7rocksdb18ImmutableCFOptionsC2ERKNS_19ColumnFamilyOptionsE:
  973|  63.1k|          cf_options.persist_user_defined_timestamps) {}
_ZN7rocksdb16ImmutableOptionsC2ERKNS_18ImmutableDBOptionsERKNS_19ColumnFamilyOptionsE:
  990|  18.0k|    : ImmutableDBOptions(db_options), ImmutableCFOptions(cf_options) {}
_ZN7rocksdb21MultiplyCheckOverflowEmd:
  997|   315k|uint64_t MultiplyCheckOverflow(uint64_t op1, double op2) {
  998|   315k|  if (op1 == 0 || op2 <= 0) {
  ------------------
  |  Branch (998:7): [True: 0, False: 315k]
  |  Branch (998:19): [True: 0, False: 315k]
  ------------------
  999|      0|    return 0;
 1000|      0|  }
 1001|   315k|  if (std::numeric_limits<uint64_t>::max() / op1 < op2) {
  ------------------
  |  Branch (1001:7): [True: 0, False: 315k]
  ------------------
 1002|      0|    return op1;
 1003|      0|  }
 1004|   315k|  return static_cast<uint64_t>(op1 * op2);
 1005|   315k|}
_ZN7rocksdb23MaxFileSizeForL0MetaPinERKNS_16MutableCFOptionsE:
 1025|  58.6k|size_t MaxFileSizeForL0MetaPin(const MutableCFOptions& cf_options) {
 1026|       |  // We do not want to pin meta-blocks that almost certainly came from intra-L0
 1027|       |  // or a former larger `write_buffer_size` value to avoid surprising users with
 1028|       |  // pinned memory usage. We use a factor of 1.5 to account for overhead
 1029|       |  // introduced during flush in most cases.
 1030|  58.6k|  if (std::numeric_limits<size_t>::max() / 3 <
  ------------------
  |  Branch (1030:7): [True: 0, False: 58.6k]
  ------------------
 1031|  58.6k|      cf_options.write_buffer_size / 2) {
 1032|      0|    return std::numeric_limits<size_t>::max();
 1033|      0|  }
 1034|  58.6k|  return cf_options.write_buffer_size / 2 * 3;
 1035|  58.6k|}
_ZN7rocksdb16MutableCFOptions21RefreshDerivedOptionsEiNS_15CompactionStyleE:
 1038|  63.1k|                                             CompactionStyle compaction_style) {
 1039|  63.1k|  max_file_size.resize(num_levels);
 1040|   505k|  for (int i = 0; i < num_levels; ++i) {
  ------------------
  |  Branch (1040:19): [True: 442k, False: 63.1k]
  ------------------
 1041|   442k|    if (i == 0 && compaction_style == kCompactionStyleUniversal) {
  ------------------
  |  Branch (1041:9): [True: 63.1k, False: 379k]
  |  Branch (1041:19): [True: 0, False: 63.1k]
  ------------------
 1042|      0|      max_file_size[i] = ULLONG_MAX;
 1043|   442k|    } else if (i > 1) {
  ------------------
  |  Branch (1043:16): [True: 315k, False: 126k]
  ------------------
 1044|   315k|      max_file_size[i] = MultiplyCheckOverflow(max_file_size[i - 1],
 1045|   315k|                                               target_file_size_multiplier);
 1046|   315k|    } else {
 1047|   126k|      max_file_size[i] = target_file_size_base;
 1048|   126k|    }
 1049|   442k|  }
 1050|  63.1k|}
_ZN7rocksdb28ConfigurableMutableCFOptionsC2ERKNS_16MutableCFOptionsE:
  835|  45.1k|  explicit ConfigurableMutableCFOptions(const MutableCFOptions& mcf) {
  836|  45.1k|    mutable_ = mcf;
  837|  45.1k|    RegisterOptions(&mutable_, &cf_mutable_options_type_info);
  838|  45.1k|  }
_ZN7rocksdb21ConfigurableCFOptionsC2ERKNS_19ColumnFamilyOptionsEPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESB_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SB_EEEEEE:
  851|  45.1k|        opt_map_(map) {
  852|  45.1k|    RegisterOptions(&immutable_, &cf_immutable_options_type_info);
  853|  45.1k|  }
_ZNK7rocksdb21ConfigurableCFOptions13GetOptionsPtrERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  869|  45.1k|  const void* GetOptionsPtr(const std::string& name) const override {
  870|  45.1k|    if (name == OptionsHelper::kCFOptionsName) {
  ------------------
  |  Branch (870:9): [True: 9.02k, False: 36.1k]
  ------------------
  871|  9.02k|      return &cf_options_;
  872|  36.1k|    } else {
  873|  36.1k|      return ConfigurableMutableCFOptions::GetOptionsPtr(name);
  874|  36.1k|    }
  875|  45.1k|  }
_ZN7rocksdb21ConfigurableCFOptions16ConfigureOptionsERKNS_13ConfigOptionsERKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESB_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SB_EEEEEEPSK_:
  859|  9.02k|      std::unordered_map<std::string, std::string>* unused) override {
  860|  9.02k|    Status s = Configurable::ConfigureOptions(config_options, opts_map, unused);
  861|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (861:9): [True: 9.02k, False: 0]
  ------------------
  862|  9.02k|      UpdateColumnFamilyOptions(mutable_, &cf_options_);
  863|  9.02k|      UpdateColumnFamilyOptions(immutable_, &cf_options_);
  864|  9.02k|      s = PrepareOptions(config_options);
  865|  9.02k|    }
  866|  9.02k|    return s;
  867|  9.02k|  }
_ZNK7rocksdb21ConfigurableCFOptions15OptionsAreEqualERKNS_13ConfigOptionsERKNS_14OptionTypeInfoERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEPKvSH_PSD_:
  881|   668k|                       std::string* mismatch) const override {
  882|   668k|    bool equals = opt_info.AreEqual(config_options, opt_name, this_ptr,
  883|   668k|                                    that_ptr, mismatch);
  884|   668k|    if (!equals && opt_info.IsByName()) {
  ------------------
  |  Branch (884:9): [True: 0, False: 668k]
  |  Branch (884:20): [True: 0, False: 0]
  ------------------
  885|      0|      if (opt_map_ == nullptr) {
  ------------------
  |  Branch (885:11): [True: 0, False: 0]
  ------------------
  886|      0|        equals = true;
  887|      0|      } else {
  888|      0|        const auto& iter = opt_map_->find(opt_name);
  889|      0|        if (iter == opt_map_->end()) {
  ------------------
  |  Branch (889:13): [True: 0, False: 0]
  ------------------
  890|      0|          equals = true;
  891|      0|        } else {
  892|      0|          equals = opt_info.AreEqualByName(config_options, opt_name, this_ptr,
  893|      0|                                           iter->second);
  894|      0|        }
  895|      0|      }
  896|      0|      if (equals) {  // False alarm, clear mismatch
  ------------------
  |  Branch (896:11): [True: 0, False: 0]
  ------------------
  897|      0|        *mismatch = "";
  898|      0|      }
  899|      0|    }
  900|   668k|    if (equals && opt_info.IsConfigurable() && opt_map_ != nullptr) {
  ------------------
  |  Branch (900:9): [True: 668k, False: 0]
  |  Branch (900:19): [True: 81.2k, False: 586k]
  |  Branch (900:48): [True: 81.2k, False: 0]
  ------------------
  901|  81.2k|      const auto* this_config = opt_info.AsRawPointer<Configurable>(this_ptr);
  902|  81.2k|      if (this_config == nullptr) {
  ------------------
  |  Branch (902:11): [True: 54.1k, False: 27.0k]
  ------------------
  903|  54.1k|        const auto& iter = opt_map_->find(opt_name);
  904|       |        // If the name exists in the map and is not empty/null,
  905|       |        // then the this_config should be set.
  906|  54.1k|        if (iter != opt_map_->end() && !iter->second.empty() &&
  ------------------
  |  Branch (906:13): [True: 54.1k, False: 0]
  |  Branch (906:13): [True: 0, False: 54.1k]
  |  Branch (906:40): [True: 54.1k, False: 0]
  ------------------
  907|  54.1k|            iter->second != kNullptrString) {
  ------------------
  |  Branch (907:13): [True: 0, False: 54.1k]
  ------------------
  908|      0|          *mismatch = opt_name;
  909|      0|          equals = false;
  910|      0|        }
  911|  54.1k|      }
  912|  81.2k|    }
  913|   668k|    return equals;
  914|   668k|  }
cf_options.cc:_ZNK7rocksdb3$_0clERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESC_Pv:
  419|  9.02k|                              void* addr) {
  420|       |               // This is to handle backward compatibility, where
  421|       |               // compaction_options_fifo could be assigned a single scalar
  422|       |               // value, say, like "23", which would be assigned to
  423|       |               // max_table_files_size.
  424|  9.02k|               if (name == "compaction_options_fifo" &&
  ------------------
  |  Branch (424:20): [True: 9.02k, False: 0]
  ------------------
  425|  9.02k|                   value.find('=') == std::string::npos) {
  ------------------
  |  Branch (425:20): [True: 0, False: 9.02k]
  ------------------
  426|       |                 // Old format. Parse just a single uint64_t value.
  427|      0|                 auto options = static_cast<CompactionOptionsFIFO*>(addr);
  428|      0|                 options->max_table_files_size = ParseUint64(value);
  429|      0|                 return Status::OK();
  430|  9.02k|               } else {
  431|  9.02k|                 return OptionTypeInfo::ParseStruct(
  432|  9.02k|                     opts, "compaction_options_fifo",
  433|  9.02k|                     &fifo_compaction_options_type_info, name, value, addr);
  434|  9.02k|               }
  435|  9.02k|             })},
cf_options.cc:_ZNK7rocksdb3$_1clERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESC_Pv:
  541|  9.02k|                const std::string& value, void* addr) {
  542|       |               // This is to handle backward compatibility, where
  543|       |               // compression_options was a ":" separated list.
  544|  9.02k|               if (name == kOptNameCompOpts &&
  ------------------
  |  Branch (544:20): [True: 9.02k, False: 0]
  ------------------
  545|  9.02k|                   value.find('=') == std::string::npos) {
  ------------------
  |  Branch (545:20): [True: 0, False: 9.02k]
  ------------------
  546|      0|                 auto* compression = static_cast<CompressionOptions*>(addr);
  547|      0|                 return ParseCompressionOptions(value, name, *compression);
  548|  9.02k|               } else {
  549|  9.02k|                 return OptionTypeInfo::ParseStruct(
  550|  9.02k|                     opts, kOptNameCompOpts, &compression_options_type_info,
  551|  9.02k|                     name, value, addr);
  552|  9.02k|               }
  553|  9.02k|             })},
cf_options.cc:_ZNK7rocksdb3$_2clERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESC_Pv:
  561|  9.02k|                const std::string& value, void* addr) {
  562|       |               // This is to handle backward compatibility, where
  563|       |               // compression_options was a ":" separated list.
  564|  9.02k|               if (name == kOptNameBMCompOpts &&
  ------------------
  |  Branch (564:20): [True: 9.02k, False: 0]
  ------------------
  565|  9.02k|                   value.find('=') == std::string::npos) {
  ------------------
  |  Branch (565:20): [True: 0, False: 9.02k]
  ------------------
  566|      0|                 auto* compression = static_cast<CompressionOptions*>(addr);
  567|      0|                 return ParseCompressionOptions(value, name, *compression);
  568|  9.02k|               } else {
  569|  9.02k|                 return OptionTypeInfo::ParseStruct(
  570|  9.02k|                     opts, kOptNameBMCompOpts, &compression_options_type_info,
  571|  9.02k|                     name, value, addr);
  572|  9.02k|               }
  573|  9.02k|             })},
cf_options.cc:_ZNK7rocksdb3$_3clERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPKvPSA_:
  668|  18.0k|                    const void* addr, std::string* value) {
  669|       |                   // it's a const pointer of const Comparator*
  670|  18.0k|                   const auto* ptr =
  671|  18.0k|                       static_cast<const Comparator* const*>(addr);
  672|  18.0k|                   if (*ptr == nullptr) {
  ------------------
  |  Branch (672:24): [True: 0, False: 18.0k]
  ------------------
  673|      0|                     *value = kNullptrString;
  674|  18.0k|                   } else if (opts.mutable_options_only) {
  ------------------
  |  Branch (674:31): [True: 0, False: 18.0k]
  ------------------
  675|      0|                     *value = "";
  676|  18.0k|                   } else {
  677|  18.0k|                     *value = (*ptr)->ToString(opts);
  678|  18.0k|                   }
  679|  18.0k|                   return Status::OK();
  680|  18.0k|                 })},
cf_options.cc:_ZNK7rocksdb3$_4clERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESC_Pv:
  691|  9.02k|             const std::string& value, void* addr) {
  692|  9.02k|            std::unique_ptr<MemTableRepFactory> factory;
  693|  9.02k|            auto* shared =
  694|  9.02k|                static_cast<std::shared_ptr<MemTableRepFactory>*>(addr);
  695|  9.02k|            Status s =
  696|  9.02k|                MemTableRepFactory::CreateFromString(opts, value, shared);
  697|  9.02k|            return s;
  698|  9.02k|          }}},

_ZN7rocksdb16MutableCFOptionsC2Ev:
  229|  63.1k|        uncache_aggressiveness(0) {}
_ZN7rocksdb16MutableCFOptionsC2ERKNS_19ColumnFamilyOptionsE:
  177|  63.1k|        uncache_aggressiveness(options.uncache_aggressiveness) {
  178|  63.1k|    RefreshDerivedOptions(options.num_levels, options.compaction_style);
  179|  63.1k|  }
_ZN7rocksdb18ImmutableCFOptions5kNameEv:
   24|  45.1k|  static const char* kName() { return "ImmutableCFOptions"; }
_ZN7rocksdb16MutableCFOptions5kNameEv:
  111|  45.1k|  static const char* kName() { return "MutableCFOptions"; }

_ZN7rocksdb12Configurable15RegisterOptionsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPvPKNS1_13unordered_mapIS7_NS_14OptionTypeInfoENS1_4hashIS7_EENS1_8equal_toIS7_EENS5_INS1_4pairIS8_SC_EEEEEE:
   22|   401k|    const std::unordered_map<std::string, OptionTypeInfo>* type_map) {
   23|   401k|  RegisteredOptions opts;
   24|   401k|  opts.name = name;
   25|   401k|  opts.type_map = type_map;
   26|   401k|  opts.opt_ptr = opt_ptr;
   27|   401k|  options_.emplace_back(opts);
   28|   401k|}
_ZN7rocksdb12Configurable14PrepareOptionsERKNS_13ConfigOptionsE:
   36|  45.1k|Status Configurable::PrepareOptions(const ConfigOptions& opts) {
   37|       |  // We ignore the invoke_prepare_options here intentionally,
   38|       |  // as if you are here, you must have called PrepareOptions explicitly.
   39|  45.1k|  Status status = Status::OK();
   40|  45.1k|  for (const auto& opt_iter : options_) {
  ------------------
  |  Branch (40:29): [True: 45.1k, False: 45.1k]
  ------------------
   41|  45.1k|    if (opt_iter.type_map != nullptr) {
  ------------------
  |  Branch (41:9): [True: 45.1k, False: 0]
  ------------------
   42|  1.87M|      for (const auto& map_iter : *(opt_iter.type_map)) {
  ------------------
  |  Branch (42:33): [True: 1.87M, False: 45.1k]
  ------------------
   43|  1.87M|        auto& opt_info = map_iter.second;
   44|  1.87M|        if (opt_info.ShouldPrepare()) {
  ------------------
  |  Branch (44:13): [True: 108k, False: 1.76M]
  ------------------
   45|   108k|          status = opt_info.Prepare(opts, map_iter.first, opt_iter.opt_ptr);
   46|   108k|          if (!status.ok()) {
  ------------------
  |  Branch (46:15): [True: 0, False: 108k]
  ------------------
   47|      0|            return status;
   48|      0|          }
   49|   108k|        }
   50|  1.87M|      }
   51|  45.1k|    }
   52|  45.1k|  }
   53|  45.1k|  return status;
   54|  45.1k|}
_ZNK7rocksdb12Configurable15ValidateOptionsERKNS_9DBOptionsERKNS_19ColumnFamilyOptionsE:
   57|  63.1k|                                     const ColumnFamilyOptions& cf_opts) const {
   58|  63.1k|  Status status;
   59|  63.1k|  for (const auto& opt_iter : options_) {
  ------------------
  |  Branch (59:29): [True: 54.1k, False: 63.1k]
  ------------------
   60|  54.1k|    if (opt_iter.type_map != nullptr) {
  ------------------
  |  Branch (60:9): [True: 54.1k, False: 0]
  ------------------
   61|  2.22M|      for (const auto& map_iter : *(opt_iter.type_map)) {
  ------------------
  |  Branch (61:33): [True: 2.22M, False: 54.1k]
  ------------------
   62|  2.22M|        auto& opt_info = map_iter.second;
   63|  2.22M|        if (opt_info.ShouldValidate()) {
  ------------------
  |  Branch (63:13): [True: 135k, False: 2.09M]
  ------------------
   64|   135k|          status = opt_info.Validate(db_opts, cf_opts, map_iter.first,
   65|   135k|                                     opt_iter.opt_ptr);
   66|   135k|          if (!status.ok()) {
  ------------------
  |  Branch (66:15): [True: 0, False: 135k]
  ------------------
   67|      0|            return status;
   68|      0|          }
   69|   135k|        }
   70|  2.22M|      }
   71|  54.1k|    }
   72|  54.1k|  }
   73|  63.1k|  return status;
   74|  63.1k|}
_ZNK7rocksdb12Configurable13GetOptionsPtrERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   82|   153k|const void* Configurable::GetOptionsPtr(const std::string& name) const {
   83|   189k|  for (const auto& o : options_) {
  ------------------
  |  Branch (83:22): [True: 189k, False: 0]
  ------------------
   84|   189k|    if (o.name == name) {
  ------------------
  |  Branch (84:9): [True: 153k, False: 36.1k]
  ------------------
   85|   153k|      return o.opt_ptr;
   86|   153k|    }
   87|   189k|  }
   88|      0|  return nullptr;
   89|   153k|}
_ZNK7rocksdb12Configurable13GetOptionNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   91|  3.63M|std::string Configurable::GetOptionName(const std::string& opt_name) const {
   92|  3.63M|  return opt_name;
   93|  3.63M|}
_ZN7rocksdb12Configurable16ConfigureFromMapERKNS_13ConfigOptionsERKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESB_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SB_EEEEEE:
  119|  72.2k|    const std::unordered_map<std::string, std::string>& opts_map) {
  120|  72.2k|  Status s = ConfigureFromMap(config_options, opts_map, nullptr);
  121|  72.2k|  return s;
  122|  72.2k|}
_ZN7rocksdb12Configurable16ConfigureFromMapERKNS_13ConfigOptionsERKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESB_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SB_EEEEEEPSK_:
  127|  72.2k|    std::unordered_map<std::string, std::string>* unused) {
  128|  72.2k|  return ConfigureOptions(config_options, opts_map, unused);
  129|  72.2k|}
_ZN7rocksdb12Configurable16ConfigureOptionsERKNS_13ConfigOptionsERKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESB_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SB_EEEEEEPSK_:
  134|  72.2k|    std::unordered_map<std::string, std::string>* unused) {
  135|  72.2k|  std::string curr_opts;
  136|  72.2k|  Status s;
  137|  72.2k|  if (!opts_map.empty()) {
  ------------------
  |  Branch (137:7): [True: 36.1k, False: 36.1k]
  ------------------
  138|       |    // There are options in the map.
  139|       |    // Save the current configuration in curr_opts and then configure the
  140|       |    // options, but do not prepare them now.  We will do all the prepare when
  141|       |    // the configuration is complete.
  142|  36.1k|    ConfigOptions copy = config_options;
  143|  36.1k|    copy.invoke_prepare_options = false;
  144|  36.1k|    if (!config_options.ignore_unknown_options) {
  ------------------
  |  Branch (144:9): [True: 36.1k, False: 0]
  ------------------
  145|       |      // If we are not ignoring unused, get the defaults in case we need to
  146|       |      // reset
  147|  36.1k|      copy.depth = ConfigOptions::kDepthDetailed;
  148|  36.1k|      copy.delimiter = "; ";
  149|  36.1k|      GetOptionString(copy, &curr_opts).PermitUncheckedError();
  150|  36.1k|    }
  151|       |
  152|  36.1k|    s = ConfigurableHelper::ConfigureOptions(copy, *this, opts_map, unused);
  153|  36.1k|  }
  154|  72.2k|  if (config_options.invoke_prepare_options && s.ok()) {
  ------------------
  |  Branch (154:7): [True: 0, False: 72.2k]
  |  Branch (154:48): [True: 0, False: 0]
  ------------------
  155|      0|    s = PrepareOptions(config_options);
  156|      0|  }
  157|  72.2k|  if (!s.ok() && !curr_opts.empty()) {
  ------------------
  |  Branch (157:7): [True: 0, False: 72.2k]
  |  Branch (157:18): [True: 0, False: 0]
  ------------------
  158|      0|    ConfigOptions reset = config_options;
  159|      0|    reset.ignore_unknown_options = true;
  160|      0|    reset.invoke_prepare_options = true;
  161|      0|    reset.ignore_unsupported_options = true;
  162|       |    // There are some options to reset from this current error
  163|      0|    ConfigureFromString(reset, curr_opts).PermitUncheckedError();
  164|      0|  }
  165|  72.2k|  return s;
  166|  72.2k|}
_ZN7rocksdb12Configurable11ParseOptionERKNS_13ConfigOptionsERKNS_14OptionTypeInfoERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEESF_Pv:
  219|  2.01M|                                 const std::string& opt_value, void* opt_ptr) {
  220|  2.01M|  if (opt_info.IsMutable()) {
  ------------------
  |  Branch (220:7): [True: 749k, False: 1.26M]
  ------------------
  221|   749k|    if (config_options.mutable_options_only) {
  ------------------
  |  Branch (221:9): [True: 0, False: 749k]
  ------------------
  222|       |      // This option is mutable. Treat all of its children as mutable as well
  223|      0|      ConfigOptions copy = config_options;
  224|      0|      copy.mutable_options_only = false;
  225|      0|      return opt_info.Parse(copy, opt_name, opt_value, opt_ptr);
  226|   749k|    } else {
  227|   749k|      return opt_info.Parse(config_options, opt_name, opt_value, opt_ptr);
  228|   749k|    }
  229|  1.26M|  } else if (config_options.mutable_options_only) {
  ------------------
  |  Branch (229:14): [True: 0, False: 1.26M]
  ------------------
  230|      0|    return Status::InvalidArgument("Option not changeable: " + opt_name);
  231|  1.26M|  } else {
  232|  1.26M|    return opt_info.Parse(config_options, opt_name, opt_value, opt_ptr);
  233|  1.26M|  }
  234|  2.01M|}
_ZN7rocksdb18ConfigurableHelper16ConfigureOptionsERKNS_13ConfigOptionsERNS_12ConfigurableERKNSt3__113unordered_mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESD_NS6_4hashISD_EENS6_8equal_toISD_EENSB_INS6_4pairIKSD_SD_EEEEEEPSM_:
  240|  36.1k|    std::unordered_map<std::string, std::string>* unused) {
  241|  36.1k|  std::unordered_map<std::string, std::string> remaining = opts_map;
  242|  36.1k|  Status s = Status::OK();
  243|  36.1k|  if (!opts_map.empty()) {
  ------------------
  |  Branch (243:7): [True: 36.1k, False: 0]
  ------------------
  244|  54.1k|    for (const auto& iter : configurable.options_) {
  ------------------
  |  Branch (244:27): [True: 54.1k, False: 0]
  ------------------
  245|  54.1k|      if (iter.type_map != nullptr) {
  ------------------
  |  Branch (245:11): [True: 54.1k, False: 0]
  ------------------
  246|  54.1k|        s = ConfigureSomeOptions(config_options, configurable, *(iter.type_map),
  247|  54.1k|                                 &remaining, iter.opt_ptr);
  248|  54.1k|        if (remaining.empty()) {  // Are there more options left?
  ------------------
  |  Branch (248:13): [True: 36.1k, False: 18.0k]
  ------------------
  249|  36.1k|          break;
  250|  36.1k|        } else if (!s.ok()) {
  ------------------
  |  Branch (250:20): [True: 0, False: 18.0k]
  ------------------
  251|      0|          break;
  252|      0|        }
  253|  54.1k|      }
  254|  54.1k|    }
  255|  36.1k|  }
  256|  36.1k|  if (unused != nullptr && !remaining.empty()) {
  ------------------
  |  Branch (256:7): [True: 0, False: 36.1k]
  |  Branch (256:28): [True: 0, False: 0]
  ------------------
  257|      0|    unused->insert(remaining.begin(), remaining.end());
  258|      0|  }
  259|  36.1k|  if (config_options.ignore_unknown_options) {
  ------------------
  |  Branch (259:7): [True: 0, False: 36.1k]
  ------------------
  260|      0|    s = Status::OK();
  261|  36.1k|  } else if (s.ok() && unused == nullptr && !remaining.empty()) {
  ------------------
  |  Branch (261:14): [True: 36.1k, False: 0]
  |  Branch (261:24): [True: 36.1k, False: 0]
  |  Branch (261:45): [True: 0, False: 36.1k]
  ------------------
  262|      0|    s = Status::NotFound("Could not find option: ", remaining.begin()->first);
  263|      0|  }
  264|  36.1k|  return s;
  265|  36.1k|}
_ZN7rocksdb18ConfigurableHelper20ConfigureSomeOptionsERKNS_13ConfigOptionsERNS_12ConfigurableERKNSt3__113unordered_mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENS_14OptionTypeInfoENS6_4hashISD_EENS6_8equal_toISD_EENSB_INS6_4pairIKSD_SE_EEEEEEPNS7_ISD_SD_SG_SI_NSB_INSJ_ISK_SD_EEEEEEPv:
  282|  54.1k|    std::unordered_map<std::string, std::string>* options, void* opt_ptr) {
  283|  54.1k|  Status result = Status::OK();  // The last non-OK result (if any)
  284|  54.1k|  Status notsup = Status::OK();  // The last NotSupported result (if any)
  285|  54.1k|  std::string elem_name;
  286|  54.1k|  int found = 1;
  287|  54.1k|  std::unordered_set<std::string> unsupported;
  288|       |  // While there are unused properties and we processed at least one,
  289|       |  // go through the remaining unused properties and attempt to configure them.
  290|   126k|  while (found > 0 && !options->empty()) {
  ------------------
  |  Branch (290:10): [True: 108k, False: 18.0k]
  |  Branch (290:23): [True: 72.2k, False: 36.1k]
  ------------------
  291|  72.2k|    found = 0;
  292|  72.2k|    notsup = Status::OK();
  293|  3.71M|    for (auto it = options->begin(); it != options->end();) {
  ------------------
  |  Branch (293:38): [True: 3.63M, False: 72.2k]
  ------------------
  294|  3.63M|      const std::string& opt_name = configurable.GetOptionName(it->first);
  295|  3.63M|      const std::string& opt_value = it->second;
  296|  3.63M|      const auto opt_info =
  297|  3.63M|          OptionTypeInfo::Find(opt_name, type_map, &elem_name);
  298|  3.63M|      if (opt_info == nullptr) {  // Did not find the option.  Skip it
  ------------------
  |  Branch (298:11): [True: 1.62M, False: 2.01M]
  ------------------
  299|  1.62M|        ++it;
  300|  2.01M|      } else {
  301|  2.01M|        Status s = ConfigureOption(config_options, configurable, *opt_info,
  302|  2.01M|                                   opt_name, elem_name, opt_value, opt_ptr);
  303|  2.01M|        if (s.IsNotFound()) {
  ------------------
  |  Branch (303:13): [True: 0, False: 2.01M]
  ------------------
  304|      0|          ++it;
  305|  2.01M|        } else if (s.IsNotSupported()) {
  ------------------
  |  Branch (305:20): [True: 0, False: 2.01M]
  ------------------
  306|      0|          notsup = s;
  307|      0|          unsupported.insert(it->first);
  308|      0|          ++it;  // Skip it for now
  309|  2.01M|        } else {
  310|  2.01M|          found++;
  311|  2.01M|          it = options->erase(it);
  312|  2.01M|          if (!s.ok()) {
  ------------------
  |  Branch (312:15): [True: 0, False: 2.01M]
  ------------------
  313|      0|            result = s;
  314|      0|          }
  315|  2.01M|        }
  316|  2.01M|      }
  317|  3.63M|    }  // End for all remaining options
  318|  72.2k|  }    // End while found one or options remain
  319|       |
  320|       |  // Now that we have been through the list, remove any unsupported
  321|  54.1k|  for (const auto& u : unsupported) {
  ------------------
  |  Branch (321:22): [True: 0, False: 54.1k]
  ------------------
  322|      0|    auto it = options->find(u);
  323|      0|    if (it != options->end()) {
  ------------------
  |  Branch (323:9): [True: 0, False: 0]
  ------------------
  324|      0|      options->erase(it);
  325|      0|    }
  326|      0|  }
  327|  54.1k|  if (config_options.ignore_unknown_options) {
  ------------------
  |  Branch (327:7): [True: 0, False: 54.1k]
  ------------------
  328|      0|    if (!result.ok()) {
  ------------------
  |  Branch (328:9): [True: 0, False: 0]
  ------------------
  329|      0|      result.PermitUncheckedError();
  330|      0|    }
  331|      0|    if (!notsup.ok()) {
  ------------------
  |  Branch (331:9): [True: 0, False: 0]
  ------------------
  332|      0|      notsup.PermitUncheckedError();
  333|      0|    }
  334|      0|    return Status::OK();
  335|  54.1k|  } else if (!result.ok()) {
  ------------------
  |  Branch (335:14): [True: 0, False: 54.1k]
  ------------------
  336|      0|    if (!notsup.ok()) {
  ------------------
  |  Branch (336:9): [True: 0, False: 0]
  ------------------
  337|      0|      notsup.PermitUncheckedError();
  338|      0|    }
  339|      0|    return result;
  340|  54.1k|  } else if (config_options.ignore_unsupported_options) {
  ------------------
  |  Branch (340:14): [True: 54.1k, False: 0]
  ------------------
  341|  54.1k|    if (!notsup.ok()) {
  ------------------
  |  Branch (341:9): [True: 0, False: 54.1k]
  ------------------
  342|      0|      notsup.PermitUncheckedError();
  343|      0|    }
  344|  54.1k|    return Status::OK();
  345|  54.1k|  } else {
  346|      0|    return notsup;
  347|      0|  }
  348|  54.1k|}
_ZN7rocksdb18ConfigurableHelper27ConfigureCustomizableOptionERKNS_13ConfigOptionsERNS_12ConfigurableERKNS_14OptionTypeInfoERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEESH_SH_Pv:
  368|   135k|    const std::string& name, const std::string& value, void* opt_ptr) {
  369|   135k|  Customizable* custom = opt_info.AsRawPointer<Customizable>(opt_ptr);
  370|   135k|  ConfigOptions copy = config_options;
  371|   135k|  if (opt_info.IsMutable()) {
  ------------------
  |  Branch (371:7): [True: 9.02k, False: 126k]
  ------------------
  372|       |    // This option is mutable. Pass that property on to any subsequent calls
  373|  9.02k|    copy.mutable_options_only = false;
  374|  9.02k|  }
  375|       |
  376|   135k|  if (opt_info.IsMutable() || !config_options.mutable_options_only) {
  ------------------
  |  Branch (376:7): [True: 9.02k, False: 126k]
  |  Branch (376:31): [True: 126k, False: 0]
  ------------------
  377|       |    // Either the option is mutable, or we are processing all of the options
  378|   135k|    if (opt_name == name || name == OptionTypeInfo::kIdPropName() ||
  ------------------
  |  Branch (378:9): [True: 135k, False: 0]
  |  Branch (378:9): [True: 135k, False: 0]
  |  Branch (378:29): [True: 0, False: 0]
  ------------------
  379|   135k|        EndsWith(opt_name, OptionTypeInfo::kIdPropSuffix())) {
  ------------------
  |  Branch (379:9): [True: 0, False: 0]
  ------------------
  380|   135k|      return configurable.ParseOption(copy, opt_info, name, value, opt_ptr);
  381|   135k|    } else if (value.empty()) {
  ------------------
  |  Branch (381:16): [True: 0, False: 0]
  ------------------
  382|      0|      return Status::OK();
  383|      0|    } else if (custom == nullptr || !StartsWith(name, custom->GetId() + ".")) {
  ------------------
  |  Branch (383:16): [True: 0, False: 0]
  |  Branch (383:16): [True: 0, False: 0]
  |  Branch (383:37): [True: 0, False: 0]
  ------------------
  384|      0|      return configurable.ParseOption(copy, opt_info, name, value, opt_ptr);
  385|      0|    } else if (value.find('=') != std::string::npos) {
  ------------------
  |  Branch (385:16): [True: 0, False: 0]
  ------------------
  386|      0|      return custom->ConfigureFromString(copy, value);
  387|      0|    } else {
  388|      0|      return custom->ConfigureOption(copy, name, value);
  389|      0|    }
  390|   135k|  } else {
  391|       |    // We are processing immutable options, which means that we cannot change
  392|       |    // the Customizable object itself, but could change its mutable properties.
  393|       |    // Check to make sure that nothing is trying to change the Customizable
  394|      0|    if (custom == nullptr) {
  ------------------
  |  Branch (394:9): [True: 0, False: 0]
  ------------------
  395|       |      // We do not have a Customizable to configure.  This is OK if the
  396|       |      // value is empty (nothing being configured) but an error otherwise
  397|      0|      if (value.empty()) {
  ------------------
  |  Branch (397:11): [True: 0, False: 0]
  ------------------
  398|      0|        return Status::OK();
  399|      0|      } else {
  400|      0|        return Status::InvalidArgument("Option not changeable: " + opt_name);
  401|      0|      }
  402|      0|    } else if (EndsWith(opt_name, OptionTypeInfo::kIdPropSuffix()) ||
  ------------------
  |  Branch (402:16): [True: 0, False: 0]
  |  Branch (402:16): [True: 0, False: 0]
  ------------------
  403|      0|               name == OptionTypeInfo::kIdPropName()) {
  ------------------
  |  Branch (403:16): [True: 0, False: 0]
  ------------------
  404|       |      // We have a property of the form "id=value" or "table.id=value"
  405|       |      // This is OK if we ID/value matches the current customizable object
  406|      0|      if (custom->GetId() == value) {
  ------------------
  |  Branch (406:11): [True: 0, False: 0]
  ------------------
  407|      0|        return Status::OK();
  408|      0|      } else {
  409|      0|        return Status::InvalidArgument("Option not changeable: " + opt_name);
  410|      0|      }
  411|      0|    } else if (opt_name == name) {
  ------------------
  |  Branch (411:16): [True: 0, False: 0]
  ------------------
  412|       |      // The properties are of one of forms:
  413|       |      //    name = { id = id; prop1 = value1; ... }
  414|       |      //    name = { prop1=value1; prop2=value2; ... }
  415|       |      //    name = ID
  416|       |      // Convert the value to a map and extract the ID
  417|       |      // If the ID does not match that of the current customizable, return an
  418|       |      // error. Otherwise, update the current customizable via the properties
  419|       |      // map
  420|      0|      std::unordered_map<std::string, std::string> props;
  421|      0|      std::string id;
  422|      0|      Status s =
  423|      0|          Configurable::GetOptionsMap(value, custom->GetId(), &id, &props);
  424|      0|      if (!s.ok()) {
  ------------------
  |  Branch (424:11): [True: 0, False: 0]
  ------------------
  425|      0|        return s;
  426|      0|      } else if (custom->GetId() != id) {
  ------------------
  |  Branch (426:18): [True: 0, False: 0]
  ------------------
  427|      0|        return Status::InvalidArgument("Option not changeable: " + opt_name);
  428|      0|      } else if (props.empty()) {
  ------------------
  |  Branch (428:18): [True: 0, False: 0]
  ------------------
  429|      0|        return Status::OK();
  430|      0|      } else {
  431|      0|        return custom->ConfigureFromMap(copy, props);
  432|      0|      }
  433|      0|    } else {
  434|       |      // Attempting to configure one of the properties of the customizable
  435|       |      // Let it through
  436|      0|      return custom->ConfigureOption(copy, name, value);
  437|      0|    }
  438|      0|  }
  439|   135k|}
_ZN7rocksdb18ConfigurableHelper15ConfigureOptionERKNS_13ConfigOptionsERNS_12ConfigurableERKNS_14OptionTypeInfoERKNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEESH_SH_Pv:
  444|  2.01M|    const std::string& name, const std::string& value, void* opt_ptr) {
  445|  2.01M|  if (opt_info.IsCustomizable()) {
  ------------------
  |  Branch (445:7): [True: 135k, False: 1.87M]
  ------------------
  446|   135k|    return ConfigureCustomizableOption(config_options, configurable, opt_info,
  447|   135k|                                       opt_name, name, value, opt_ptr);
  448|  1.87M|  } else if (opt_name == name) {
  ------------------
  |  Branch (448:14): [True: 1.87M, False: 0]
  ------------------
  449|  1.87M|    return configurable.ParseOption(config_options, opt_info, opt_name, value,
  450|  1.87M|                                    opt_ptr);
  451|  1.87M|  } else if (opt_info.IsStruct() || opt_info.IsConfigurable()) {
  ------------------
  |  Branch (451:14): [True: 0, False: 0]
  |  Branch (451:37): [True: 0, False: 0]
  ------------------
  452|      0|    return configurable.ParseOption(config_options, opt_info, name, value,
  453|      0|                                    opt_ptr);
  454|      0|  } else {
  455|      0|    return Status::NotFound("Could not find option: ", name);
  456|      0|  }
  457|  2.01M|}
_ZNK7rocksdb12Configurable15GetOptionStringERKNS_13ConfigOptionsEPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  466|  99.3k|                                     std::string* result) const {
  467|  99.3k|  assert(result);
  468|  99.3k|  result->clear();
  469|  99.3k|  return ConfigurableHelper::SerializeOptions(config_options, *this, "",
  470|  99.3k|                                              result);
  471|  99.3k|}
_ZNK7rocksdb12Configurable8ToStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  474|  90.2k|                                   const std::string& prefix) const {
  475|  90.2k|  std::string result = SerializeOptions(config_options, prefix);
  476|  90.2k|  if (result.empty() || result.find('=') == std::string::npos) {
  ------------------
  |  Branch (476:7): [True: 0, False: 90.2k]
  |  Branch (476:25): [True: 81.2k, False: 9.02k]
  ------------------
  477|  81.2k|    return result;
  478|  81.2k|  } else {
  479|  9.02k|    return "{" + result + "}";
  480|  9.02k|  }
  481|  90.2k|}
_ZNK7rocksdb12Configurable16SerializeOptionsERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  484|  90.2k|                                           const std::string& header) const {
  485|  90.2k|  std::string result;
  486|  90.2k|  Status s = ConfigurableHelper::SerializeOptions(config_options, *this, header,
  487|  90.2k|                                                  &result);
  488|  90.2k|  assert(s.ok());
  489|  90.2k|  return result;
  490|  90.2k|}
_ZN7rocksdb18ConfigurableHelper16SerializeOptionsERKNS_13ConfigOptionsERKNS_12ConfigurableERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEPSD_:
  531|   189k|                                            std::string* result) {
  532|   189k|  assert(result);
  533|   189k|  for (auto const& opt_iter : configurable.options_) {
  ------------------
  |  Branch (533:29): [True: 135k, False: 189k]
  ------------------
  534|   135k|    if (opt_iter.type_map != nullptr) {
  ------------------
  |  Branch (534:9): [True: 135k, False: 0]
  ------------------
  535|  5.51M|      for (const auto& map_iter : *(opt_iter.type_map)) {
  ------------------
  |  Branch (535:33): [True: 5.51M, False: 135k]
  ------------------
  536|  5.51M|        const auto& opt_name = map_iter.first;
  537|  5.51M|        const auto& opt_info = map_iter.second;
  538|  5.51M|        if (opt_info.ShouldSerialize()) {
  ------------------
  |  Branch (538:13): [True: 4.42M, False: 1.09M]
  ------------------
  539|  4.42M|          std::string value;
  540|  4.42M|          Status s;
  541|  4.42M|          if (!config_options.mutable_options_only) {
  ------------------
  |  Branch (541:15): [True: 4.42M, False: 0]
  ------------------
  542|  4.42M|            s = opt_info.Serialize(config_options, prefix + opt_name,
  543|  4.42M|                                   opt_iter.opt_ptr, &value);
  544|  4.42M|          } else if (opt_info.IsMutable()) {
  ------------------
  |  Branch (544:22): [True: 0, False: 0]
  ------------------
  545|      0|            ConfigOptions copy = config_options;
  546|      0|            copy.mutable_options_only = false;
  547|      0|            s = opt_info.Serialize(copy, prefix + opt_name, opt_iter.opt_ptr,
  548|      0|                                   &value);
  549|      0|          } else if (opt_info.IsConfigurable()) {
  ------------------
  |  Branch (549:22): [True: 0, False: 0]
  ------------------
  550|       |            // If it is a Configurable and we are either printing all of the
  551|       |            // details or not printing only the name, this option should be
  552|       |            // included in the list
  553|      0|            if (config_options.IsDetailed() ||
  ------------------
  |  Branch (553:17): [True: 0, False: 0]
  ------------------
  554|      0|                !opt_info.IsEnabled(OptionTypeFlags::kStringNameOnly)) {
  ------------------
  |  Branch (554:17): [True: 0, False: 0]
  ------------------
  555|      0|              s = opt_info.Serialize(config_options, prefix + opt_name,
  556|      0|                                     opt_iter.opt_ptr, &value);
  557|      0|            }
  558|      0|          }
  559|  4.42M|          if (!s.ok()) {
  ------------------
  |  Branch (559:15): [True: 0, False: 4.42M]
  ------------------
  560|      0|            return s;
  561|  4.42M|          } else if (!value.empty()) {
  ------------------
  |  Branch (561:22): [True: 4.31M, False: 108k]
  ------------------
  562|       |            // <prefix><opt_name>=<value><delimiter>
  563|  4.31M|            result->append(prefix + opt_name + "=" + value +
  564|  4.31M|                           config_options.delimiter);
  565|  4.31M|          }
  566|  4.42M|        }
  567|  5.51M|      }
  568|   135k|    }
  569|   135k|  }
  570|   189k|  return Status::OK();
  571|   189k|}
_ZNK7rocksdb12Configurable13AreEquivalentERKNS_13ConfigOptionsEPKS0_PNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  617|  36.1k|                                 std::string* name) const {
  618|  36.1k|  assert(name);
  619|  36.1k|  name->clear();
  620|  36.1k|  if (this == other || config_options.IsCheckDisabled()) {
  ------------------
  |  Branch (620:7): [True: 0, False: 36.1k]
  |  Branch (620:24): [True: 0, False: 36.1k]
  ------------------
  621|      0|    return true;
  622|  36.1k|  } else if (other != nullptr) {
  ------------------
  |  Branch (622:14): [True: 36.1k, False: 0]
  ------------------
  623|  36.1k|    return ConfigurableHelper::AreEquivalent(config_options, *this, *other,
  624|  36.1k|                                             name);
  625|  36.1k|  } else {
  626|      0|    return false;
  627|      0|  }
  628|  36.1k|}
_ZNK7rocksdb12Configurable15OptionsAreEqualERKNS_13ConfigOptionsERKNS_14OptionTypeInfoERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEPKvSH_PSD_:
  635|   288k|                                   std::string* mismatch) const {
  636|   288k|  if (opt_info.AreEqual(config_options, opt_name, this_ptr, that_ptr,
  ------------------
  |  Branch (636:7): [True: 288k, False: 0]
  ------------------
  637|   288k|                        mismatch)) {
  638|   288k|    return true;
  639|   288k|  } else if (opt_info.AreEqualByName(config_options, opt_name, this_ptr,
  ------------------
  |  Branch (639:14): [True: 0, False: 0]
  ------------------
  640|      0|                                     that_ptr)) {
  641|      0|    *mismatch = "";
  642|      0|    return true;
  643|      0|  } else {
  644|      0|    return false;
  645|      0|  }
  646|   288k|}
_ZN7rocksdb18ConfigurableHelper13AreEquivalentERKNS_13ConfigOptionsERKNS_12ConfigurableES6_PNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE:
  651|  36.1k|                                       std::string* mismatch) {
  652|  36.1k|  assert(mismatch != nullptr);
  653|  54.1k|  for (auto const& o : this_one.options_) {
  ------------------
  |  Branch (653:22): [True: 54.1k, False: 36.1k]
  ------------------
  654|  54.1k|    const auto this_offset = this_one.GetOptionsPtr(o.name);
  655|  54.1k|    const auto that_offset = that_one.GetOptionsPtr(o.name);
  656|  54.1k|    if (this_offset != that_offset) {
  ------------------
  |  Branch (656:9): [True: 54.1k, False: 0]
  ------------------
  657|  54.1k|      if (this_offset == nullptr || that_offset == nullptr) {
  ------------------
  |  Branch (657:11): [True: 0, False: 54.1k]
  |  Branch (657:37): [True: 0, False: 54.1k]
  ------------------
  658|      0|        return false;
  659|  54.1k|      } else if (o.type_map != nullptr) {
  ------------------
  |  Branch (659:18): [True: 54.1k, False: 0]
  ------------------
  660|  2.22M|        for (const auto& map_iter : *(o.type_map)) {
  ------------------
  |  Branch (660:35): [True: 2.22M, False: 54.1k]
  ------------------
  661|  2.22M|          const auto& opt_info = map_iter.second;
  662|  2.22M|          if (config_options.IsCheckEnabled(opt_info.GetSanityLevel())) {
  ------------------
  |  Branch (662:15): [True: 1.72M, False: 505k]
  ------------------
  663|  1.72M|            if (!config_options.mutable_options_only) {
  ------------------
  |  Branch (663:17): [True: 1.72M, False: 0]
  ------------------
  664|  1.72M|              if (!this_one.OptionsAreEqual(config_options, opt_info,
  ------------------
  |  Branch (664:19): [True: 0, False: 1.72M]
  ------------------
  665|  1.72M|                                            map_iter.first, this_offset,
  666|  1.72M|                                            that_offset, mismatch)) {
  667|      0|                return false;
  668|      0|              }
  669|  1.72M|            } else if (opt_info.IsMutable()) {
  ------------------
  |  Branch (669:24): [True: 0, False: 0]
  ------------------
  670|      0|              ConfigOptions copy = config_options;
  671|      0|              copy.mutable_options_only = false;
  672|      0|              if (!this_one.OptionsAreEqual(copy, opt_info, map_iter.first,
  ------------------
  |  Branch (672:19): [True: 0, False: 0]
  ------------------
  673|      0|                                            this_offset, that_offset,
  674|      0|                                            mismatch)) {
  675|      0|                return false;
  676|      0|              }
  677|      0|            }
  678|  1.72M|          }
  679|  2.22M|        }
  680|  54.1k|      }
  681|  54.1k|    }
  682|  54.1k|  }
  683|  36.1k|  return true;
  684|  36.1k|}
_ZN7rocksdb12Configurable13GetOptionsMapERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_PS7_PNS1_13unordered_mapIS7_S7_NS1_4hashIS7_EENS1_8equal_toIS7_EENS5_INS1_4pairIS8_S7_EEEEEE:
  688|  54.1k|    std::unordered_map<std::string, std::string>* props) {
  689|  54.1k|  assert(id);
  690|  54.1k|  assert(props);
  691|  54.1k|  Status status;
  692|  54.1k|  if (value.empty() || value == kNullptrString) {
  ------------------
  |  Branch (692:7): [True: 0, False: 54.1k]
  |  Branch (692:24): [True: 0, False: 54.1k]
  ------------------
  693|      0|    *id = default_id;
  694|  54.1k|  } else if (value.find('=') == std::string::npos) {
  ------------------
  |  Branch (694:14): [True: 54.1k, False: 0]
  ------------------
  695|  54.1k|    *id = value;
  696|  54.1k|  } else {
  697|      0|    status = StringToMap(value, props);
  698|      0|    if (!status.ok()) {       // There was an error creating the map.
  ------------------
  |  Branch (698:9): [True: 0, False: 0]
  ------------------
  699|      0|      *id = value;            // Treat the value as id
  700|      0|      props->clear();         // Clear the properties
  701|      0|      status = Status::OK();  // and ignore the error
  702|      0|    } else {
  703|      0|      auto iter = props->find(OptionTypeInfo::kIdPropName());
  704|      0|      if (iter != props->end()) {
  ------------------
  |  Branch (704:11): [True: 0, False: 0]
  ------------------
  705|      0|        *id = iter->second;
  706|      0|        props->erase(iter);
  707|      0|        if (*id == kNullptrString) {
  ------------------
  |  Branch (707:13): [True: 0, False: 0]
  ------------------
  708|      0|          id->clear();
  709|      0|        }
  710|      0|      } else if (!default_id.empty()) {
  ------------------
  |  Branch (710:18): [True: 0, False: 0]
  ------------------
  711|      0|        *id = default_id;
  712|      0|      } else {           // No id property and no default
  713|      0|        *id = value;     // Treat the value as id
  714|      0|        props->clear();  // Clear the properties
  715|      0|      }
  716|      0|    }
  717|      0|  }
  718|  54.1k|  return status;
  719|  54.1k|}

_ZNK7rocksdb12Customizable13GetOptionNameERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   19|   577k|std::string Customizable::GetOptionName(const std::string& long_name) const {
   20|   577k|  const std::string& name = Name();
   21|   577k|  size_t name_len = name.size();
   22|   577k|  if (long_name.size() > name_len + 1 &&
  ------------------
  |  Branch (22:7): [True: 433k, False: 144k]
  ------------------
   23|   577k|      long_name.compare(0, name_len, name) == 0 &&
  ------------------
  |  Branch (23:7): [True: 0, False: 433k]
  ------------------
   24|   577k|      long_name.at(name_len) == '.') {
  ------------------
  |  Branch (24:7): [True: 0, False: 0]
  ------------------
   25|      0|    return long_name.substr(name_len + 1);
   26|   577k|  } else {
   27|   577k|    return Configurable::GetOptionName(long_name);
   28|   577k|  }
   29|   577k|}
_ZNK7rocksdb12Customizable16SerializeOptionsERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
   50|  90.2k|                                           const std::string& prefix) const {
   51|  90.2k|  std::string result;
   52|  90.2k|  std::string parent;
   53|  90.2k|  std::string id = GetId();
   54|  90.2k|  if (!config_options.IsShallow() && !id.empty()) {
  ------------------
  |  Branch (54:7): [True: 90.2k, False: 0]
  |  Branch (54:38): [True: 90.2k, False: 0]
  ------------------
   55|  90.2k|    parent = Configurable::SerializeOptions(config_options, "");
   56|  90.2k|  }
   57|  90.2k|  if (parent.empty()) {
  ------------------
  |  Branch (57:7): [True: 81.2k, False: 9.02k]
  ------------------
   58|  81.2k|    result = id;
   59|  81.2k|  } else {
   60|  9.02k|    result.append(prefix);
   61|  9.02k|    result.append(OptionTypeInfo::kIdPropName());
   62|  9.02k|    result.append("=");
   63|  9.02k|    result.append(id);
   64|  9.02k|    result.append(config_options.delimiter);
   65|  9.02k|    result.append(parent);
   66|  9.02k|  }
   67|  90.2k|  return result;
   68|  90.2k|}
_ZNK7rocksdb12Customizable13AreEquivalentERKNS_13ConfigOptionsEPKNS_12ConfigurableEPNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE:
   73|  27.0k|                                 std::string* mismatch) const {
   74|  27.0k|  if (config_options.sanity_level > ConfigOptions::kSanityLevelNone &&
  ------------------
  |  Branch (74:7): [True: 27.0k, False: 0]
  ------------------
   75|  27.0k|      this != other) {
  ------------------
  |  Branch (75:7): [True: 27.0k, False: 0]
  ------------------
   76|  27.0k|    const Customizable* custom = static_cast<const Customizable*>(other);
   77|  27.0k|    if (custom == nullptr) {  // Cast failed
  ------------------
  |  Branch (77:9): [True: 0, False: 27.0k]
  ------------------
   78|      0|      return false;
   79|  27.0k|    } else if (GetId() != custom->GetId()) {
  ------------------
  |  Branch (79:16): [True: 0, False: 27.0k]
  ------------------
   80|      0|      *mismatch = OptionTypeInfo::kIdPropName();
   81|      0|      return false;
   82|  27.0k|    } else if (config_options.sanity_level >
  ------------------
  |  Branch (82:16): [True: 18.0k, False: 9.02k]
  ------------------
   83|  27.0k|               ConfigOptions::kSanityLevelLooselyCompatible) {
   84|  18.0k|      bool matches =
   85|  18.0k|          Configurable::AreEquivalent(config_options, other, mismatch);
   86|  18.0k|      return matches;
   87|  18.0k|    }
   88|  27.0k|  }
   89|  9.02k|  return true;
   90|  27.0k|}
_ZN7rocksdb12Customizable13GetOptionsMapERKNS_13ConfigOptionsEPKS0_RKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEPSC_PNS6_13unordered_mapISC_SC_NS6_4hashISC_EENS6_8equal_toISC_EENSA_INS6_4pairISD_SC_EEEEEE:
   95|   130k|    std::unordered_map<std::string, std::string>* props) {
   96|   130k|  Status status;
   97|   130k|  if (value.empty() || value == kNullptrString) {
  ------------------
  |  Branch (97:7): [True: 0, False: 130k]
  |  Branch (97:24): [True: 76.7k, False: 54.1k]
  ------------------
   98|  76.7k|    *id = "";
   99|  76.7k|    props->clear();
  100|  76.7k|  } else if (customizable != nullptr) {
  ------------------
  |  Branch (100:14): [True: 36.1k, False: 18.0k]
  ------------------
  101|  36.1k|    status =
  102|  36.1k|        Configurable::GetOptionsMap(value, customizable->GetId(), id, props);
  103|  36.1k|    if (status.ok() && customizable->IsInstanceOf(*id)) {
  ------------------
  |  Branch (103:9): [True: 36.1k, False: 0]
  |  Branch (103:24): [True: 36.1k, False: 0]
  ------------------
  104|       |      // The new ID and the old ID match, so the objects are the same type.
  105|       |      // Try to get the existing options, ignoring any errors
  106|  36.1k|      ConfigOptions embedded = config_options;
  107|  36.1k|      embedded.delimiter = ";";
  108|  36.1k|      std::string curr_opts;
  109|  36.1k|      if (customizable->GetOptionString(embedded, &curr_opts).ok()) {
  ------------------
  |  Branch (109:11): [True: 36.1k, False: 0]
  ------------------
  110|  36.1k|        std::unordered_map<std::string, std::string> curr_props;
  111|  36.1k|        if (StringToMap(curr_opts, &curr_props).ok()) {
  ------------------
  |  Branch (111:13): [True: 36.1k, False: 0]
  ------------------
  112|  36.1k|          props->insert(curr_props.begin(), curr_props.end());
  113|  36.1k|        }
  114|  36.1k|      }
  115|  36.1k|    }
  116|  36.1k|  } else {
  117|  18.0k|    status = Configurable::GetOptionsMap(value, "", id, props);
  118|  18.0k|  }
  119|   130k|  return status;
  120|   130k|}
_ZN7rocksdb12Customizable18ConfigureNewObjectERKNS_13ConfigOptionsEPS0_RKNSt3__113unordered_mapINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_NS5_4hashISC_EENS5_8equal_toISC_EENSA_INS5_4pairIKSC_SC_EEEEEE:
  124|  45.1k|    const std::unordered_map<std::string, std::string>& opt_map) {
  125|  45.1k|  Status status;
  126|  45.1k|  if (object != nullptr) {
  ------------------
  |  Branch (126:7): [True: 45.1k, False: 0]
  ------------------
  127|  45.1k|    status = object->ConfigureFromMap(config_options, opt_map);
  128|  45.1k|  } else if (!opt_map.empty()) {
  ------------------
  |  Branch (128:14): [True: 0, False: 0]
  ------------------
  129|      0|    status = Status::InvalidArgument("Cannot configure null object ");
  130|      0|  }
  131|  45.1k|  return status;
  132|  45.1k|}

_ZN7rocksdb23DBOptionsAsConfigurableERKNS_9DBOptionsEPKNSt3__113unordered_mapINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_NS3_4hashISA_EENS3_8equal_toISA_EENS8_INS3_4pairIKSA_SA_EEEEEE:
  687|  45.1k|    const std::unordered_map<std::string, std::string>* opt_map) {
  688|  45.1k|  std::unique_ptr<Configurable> ptr(new DBOptionsConfigurable(opts, opt_map));
  689|  45.1k|  return ptr;
  690|  45.1k|}
_ZN7rocksdb18ImmutableDBOptionsC2Ev:
  692|  45.1k|ImmutableDBOptions::ImmutableDBOptions() : ImmutableDBOptions(Options()) {}
_ZN7rocksdb18ImmutableDBOptionsC2ERKNS_9DBOptionsE:
  781|   121k|      follower_catchup_retry_wait_ms(options.follower_catchup_retry_wait_ms) {
  782|   121k|  fs = env->GetFileSystem();
  783|   121k|  clock = env->GetSystemClock().get();
  784|   121k|  logger = info_log.get();
  785|   121k|  stats = statistics.get();
  786|   121k|}
_ZNK7rocksdb18ImmutableDBOptions4DumpEPNS_6LoggerE:
  788|  9.02k|void ImmutableDBOptions::Dump(Logger* log) const {
  789|  9.02k|  ROCKS_LOG_HEADER(log, "                        Options.error_if_exists: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  790|  9.02k|                   error_if_exists);
  791|  9.02k|  ROCKS_LOG_HEADER(log, "                      Options.create_if_missing: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  792|  9.02k|                   create_if_missing);
  793|  9.02k|  ROCKS_LOG_HEADER(log, "                        Options.paranoid_checks: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  794|  9.02k|                   paranoid_checks);
  795|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.flush_verify_memtable_count: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  796|  9.02k|                   flush_verify_memtable_count);
  797|  9.02k|  ROCKS_LOG_HEADER(log, "         Options.compaction_verify_record_count: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  798|  9.02k|                   compaction_verify_record_count);
  799|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  800|  9.02k|                   "                              "
  801|  9.02k|                   "Options.track_and_verify_wals_in_manifest: %d",
  802|  9.02k|                   track_and_verify_wals_in_manifest);
  803|  9.02k|  ROCKS_LOG_HEADER(log, "       Options.verify_sst_unique_id_in_manifest: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  804|  9.02k|                   verify_sst_unique_id_in_manifest);
  805|  9.02k|  ROCKS_LOG_HEADER(log, "                                    Options.env: %p",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  806|  9.02k|                   env);
  807|  9.02k|  ROCKS_LOG_HEADER(log, "                                     Options.fs: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  808|  9.02k|                   fs->Name());
  809|  9.02k|  ROCKS_LOG_HEADER(log, "                               Options.info_log: %p",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  810|  9.02k|                   info_log.get());
  811|  9.02k|  ROCKS_LOG_HEADER(log, "               Options.max_file_opening_threads: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  812|  9.02k|                   max_file_opening_threads);
  813|  9.02k|  ROCKS_LOG_HEADER(log, "                             Options.statistics: %p",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  814|  9.02k|                   stats);
  815|  9.02k|  if (stats) {
  ------------------
  |  Branch (815:7): [True: 0, False: 9.02k]
  ------------------
  816|      0|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|      0|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  817|      0|        log, "                             Options.statistics stats level: %u",
  818|      0|        stats->get_stats_level());
  819|      0|  }
  820|  9.02k|  ROCKS_LOG_HEADER(log, "                              Options.use_fsync: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  821|  9.02k|                   use_fsync);
  822|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  823|  9.02k|      log, "                      Options.max_log_file_size: %" ROCKSDB_PRIszt,
  824|  9.02k|      max_log_file_size);
  825|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  826|  9.02k|                   "                 Options.max_manifest_file_size: %" PRIu64,
  827|  9.02k|                   max_manifest_file_size);
  828|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  829|  9.02k|      log, "                  Options.log_file_time_to_roll: %" ROCKSDB_PRIszt,
  830|  9.02k|      log_file_time_to_roll);
  831|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  832|  9.02k|      log, "                      Options.keep_log_file_num: %" ROCKSDB_PRIszt,
  833|  9.02k|      keep_log_file_num);
  834|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  835|  9.02k|      log, "                   Options.recycle_log_file_num: %" ROCKSDB_PRIszt,
  836|  9.02k|      recycle_log_file_num);
  837|  9.02k|  ROCKS_LOG_HEADER(log, "                        Options.allow_fallocate: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  838|  9.02k|                   allow_fallocate);
  839|  9.02k|  ROCKS_LOG_HEADER(log, "                       Options.allow_mmap_reads: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  840|  9.02k|                   allow_mmap_reads);
  841|  9.02k|  ROCKS_LOG_HEADER(log, "                      Options.allow_mmap_writes: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  842|  9.02k|                   allow_mmap_writes);
  843|  9.02k|  ROCKS_LOG_HEADER(log, "                       Options.use_direct_reads: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  844|  9.02k|                   use_direct_reads);
  845|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  846|  9.02k|                   "                       "
  847|  9.02k|                   "Options.use_direct_io_for_flush_and_compaction: %d",
  848|  9.02k|                   use_direct_io_for_flush_and_compaction);
  849|  9.02k|  ROCKS_LOG_HEADER(log, "         Options.create_missing_column_families: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  850|  9.02k|                   create_missing_column_families);
  851|  9.02k|  ROCKS_LOG_HEADER(log, "                             Options.db_log_dir: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  852|  9.02k|                   db_log_dir.c_str());
  853|  9.02k|  ROCKS_LOG_HEADER(log, "                                Options.wal_dir: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  854|  9.02k|                   wal_dir.c_str());
  855|  9.02k|  ROCKS_LOG_HEADER(log, "               Options.table_cache_numshardbits: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  856|  9.02k|                   table_cache_numshardbits);
  857|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  858|  9.02k|                   "                        Options.WAL_ttl_seconds: %" PRIu64,
  859|  9.02k|                   WAL_ttl_seconds);
  860|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  861|  9.02k|                   "                      Options.WAL_size_limit_MB: %" PRIu64,
  862|  9.02k|                   WAL_size_limit_MB);
  863|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  864|  9.02k|                   "                       "
  865|  9.02k|                   "Options.max_write_batch_group_size_bytes: %" PRIu64,
  866|  9.02k|                   max_write_batch_group_size_bytes);
  867|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  868|  9.02k|      log, "            Options.manifest_preallocation_size: %" ROCKSDB_PRIszt,
  869|  9.02k|      manifest_preallocation_size);
  870|  9.02k|  ROCKS_LOG_HEADER(log, "                    Options.is_fd_close_on_exec: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  871|  9.02k|                   is_fd_close_on_exec);
  872|  9.02k|  ROCKS_LOG_HEADER(log, "                  Options.advise_random_on_open: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  873|  9.02k|                   advise_random_on_open);
  874|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  875|  9.02k|      log, "                   Options.db_write_buffer_size: %" ROCKSDB_PRIszt,
  876|  9.02k|      db_write_buffer_size);
  877|  9.02k|  ROCKS_LOG_HEADER(log, "                   Options.write_buffer_manager: %p",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  878|  9.02k|                   write_buffer_manager.get());
  879|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  880|  9.02k|      log, "          Options.random_access_max_buffer_size: %" ROCKSDB_PRIszt,
  881|  9.02k|      random_access_max_buffer_size);
  882|  9.02k|  ROCKS_LOG_HEADER(log, "                     Options.use_adaptive_mutex: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  883|  9.02k|                   use_adaptive_mutex);
  884|  9.02k|  ROCKS_LOG_HEADER(log, "                           Options.rate_limiter: %p",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  885|  9.02k|                   rate_limiter.get());
  886|  9.02k|  Header(
  887|  9.02k|      log, "    Options.sst_file_manager.rate_bytes_per_sec: %" PRIi64,
  888|  9.02k|      sst_file_manager ? sst_file_manager->GetDeleteRateBytesPerSecond() : 0);
  ------------------
  |  Branch (888:7): [True: 9.02k, False: 0]
  ------------------
  889|  9.02k|  ROCKS_LOG_HEADER(log, "                      Options.wal_recovery_mode: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  890|  9.02k|                   static_cast<int>(wal_recovery_mode));
  891|  9.02k|  ROCKS_LOG_HEADER(log, "                 Options.enable_thread_tracking: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  892|  9.02k|                   enable_thread_tracking);
  893|  9.02k|  ROCKS_LOG_HEADER(log, "                 Options.enable_pipelined_write: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  894|  9.02k|                   enable_pipelined_write);
  895|  9.02k|  ROCKS_LOG_HEADER(log, "                 Options.unordered_write: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  896|  9.02k|                   unordered_write);
  897|  9.02k|  ROCKS_LOG_HEADER(log, "        Options.allow_concurrent_memtable_write: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  898|  9.02k|                   allow_concurrent_memtable_write);
  899|  9.02k|  ROCKS_LOG_HEADER(log, "     Options.enable_write_thread_adaptive_yield: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  900|  9.02k|                   enable_write_thread_adaptive_yield);
  901|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  902|  9.02k|                   "            Options.write_thread_max_yield_usec: %" PRIu64,
  903|  9.02k|                   write_thread_max_yield_usec);
  904|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  905|  9.02k|                   "           Options.write_thread_slow_yield_usec: %" PRIu64,
  906|  9.02k|                   write_thread_slow_yield_usec);
  907|  9.02k|  if (row_cache) {
  ------------------
  |  Branch (907:7): [True: 0, False: 9.02k]
  ------------------
  908|      0|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|      0|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  909|      0|        log,
  910|      0|        "                              Options.row_cache: %" ROCKSDB_PRIszt,
  911|      0|        row_cache->GetCapacity());
  912|  9.02k|  } else {
  913|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  914|  9.02k|                     "                              Options.row_cache: None");
  915|  9.02k|  }
  916|  9.02k|  ROCKS_LOG_HEADER(log, "                             Options.wal_filter: %s",
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 9.02k]
  |  |  ------------------
  ------------------
  917|  9.02k|                   wal_filter ? wal_filter->Name() : "None");
  918|       |
  919|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.avoid_flush_during_recovery: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  920|  9.02k|                   avoid_flush_during_recovery);
  921|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.allow_ingest_behind: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  922|  9.02k|                   allow_ingest_behind);
  923|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.two_write_queues: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  924|  9.02k|                   two_write_queues);
  925|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.manual_wal_flush: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  926|  9.02k|                   manual_wal_flush);
  927|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.wal_compression: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  928|  9.02k|                   wal_compression);
  929|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  930|  9.02k|                   "            Options.background_close_inactive_wals: %d",
  931|  9.02k|                   background_close_inactive_wals);
  932|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.atomic_flush: %d", atomic_flush);
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  933|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  934|  9.02k|                   "            Options.avoid_unnecessary_blocking_io: %d",
  935|  9.02k|                   avoid_unnecessary_blocking_io);
  936|  9.02k|  ROCKS_LOG_HEADER(log, "                Options.persist_stats_to_disk: %u",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  937|  9.02k|                   persist_stats_to_disk);
  938|  9.02k|  ROCKS_LOG_HEADER(log, "                Options.write_dbid_to_manifest: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  939|  9.02k|                   write_dbid_to_manifest);
  940|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  941|  9.02k|      log, "                Options.log_readahead_size: %" ROCKSDB_PRIszt,
  942|  9.02k|      log_readahead_size);
  943|  9.02k|  ROCKS_LOG_HEADER(log, "                Options.file_checksum_gen_factory: %s",
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 9.02k]
  |  |  ------------------
  ------------------
  944|  9.02k|                   file_checksum_gen_factory ? file_checksum_gen_factory->Name()
  945|  9.02k|                                             : kUnknownFileChecksumFuncName);
  946|  9.02k|  ROCKS_LOG_HEADER(log, "                Options.best_efforts_recovery: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  947|  9.02k|                   static_cast<int>(best_efforts_recovery));
  948|  9.02k|  ROCKS_LOG_HEADER(log, "               Options.max_bgerror_resume_count: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  949|  9.02k|                   max_bgerror_resume_count);
  950|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  951|  9.02k|                   "           Options.bgerror_resume_retry_interval: %" PRIu64,
  952|  9.02k|                   bgerror_resume_retry_interval);
  953|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.allow_data_in_errors: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  954|  9.02k|                   allow_data_in_errors);
  955|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.db_host_id: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  956|  9.02k|                   db_host_id.c_str());
  957|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.enforce_single_del_contracts: %s",
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 9.02k, False: 0]
  |  |  ------------------
  ------------------
  958|  9.02k|                   enforce_single_del_contracts ? "true" : "false");
  959|  9.02k|}
_ZNK7rocksdb18ImmutableDBOptions20IsWalDirSameAsDBPathEv:
  961|  36.1k|bool ImmutableDBOptions::IsWalDirSameAsDBPath() const {
  962|  36.1k|  assert(!db_paths.empty());
  963|  36.1k|  return IsWalDirSameAsDBPath(db_paths[0].path);
  964|  36.1k|}
_ZNK7rocksdb18ImmutableDBOptions20IsWalDirSameAsDBPathERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  967|  67.7k|    const std::string& db_path) const {
  968|  67.7k|  bool same = wal_dir.empty();
  969|  67.7k|  if (!same) {
  ------------------
  |  Branch (969:7): [True: 0, False: 67.7k]
  ------------------
  970|      0|    Status s = env->AreFilesSame(wal_dir, db_path, &same);
  971|      0|    if (s.IsNotSupported()) {
  ------------------
  |  Branch (971:9): [True: 0, False: 0]
  ------------------
  972|      0|      same = wal_dir == db_path;
  973|      0|    }
  974|      0|  }
  975|  67.7k|  return same;
  976|  67.7k|}
_ZNK7rocksdb18ImmutableDBOptions9GetWalDirEv:
  978|  63.1k|const std::string& ImmutableDBOptions::GetWalDir() const {
  979|  63.1k|  if (wal_dir.empty()) {
  ------------------
  |  Branch (979:7): [True: 63.1k, False: 0]
  ------------------
  980|  63.1k|    assert(!db_paths.empty());
  981|  63.1k|    return db_paths[0].path;
  982|  63.1k|  } else {
  983|      0|    return wal_dir;
  984|      0|  }
  985|  63.1k|}
_ZNK7rocksdb18ImmutableDBOptions9GetWalDirERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  988|  9.02k|    const std::string& path) const {
  989|  9.02k|  if (wal_dir.empty()) {
  ------------------
  |  Branch (989:7): [True: 9.02k, False: 0]
  ------------------
  990|  9.02k|    return path;
  991|  9.02k|  } else {
  992|      0|    return wal_dir;
  993|      0|  }
  994|  9.02k|}
_ZN7rocksdb16MutableDBOptionsC2ERKNS_9DBOptionsE:
 1034|  54.1k|      daily_offpeak_time_utc(options.daily_offpeak_time_utc) {}
_ZNK7rocksdb16MutableDBOptions4DumpEPNS_6LoggerE:
 1036|  9.02k|void MutableDBOptions::Dump(Logger* log) const {
 1037|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.max_background_jobs: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1038|  9.02k|                   max_background_jobs);
 1039|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.max_background_compactions: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1040|  9.02k|                   max_background_compactions);
 1041|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.max_subcompactions: %" PRIu32,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1042|  9.02k|                   max_subcompactions);
 1043|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.avoid_flush_during_shutdown: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1044|  9.02k|                   avoid_flush_during_shutdown);
 1045|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1046|  9.02k|      log, "          Options.writable_file_max_buffer_size: %" ROCKSDB_PRIszt,
 1047|  9.02k|      writable_file_max_buffer_size);
 1048|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.delayed_write_rate : %" PRIu64,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1049|  9.02k|                   delayed_write_rate);
 1050|  9.02k|  ROCKS_LOG_HEADER(log, "            Options.max_total_wal_size: %" PRIu64,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1051|  9.02k|                   max_total_wal_size);
 1052|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1053|  9.02k|      log, "            Options.delete_obsolete_files_period_micros: %" PRIu64,
 1054|  9.02k|      delete_obsolete_files_period_micros);
 1055|  9.02k|  ROCKS_LOG_HEADER(log, "                  Options.stats_dump_period_sec: %u",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1056|  9.02k|                   stats_dump_period_sec);
 1057|  9.02k|  ROCKS_LOG_HEADER(log, "                Options.stats_persist_period_sec: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1058|  9.02k|                   stats_persist_period_sec);
 1059|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1060|  9.02k|      log,
 1061|  9.02k|      "                Options.stats_history_buffer_size: %" ROCKSDB_PRIszt,
 1062|  9.02k|      stats_history_buffer_size);
 1063|  9.02k|  ROCKS_LOG_HEADER(log, "                         Options.max_open_files: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1064|  9.02k|                   max_open_files);
 1065|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1066|  9.02k|                   "                         Options.bytes_per_sync: %" PRIu64,
 1067|  9.02k|                   bytes_per_sync);
 1068|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1069|  9.02k|                   "                     Options.wal_bytes_per_sync: %" PRIu64,
 1070|  9.02k|                   wal_bytes_per_sync);
 1071|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1072|  9.02k|                   "                  Options.strict_bytes_per_sync: %d",
 1073|  9.02k|                   strict_bytes_per_sync);
 1074|  9.02k|  ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1075|  9.02k|                   "      Options.compaction_readahead_size: %" ROCKSDB_PRIszt,
 1076|  9.02k|                   compaction_readahead_size);
 1077|  9.02k|  ROCKS_LOG_HEADER(log, "                 Options.max_background_flushes: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1078|  9.02k|                          max_background_flushes);
 1079|  9.02k|  ROCKS_LOG_HEADER(log, "Options.daily_offpeak_time_utc: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
 1080|  9.02k|                   daily_offpeak_time_utc.c_str());
 1081|  9.02k|}
_ZN7rocksdb21MutableDBConfigurableC2ERKNS_16MutableDBOptionsEPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESB_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SB_EEEEEE:
  588|  45.1k|      : mutable_(mdb), opt_map_(map) {
  589|  45.1k|    RegisterOptions(&mutable_, &db_mutable_options_type_info);
  590|  45.1k|  }
_ZNK7rocksdb21MutableDBConfigurable15OptionsAreEqualERKNS_13ConfigOptionsERKNS_14OptionTypeInfoERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEPKvSH_PSD_:
  596|   767k|                       std::string* mismatch) const override {
  597|   767k|    bool equals = opt_info.AreEqual(config_options, opt_name, this_ptr,
  598|   767k|                                    that_ptr, mismatch);
  599|   767k|    if (!equals && opt_info.IsByName()) {
  ------------------
  |  Branch (599:9): [True: 0, False: 767k]
  |  Branch (599:20): [True: 0, False: 0]
  ------------------
  600|      0|      if (opt_map_ == nullptr) {
  ------------------
  |  Branch (600:11): [True: 0, False: 0]
  ------------------
  601|      0|        equals = true;
  602|      0|      } else {
  603|      0|        const auto& iter = opt_map_->find(opt_name);
  604|      0|        if (iter == opt_map_->end()) {
  ------------------
  |  Branch (604:13): [True: 0, False: 0]
  ------------------
  605|      0|          equals = true;
  606|      0|        } else {
  607|      0|          equals = opt_info.AreEqualByName(config_options, opt_name, this_ptr,
  608|      0|                                           iter->second);
  609|      0|        }
  610|      0|      }
  611|      0|      if (equals) {  // False alarm, clear mismatch
  ------------------
  |  Branch (611:11): [True: 0, False: 0]
  ------------------
  612|      0|        *mismatch = "";
  613|      0|      }
  614|      0|    }
  615|   767k|    if (equals && opt_info.IsConfigurable() && opt_map_ != nullptr) {
  ------------------
  |  Branch (615:9): [True: 767k, False: 0]
  |  Branch (615:19): [True: 9.02k, False: 758k]
  |  Branch (615:48): [True: 9.02k, False: 0]
  ------------------
  616|  9.02k|      const auto* this_config = opt_info.AsRawPointer<Configurable>(this_ptr);
  617|  9.02k|      if (this_config == nullptr) {
  ------------------
  |  Branch (617:11): [True: 9.02k, False: 0]
  ------------------
  618|  9.02k|        const auto& iter = opt_map_->find(opt_name);
  619|       |        // If the name exists in the map and is not empty/null,
  620|       |        // then the this_config should be set.
  621|  9.02k|        if (iter != opt_map_->end() && !iter->second.empty() &&
  ------------------
  |  Branch (621:13): [True: 9.02k, False: 0]
  |  Branch (621:13): [True: 0, False: 9.02k]
  |  Branch (621:40): [True: 9.02k, False: 0]
  ------------------
  622|  9.02k|            iter->second != kNullptrString) {
  ------------------
  |  Branch (622:13): [True: 0, False: 9.02k]
  ------------------
  623|      0|          *mismatch = opt_name;
  624|      0|          equals = false;
  625|      0|        }
  626|  9.02k|      }
  627|  9.02k|    }
  628|   767k|    return equals;
  629|   767k|  }
_ZN7rocksdb21DBOptionsConfigurableC2ERKNS_9DBOptionsEPKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESB_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SB_EEEEEE:
  641|  45.1k|      : MutableDBConfigurable(MutableDBOptions(opts), map), db_options_(opts) {
  642|       |    // The ImmutableDBOptions currently requires the env to be non-null.  Make
  643|       |    // sure it is
  644|  45.1k|    if (opts.env != nullptr) {
  ------------------
  |  Branch (644:9): [True: 45.1k, False: 0]
  ------------------
  645|  45.1k|      immutable_ = ImmutableDBOptions(opts);
  646|  45.1k|    } else {
  647|      0|      DBOptions copy = opts;
  648|      0|      copy.env = Env::Default();
  649|      0|      immutable_ = ImmutableDBOptions(copy);
  650|      0|    }
  651|  45.1k|    RegisterOptions(&immutable_, &db_immutable_options_type_info);
  652|  45.1k|  }
_ZNK7rocksdb21DBOptionsConfigurable13GetOptionsPtrERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  667|  45.1k|  const void* GetOptionsPtr(const std::string& name) const override {
  668|  45.1k|    if (name == OptionsHelper::kDBOptionsName) {
  ------------------
  |  Branch (668:9): [True: 9.02k, False: 36.1k]
  ------------------
  669|  9.02k|      return &db_options_;
  670|  36.1k|    } else {
  671|  36.1k|      return MutableDBConfigurable::GetOptionsPtr(name);
  672|  36.1k|    }
  673|  45.1k|  }
_ZN7rocksdb21DBOptionsConfigurable16ConfigureOptionsERKNS_13ConfigOptionsERKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESB_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SB_EEEEEEPSK_:
  658|  9.02k|      std::unordered_map<std::string, std::string>* unused) override {
  659|  9.02k|    Status s = Configurable::ConfigureOptions(config_options, opts_map, unused);
  660|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (660:9): [True: 9.02k, False: 0]
  ------------------
  661|  9.02k|      db_options_ = BuildDBOptions(immutable_, mutable_);
  662|  9.02k|      s = PrepareOptions(config_options);
  663|  9.02k|    }
  664|  9.02k|    return s;
  665|  9.02k|  }
db_options.cc:_ZNK7rocksdb3$_2clERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPv:
  468|  9.02k|                                const std::string& /*name*/, void* addr) {
  469|  9.02k|               auto env = static_cast<Env**>(addr);
  470|  9.02k|               return (*env)->PrepareOptions(opts);
  471|  9.02k|             })
db_options.cc:_ZNK7rocksdb3$_3clERKNS_9DBOptionsERKNS_19ColumnFamilyOptionsERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEPKv:
  475|  9.02k|                                 const void* addr) {
  476|  9.02k|               const auto env = static_cast<const Env* const*>(addr);
  477|  9.02k|               return (*env)->ValidateOptions(db_opts, cf_opts);
  478|  9.02k|             })},
db_options.cc:_ZNK7rocksdb3$_5clERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPKvPSA_:
  533|  18.0k|             const void* addr, std::string* value) {
  534|  18.0k|            const auto listeners =
  535|  18.0k|                static_cast<const std::vector<std::shared_ptr<EventListener>>*>(
  536|  18.0k|                    addr);
  537|  18.0k|            ConfigOptions embedded = opts;
  538|  18.0k|            embedded.delimiter = ";";
  539|  18.0k|            int printed = 0;
  540|  18.0k|            for (const auto& listener : *listeners) {
  ------------------
  |  Branch (540:39): [True: 0, False: 18.0k]
  ------------------
  541|      0|              auto id = listener->GetId();
  542|      0|              if (!id.empty()) {
  ------------------
  |  Branch (542:19): [True: 0, False: 0]
  ------------------
  543|      0|                std::string elem_str = listener->ToString(embedded, "");
  544|      0|                if (printed++ == 0) {
  ------------------
  |  Branch (544:21): [True: 0, False: 0]
  ------------------
  545|      0|                  value->append("{");
  546|      0|                } else {
  547|      0|                  value->append(":");
  548|      0|                }
  549|      0|                value->append(elem_str);
  550|      0|              }
  551|      0|            }
  552|  18.0k|            if (printed > 0) {
  ------------------
  |  Branch (552:17): [True: 0, False: 18.0k]
  ------------------
  553|      0|              value->append("}");
  554|      0|            }
  555|  18.0k|            return Status::OK();
  556|  18.0k|          },

_ZN7rocksdb18ImmutableDBOptions5kNameEv:
   17|  45.1k|  static const char* kName() { return "ImmutableDBOptions"; }
_ZN7rocksdb16MutableDBOptions5kNameEv:
  122|  45.1k|  static const char* kName() { return "MutableDBOptions"; }

_ZN7rocksdb17OffpeakTimeOptionC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   13|  9.02k|OffpeakTimeOption::OffpeakTimeOption(const std::string& offpeak_time_string) {
   14|  9.02k|  SetFromOffpeakTimeString(offpeak_time_string);
   15|  9.02k|}
_ZN7rocksdb17OffpeakTimeOption24SetFromOffpeakTimeStringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   18|  9.02k|    const std::string& offpeak_time_string) {
   19|  9.02k|  const int old_start_time = daily_offpeak_start_time_utc;
   20|  9.02k|  const int old_end_time = daily_offpeak_end_time_utc;
   21|  9.02k|  if (TryParseTimeRangeString(offpeak_time_string, daily_offpeak_start_time_utc,
  ------------------
  |  Branch (21:7): [True: 9.02k, False: 0]
  ------------------
   22|  9.02k|                              daily_offpeak_end_time_utc)) {
   23|  9.02k|    daily_offpeak_time_utc = offpeak_time_string;
   24|  9.02k|  } else {
   25|      0|    daily_offpeak_start_time_utc = old_start_time;
   26|      0|    daily_offpeak_end_time_utc = old_end_time;
   27|      0|  }
   28|  9.02k|}

_ZN7rocksdb27AdvancedColumnFamilyOptionsC2Ev:
   38|  76.7k|AdvancedColumnFamilyOptions::AdvancedColumnFamilyOptions() {
   39|  76.7k|  assert(memtable_factory.get() != nullptr);
   40|  76.7k|}
_ZN7rocksdb19ColumnFamilyOptionsC2Ev:
  126|  76.7k|          std::shared_ptr<TableFactory>(new BlockBasedTableFactory())) {}
_ZN7rocksdb19ColumnFamilyOptionsC2ERKNS_7OptionsE:
  129|  13.5k|    : ColumnFamilyOptions(*static_cast<const ColumnFamilyOptions*>(&options)) {}
_ZN7rocksdb9DBOptionsC2Ev:
  131|   212k|DBOptions::DBOptions() = default;
_ZN7rocksdb9DBOptionsC2ERKNS_7OptionsE:
  133|  13.5k|    : DBOptions(*static_cast<const DBOptions*>(&options)) {}
_ZNK7rocksdb19ColumnFamilyOptions4DumpEPNS_6LoggerE:
  140|  9.02k|void ColumnFamilyOptions::Dump(Logger* log) const {
  141|  9.02k|  ROCKS_LOG_HEADER(log, "              Options.comparator: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  142|  9.02k|                   comparator->Name());
  143|  9.02k|  if (comparator->timestamp_size() > 0) {
  ------------------
  |  Branch (143:7): [True: 0, False: 9.02k]
  ------------------
  144|      0|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|      0|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  145|      0|        log, "              Options.persist_user_defined_timestamps: %s",
  146|      0|        persist_user_defined_timestamps ? "true" : "false");
  147|      0|  }
  148|  9.02k|  ROCKS_LOG_HEADER(log, "          Options.merge_operator: %s",
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 9.02k]
  |  |  ------------------
  ------------------
  149|  9.02k|                   merge_operator ? merge_operator->Name() : "None");
  150|  9.02k|  ROCKS_LOG_HEADER(log, "       Options.compaction_filter: %s",
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 9.02k]
  |  |  ------------------
  ------------------
  151|  9.02k|                   compaction_filter ? compaction_filter->Name() : "None");
  152|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 9.02k]
  |  |  ------------------
  ------------------
  153|  9.02k|      log, "       Options.compaction_filter_factory: %s",
  154|  9.02k|      compaction_filter_factory ? compaction_filter_factory->Name() : "None");
  155|  9.02k|  ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 9.02k]
  |  |  ------------------
  ------------------
  156|  9.02k|      log, " Options.sst_partitioner_factory: %s",
  157|  9.02k|      sst_partitioner_factory ? sst_partitioner_factory->Name() : "None");
  158|  9.02k|  ROCKS_LOG_HEADER(log, "        Options.memtable_factory: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  159|  9.02k|                   memtable_factory->Name());
  160|  9.02k|  ROCKS_LOG_HEADER(log, "           Options.table_factory: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  161|  9.02k|                   table_factory->Name());
  162|  9.02k|  ROCKS_LOG_HEADER(log, "           table_factory options: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  163|  9.02k|                   table_factory->GetPrintableOptions().c_str());
  164|  9.02k|  ROCKS_LOG_HEADER(log, "       Options.write_buffer_size: %" ROCKSDB_PRIszt,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  165|  9.02k|                   write_buffer_size);
  166|  9.02k|  ROCKS_LOG_HEADER(log, " Options.max_write_buffer_number: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  167|  9.02k|                   max_write_buffer_number);
  168|  9.02k|  if (!compression_per_level.empty()) {
  ------------------
  |  Branch (168:7): [True: 0, False: 9.02k]
  ------------------
  169|      0|    for (unsigned int i = 0; i < compression_per_level.size(); i++) {
  ------------------
  |  Branch (169:30): [True: 0, False: 0]
  ------------------
  170|      0|      ROCKS_LOG_HEADER(
  ------------------
  |  |   29|      0|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  171|      0|          log, "       Options.compression[%d]: %s", i,
  172|      0|          CompressionTypeToString(compression_per_level[i]).c_str());
  173|      0|    }
  174|  9.02k|    } else {
  175|  9.02k|      ROCKS_LOG_HEADER(log, "         Options.compression: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  176|  9.02k|                       CompressionTypeToString(compression).c_str());
  177|  9.02k|    }
  178|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 9.02k, False: 0]
  |  |  ------------------
  ------------------
  179|  9.02k|        log, "                 Options.bottommost_compression: %s",
  180|  9.02k|        bottommost_compression == kDisableCompressionOption
  181|  9.02k|            ? "Disabled"
  182|  9.02k|            : CompressionTypeToString(bottommost_compression).c_str());
  183|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 9.02k, False: 0]
  |  |  ------------------
  ------------------
  184|  9.02k|        log, "      Options.prefix_extractor: %s",
  185|  9.02k|        prefix_extractor == nullptr ? "nullptr" : prefix_extractor->Name());
  186|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 9.02k, False: 0]
  |  |  ------------------
  ------------------
  187|  9.02k|                     "  Options.memtable_insert_with_hint_prefix_extractor: %s",
  188|  9.02k|                     memtable_insert_with_hint_prefix_extractor == nullptr
  189|  9.02k|                         ? "nullptr"
  190|  9.02k|                         : memtable_insert_with_hint_prefix_extractor->Name());
  191|  9.02k|    ROCKS_LOG_HEADER(log, "            Options.num_levels: %d", num_levels);
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  192|  9.02k|    ROCKS_LOG_HEADER(log, "       Options.min_write_buffer_number_to_merge: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  193|  9.02k|                     min_write_buffer_number_to_merge);
  194|  9.02k|    ROCKS_LOG_HEADER(log, "    Options.max_write_buffer_number_to_maintain: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  195|  9.02k|                     max_write_buffer_number_to_maintain);
  196|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  197|  9.02k|                     "    Options.max_write_buffer_size_to_maintain: %" PRIu64,
  198|  9.02k|                     max_write_buffer_size_to_maintain);
  199|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  200|  9.02k|        log, "           Options.bottommost_compression_opts.window_bits: %d",
  201|  9.02k|        bottommost_compression_opts.window_bits);
  202|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  203|  9.02k|        log, "                 Options.bottommost_compression_opts.level: %d",
  204|  9.02k|        bottommost_compression_opts.level);
  205|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  206|  9.02k|        log, "              Options.bottommost_compression_opts.strategy: %d",
  207|  9.02k|        bottommost_compression_opts.strategy);
  208|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  209|  9.02k|        log,
  210|  9.02k|        "        Options.bottommost_compression_opts.max_dict_bytes: "
  211|  9.02k|        "%" PRIu32,
  212|  9.02k|        bottommost_compression_opts.max_dict_bytes);
  213|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  214|  9.02k|        log,
  215|  9.02k|        "        Options.bottommost_compression_opts.zstd_max_train_bytes: "
  216|  9.02k|        "%" PRIu32,
  217|  9.02k|        bottommost_compression_opts.zstd_max_train_bytes);
  218|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  219|  9.02k|        log,
  220|  9.02k|        "        Options.bottommost_compression_opts.parallel_threads: "
  221|  9.02k|        "%" PRIu32,
  222|  9.02k|        bottommost_compression_opts.parallel_threads);
  223|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 9.02k]
  |  |  ------------------
  ------------------
  224|  9.02k|        log, "                 Options.bottommost_compression_opts.enabled: %s",
  225|  9.02k|        bottommost_compression_opts.enabled ? "true" : "false");
  226|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  227|  9.02k|        log,
  228|  9.02k|        "        Options.bottommost_compression_opts.max_dict_buffer_bytes: "
  229|  9.02k|        "%" PRIu64,
  230|  9.02k|        bottommost_compression_opts.max_dict_buffer_bytes);
  231|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 9.02k, False: 0]
  |  |  ------------------
  ------------------
  232|  9.02k|        log,
  233|  9.02k|        "        Options.bottommost_compression_opts.use_zstd_dict_trainer: %s",
  234|  9.02k|        bottommost_compression_opts.use_zstd_dict_trainer ? "true" : "false");
  235|  9.02k|    ROCKS_LOG_HEADER(log, "           Options.compression_opts.window_bits: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  236|  9.02k|                     compression_opts.window_bits);
  237|  9.02k|    ROCKS_LOG_HEADER(log, "                 Options.compression_opts.level: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  238|  9.02k|                     compression_opts.level);
  239|  9.02k|    ROCKS_LOG_HEADER(log, "              Options.compression_opts.strategy: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  240|  9.02k|                     compression_opts.strategy);
  241|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  242|  9.02k|        log,
  243|  9.02k|        "        Options.compression_opts.max_dict_bytes: %" PRIu32,
  244|  9.02k|        compression_opts.max_dict_bytes);
  245|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  246|  9.02k|                     "        Options.compression_opts.zstd_max_train_bytes: "
  247|  9.02k|                     "%" PRIu32,
  248|  9.02k|                     compression_opts.zstd_max_train_bytes);
  249|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 9.02k, False: 0]
  |  |  ------------------
  ------------------
  250|  9.02k|        log, "        Options.compression_opts.use_zstd_dict_trainer: %s",
  251|  9.02k|        compression_opts.use_zstd_dict_trainer ? "true" : "false");
  252|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  253|  9.02k|                     "        Options.compression_opts.parallel_threads: "
  254|  9.02k|                     "%" PRIu32,
  255|  9.02k|                     compression_opts.parallel_threads);
  256|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 9.02k]
  |  |  ------------------
  ------------------
  257|  9.02k|                     "                 Options.compression_opts.enabled: %s",
  258|  9.02k|                     compression_opts.enabled ? "true" : "false");
  259|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  260|  9.02k|                     "        Options.compression_opts.max_dict_buffer_bytes: "
  261|  9.02k|                     "%" PRIu64,
  262|  9.02k|                     compression_opts.max_dict_buffer_bytes);
  263|  9.02k|    ROCKS_LOG_HEADER(log, "     Options.level0_file_num_compaction_trigger: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  264|  9.02k|                     level0_file_num_compaction_trigger);
  265|  9.02k|    ROCKS_LOG_HEADER(log, "         Options.level0_slowdown_writes_trigger: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  266|  9.02k|                     level0_slowdown_writes_trigger);
  267|  9.02k|    ROCKS_LOG_HEADER(log, "             Options.level0_stop_writes_trigger: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  268|  9.02k|                     level0_stop_writes_trigger);
  269|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  270|  9.02k|        log, "                  Options.target_file_size_base: %" PRIu64,
  271|  9.02k|        target_file_size_base);
  272|  9.02k|    ROCKS_LOG_HEADER(log, "            Options.target_file_size_multiplier: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  273|  9.02k|                     target_file_size_multiplier);
  274|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  275|  9.02k|        log, "               Options.max_bytes_for_level_base: %" PRIu64,
  276|  9.02k|        max_bytes_for_level_base);
  277|  9.02k|    ROCKS_LOG_HEADER(log, "Options.level_compaction_dynamic_level_bytes: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  278|  9.02k|                     level_compaction_dynamic_level_bytes);
  279|  9.02k|    ROCKS_LOG_HEADER(log, "         Options.max_bytes_for_level_multiplier: %f",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  280|  9.02k|                     max_bytes_for_level_multiplier);
  281|  72.2k|    for (size_t i = 0; i < max_bytes_for_level_multiplier_additional.size();
  ------------------
  |  Branch (281:24): [True: 63.1k, False: 9.02k]
  ------------------
  282|  63.1k|         i++) {
  283|  63.1k|      ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  63.1k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  63.1k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  284|  63.1k|          log, "Options.max_bytes_for_level_multiplier_addtl[%" ROCKSDB_PRIszt
  285|  63.1k|               "]: %d",
  286|  63.1k|          i, max_bytes_for_level_multiplier_additional[i]);
  287|  63.1k|    }
  288|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  289|  9.02k|        log, "      Options.max_sequential_skip_in_iterations: %" PRIu64,
  290|  9.02k|        max_sequential_skip_in_iterations);
  291|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  292|  9.02k|        log, "                   Options.max_compaction_bytes: %" PRIu64,
  293|  9.02k|        max_compaction_bytes);
  294|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  295|  9.02k|        log,
  296|  9.02k|        "                       Options.arena_block_size: %" ROCKSDB_PRIszt,
  297|  9.02k|        arena_block_size);
  298|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  299|  9.02k|                     "  Options.soft_pending_compaction_bytes_limit: %" PRIu64,
  300|  9.02k|                     soft_pending_compaction_bytes_limit);
  301|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  302|  9.02k|                     "  Options.hard_pending_compaction_bytes_limit: %" PRIu64,
  303|  9.02k|                     hard_pending_compaction_bytes_limit);
  304|  9.02k|    ROCKS_LOG_HEADER(log, "               Options.disable_auto_compactions: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  305|  9.02k|                     disable_auto_compactions);
  306|       |
  307|  9.02k|    const auto& it_compaction_style =
  308|  9.02k|        compaction_style_to_string.find(compaction_style);
  309|  9.02k|    std::string str_compaction_style;
  310|  9.02k|    if (it_compaction_style == compaction_style_to_string.end()) {
  ------------------
  |  Branch (310:9): [True: 0, False: 9.02k]
  ------------------
  311|      0|      assert(false);
  312|      0|      str_compaction_style = "unknown_" + std::to_string(compaction_style);
  313|  9.02k|    } else {
  314|  9.02k|      str_compaction_style = it_compaction_style->second;
  315|  9.02k|    }
  316|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  317|  9.02k|                     "                       Options.compaction_style: %s",
  318|  9.02k|                     str_compaction_style.c_str());
  319|       |
  320|  9.02k|    const auto& it_compaction_pri =
  321|  9.02k|        compaction_pri_to_string.find(compaction_pri);
  322|  9.02k|    std::string str_compaction_pri;
  323|  9.02k|    if (it_compaction_pri == compaction_pri_to_string.end()) {
  ------------------
  |  Branch (323:9): [True: 0, False: 9.02k]
  ------------------
  324|      0|      assert(false);
  325|      0|      str_compaction_pri = "unknown_" + std::to_string(compaction_pri);
  326|  9.02k|    } else {
  327|  9.02k|      str_compaction_pri = it_compaction_pri->second;
  328|  9.02k|    }
  329|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  330|  9.02k|                     "                         Options.compaction_pri: %s",
  331|  9.02k|                     str_compaction_pri.c_str());
  332|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  333|  9.02k|                     "Options.compaction_options_universal.size_ratio: %u",
  334|  9.02k|                     compaction_options_universal.size_ratio);
  335|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  336|  9.02k|                     "Options.compaction_options_universal.min_merge_width: %u",
  337|  9.02k|                     compaction_options_universal.min_merge_width);
  338|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  339|  9.02k|                     "Options.compaction_options_universal.max_merge_width: %u",
  340|  9.02k|                     compaction_options_universal.max_merge_width);
  341|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  342|  9.02k|        log,
  343|  9.02k|        "Options.compaction_options_universal."
  344|  9.02k|        "max_size_amplification_percent: %u",
  345|  9.02k|        compaction_options_universal.max_size_amplification_percent);
  346|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  347|  9.02k|        log,
  348|  9.02k|        "Options.compaction_options_universal.compression_size_percent: %d",
  349|  9.02k|        compaction_options_universal.compression_size_percent);
  350|  9.02k|    const auto& it_compaction_stop_style = compaction_stop_style_to_string.find(
  351|  9.02k|        compaction_options_universal.stop_style);
  352|  9.02k|    std::string str_compaction_stop_style;
  353|  9.02k|    if (it_compaction_stop_style == compaction_stop_style_to_string.end()) {
  ------------------
  |  Branch (353:9): [True: 0, False: 9.02k]
  ------------------
  354|      0|      assert(false);
  355|      0|      str_compaction_stop_style =
  356|      0|          "unknown_" + std::to_string(compaction_options_universal.stop_style);
  357|  9.02k|    } else {
  358|  9.02k|      str_compaction_stop_style = it_compaction_stop_style->second;
  359|  9.02k|    }
  360|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  361|  9.02k|                     "Options.compaction_options_universal.stop_style: %s",
  362|  9.02k|                     str_compaction_stop_style.c_str());
  363|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  364|  9.02k|                     "Options.compaction_options_universal.max_read_amp: %d",
  365|  9.02k|                     compaction_options_universal.max_read_amp);
  366|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  367|  9.02k|        log, "Options.compaction_options_fifo.max_table_files_size: %" PRIu64,
  368|  9.02k|        compaction_options_fifo.max_table_files_size);
  369|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  370|  9.02k|                     "Options.compaction_options_fifo.allow_compaction: %d",
  371|  9.02k|                     compaction_options_fifo.allow_compaction);
  372|  9.02k|    std::ostringstream collector_info;
  373|  9.02k|    for (const auto& collector_factory : table_properties_collector_factories) {
  ------------------
  |  Branch (373:40): [True: 0, False: 9.02k]
  ------------------
  374|      0|      collector_info << collector_factory->ToString() << ';';
  375|      0|    }
  376|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  377|  9.02k|        log, "                  Options.table_properties_collectors: %s",
  378|  9.02k|        collector_info.str().c_str());
  379|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  380|  9.02k|                     "                  Options.inplace_update_support: %d",
  381|  9.02k|                     inplace_update_support);
  382|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  383|  9.02k|        log,
  384|  9.02k|        "                Options.inplace_update_num_locks: %" ROCKSDB_PRIszt,
  385|  9.02k|        inplace_update_num_locks);
  386|       |    // TODO: easier config for bloom (maybe based on avg key/value size)
  387|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  388|  9.02k|        log, "              Options.memtable_prefix_bloom_size_ratio: %f",
  389|  9.02k|        memtable_prefix_bloom_size_ratio);
  390|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  391|  9.02k|                     "              Options.memtable_whole_key_filtering: %d",
  392|  9.02k|                     memtable_whole_key_filtering);
  393|       |
  394|  9.02k|    ROCKS_LOG_HEADER(log, "  Options.memtable_huge_page_size: %" ROCKSDB_PRIszt,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  395|  9.02k|                     memtable_huge_page_size);
  396|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  397|  9.02k|                     "                          Options.bloom_locality: %d",
  398|  9.02k|                     bloom_locality);
  399|       |
  400|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  401|  9.02k|        log,
  402|  9.02k|        "                   Options.max_successive_merges: %" ROCKSDB_PRIszt,
  403|  9.02k|        max_successive_merges);
  404|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  405|  9.02k|                     "            Options.strict_max_successive_merges: %d",
  406|  9.02k|                     strict_max_successive_merges);
  407|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  408|  9.02k|                     "               Options.optimize_filters_for_hits: %d",
  409|  9.02k|                     optimize_filters_for_hits);
  410|  9.02k|    ROCKS_LOG_HEADER(log, "               Options.paranoid_file_checks: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  411|  9.02k|                     paranoid_file_checks);
  412|  9.02k|    ROCKS_LOG_HEADER(log, "               Options.force_consistency_checks: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  413|  9.02k|                     force_consistency_checks);
  414|  9.02k|    ROCKS_LOG_HEADER(log, "               Options.report_bg_io_stats: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  415|  9.02k|                     report_bg_io_stats);
  416|  9.02k|    ROCKS_LOG_HEADER(log, "                              Options.ttl: %" PRIu64,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  417|  9.02k|                     ttl);
  418|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  419|  9.02k|                     "         Options.periodic_compaction_seconds: %" PRIu64,
  420|  9.02k|                     periodic_compaction_seconds);
  421|  9.02k|    const auto& it_temp = temperature_to_string.find(default_temperature);
  422|  9.02k|    std::string str_default_temperature;
  423|  9.02k|    if (it_temp == temperature_to_string.end()) {
  ------------------
  |  Branch (423:9): [True: 0, False: 9.02k]
  ------------------
  424|      0|      assert(false);
  425|      0|      str_default_temperature = "unknown_temperature";
  426|  9.02k|    } else {
  427|  9.02k|      str_default_temperature = it_temp->second;
  428|  9.02k|    }
  429|  9.02k|    ROCKS_LOG_HEADER(log,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  430|  9.02k|                     "                       Options.default_temperature: %s",
  431|  9.02k|                     str_default_temperature.c_str());
  432|  9.02k|    ROCKS_LOG_HEADER(log, " Options.preclude_last_level_data_seconds: %" PRIu64,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  433|  9.02k|                     preclude_last_level_data_seconds);
  434|  9.02k|    ROCKS_LOG_HEADER(log, "   Options.preserve_internal_time_seconds: %" PRIu64,
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  435|  9.02k|                     preserve_internal_time_seconds);
  436|  9.02k|    ROCKS_LOG_HEADER(log, "                      Options.enable_blob_files: %s",
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 9.02k]
  |  |  ------------------
  ------------------
  437|  9.02k|                     enable_blob_files ? "true" : "false");
  438|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  439|  9.02k|        log, "                          Options.min_blob_size: %" PRIu64,
  440|  9.02k|        min_blob_size);
  441|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  442|  9.02k|        log, "                         Options.blob_file_size: %" PRIu64,
  443|  9.02k|        blob_file_size);
  444|  9.02k|    ROCKS_LOG_HEADER(log, "                  Options.blob_compression_type: %s",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  445|  9.02k|                     CompressionTypeToString(blob_compression_type).c_str());
  446|  9.02k|    ROCKS_LOG_HEADER(log, "         Options.enable_blob_garbage_collection: %s",
  ------------------
  |  |   29|  18.0k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 9.02k]
  |  |  ------------------
  ------------------
  447|  9.02k|                     enable_blob_garbage_collection ? "true" : "false");
  448|  9.02k|    ROCKS_LOG_HEADER(log, "     Options.blob_garbage_collection_age_cutoff: %f",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  449|  9.02k|                     blob_garbage_collection_age_cutoff);
  450|  9.02k|    ROCKS_LOG_HEADER(log, "Options.blob_garbage_collection_force_threshold: %f",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  451|  9.02k|                     blob_garbage_collection_force_threshold);
  452|  9.02k|    ROCKS_LOG_HEADER(
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  453|  9.02k|        log, "         Options.blob_compaction_readahead_size: %" PRIu64,
  454|  9.02k|        blob_compaction_readahead_size);
  455|  9.02k|    ROCKS_LOG_HEADER(log, "               Options.blob_file_starting_level: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  456|  9.02k|                     blob_file_starting_level);
  457|  9.02k|    if (blob_cache) {
  ------------------
  |  Branch (457:9): [True: 0, False: 9.02k]
  ------------------
  458|      0|      ROCKS_LOG_HEADER(log, "                          Options.blob_cache: %s",
  ------------------
  |  |   29|      0|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  459|      0|                       blob_cache->Name());
  460|      0|      ROCKS_LOG_HEADER(log, "                          blob_cache options: %s",
  ------------------
  |  |   29|      0|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  461|      0|                       blob_cache->GetPrintableOptions().c_str());
  462|      0|      ROCKS_LOG_HEADER(
  ------------------
  |  |   29|      0|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  |  |  |  Branch (29:66): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  463|      0|          log, "                          blob_cache prepopulated: %s",
  464|      0|          prepopulate_blob_cache == PrepopulateBlobCache::kFlushOnly
  465|      0|              ? "flush only"
  466|      0|              : "disabled");
  467|      0|    }
  468|  9.02k|    ROCKS_LOG_HEADER(log, "        Options.experimental_mempurge_threshold: %f",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  469|  9.02k|                     experimental_mempurge_threshold);
  470|  9.02k|    ROCKS_LOG_HEADER(log, "           Options.memtable_max_range_deletions: %d",
  ------------------
  |  |   29|  9.02k|  ROCKSDB_NAMESPACE::Log(InfoLogLevel::HEADER_LEVEL, LGR, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   15|  9.02k|#define ROCKSDB_NAMESPACE rocksdb
  |  |  ------------------
  ------------------
  471|  9.02k|                     memtable_max_range_deletions);
  472|  9.02k|}  // ColumnFamilyOptions::Dump
_ZN7rocksdb11ReadOptionsC2ENS_3Env10IOActivityE:
  708|  31.5k|    : io_activity(_io_activity) {}
_ZN7rocksdb12WriteOptionsC2ENS_3Env10IOActivityE:
  711|  31.5k|    : io_activity(_io_activity) {}
_ZN7rocksdb12WriteOptionsC2ENS_3Env10IOPriorityENS1_10IOActivityE:
  716|  4.48k|      io_activity(_io_activity) {}

_ZN7rocksdb13ConfigOptionsC2Ev:
   35|  13.5k|{
   36|  13.5k|  env = Env::Default();
   37|  13.5k|}
_ZN7rocksdb15ValidateOptionsERKNS_9DBOptionsERKNS_19ColumnFamilyOptionsE:
   44|  9.02k|                       const ColumnFamilyOptions& cf_opts) {
   45|  9.02k|  Status s;
   46|  9.02k|  auto db_cfg = DBOptionsAsConfigurable(db_opts);
   47|  9.02k|  auto cf_cfg = CFOptionsAsConfigurable(cf_opts);
   48|  9.02k|  s = db_cfg->ValidateOptions(db_opts, cf_opts);
   49|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (49:7): [True: 9.02k, False: 0]
  ------------------
   50|  9.02k|    s = cf_cfg->ValidateOptions(db_opts, cf_opts);
   51|  9.02k|  }
   52|  9.02k|  return s;
   53|  9.02k|}
_ZN7rocksdb14BuildDBOptionsERKNS_18ImmutableDBOptionsERKNS_16MutableDBOptionsE:
   56|  40.6k|                         const MutableDBOptions& mutable_db_options) {
   57|  40.6k|  DBOptions options;
   58|       |
   59|  40.6k|  options.create_if_missing = immutable_db_options.create_if_missing;
   60|  40.6k|  options.create_missing_column_families =
   61|  40.6k|      immutable_db_options.create_missing_column_families;
   62|  40.6k|  options.error_if_exists = immutable_db_options.error_if_exists;
   63|  40.6k|  options.paranoid_checks = immutable_db_options.paranoid_checks;
   64|  40.6k|  options.flush_verify_memtable_count =
   65|  40.6k|      immutable_db_options.flush_verify_memtable_count;
   66|  40.6k|  options.compaction_verify_record_count =
   67|  40.6k|      immutable_db_options.compaction_verify_record_count;
   68|  40.6k|  options.track_and_verify_wals_in_manifest =
   69|  40.6k|      immutable_db_options.track_and_verify_wals_in_manifest;
   70|  40.6k|  options.verify_sst_unique_id_in_manifest =
   71|  40.6k|      immutable_db_options.verify_sst_unique_id_in_manifest;
   72|  40.6k|  options.env = immutable_db_options.env;
   73|  40.6k|  options.rate_limiter = immutable_db_options.rate_limiter;
   74|  40.6k|  options.sst_file_manager = immutable_db_options.sst_file_manager;
   75|  40.6k|  options.info_log = immutable_db_options.info_log;
   76|  40.6k|  options.info_log_level = immutable_db_options.info_log_level;
   77|  40.6k|  options.max_open_files = mutable_db_options.max_open_files;
   78|  40.6k|  options.max_file_opening_threads =
   79|  40.6k|      immutable_db_options.max_file_opening_threads;
   80|  40.6k|  options.max_total_wal_size = mutable_db_options.max_total_wal_size;
   81|  40.6k|  options.statistics = immutable_db_options.statistics;
   82|  40.6k|  options.use_fsync = immutable_db_options.use_fsync;
   83|  40.6k|  options.db_paths = immutable_db_options.db_paths;
   84|  40.6k|  options.db_log_dir = immutable_db_options.db_log_dir;
   85|  40.6k|  options.wal_dir = immutable_db_options.wal_dir;
   86|  40.6k|  options.delete_obsolete_files_period_micros =
   87|  40.6k|      mutable_db_options.delete_obsolete_files_period_micros;
   88|  40.6k|  options.max_background_jobs = mutable_db_options.max_background_jobs;
   89|  40.6k|  options.max_background_compactions =
   90|  40.6k|      mutable_db_options.max_background_compactions;
   91|  40.6k|  options.bytes_per_sync = mutable_db_options.bytes_per_sync;
   92|  40.6k|  options.wal_bytes_per_sync = mutable_db_options.wal_bytes_per_sync;
   93|  40.6k|  options.strict_bytes_per_sync = mutable_db_options.strict_bytes_per_sync;
   94|  40.6k|  options.max_subcompactions = mutable_db_options.max_subcompactions;
   95|  40.6k|  options.max_background_flushes = mutable_db_options.max_background_flushes;
   96|  40.6k|  options.max_log_file_size = immutable_db_options.max_log_file_size;
   97|  40.6k|  options.log_file_time_to_roll = immutable_db_options.log_file_time_to_roll;
   98|  40.6k|  options.keep_log_file_num = immutable_db_options.keep_log_file_num;
   99|  40.6k|  options.recycle_log_file_num = immutable_db_options.recycle_log_file_num;
  100|  40.6k|  options.max_manifest_file_size = immutable_db_options.max_manifest_file_size;
  101|  40.6k|  options.table_cache_numshardbits =
  102|  40.6k|      immutable_db_options.table_cache_numshardbits;
  103|  40.6k|  options.WAL_ttl_seconds = immutable_db_options.WAL_ttl_seconds;
  104|  40.6k|  options.WAL_size_limit_MB = immutable_db_options.WAL_size_limit_MB;
  105|  40.6k|  options.manifest_preallocation_size =
  106|  40.6k|      immutable_db_options.manifest_preallocation_size;
  107|  40.6k|  options.allow_mmap_reads = immutable_db_options.allow_mmap_reads;
  108|  40.6k|  options.allow_mmap_writes = immutable_db_options.allow_mmap_writes;
  109|  40.6k|  options.use_direct_reads = immutable_db_options.use_direct_reads;
  110|  40.6k|  options.use_direct_io_for_flush_and_compaction =
  111|  40.6k|      immutable_db_options.use_direct_io_for_flush_and_compaction;
  112|  40.6k|  options.allow_fallocate = immutable_db_options.allow_fallocate;
  113|  40.6k|  options.is_fd_close_on_exec = immutable_db_options.is_fd_close_on_exec;
  114|  40.6k|  options.stats_dump_period_sec = mutable_db_options.stats_dump_period_sec;
  115|  40.6k|  options.stats_persist_period_sec =
  116|  40.6k|      mutable_db_options.stats_persist_period_sec;
  117|  40.6k|  options.persist_stats_to_disk = immutable_db_options.persist_stats_to_disk;
  118|  40.6k|  options.stats_history_buffer_size =
  119|  40.6k|      mutable_db_options.stats_history_buffer_size;
  120|  40.6k|  options.advise_random_on_open = immutable_db_options.advise_random_on_open;
  121|  40.6k|  options.db_write_buffer_size = immutable_db_options.db_write_buffer_size;
  122|  40.6k|  options.write_buffer_manager = immutable_db_options.write_buffer_manager;
  123|  40.6k|  options.compaction_readahead_size =
  124|  40.6k|      mutable_db_options.compaction_readahead_size;
  125|  40.6k|  options.random_access_max_buffer_size =
  126|  40.6k|      immutable_db_options.random_access_max_buffer_size;
  127|  40.6k|  options.writable_file_max_buffer_size =
  128|  40.6k|      mutable_db_options.writable_file_max_buffer_size;
  129|  40.6k|  options.use_adaptive_mutex = immutable_db_options.use_adaptive_mutex;
  130|  40.6k|  options.listeners = immutable_db_options.listeners;
  131|  40.6k|  options.enable_thread_tracking = immutable_db_options.enable_thread_tracking;
  132|  40.6k|  options.delayed_write_rate = mutable_db_options.delayed_write_rate;
  133|  40.6k|  options.enable_pipelined_write = immutable_db_options.enable_pipelined_write;
  134|  40.6k|  options.unordered_write = immutable_db_options.unordered_write;
  135|  40.6k|  options.allow_concurrent_memtable_write =
  136|  40.6k|      immutable_db_options.allow_concurrent_memtable_write;
  137|  40.6k|  options.enable_write_thread_adaptive_yield =
  138|  40.6k|      immutable_db_options.enable_write_thread_adaptive_yield;
  139|  40.6k|  options.max_write_batch_group_size_bytes =
  140|  40.6k|      immutable_db_options.max_write_batch_group_size_bytes;
  141|  40.6k|  options.write_thread_max_yield_usec =
  142|  40.6k|      immutable_db_options.write_thread_max_yield_usec;
  143|  40.6k|  options.write_thread_slow_yield_usec =
  144|  40.6k|      immutable_db_options.write_thread_slow_yield_usec;
  145|  40.6k|  options.skip_stats_update_on_db_open =
  146|  40.6k|      immutable_db_options.skip_stats_update_on_db_open;
  147|  40.6k|  options.skip_checking_sst_file_sizes_on_db_open =
  148|  40.6k|      immutable_db_options.skip_checking_sst_file_sizes_on_db_open;
  149|  40.6k|  options.wal_recovery_mode = immutable_db_options.wal_recovery_mode;
  150|  40.6k|  options.allow_2pc = immutable_db_options.allow_2pc;
  151|  40.6k|  options.row_cache = immutable_db_options.row_cache;
  152|  40.6k|  options.wal_filter = immutable_db_options.wal_filter;
  153|  40.6k|  options.fail_if_options_file_error =
  154|  40.6k|      immutable_db_options.fail_if_options_file_error;
  155|  40.6k|  options.dump_malloc_stats = immutable_db_options.dump_malloc_stats;
  156|  40.6k|  options.avoid_flush_during_recovery =
  157|  40.6k|      immutable_db_options.avoid_flush_during_recovery;
  158|  40.6k|  options.avoid_flush_during_shutdown =
  159|  40.6k|      mutable_db_options.avoid_flush_during_shutdown;
  160|  40.6k|  options.allow_ingest_behind = immutable_db_options.allow_ingest_behind;
  161|  40.6k|  options.two_write_queues = immutable_db_options.two_write_queues;
  162|  40.6k|  options.manual_wal_flush = immutable_db_options.manual_wal_flush;
  163|  40.6k|  options.wal_compression = immutable_db_options.wal_compression;
  164|  40.6k|  options.atomic_flush = immutable_db_options.atomic_flush;
  165|  40.6k|  options.avoid_unnecessary_blocking_io =
  166|  40.6k|      immutable_db_options.avoid_unnecessary_blocking_io;
  167|  40.6k|  options.log_readahead_size = immutable_db_options.log_readahead_size;
  168|  40.6k|  options.file_checksum_gen_factory =
  169|  40.6k|      immutable_db_options.file_checksum_gen_factory;
  170|  40.6k|  options.best_efforts_recovery = immutable_db_options.best_efforts_recovery;
  171|  40.6k|  options.max_bgerror_resume_count =
  172|  40.6k|      immutable_db_options.max_bgerror_resume_count;
  173|  40.6k|  options.bgerror_resume_retry_interval =
  174|  40.6k|      immutable_db_options.bgerror_resume_retry_interval;
  175|  40.6k|  options.db_host_id = immutable_db_options.db_host_id;
  176|  40.6k|  options.allow_data_in_errors = immutable_db_options.allow_data_in_errors;
  177|  40.6k|  options.checksum_handoff_file_types =
  178|  40.6k|      immutable_db_options.checksum_handoff_file_types;
  179|  40.6k|  options.lowest_used_cache_tier = immutable_db_options.lowest_used_cache_tier;
  180|  40.6k|  options.enforce_single_del_contracts =
  181|  40.6k|      immutable_db_options.enforce_single_del_contracts;
  182|  40.6k|  options.daily_offpeak_time_utc = mutable_db_options.daily_offpeak_time_utc;
  183|  40.6k|  return options;
  184|  40.6k|}
_ZN7rocksdb24BuildColumnFamilyOptionsERKNS_19ColumnFamilyOptionsERKNS_16MutableCFOptionsE:
  188|  9.02k|    const MutableCFOptions& mutable_cf_options) {
  189|  9.02k|  ColumnFamilyOptions cf_opts(options);
  190|  9.02k|  UpdateColumnFamilyOptions(mutable_cf_options, &cf_opts);
  191|       |  // TODO(yhchiang): find some way to handle the following derived options
  192|       |  // * max_file_size
  193|  9.02k|  return cf_opts;
  194|  9.02k|}
_ZN7rocksdb25UpdateColumnFamilyOptionsERKNS_16MutableCFOptionsEPNS_19ColumnFamilyOptionsE:
  197|  18.0k|                               ColumnFamilyOptions* cf_opts) {
  198|       |  // Memtable related options
  199|  18.0k|  cf_opts->write_buffer_size = moptions.write_buffer_size;
  200|  18.0k|  cf_opts->max_write_buffer_number = moptions.max_write_buffer_number;
  201|  18.0k|  cf_opts->arena_block_size = moptions.arena_block_size;
  202|  18.0k|  cf_opts->memtable_prefix_bloom_size_ratio =
  203|  18.0k|      moptions.memtable_prefix_bloom_size_ratio;
  204|  18.0k|  cf_opts->memtable_whole_key_filtering = moptions.memtable_whole_key_filtering;
  205|  18.0k|  cf_opts->memtable_huge_page_size = moptions.memtable_huge_page_size;
  206|  18.0k|  cf_opts->max_successive_merges = moptions.max_successive_merges;
  207|  18.0k|  cf_opts->strict_max_successive_merges = moptions.strict_max_successive_merges;
  208|  18.0k|  cf_opts->inplace_update_num_locks = moptions.inplace_update_num_locks;
  209|  18.0k|  cf_opts->prefix_extractor = moptions.prefix_extractor;
  210|  18.0k|  cf_opts->experimental_mempurge_threshold =
  211|  18.0k|      moptions.experimental_mempurge_threshold;
  212|  18.0k|  cf_opts->memtable_protection_bytes_per_key =
  213|  18.0k|      moptions.memtable_protection_bytes_per_key;
  214|  18.0k|  cf_opts->block_protection_bytes_per_key =
  215|  18.0k|      moptions.block_protection_bytes_per_key;
  216|  18.0k|  cf_opts->bottommost_file_compaction_delay =
  217|  18.0k|      moptions.bottommost_file_compaction_delay;
  218|       |
  219|       |  // Compaction related options
  220|  18.0k|  cf_opts->disable_auto_compactions = moptions.disable_auto_compactions;
  221|  18.0k|  cf_opts->soft_pending_compaction_bytes_limit =
  222|  18.0k|      moptions.soft_pending_compaction_bytes_limit;
  223|  18.0k|  cf_opts->hard_pending_compaction_bytes_limit =
  224|  18.0k|      moptions.hard_pending_compaction_bytes_limit;
  225|  18.0k|  cf_opts->level0_file_num_compaction_trigger =
  226|  18.0k|      moptions.level0_file_num_compaction_trigger;
  227|  18.0k|  cf_opts->level0_slowdown_writes_trigger =
  228|  18.0k|      moptions.level0_slowdown_writes_trigger;
  229|  18.0k|  cf_opts->level0_stop_writes_trigger = moptions.level0_stop_writes_trigger;
  230|  18.0k|  cf_opts->max_compaction_bytes = moptions.max_compaction_bytes;
  231|  18.0k|  cf_opts->target_file_size_base = moptions.target_file_size_base;
  232|  18.0k|  cf_opts->target_file_size_multiplier = moptions.target_file_size_multiplier;
  233|  18.0k|  cf_opts->max_bytes_for_level_base = moptions.max_bytes_for_level_base;
  234|  18.0k|  cf_opts->max_bytes_for_level_multiplier =
  235|  18.0k|      moptions.max_bytes_for_level_multiplier;
  236|  18.0k|  cf_opts->ttl = moptions.ttl;
  237|  18.0k|  cf_opts->periodic_compaction_seconds = moptions.periodic_compaction_seconds;
  238|       |
  239|  18.0k|  cf_opts->max_bytes_for_level_multiplier_additional.clear();
  240|   126k|  for (auto value : moptions.max_bytes_for_level_multiplier_additional) {
  ------------------
  |  Branch (240:19): [True: 126k, False: 18.0k]
  ------------------
  241|   126k|    cf_opts->max_bytes_for_level_multiplier_additional.emplace_back(value);
  242|   126k|  }
  243|       |
  244|  18.0k|  cf_opts->compaction_options_fifo = moptions.compaction_options_fifo;
  245|  18.0k|  cf_opts->compaction_options_universal = moptions.compaction_options_universal;
  246|       |
  247|       |  // Blob file related options
  248|  18.0k|  cf_opts->enable_blob_files = moptions.enable_blob_files;
  249|  18.0k|  cf_opts->min_blob_size = moptions.min_blob_size;
  250|  18.0k|  cf_opts->blob_file_size = moptions.blob_file_size;
  251|  18.0k|  cf_opts->blob_compression_type = moptions.blob_compression_type;
  252|  18.0k|  cf_opts->enable_blob_garbage_collection =
  253|  18.0k|      moptions.enable_blob_garbage_collection;
  254|  18.0k|  cf_opts->blob_garbage_collection_age_cutoff =
  255|  18.0k|      moptions.blob_garbage_collection_age_cutoff;
  256|  18.0k|  cf_opts->blob_garbage_collection_force_threshold =
  257|  18.0k|      moptions.blob_garbage_collection_force_threshold;
  258|  18.0k|  cf_opts->blob_compaction_readahead_size =
  259|  18.0k|      moptions.blob_compaction_readahead_size;
  260|  18.0k|  cf_opts->blob_file_starting_level = moptions.blob_file_starting_level;
  261|  18.0k|  cf_opts->prepopulate_blob_cache = moptions.prepopulate_blob_cache;
  262|       |
  263|       |  // Misc options
  264|  18.0k|  cf_opts->max_sequential_skip_in_iterations =
  265|  18.0k|      moptions.max_sequential_skip_in_iterations;
  266|  18.0k|  cf_opts->paranoid_file_checks = moptions.paranoid_file_checks;
  267|  18.0k|  cf_opts->report_bg_io_stats = moptions.report_bg_io_stats;
  268|  18.0k|  cf_opts->compression = moptions.compression;
  269|  18.0k|  cf_opts->compression_opts = moptions.compression_opts;
  270|  18.0k|  cf_opts->bottommost_compression = moptions.bottommost_compression;
  271|  18.0k|  cf_opts->bottommost_compression_opts = moptions.bottommost_compression_opts;
  272|  18.0k|  cf_opts->sample_for_compression = moptions.sample_for_compression;
  273|  18.0k|  cf_opts->compression_per_level = moptions.compression_per_level;
  274|  18.0k|  cf_opts->last_level_temperature = moptions.last_level_temperature;
  275|  18.0k|  cf_opts->default_write_temperature = moptions.default_write_temperature;
  276|  18.0k|  cf_opts->memtable_max_range_deletions = moptions.memtable_max_range_deletions;
  277|  18.0k|  cf_opts->uncache_aggressiveness = moptions.uncache_aggressiveness;
  278|  18.0k|}
_ZN7rocksdb25UpdateColumnFamilyOptionsERKNS_18ImmutableCFOptionsEPNS_19ColumnFamilyOptionsE:
  281|  9.02k|                               ColumnFamilyOptions* cf_opts) {
  282|  9.02k|  cf_opts->compaction_style = ioptions.compaction_style;
  283|  9.02k|  cf_opts->compaction_pri = ioptions.compaction_pri;
  284|  9.02k|  cf_opts->comparator = ioptions.user_comparator;
  285|  9.02k|  cf_opts->merge_operator = ioptions.merge_operator;
  286|  9.02k|  cf_opts->compaction_filter = ioptions.compaction_filter;
  287|  9.02k|  cf_opts->compaction_filter_factory = ioptions.compaction_filter_factory;
  288|  9.02k|  cf_opts->min_write_buffer_number_to_merge =
  289|  9.02k|      ioptions.min_write_buffer_number_to_merge;
  290|  9.02k|  cf_opts->max_write_buffer_number_to_maintain =
  291|  9.02k|      ioptions.max_write_buffer_number_to_maintain;
  292|  9.02k|  cf_opts->max_write_buffer_size_to_maintain =
  293|  9.02k|      ioptions.max_write_buffer_size_to_maintain;
  294|  9.02k|  cf_opts->inplace_update_support = ioptions.inplace_update_support;
  295|  9.02k|  cf_opts->inplace_callback = ioptions.inplace_callback;
  296|  9.02k|  cf_opts->memtable_factory = ioptions.memtable_factory;
  297|  9.02k|  cf_opts->table_factory = ioptions.table_factory;
  298|  9.02k|  cf_opts->table_properties_collector_factories =
  299|  9.02k|      ioptions.table_properties_collector_factories;
  300|  9.02k|  cf_opts->bloom_locality = ioptions.bloom_locality;
  301|  9.02k|  cf_opts->level_compaction_dynamic_level_bytes =
  302|  9.02k|      ioptions.level_compaction_dynamic_level_bytes;
  303|  9.02k|  cf_opts->num_levels = ioptions.num_levels;
  304|  9.02k|  cf_opts->optimize_filters_for_hits = ioptions.optimize_filters_for_hits;
  305|  9.02k|  cf_opts->force_consistency_checks = ioptions.force_consistency_checks;
  306|  9.02k|  cf_opts->memtable_insert_with_hint_prefix_extractor =
  307|  9.02k|      ioptions.memtable_insert_with_hint_prefix_extractor;
  308|  9.02k|  cf_opts->cf_paths = ioptions.cf_paths;
  309|  9.02k|  cf_opts->compaction_thread_limiter = ioptions.compaction_thread_limiter;
  310|  9.02k|  cf_opts->sst_partitioner_factory = ioptions.sst_partitioner_factory;
  311|  9.02k|  cf_opts->blob_cache = ioptions.blob_cache;
  312|  9.02k|  cf_opts->preclude_last_level_data_seconds =
  313|  9.02k|      ioptions.preclude_last_level_data_seconds;
  314|  9.02k|  cf_opts->preserve_internal_time_seconds =
  315|  9.02k|      ioptions.preserve_internal_time_seconds;
  316|  9.02k|  cf_opts->persist_user_defined_timestamps =
  317|  9.02k|      ioptions.persist_user_defined_timestamps;
  318|  9.02k|  cf_opts->default_temperature = ioptions.default_temperature;
  319|       |
  320|       |  // TODO(yhchiang): find some way to handle the following derived options
  321|       |  // * max_file_size
  322|  9.02k|}
_ZN7rocksdb27SerializeSingleOptionHelperEPKvNS_10OptionTypeEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  481|  4.43M|                                 std::string* value) {
  482|  4.43M|  assert(value);
  483|  4.43M|  switch (opt_type) {
  484|  1.70M|    case OptionType::kBoolean:
  ------------------
  |  Branch (484:5): [True: 1.70M, False: 2.72M]
  ------------------
  485|  1.70M|      *value = *(static_cast<const bool*>(opt_address)) ? "true" : "false";
  ------------------
  |  Branch (485:16): [True: 568k, False: 1.13M]
  ------------------
  486|  1.70M|      break;
  487|   767k|    case OptionType::kInt:
  ------------------
  |  Branch (487:5): [True: 767k, False: 3.66M]
  ------------------
  488|   767k|      *value = std::to_string(*(static_cast<const int*>(opt_address)));
  489|   767k|      break;
  490|      0|    case OptionType::kInt32T:
  ------------------
  |  Branch (490:5): [True: 0, False: 4.43M]
  ------------------
  491|      0|      *value = std::to_string(*(static_cast<const int32_t*>(opt_address)));
  492|      0|      break;
  493|  18.0k|    case OptionType::kInt64T:
  ------------------
  |  Branch (493:5): [True: 18.0k, False: 4.41M]
  ------------------
  494|  18.0k|      {
  495|  18.0k|        int64_t v;
  496|  18.0k|        GetUnaligned(static_cast<const int64_t*>(opt_address), &v);
  497|  18.0k|        *value = std::to_string(v);
  498|  18.0k|      }
  499|  18.0k|      break;
  500|   108k|    case OptionType::kUInt:
  ------------------
  |  Branch (500:5): [True: 108k, False: 4.32M]
  ------------------
  501|   108k|      *value = std::to_string(*(static_cast<const unsigned int*>(opt_address)));
  502|   108k|      break;
  503|  18.0k|    case OptionType::kUInt8T:
  ------------------
  |  Branch (503:5): [True: 18.0k, False: 4.41M]
  ------------------
  504|  18.0k|      *value = std::to_string(*(static_cast<const uint8_t*>(opt_address)));
  505|  18.0k|      break;
  506|   270k|    case OptionType::kUInt32T:
  ------------------
  |  Branch (506:5): [True: 270k, False: 4.16M]
  ------------------
  507|   270k|      *value = std::to_string(*(static_cast<const uint32_t*>(opt_address)));
  508|   270k|      break;
  509|   686k|    case OptionType::kUInt64T:
  ------------------
  |  Branch (509:5): [True: 686k, False: 3.74M]
  ------------------
  510|   686k|      {
  511|   686k|        uint64_t v;
  512|   686k|        GetUnaligned(static_cast<const uint64_t*>(opt_address), &v);
  513|   686k|        *value = std::to_string(v);
  514|   686k|      }
  515|   686k|      break;
  516|   424k|    case OptionType::kSizeT:
  ------------------
  |  Branch (516:5): [True: 424k, False: 4.00M]
  ------------------
  517|   424k|      {
  518|   424k|        size_t v;
  519|   424k|        GetUnaligned(static_cast<const size_t*>(opt_address), &v);
  520|   424k|        *value = std::to_string(v);
  521|   424k|      }
  522|   424k|      break;
  523|   135k|    case OptionType::kDouble:
  ------------------
  |  Branch (523:5): [True: 135k, False: 4.29M]
  ------------------
  524|   135k|      *value = std::to_string(*(static_cast<const double*>(opt_address)));
  525|   135k|      break;
  526|      0|    case OptionType::kAtomicInt:
  ------------------
  |  Branch (526:5): [True: 0, False: 4.43M]
  ------------------
  527|      0|      *value = std::to_string(static_cast<const std::atomic<int>*>(opt_address)
  528|      0|                                  ->load(std::memory_order_acquire));
  529|      0|      break;
  530|  72.2k|    case OptionType::kString:
  ------------------
  |  Branch (530:5): [True: 72.2k, False: 4.36M]
  ------------------
  531|  72.2k|      *value =
  532|  72.2k|          EscapeOptionString(*(static_cast<const std::string*>(opt_address)));
  533|  72.2k|      break;
  534|  18.0k|    case OptionType::kCompactionStyle:
  ------------------
  |  Branch (534:5): [True: 18.0k, False: 4.41M]
  ------------------
  535|  18.0k|      return SerializeEnum<CompactionStyle>(
  536|  18.0k|          compaction_style_string_map,
  537|  18.0k|          *(static_cast<const CompactionStyle*>(opt_address)), value);
  538|  18.0k|    case OptionType::kCompactionPri:
  ------------------
  |  Branch (538:5): [True: 18.0k, False: 4.41M]
  ------------------
  539|  18.0k|      return SerializeEnum<CompactionPri>(
  540|  18.0k|          compaction_pri_string_map,
  541|  18.0k|          *(static_cast<const CompactionPri*>(opt_address)), value);
  542|  72.2k|    case OptionType::kCompressionType:
  ------------------
  |  Branch (542:5): [True: 72.2k, False: 4.36M]
  ------------------
  543|  72.2k|      return SerializeEnum<CompressionType>(
  544|  72.2k|          compression_type_string_map,
  545|  72.2k|          *(static_cast<const CompressionType*>(opt_address)), value);
  546|      0|      break;
  547|  45.1k|    case OptionType::kChecksumType:
  ------------------
  |  Branch (547:5): [True: 45.1k, False: 4.38M]
  ------------------
  548|  45.1k|      return SerializeEnum<ChecksumType>(
  549|  45.1k|          checksum_type_string_map,
  550|  45.1k|          *static_cast<const ChecksumType*>(opt_address), value);
  551|      0|    case OptionType::kEncodingType:
  ------------------
  |  Branch (551:5): [True: 0, False: 4.43M]
  ------------------
  552|      0|      return SerializeEnum<EncodingType>(
  553|      0|          encoding_type_string_map,
  554|      0|          *static_cast<const EncodingType*>(opt_address), value);
  555|  18.0k|    case OptionType::kCompactionStopStyle:
  ------------------
  |  Branch (555:5): [True: 18.0k, False: 4.41M]
  ------------------
  556|  18.0k|      return SerializeEnum<CompactionStopStyle>(
  557|  18.0k|          compaction_stop_style_string_map,
  558|  18.0k|          *static_cast<const CompactionStopStyle*>(opt_address), value);
  559|      0|    case OptionType::kEncodedString: {
  ------------------
  |  Branch (559:5): [True: 0, False: 4.43M]
  ------------------
  560|      0|      const auto* ptr = static_cast<const std::string*>(opt_address);
  561|      0|      *value = (Slice(*ptr)).ToString(true);
  562|      0|      break;
  563|      0|    }
  564|  54.1k|    case OptionType::kTemperature: {
  ------------------
  |  Branch (564:5): [True: 54.1k, False: 4.37M]
  ------------------
  565|  54.1k|      return SerializeEnum<Temperature>(
  566|  54.1k|          temperature_string_map, *static_cast<const Temperature*>(opt_address),
  567|  54.1k|          value);
  568|      0|    }
  569|      0|    default:
  ------------------
  |  Branch (569:5): [True: 0, False: 4.43M]
  ------------------
  570|      0|      return false;
  571|  4.43M|  }
  572|  4.20M|  return true;
  573|  4.43M|}
_ZN7rocksdb11StringToMapERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPNS0_13unordered_mapIS6_S6_NS0_4hashIS6_EENS0_8equal_toIS6_EENS4_INS0_4pairIS7_S6_EEEEEE:
  589|  90.2k|                   std::unordered_map<std::string, std::string>* opts_map) {
  590|  90.2k|  assert(opts_map);
  591|       |  // Example:
  592|       |  //   opts_str = "write_buffer_size=1024;max_write_buffer_number=2;"
  593|       |  //              "nested_opt={opt1=1;opt2=2};max_bytes_for_level_base=100"
  594|  90.2k|  size_t pos = 0;
  595|  90.2k|  std::string opts = trim(opts_str);
  596|       |  // If the input string starts and ends with "{...}", strip off the brackets
  597|   135k|  while (opts.size() > 2 && opts[0] == '{' && opts[opts.size() - 1] == '}') {
  ------------------
  |  Branch (597:10): [True: 108k, False: 27.0k]
  |  Branch (597:29): [True: 45.1k, False: 63.1k]
  |  Branch (597:47): [True: 45.1k, False: 0]
  ------------------
  598|  45.1k|    opts = trim(opts.substr(1, opts.size() - 2));
  599|  45.1k|  }
  600|       |
  601|   749k|  while (pos < opts.size()) {
  ------------------
  |  Branch (601:10): [True: 659k, False: 90.2k]
  ------------------
  602|   659k|    size_t eq_pos = opts.find_first_of("={};", pos);
  603|   659k|    if (eq_pos == std::string::npos) {
  ------------------
  |  Branch (603:9): [True: 0, False: 659k]
  ------------------
  604|      0|      return Status::InvalidArgument("Mismatched key value pair, '=' expected");
  605|   659k|    } else if (opts[eq_pos] != '=') {
  ------------------
  |  Branch (605:16): [True: 0, False: 659k]
  ------------------
  606|      0|      return Status::InvalidArgument("Unexpected char in key");
  607|      0|    }
  608|       |
  609|   659k|    std::string key = trim(opts.substr(pos, eq_pos - pos));
  610|   659k|    if (key.empty()) {
  ------------------
  |  Branch (610:9): [True: 0, False: 659k]
  ------------------
  611|      0|      return Status::InvalidArgument("Empty key found");
  612|      0|    }
  613|       |
  614|   659k|    std::string value;
  615|   659k|    Status s = OptionTypeInfo::NextToken(opts, ';', eq_pos + 1, &pos, &value);
  616|   659k|    if (!s.ok()) {
  ------------------
  |  Branch (616:9): [True: 0, False: 659k]
  ------------------
  617|      0|      return s;
  618|   659k|    } else {
  619|   659k|      (*opts_map)[key] = value;
  620|   659k|      if (pos == std::string::npos) {
  ------------------
  |  Branch (620:11): [True: 0, False: 659k]
  ------------------
  621|      0|        break;
  622|   659k|      } else {
  623|   659k|        pos++;
  624|   659k|      }
  625|   659k|    }
  626|   659k|  }
  627|       |
  628|  90.2k|  return Status::OK();
  629|  90.2k|}
_ZN7rocksdb22GetStringFromDBOptionsERKNS_13ConfigOptionsERKNS_9DBOptionsEPNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  642|  9.02k|                              std::string* opt_string) {
  643|  9.02k|  assert(opt_string);
  644|  9.02k|  opt_string->clear();
  645|  9.02k|  auto config = DBOptionsAsConfigurable(db_options);
  646|  9.02k|  return config->GetOptionString(config_options, opt_string);
  647|  9.02k|}
_ZN7rocksdb32GetStringFromColumnFamilyOptionsERKNS_13ConfigOptionsERKNS_19ColumnFamilyOptionsEPNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEE:
  661|  9.02k|                                        std::string* opt_string) {
  662|  9.02k|  const auto config = CFOptionsAsConfigurable(cf_options);
  663|  9.02k|  return config->GetOptionString(config_options, opt_string);
  664|  9.02k|}
_ZN7rocksdb29GetColumnFamilyOptionsFromMapERKNS_13ConfigOptionsERKNS_19ColumnFamilyOptionsERKNSt3__113unordered_mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESD_NS6_4hashISD_EENS6_8equal_toISD_EENSB_INS6_4pairIKSD_SD_EEEEEEPS3_:
  681|  9.02k|    ColumnFamilyOptions* new_options) {
  682|  9.02k|  assert(new_options);
  683|       |
  684|  9.02k|  *new_options = base_options;
  685|       |
  686|  9.02k|  const auto config = CFOptionsAsConfigurable(base_options);
  687|  9.02k|  Status s = ConfigureFromMap<ColumnFamilyOptions>(
  688|  9.02k|      config_options, opts_map, OptionsHelper::kCFOptionsName, config.get(),
  689|  9.02k|      new_options);
  690|       |  // Translate any errors (NotFound, NotSupported, to InvalidArgument
  691|  9.02k|  if (s.ok() || s.IsInvalidArgument()) {
  ------------------
  |  Branch (691:7): [True: 9.02k, False: 0]
  |  Branch (691:17): [True: 0, False: 0]
  ------------------
  692|  9.02k|    return s;
  693|  9.02k|  } else {
  694|      0|    return Status::InvalidArgument(s.getState());
  695|      0|  }
  696|  9.02k|}
_ZN7rocksdb19GetDBOptionsFromMapERKNS_13ConfigOptionsERKNS_9DBOptionsERKNSt3__113unordered_mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESD_NS6_4hashISD_EENS6_8equal_toISD_EENSB_INS6_4pairIKSD_SD_EEEEEEPS3_:
  715|  9.02k|    DBOptions* new_options) {
  716|  9.02k|  assert(new_options);
  717|  9.02k|  *new_options = base_options;
  718|  9.02k|  auto config = DBOptionsAsConfigurable(base_options);
  719|  9.02k|  Status s = ConfigureFromMap<DBOptions>(config_options, opts_map,
  720|  9.02k|                                         OptionsHelper::kDBOptionsName,
  721|  9.02k|                                         config.get(), new_options);
  722|       |  // Translate any errors (NotFound, NotSupported, to InvalidArgument
  723|  9.02k|  if (s.ok() || s.IsInvalidArgument()) {
  ------------------
  |  Branch (723:7): [True: 9.02k, False: 0]
  |  Branch (723:17): [True: 0, False: 0]
  ------------------
  724|  9.02k|    return s;
  725|  9.02k|  } else {
  726|      0|    return Status::InvalidArgument(s.getState());
  727|      0|  }
  728|  9.02k|}
_ZN7rocksdb14OptionTypeInfo9NextTokenERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEcmPmPS7_:
  828|   722k|                                 size_t pos, size_t* end, std::string* token) {
  829|   722k|  while (pos < opts.size() && isspace(opts[pos])) {
  ------------------
  |  Branch (829:10): [True: 722k, False: 0]
  |  Branch (829:31): [True: 0, False: 722k]
  ------------------
  830|      0|    ++pos;
  831|      0|  }
  832|       |  // Empty value at the end
  833|   722k|  if (pos >= opts.size()) {
  ------------------
  |  Branch (833:7): [True: 0, False: 722k]
  ------------------
  834|      0|    *token = "";
  835|      0|    *end = std::string::npos;
  836|      0|    return Status::OK();
  837|   722k|  } else if (opts[pos] == '{') {
  ------------------
  |  Branch (837:14): [True: 9.02k, False: 713k]
  ------------------
  838|  9.02k|    int count = 1;
  839|  9.02k|    size_t brace_pos = pos + 1;
  840|   857k|    while (brace_pos < opts.size()) {
  ------------------
  |  Branch (840:12): [True: 857k, False: 0]
  ------------------
  841|   857k|      if (opts[brace_pos] == '{') {
  ------------------
  |  Branch (841:11): [True: 0, False: 857k]
  ------------------
  842|      0|        ++count;
  843|   857k|      } else if (opts[brace_pos] == '}') {
  ------------------
  |  Branch (843:18): [True: 9.02k, False: 848k]
  ------------------
  844|  9.02k|        --count;
  845|  9.02k|        if (count == 0) {
  ------------------
  |  Branch (845:13): [True: 9.02k, False: 0]
  ------------------
  846|  9.02k|          break;
  847|  9.02k|        }
  848|  9.02k|      }
  849|   848k|      ++brace_pos;
  850|   848k|    }
  851|       |    // found the matching closing brace
  852|  9.02k|    if (count == 0) {
  ------------------
  |  Branch (852:9): [True: 9.02k, False: 0]
  ------------------
  853|  9.02k|      *token = trim(opts.substr(pos + 1, brace_pos - pos - 1));
  854|       |      // skip all whitespace and move to the next delimiter
  855|       |      // brace_pos points to the next position after the matching '}'
  856|  9.02k|      pos = brace_pos + 1;
  857|  9.02k|      while (pos < opts.size() && isspace(opts[pos])) {
  ------------------
  |  Branch (857:14): [True: 9.02k, False: 0]
  |  Branch (857:35): [True: 0, False: 9.02k]
  ------------------
  858|      0|        ++pos;
  859|      0|      }
  860|  9.02k|      if (pos < opts.size() && opts[pos] != delimiter) {
  ------------------
  |  Branch (860:11): [True: 9.02k, False: 0]
  |  Branch (860:32): [True: 0, False: 9.02k]
  ------------------
  861|      0|        return Status::InvalidArgument("Unexpected chars after nested options");
  862|      0|      }
  863|  9.02k|      *end = pos;
  864|  9.02k|    } else {
  865|      0|      return Status::InvalidArgument(
  866|      0|          "Mismatched curly braces for nested options");
  867|      0|    }
  868|   713k|  } else {
  869|   713k|    *end = opts.find(delimiter, pos);
  870|   713k|    if (*end == std::string::npos) {
  ------------------
  |  Branch (870:9): [True: 9.02k, False: 704k]
  ------------------
  871|       |      // It either ends with a trailing semi-colon or the last key-value pair
  872|  9.02k|      *token = trim(opts.substr(pos));
  873|   704k|    } else {
  874|   704k|      *token = trim(opts.substr(pos, *end - pos));
  875|   704k|    }
  876|   713k|  }
  877|   722k|  return Status::OK();
  878|   722k|}
_ZNK7rocksdb14OptionTypeInfo5ParseERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESC_Pv:
  882|  2.44M|                             const std::string& value, void* opt_ptr) const {
  883|  2.44M|  if (IsDeprecated()) {
  ------------------
  |  Branch (883:7): [True: 0, False: 2.44M]
  ------------------
  884|      0|    return Status::OK();
  885|      0|  }
  886|  2.44M|  try {
  887|  2.44M|    const std::string& opt_value = config_options.input_strings_escaped
  ------------------
  |  Branch (887:36): [True: 2.44M, False: 0]
  ------------------
  888|  2.44M|                                       ? UnescapeOptionString(value)
  889|  2.44M|                                       : value;
  890|       |
  891|  2.44M|    if (opt_ptr == nullptr) {
  ------------------
  |  Branch (891:9): [True: 0, False: 2.44M]
  ------------------
  892|      0|      return Status::NotFound("Could not find option", opt_name);
  893|  2.44M|    } else if (parse_func_ != nullptr) {
  ------------------
  |  Branch (893:16): [True: 388k, False: 2.05M]
  ------------------
  894|   388k|      ConfigOptions copy = config_options;
  895|   388k|      copy.invoke_prepare_options = false;
  896|   388k|      void* opt_addr = GetOffset(opt_ptr);
  897|   388k|      return parse_func_(copy, opt_name, opt_value, opt_addr);
  898|  2.05M|    } else if (ParseOptionHelper(GetOffset(opt_ptr), type_, opt_value)) {
  ------------------
  |  Branch (898:16): [True: 2.05M, False: 0]
  ------------------
  899|  2.05M|      return Status::OK();
  900|  2.05M|    } else if (IsConfigurable()) {
  ------------------
  |  Branch (900:16): [True: 0, False: 0]
  ------------------
  901|       |      // The option is <config>.<name>
  902|      0|      Configurable* config = AsRawPointer<Configurable>(opt_ptr);
  903|      0|      if (opt_value.empty()) {
  ------------------
  |  Branch (903:11): [True: 0, False: 0]
  ------------------
  904|      0|        return Status::OK();
  905|      0|      } else if (config == nullptr) {
  ------------------
  |  Branch (905:18): [True: 0, False: 0]
  ------------------
  906|      0|        return Status::NotFound("Could not find configurable: ", opt_name);
  907|      0|      } else {
  908|      0|        ConfigOptions copy = config_options;
  909|      0|        copy.ignore_unknown_options = false;
  910|      0|        copy.invoke_prepare_options = false;
  911|      0|        if (opt_value.find('=') != std::string::npos) {
  ------------------
  |  Branch (911:13): [True: 0, False: 0]
  ------------------
  912|      0|          return config->ConfigureFromString(copy, opt_value);
  913|      0|        } else {
  914|      0|          return config->ConfigureOption(copy, opt_name, opt_value);
  915|      0|        }
  916|      0|      }
  917|      0|    } else if (IsByName()) {
  ------------------
  |  Branch (917:16): [True: 0, False: 0]
  ------------------
  918|      0|      return Status::NotSupported("Deserializing the option " + opt_name +
  919|      0|                                  " is not supported");
  920|      0|    } else {
  921|      0|      return Status::InvalidArgument("Error parsing:", opt_name);
  922|      0|    }
  923|  2.44M|  } catch (std::exception& e) {
  924|      0|    return Status::InvalidArgument("Error parsing " + opt_name + ":" +
  925|      0|                                   std::string(e.what()));
  926|      0|  }
  927|  2.44M|}
_ZN7rocksdb14OptionTypeInfo9ParseTypeERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKNS4_13unordered_mapISA_S0_NS4_4hashISA_EENS4_8equal_toISA_EENS8_INS4_4pairISB_S0_EEEEEEPvPNSD_ISA_SA_SF_SH_NS8_INSI_ISB_SA_EEEEEE:
  932|  54.1k|    void* opt_addr, std::unordered_map<std::string, std::string>* unused) {
  933|  54.1k|  std::unordered_map<std::string, std::string> opts_map;
  934|  54.1k|  Status status = StringToMap(opts_str, &opts_map);
  935|  54.1k|  if (!status.ok()) {
  ------------------
  |  Branch (935:7): [True: 0, False: 54.1k]
  ------------------
  936|      0|    return status;
  937|  54.1k|  } else {
  938|  54.1k|    return ParseType(config_options, opts_map, type_map, opt_addr, unused);
  939|  54.1k|  }
  940|  54.1k|}
_ZN7rocksdb14OptionTypeInfo9ParseTypeERKNS_13ConfigOptionsERKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESB_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_SB_EEEEEERKNS5_ISB_S0_SD_SF_NS9_INSG_ISH_S0_EEEEEEPvPSK_:
  946|  54.1k|    void* opt_addr, std::unordered_map<std::string, std::string>* unused) {
  947|   370k|  for (const auto& opts_iter : opts_map) {
  ------------------
  |  Branch (947:30): [True: 370k, False: 54.1k]
  ------------------
  948|   370k|    std::string opt_name;
  949|   370k|    const auto* opt_info = Find(opts_iter.first, type_map, &opt_name);
  950|   370k|    if (opt_info != nullptr) {
  ------------------
  |  Branch (950:9): [True: 370k, False: 0]
  ------------------
  951|   370k|      Status status =
  952|   370k|          opt_info->Parse(config_options, opt_name, opts_iter.second, opt_addr);
  953|   370k|      if (!status.ok()) {
  ------------------
  |  Branch (953:11): [True: 0, False: 370k]
  ------------------
  954|      0|        return status;
  955|      0|      }
  956|   370k|    } else if (unused != nullptr) {
  ------------------
  |  Branch (956:16): [True: 0, False: 0]
  ------------------
  957|      0|      (*unused)[opts_iter.first] = opts_iter.second;
  958|      0|    } else if (!config_options.ignore_unknown_options) {
  ------------------
  |  Branch (958:16): [True: 0, False: 0]
  ------------------
  959|      0|      return Status::NotFound("Unrecognized option", opts_iter.first);
  960|      0|    }
  961|   370k|  }
  962|  54.1k|  return Status::OK();
  963|  54.1k|}
_ZN7rocksdb14OptionTypeInfo11ParseStructERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPKNS4_13unordered_mapISA_S0_NS4_4hashISA_EENS4_8equal_toISA_EENS8_INS4_4pairISB_S0_EEEEEESC_SC_Pv:
  968|  54.1k|    const std::string& opt_name, const std::string& opt_value, void* opt_addr) {
  969|  54.1k|  assert(struct_map);
  970|  54.1k|  Status status;
  971|  54.1k|  if (opt_name == struct_name || EndsWith(opt_name, "." + struct_name)) {
  ------------------
  |  Branch (971:7): [True: 54.1k, False: 0]
  |  Branch (971:7): [True: 54.1k, False: 0]
  |  Branch (971:34): [True: 0, False: 0]
  ------------------
  972|       |    // This option represents the entire struct
  973|  54.1k|    std::unordered_map<std::string, std::string> unused;
  974|  54.1k|    status =
  975|  54.1k|        ParseType(config_options, opt_value, *struct_map, opt_addr, &unused);
  976|  54.1k|    if (status.ok() && !unused.empty()) {
  ------------------
  |  Branch (976:9): [True: 54.1k, False: 0]
  |  Branch (976:24): [True: 0, False: 54.1k]
  ------------------
  977|      0|      status = Status::InvalidArgument(
  978|      0|          "Unrecognized option", struct_name + "." + unused.begin()->first);
  979|      0|    }
  980|  54.1k|  } else if (StartsWith(opt_name, struct_name + ".")) {
  ------------------
  |  Branch (980:14): [True: 0, False: 0]
  ------------------
  981|       |    // This option represents a nested field in the struct (e.g, struct.field)
  982|      0|    std::string elem_name;
  983|      0|    const auto opt_info =
  984|      0|        Find(opt_name.substr(struct_name.size() + 1), *struct_map, &elem_name);
  985|      0|    if (opt_info != nullptr) {
  ------------------
  |  Branch (985:9): [True: 0, False: 0]
  ------------------
  986|      0|      status = opt_info->Parse(config_options, elem_name, opt_value, opt_addr);
  987|      0|    } else {
  988|      0|      status = Status::InvalidArgument("Unrecognized option", opt_name);
  989|      0|    }
  990|      0|  } else {
  991|       |    // This option represents a field in the struct (e.g. field)
  992|      0|    std::string elem_name;
  993|      0|    const auto opt_info = Find(opt_name, *struct_map, &elem_name);
  994|      0|    if (opt_info != nullptr) {
  ------------------
  |  Branch (994:9): [True: 0, False: 0]
  ------------------
  995|      0|      status = opt_info->Parse(config_options, elem_name, opt_value, opt_addr);
  996|      0|    } else {
  997|      0|      status = Status::InvalidArgument("Unrecognized option",
  998|      0|                                       struct_name + "." + opt_name);
  999|      0|    }
 1000|      0|  }
 1001|  54.1k|  return status;
 1002|  54.1k|}
_ZNK7rocksdb14OptionTypeInfo9SerializeERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPKvPSA_:
 1007|  5.31M|                                 std::string* opt_value) const {
 1008|       |  // If the option is no longer used in rocksdb and marked as deprecated,
 1009|       |  // we skip it in the serialization.
 1010|  5.31M|  if (opt_ptr == nullptr || IsDeprecated()) {
  ------------------
  |  Branch (1010:7): [True: 0, False: 5.31M]
  |  Branch (1010:29): [True: 0, False: 5.31M]
  ------------------
 1011|      0|    return Status::OK();
 1012|  5.31M|  } else if (IsEnabled(OptionTypeFlags::kDontSerialize)) {
  ------------------
  |  Branch (1012:14): [True: 0, False: 5.31M]
  ------------------
 1013|      0|    return Status::NotSupported("Cannot serialize option: ", opt_name);
 1014|  5.31M|  } else if (serialize_func_ != nullptr) {
  ------------------
  |  Branch (1014:14): [True: 613k, False: 4.70M]
  ------------------
 1015|   613k|    const void* opt_addr = GetOffset(opt_ptr);
 1016|   613k|    return serialize_func_(config_options, opt_name, opt_addr, opt_value);
 1017|  4.70M|  } else if (IsCustomizable()) {
  ------------------
  |  Branch (1017:14): [True: 270k, False: 4.43M]
  ------------------
 1018|   270k|    const Customizable* custom = AsRawPointer<Customizable>(opt_ptr);
 1019|   270k|    opt_value->clear();
 1020|   270k|    if (custom == nullptr) {
  ------------------
  |  Branch (1020:9): [True: 189k, False: 81.2k]
  ------------------
 1021|       |      // We do not have a custom object to serialize.
 1022|       |      // If the option is not mutable and we are doing only mutable options,
 1023|       |      // we return an empty string (which will cause the option not to be
 1024|       |      // printed). Otherwise, we return the "nullptr" string, which will result
 1025|       |      // in "option=nullptr" being printed.
 1026|   189k|      if (IsMutable() || !config_options.mutable_options_only) {
  ------------------
  |  Branch (1026:11): [True: 18.0k, False: 171k]
  |  Branch (1026:26): [True: 171k, False: 0]
  ------------------
 1027|   189k|        *opt_value = kNullptrString;
 1028|   189k|      } else {
 1029|      0|        *opt_value = "";
 1030|      0|      }
 1031|   189k|    } else if (IsEnabled(OptionTypeFlags::kStringNameOnly) &&
  ------------------
  |  Branch (1031:16): [True: 18.0k, False: 63.1k]
  ------------------
 1032|  81.2k|               !config_options.IsDetailed()) {
  ------------------
  |  Branch (1032:16): [True: 9.02k, False: 9.02k]
  ------------------
 1033|  9.02k|      if (!config_options.mutable_options_only || IsMutable()) {
  ------------------
  |  Branch (1033:11): [True: 9.02k, False: 0]
  |  Branch (1033:51): [True: 0, False: 0]
  ------------------
 1034|  9.02k|        *opt_value = custom->GetId();
 1035|  9.02k|      }
 1036|  72.2k|    } else {
 1037|  72.2k|      ConfigOptions embedded = config_options;
 1038|  72.2k|      embedded.delimiter = ";";
 1039|       |      // If this option is mutable, everything inside it should be considered
 1040|       |      // mutable
 1041|  72.2k|      if (IsMutable()) {
  ------------------
  |  Branch (1041:11): [True: 0, False: 72.2k]
  ------------------
 1042|      0|        embedded.mutable_options_only = false;
 1043|      0|      }
 1044|  72.2k|      std::string value = custom->ToString(embedded);
 1045|  72.2k|      if (!embedded.mutable_options_only ||
  ------------------
  |  Branch (1045:11): [True: 72.2k, False: 0]
  ------------------
 1046|  72.2k|          value.find('=') != std::string::npos) {
  ------------------
  |  Branch (1046:11): [True: 0, False: 0]
  ------------------
 1047|  72.2k|        *opt_value = value;
 1048|  72.2k|      } else {
 1049|      0|        *opt_value = "";
 1050|      0|      }
 1051|  72.2k|    }
 1052|   270k|    return Status::OK();
 1053|  4.43M|  } else if (IsConfigurable()) {
  ------------------
  |  Branch (1053:14): [True: 0, False: 4.43M]
  ------------------
 1054|      0|    const Configurable* config = AsRawPointer<Configurable>(opt_ptr);
 1055|      0|    if (config != nullptr) {
  ------------------
  |  Branch (1055:9): [True: 0, False: 0]
  ------------------
 1056|      0|      ConfigOptions embedded = config_options;
 1057|      0|      embedded.delimiter = ";";
 1058|      0|      *opt_value = config->ToString(embedded);
 1059|      0|    }
 1060|      0|    return Status::OK();
 1061|  4.43M|  } else if (config_options.mutable_options_only && !IsMutable()) {
  ------------------
  |  Branch (1061:14): [True: 0, False: 4.43M]
  |  Branch (1061:53): [True: 0, False: 0]
  ------------------
 1062|      0|    return Status::OK();
 1063|  4.43M|  } else if (SerializeSingleOptionHelper(GetOffset(opt_ptr), type_,
  ------------------
  |  Branch (1063:14): [True: 4.43M, False: 0]
  ------------------
 1064|  4.43M|                                         opt_value)) {
 1065|  4.43M|    return Status::OK();
 1066|  4.43M|  } else {
 1067|      0|    return Status::InvalidArgument("Cannot serialize option: ", opt_name);
 1068|      0|  }
 1069|  5.31M|}
_ZN7rocksdb14OptionTypeInfo13SerializeTypeERKNS_13ConfigOptionsERKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEES0_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_S0_EEEEEEPKvPSB_:
 1074|   117k|    const void* opt_addr, std::string* result) {
 1075|   117k|  Status status;
 1076|   785k|  for (const auto& iter : type_map) {
  ------------------
  |  Branch (1076:25): [True: 785k, False: 117k]
  ------------------
 1077|   785k|    std::string single;
 1078|   785k|    const auto& opt_info = iter.second;
 1079|   785k|    if (opt_info.ShouldSerialize()) {
  ------------------
  |  Branch (1079:9): [True: 767k, False: 18.0k]
  ------------------
 1080|   767k|      status =
 1081|   767k|          opt_info.Serialize(config_options, iter.first, opt_addr, &single);
 1082|   767k|      if (!status.ok()) {
  ------------------
  |  Branch (1082:11): [True: 0, False: 767k]
  ------------------
 1083|      0|        return status;
 1084|   767k|      } else {
 1085|   767k|        result->append(iter.first + "=" + single + config_options.delimiter);
 1086|   767k|      }
 1087|   767k|    }
 1088|   785k|  }
 1089|   117k|  return status;
 1090|   117k|}
_ZN7rocksdb14OptionTypeInfo15SerializeStructERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPKNS4_13unordered_mapISA_S0_NS4_4hashISA_EENS4_8equal_toISA_EENS8_INS4_4pairISB_S0_EEEEEESC_PKvPSA_:
 1095|   117k|    const std::string& opt_name, const void* opt_addr, std::string* value) {
 1096|   117k|  assert(struct_map);
 1097|   117k|  Status status;
 1098|   117k|  if (EndsWith(opt_name, struct_name)) {
  ------------------
  |  Branch (1098:7): [True: 117k, False: 0]
  ------------------
 1099|       |    // We are going to write the struct as "{ prop1=value1; prop2=value2;}.
 1100|       |    // Set the delimiter to ";" so that the everything will be on one line.
 1101|   117k|    ConfigOptions embedded = config_options;
 1102|   117k|    embedded.delimiter = ";";
 1103|       |
 1104|       |    // This option represents the entire struct
 1105|   117k|    std::string result;
 1106|   117k|    status = SerializeType(embedded, *struct_map, opt_addr, &result);
 1107|   117k|    if (!status.ok()) {
  ------------------
  |  Branch (1107:9): [True: 0, False: 117k]
  ------------------
 1108|      0|      return status;
 1109|   117k|    } else {
 1110|   117k|      *value = "{" + result + "}";
 1111|   117k|    }
 1112|   117k|  } else if (StartsWith(opt_name, struct_name + ".")) {
  ------------------
  |  Branch (1112:14): [True: 0, False: 0]
  ------------------
 1113|       |    // This option represents a nested field in the struct (e.g, struct.field)
 1114|      0|    std::string elem_name;
 1115|      0|    const auto opt_info =
 1116|      0|        Find(opt_name.substr(struct_name.size() + 1), *struct_map, &elem_name);
 1117|      0|    if (opt_info != nullptr) {
  ------------------
  |  Branch (1117:9): [True: 0, False: 0]
  ------------------
 1118|      0|      status = opt_info->Serialize(config_options, elem_name, opt_addr, value);
 1119|      0|    } else {
 1120|      0|      status = Status::InvalidArgument("Unrecognized option", opt_name);
 1121|      0|    }
 1122|      0|  } else {
 1123|       |    // This option represents a field in the struct (e.g. field)
 1124|      0|    std::string elem_name;
 1125|      0|    const auto opt_info = Find(opt_name, *struct_map, &elem_name);
 1126|      0|    if (opt_info == nullptr) {
  ------------------
  |  Branch (1126:9): [True: 0, False: 0]
  ------------------
 1127|      0|      status = Status::InvalidArgument("Unrecognized option", opt_name);
 1128|      0|    } else if (opt_info->ShouldSerialize()) {
  ------------------
  |  Branch (1128:16): [True: 0, False: 0]
  ------------------
 1129|      0|      status = opt_info->Serialize(config_options, opt_name + "." + elem_name,
 1130|      0|                                   opt_addr, value);
 1131|      0|    }
 1132|      0|  }
 1133|   117k|  return status;
 1134|   117k|}
_ZNK7rocksdb14OptionTypeInfo8AreEqualERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPKvSE_PSA_:
 1210|  1.94M|                              std::string* mismatch) const {
 1211|  1.94M|  auto level = GetSanityLevel();
 1212|  1.94M|  if (!config_options.IsCheckEnabled(level)) {
  ------------------
  |  Branch (1212:7): [True: 9.02k, False: 1.93M]
  ------------------
 1213|  9.02k|    return true;  // If the sanity level is not being checked, skip it
 1214|  9.02k|  }
 1215|  1.93M|  if (this_ptr == nullptr || that_ptr == nullptr) {
  ------------------
  |  Branch (1215:7): [True: 0, False: 1.93M]
  |  Branch (1215:30): [True: 0, False: 1.93M]
  ------------------
 1216|      0|    if (this_ptr == that_ptr) {
  ------------------
  |  Branch (1216:9): [True: 0, False: 0]
  ------------------
 1217|      0|      return true;
 1218|      0|    }
 1219|  1.93M|  } else if (equals_func_ != nullptr) {
  ------------------
  |  Branch (1219:14): [True: 162k, False: 1.76M]
  ------------------
 1220|   162k|    const void* this_addr = GetOffset(this_ptr);
 1221|   162k|    const void* that_addr = GetOffset(that_ptr);
 1222|   162k|    if (equals_func_(config_options, opt_name, this_addr, that_addr,
  ------------------
  |  Branch (1222:9): [True: 162k, False: 0]
  ------------------
 1223|   162k|                     mismatch)) {
 1224|   162k|      return true;
 1225|   162k|    }
 1226|  1.76M|  } else {
 1227|  1.76M|    const void* this_addr = GetOffset(this_ptr);
 1228|  1.76M|    const void* that_addr = GetOffset(that_ptr);
 1229|  1.76M|    if (AreOptionsEqual(type_, this_addr, that_addr)) {
  ------------------
  |  Branch (1229:9): [True: 1.67M, False: 99.3k]
  ------------------
 1230|  1.67M|      return true;
 1231|  1.67M|    } else if (IsConfigurable()) {
  ------------------
  |  Branch (1231:16): [True: 99.3k, False: 0]
  ------------------
 1232|  99.3k|      const auto* this_config = AsRawPointer<Configurable>(this_ptr);
 1233|  99.3k|      const auto* that_config = AsRawPointer<Configurable>(that_ptr);
 1234|  99.3k|      if (this_config == that_config) {
  ------------------
  |  Branch (1234:11): [True: 81.2k, False: 18.0k]
  ------------------
 1235|  81.2k|        return true;
 1236|  81.2k|      } else if (this_config != nullptr && that_config != nullptr) {
  ------------------
  |  Branch (1236:18): [True: 18.0k, False: 0]
  |  Branch (1236:44): [True: 18.0k, False: 0]
  ------------------
 1237|  18.0k|        std::string bad_name;
 1238|  18.0k|        bool matches;
 1239|  18.0k|        if (level < config_options.sanity_level) {
  ------------------
  |  Branch (1239:13): [True: 9.02k, False: 9.02k]
  ------------------
 1240|  9.02k|          ConfigOptions copy = config_options;
 1241|  9.02k|          copy.sanity_level = level;
 1242|  9.02k|          matches = this_config->AreEquivalent(copy, that_config, &bad_name);
 1243|  9.02k|        } else {
 1244|  9.02k|          matches = this_config->AreEquivalent(config_options, that_config,
 1245|  9.02k|                                               &bad_name);
 1246|  9.02k|        }
 1247|  18.0k|        if (!matches) {
  ------------------
  |  Branch (1247:13): [True: 0, False: 18.0k]
  ------------------
 1248|      0|          *mismatch = opt_name + "." + bad_name;
 1249|      0|        }
 1250|  18.0k|        return matches;
 1251|  18.0k|      }
 1252|  99.3k|    }
 1253|  1.76M|  }
 1254|      0|  if (mismatch->empty()) {
  ------------------
  |  Branch (1254:7): [True: 0, False: 0]
  ------------------
 1255|      0|    *mismatch = opt_name;
 1256|      0|  }
 1257|      0|  return false;
 1258|  1.93M|}
_ZN7rocksdb14OptionTypeInfo13TypesAreEqualERKNS_13ConfigOptionsERKNSt3__113unordered_mapINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEES0_NS4_4hashISB_EENS4_8equal_toISB_EENS9_INS4_4pairIKSB_S0_EEEEEEPKvSO_PSB_:
 1263|  27.0k|    const void* this_addr, const void* that_addr, std::string* mismatch) {
 1264|   153k|  for (const auto& iter : type_map) {
  ------------------
  |  Branch (1264:25): [True: 153k, False: 27.0k]
  ------------------
 1265|   153k|    const auto& opt_info = iter.second;
 1266|   153k|    if (!opt_info.AreEqual(config_options, iter.first, this_addr, that_addr,
  ------------------
  |  Branch (1266:9): [True: 0, False: 153k]
  ------------------
 1267|   153k|                           mismatch)) {
 1268|      0|      return false;
 1269|      0|    }
 1270|   153k|  }
 1271|  27.0k|  return true;
 1272|  27.0k|}
_ZN7rocksdb14OptionTypeInfo15StructsAreEqualERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPKNS4_13unordered_mapISA_S0_NS4_4hashISA_EENS4_8equal_toISA_EENS8_INS4_4pairISB_S0_EEEEEESC_PKvSP_PSA_:
 1278|  27.0k|    std::string* mismatch) {
 1279|  27.0k|  assert(struct_map);
 1280|  27.0k|  bool matches = true;
 1281|  27.0k|  std::string result;
 1282|  27.0k|  if (EndsWith(opt_name, struct_name)) {
  ------------------
  |  Branch (1282:7): [True: 27.0k, False: 0]
  ------------------
 1283|       |    // This option represents the entire struct
 1284|  27.0k|    matches = TypesAreEqual(config_options, *struct_map, this_addr, that_addr,
 1285|  27.0k|                            &result);
 1286|  27.0k|    if (!matches) {
  ------------------
  |  Branch (1286:9): [True: 0, False: 27.0k]
  ------------------
 1287|      0|      *mismatch = struct_name + "." + result;
 1288|      0|      return false;
 1289|      0|    }
 1290|  27.0k|  } else if (StartsWith(opt_name, struct_name + ".")) {
  ------------------
  |  Branch (1290:14): [True: 0, False: 0]
  ------------------
 1291|       |    // This option represents a nested field in the struct (e.g, struct.field)
 1292|      0|    std::string elem_name;
 1293|      0|    const auto opt_info =
 1294|      0|        Find(opt_name.substr(struct_name.size() + 1), *struct_map, &elem_name);
 1295|      0|    assert(opt_info);
 1296|      0|    if (opt_info == nullptr) {
  ------------------
  |  Branch (1296:9): [True: 0, False: 0]
  ------------------
 1297|      0|      *mismatch = opt_name;
 1298|      0|      matches = false;
 1299|      0|    } else if (!opt_info->AreEqual(config_options, elem_name, this_addr,
  ------------------
  |  Branch (1299:16): [True: 0, False: 0]
  ------------------
 1300|      0|                                   that_addr, &result)) {
 1301|      0|      matches = false;
 1302|      0|      *mismatch = struct_name + "." + result;
 1303|      0|    }
 1304|      0|  } else {
 1305|       |    // This option represents a field in the struct (e.g. field)
 1306|      0|    std::string elem_name;
 1307|      0|    const auto opt_info = Find(opt_name, *struct_map, &elem_name);
 1308|      0|    assert(opt_info);
 1309|      0|    if (opt_info == nullptr) {
  ------------------
  |  Branch (1309:9): [True: 0, False: 0]
  ------------------
 1310|      0|      *mismatch = struct_name + "." + opt_name;
 1311|      0|      matches = false;
 1312|      0|    } else if (!opt_info->AreEqual(config_options, elem_name, this_addr,
  ------------------
  |  Branch (1312:16): [True: 0, False: 0]
  ------------------
 1313|      0|                                   that_addr, &result)) {
 1314|      0|      matches = false;
 1315|      0|      *mismatch = struct_name + "." + result;
 1316|      0|    }
 1317|      0|  }
 1318|  27.0k|  return matches;
 1319|  27.0k|}
_ZNK7rocksdb14OptionTypeInfo7PrepareERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPv:
 1376|   108k|                               const std::string& name, void* opt_ptr) const {
 1377|   108k|  if (ShouldPrepare()) {
  ------------------
  |  Branch (1377:7): [True: 108k, False: 0]
  ------------------
 1378|   108k|    if (prepare_func_ != nullptr) {
  ------------------
  |  Branch (1378:9): [True: 9.02k, False: 99.3k]
  ------------------
 1379|  9.02k|      void* opt_addr = GetOffset(opt_ptr);
 1380|  9.02k|      return prepare_func_(config_options, name, opt_addr);
 1381|  99.3k|    } else if (IsConfigurable()) {
  ------------------
  |  Branch (1381:16): [True: 99.3k, False: 0]
  ------------------
 1382|  99.3k|      Configurable* config = AsRawPointer<Configurable>(opt_ptr);
 1383|  99.3k|      if (config != nullptr) {
  ------------------
  |  Branch (1383:11): [True: 18.0k, False: 81.2k]
  ------------------
 1384|  18.0k|        return config->PrepareOptions(config_options);
 1385|  81.2k|      } else if (!CanBeNull()) {
  ------------------
  |  Branch (1385:18): [True: 0, False: 81.2k]
  ------------------
 1386|      0|        return Status::NotFound("Missing configurable object", name);
 1387|      0|      }
 1388|  99.3k|    }
 1389|   108k|  }
 1390|  81.2k|  return Status::OK();
 1391|   108k|}
_ZNK7rocksdb14OptionTypeInfo8ValidateERKNS_9DBOptionsERKNS_19ColumnFamilyOptionsERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEPKv:
 1396|   135k|                                const void* opt_ptr) const {
 1397|   135k|  if (ShouldValidate()) {
  ------------------
  |  Branch (1397:7): [True: 135k, False: 0]
  ------------------
 1398|   135k|    if (validate_func_ != nullptr) {
  ------------------
  |  Branch (1398:9): [True: 9.02k, False: 126k]
  ------------------
 1399|  9.02k|      const void* opt_addr = GetOffset(opt_ptr);
 1400|  9.02k|      return validate_func_(db_opts, cf_opts, name, opt_addr);
 1401|   126k|    } else if (IsConfigurable()) {
  ------------------
  |  Branch (1401:16): [True: 126k, False: 0]
  ------------------
 1402|   126k|      const Configurable* config = AsRawPointer<Configurable>(opt_ptr);
 1403|   126k|      if (config != nullptr) {
  ------------------
  |  Branch (1403:11): [True: 36.1k, False: 90.2k]
  ------------------
 1404|  36.1k|        return config->ValidateOptions(db_opts, cf_opts);
 1405|  90.2k|      } else if (!CanBeNull()) {
  ------------------
  |  Branch (1405:18): [True: 0, False: 90.2k]
  ------------------
 1406|      0|        return Status::NotFound("Missing configurable object", name);
 1407|      0|      }
 1408|   126k|    }
 1409|   135k|  }
 1410|  90.2k|  return Status::OK();
 1411|   135k|}
_ZN7rocksdb14OptionTypeInfo4FindERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS1_13unordered_mapIS7_S0_NS1_4hashIS7_EENS1_8equal_toIS7_EENS5_INS1_4pairIS8_S0_EEEEEEPS7_:
 1416|  4.00M|    std::string* elem_name) {
 1417|  4.00M|  const auto iter = opt_map.find(opt_name);  // Look up the value in the map
 1418|  4.00M|  if (iter != opt_map.end()) {               // Found the option in the map
  ------------------
  |  Branch (1418:7): [True: 2.38M, False: 1.62M]
  ------------------
 1419|  2.38M|    *elem_name = opt_name;                   // Return the name
 1420|  2.38M|    return &(iter->second);  // Return the contents of the iterator
 1421|  2.38M|  } else {
 1422|  1.62M|    auto idx = opt_name.find('.');              // Look for a separator
 1423|  1.62M|    if (idx > 0 && idx != std::string::npos) {  // We found a separator
  ------------------
  |  Branch (1423:9): [True: 1.62M, False: 0]
  |  Branch (1423:20): [True: 0, False: 1.62M]
  ------------------
 1424|      0|      auto siter =
 1425|      0|          opt_map.find(opt_name.substr(0, idx));  // Look for the short name
 1426|      0|      if (siter != opt_map.end()) {               // We found the short name
  ------------------
  |  Branch (1426:11): [True: 0, False: 0]
  ------------------
 1427|      0|        if (siter->second.IsStruct() ||           // If the object is a struct
  ------------------
  |  Branch (1427:13): [True: 0, False: 0]
  ------------------
 1428|      0|            siter->second.IsConfigurable()) {     // or a Configurable
  ------------------
  |  Branch (1428:13): [True: 0, False: 0]
  ------------------
 1429|      0|          *elem_name = opt_name.substr(idx + 1);  // Return the rest
 1430|      0|          return &(siter->second);  // Return the contents of the iterator
 1431|      0|        }
 1432|      0|      }
 1433|      0|    }
 1434|  1.62M|  }
 1435|  1.62M|  return nullptr;
 1436|  4.00M|}
options_helper.cc:_ZN7rocksdbL17ParseOptionHelperEPvRKNS_10OptionTypeERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  404|  2.05M|                              const std::string& value) {
  405|  2.05M|  switch (opt_type) {
  406|   794k|    case OptionType::kBoolean:
  ------------------
  |  Branch (406:5): [True: 794k, False: 1.26M]
  ------------------
  407|   794k|      *static_cast<bool*>(opt_address) = ParseBoolean("", value);
  408|   794k|      break;
  409|   370k|    case OptionType::kInt:
  ------------------
  |  Branch (409:5): [True: 370k, False: 1.68M]
  ------------------
  410|   370k|      *static_cast<int*>(opt_address) = ParseInt(value);
  411|   370k|      break;
  412|      0|    case OptionType::kInt32T:
  ------------------
  |  Branch (412:5): [True: 0, False: 2.05M]
  ------------------
  413|      0|      *static_cast<int32_t*>(opt_address) = ParseInt32(value);
  414|      0|      break;
  415|  9.02k|    case OptionType::kInt64T:
  ------------------
  |  Branch (415:5): [True: 9.02k, False: 2.04M]
  ------------------
  416|  9.02k|      PutUnaligned(static_cast<int64_t*>(opt_address), ParseInt64(value));
  417|  9.02k|      break;
  418|  54.1k|    case OptionType::kUInt:
  ------------------
  |  Branch (418:5): [True: 54.1k, False: 2.00M]
  ------------------
  419|  54.1k|      *static_cast<unsigned int*>(opt_address) = ParseUint32(value);
  420|  54.1k|      break;
  421|  9.02k|    case OptionType::kUInt8T:
  ------------------
  |  Branch (421:5): [True: 9.02k, False: 2.04M]
  ------------------
  422|  9.02k|      *static_cast<uint8_t*>(opt_address) = ParseUint8(value);
  423|  9.02k|      break;
  424|   108k|    case OptionType::kUInt32T:
  ------------------
  |  Branch (424:5): [True: 108k, False: 1.95M]
  ------------------
  425|   108k|      *static_cast<uint32_t*>(opt_address) = ParseUint32(value);
  426|   108k|      break;
  427|   334k|    case OptionType::kUInt64T:
  ------------------
  |  Branch (427:5): [True: 334k, False: 1.72M]
  ------------------
  428|   334k|      PutUnaligned(static_cast<uint64_t*>(opt_address), ParseUint64(value));
  429|   334k|      break;
  430|   198k|    case OptionType::kSizeT:
  ------------------
  |  Branch (430:5): [True: 198k, False: 1.85M]
  ------------------
  431|   198k|      PutUnaligned(static_cast<size_t*>(opt_address), ParseSizeT(value));
  432|   198k|      break;
  433|      0|    case OptionType::kAtomicInt:
  ------------------
  |  Branch (433:5): [True: 0, False: 2.05M]
  ------------------
  434|      0|      static_cast<std::atomic<int>*>(opt_address)
  435|      0|          ->store(ParseInt(value), std::memory_order_release);
  436|      0|      break;
  437|  9.02k|    case OptionType::kString:
  ------------------
  |  Branch (437:5): [True: 9.02k, False: 2.04M]
  ------------------
  438|  9.02k|      *static_cast<std::string*>(opt_address) = value;
  439|  9.02k|      break;
  440|  63.1k|    case OptionType::kDouble:
  ------------------
  |  Branch (440:5): [True: 63.1k, False: 1.99M]
  ------------------
  441|  63.1k|      *static_cast<double*>(opt_address) = ParseDouble(value);
  442|  63.1k|      break;
  443|  9.02k|    case OptionType::kCompactionStyle:
  ------------------
  |  Branch (443:5): [True: 9.02k, False: 2.04M]
  ------------------
  444|  9.02k|      return ParseEnum<CompactionStyle>(
  445|  9.02k|          compaction_style_string_map, value,
  446|  9.02k|          static_cast<CompactionStyle*>(opt_address));
  447|  9.02k|    case OptionType::kCompactionPri:
  ------------------
  |  Branch (447:5): [True: 9.02k, False: 2.04M]
  ------------------
  448|  9.02k|      return ParseEnum<CompactionPri>(compaction_pri_string_map, value,
  449|  9.02k|                                      static_cast<CompactionPri*>(opt_address));
  450|  36.1k|    case OptionType::kCompressionType:
  ------------------
  |  Branch (450:5): [True: 36.1k, False: 2.02M]
  ------------------
  451|  36.1k|      return ParseEnum<CompressionType>(
  452|  36.1k|          compression_type_string_map, value,
  453|  36.1k|          static_cast<CompressionType*>(opt_address));
  454|  18.0k|    case OptionType::kChecksumType:
  ------------------
  |  Branch (454:5): [True: 18.0k, False: 2.04M]
  ------------------
  455|  18.0k|      return ParseEnum<ChecksumType>(checksum_type_string_map, value,
  456|  18.0k|                                     static_cast<ChecksumType*>(opt_address));
  457|      0|    case OptionType::kEncodingType:
  ------------------
  |  Branch (457:5): [True: 0, False: 2.05M]
  ------------------
  458|      0|      return ParseEnum<EncodingType>(encoding_type_string_map, value,
  459|      0|                                     static_cast<EncodingType*>(opt_address));
  460|  9.02k|    case OptionType::kCompactionStopStyle:
  ------------------
  |  Branch (460:5): [True: 9.02k, False: 2.04M]
  ------------------
  461|  9.02k|      return ParseEnum<CompactionStopStyle>(
  462|  9.02k|          compaction_stop_style_string_map, value,
  463|  9.02k|          static_cast<CompactionStopStyle*>(opt_address));
  464|      0|    case OptionType::kEncodedString: {
  ------------------
  |  Branch (464:5): [True: 0, False: 2.05M]
  ------------------
  465|      0|      std::string* output_addr = static_cast<std::string*>(opt_address);
  466|      0|      (Slice(value)).DecodeHex(output_addr);
  467|      0|      break;
  468|      0|    }
  469|  27.0k|    case OptionType::kTemperature: {
  ------------------
  |  Branch (469:5): [True: 27.0k, False: 2.03M]
  ------------------
  470|  27.0k|      return ParseEnum<Temperature>(temperature_string_map, value,
  471|  27.0k|                                    static_cast<Temperature*>(opt_address));
  472|      0|    }
  473|      0|    default:
  ------------------
  |  Branch (473:5): [True: 0, False: 2.05M]
  ------------------
  474|      0|      return false;
  475|  2.05M|  }
  476|  1.95M|  return true;
  477|  2.05M|}
options_helper.cc:_ZN7rocksdbL15AreOptionsEqualENS_10OptionTypeEPKvS2_:
 1146|  1.76M|                            const void* that_offset) {
 1147|  1.76M|  switch (type) {
 1148|   622k|    case OptionType::kBoolean:
  ------------------
  |  Branch (1148:5): [True: 622k, False: 1.14M]
  ------------------
 1149|   622k|      return IsOptionEqual<bool>(this_offset, that_offset);
 1150|   252k|    case OptionType::kInt:
  ------------------
  |  Branch (1150:5): [True: 252k, False: 1.51M]
  ------------------
 1151|   252k|      return IsOptionEqual<int>(this_offset, that_offset);
 1152|  54.1k|    case OptionType::kUInt:
  ------------------
  |  Branch (1152:5): [True: 54.1k, False: 1.71M]
  ------------------
 1153|  54.1k|      return IsOptionEqual<unsigned int>(this_offset, that_offset);
 1154|      0|    case OptionType::kInt32T:
  ------------------
  |  Branch (1154:5): [True: 0, False: 1.76M]
  ------------------
 1155|      0|      return IsOptionEqual<int32_t>(this_offset, that_offset);
 1156|  9.02k|    case OptionType::kInt64T: {
  ------------------
  |  Branch (1156:5): [True: 9.02k, False: 1.76M]
  ------------------
 1157|  9.02k|      int64_t v1, v2;
 1158|  9.02k|      GetUnaligned(static_cast<const int64_t*>(this_offset), &v1);
 1159|  9.02k|      GetUnaligned(static_cast<const int64_t*>(that_offset), &v2);
 1160|  9.02k|      return (v1 == v2);
 1161|      0|    }
 1162|  9.02k|    case OptionType::kUInt8T:
  ------------------
  |  Branch (1162:5): [True: 9.02k, False: 1.76M]
  ------------------
 1163|  9.02k|      return IsOptionEqual<uint8_t>(this_offset, that_offset);
 1164|  72.2k|    case OptionType::kUInt32T:
  ------------------
  |  Branch (1164:5): [True: 72.2k, False: 1.69M]
  ------------------
 1165|  72.2k|      return IsOptionEqual<uint32_t>(this_offset, that_offset);
 1166|   297k|    case OptionType::kUInt64T: {
  ------------------
  |  Branch (1166:5): [True: 297k, False: 1.47M]
  ------------------
 1167|   297k|      uint64_t v1, v2;
 1168|   297k|      GetUnaligned(static_cast<const uint64_t*>(this_offset), &v1);
 1169|   297k|      GetUnaligned(static_cast<const uint64_t*>(that_offset), &v2);
 1170|   297k|      return (v1 == v2);
 1171|      0|    }
 1172|   180k|    case OptionType::kSizeT: {
  ------------------
  |  Branch (1172:5): [True: 180k, False: 1.58M]
  ------------------
 1173|   180k|      size_t v1, v2;
 1174|   180k|      GetUnaligned(static_cast<const size_t*>(this_offset), &v1);
 1175|   180k|      GetUnaligned(static_cast<const size_t*>(that_offset), &v2);
 1176|   180k|      return (v1 == v2);
 1177|      0|    }
 1178|      0|    case OptionType::kAtomicInt:
  ------------------
  |  Branch (1178:5): [True: 0, False: 1.76M]
  ------------------
 1179|      0|      return IsOptionEqual<std::atomic<int>>(this_offset, that_offset);
 1180|  27.0k|    case OptionType::kString:
  ------------------
  |  Branch (1180:5): [True: 27.0k, False: 1.74M]
  ------------------
 1181|  27.0k|      return IsOptionEqual<std::string>(this_offset, that_offset);
 1182|  54.1k|    case OptionType::kDouble:
  ------------------
  |  Branch (1182:5): [True: 54.1k, False: 1.71M]
  ------------------
 1183|  54.1k|      return AreEqualDoubles(*static_cast<const double*>(this_offset),
 1184|  54.1k|                             *static_cast<const double*>(that_offset));
 1185|  9.02k|    case OptionType::kCompactionStyle:
  ------------------
  |  Branch (1185:5): [True: 9.02k, False: 1.76M]
  ------------------
 1186|  9.02k|      return IsOptionEqual<CompactionStyle>(this_offset, that_offset);
 1187|  9.02k|    case OptionType::kCompactionStopStyle:
  ------------------
  |  Branch (1187:5): [True: 9.02k, False: 1.76M]
  ------------------
 1188|  9.02k|      return IsOptionEqual<CompactionStopStyle>(this_offset, that_offset);
 1189|  9.02k|    case OptionType::kCompactionPri:
  ------------------
  |  Branch (1189:5): [True: 9.02k, False: 1.76M]
  ------------------
 1190|  9.02k|      return IsOptionEqual<CompactionPri>(this_offset, that_offset);
 1191|  36.1k|    case OptionType::kCompressionType:
  ------------------
  |  Branch (1191:5): [True: 36.1k, False: 1.73M]
  ------------------
 1192|  36.1k|      return IsOptionEqual<CompressionType>(this_offset, that_offset);
 1193|  9.02k|    case OptionType::kChecksumType:
  ------------------
  |  Branch (1193:5): [True: 9.02k, False: 1.76M]
  ------------------
 1194|  9.02k|      return IsOptionEqual<ChecksumType>(this_offset, that_offset);
 1195|      0|    case OptionType::kEncodingType:
  ------------------
  |  Branch (1195:5): [True: 0, False: 1.76M]
  ------------------
 1196|      0|      return IsOptionEqual<EncodingType>(this_offset, that_offset);
 1197|      0|    case OptionType::kEncodedString:
  ------------------
  |  Branch (1197:5): [True: 0, False: 1.76M]
  ------------------
 1198|      0|      return IsOptionEqual<std::string>(this_offset, that_offset);
 1199|  18.0k|    case OptionType::kTemperature:
  ------------------
  |  Branch (1199:5): [True: 18.0k, False: 1.75M]
  ------------------
 1200|  18.0k|      return IsOptionEqual<Temperature>(this_offset, that_offset);
 1201|  99.3k|    default:
  ------------------
  |  Branch (1201:5): [True: 99.3k, False: 1.67M]
  ------------------
 1202|  99.3k|      return false;
 1203|  1.76M|  }  // End switch
 1204|  1.76M|}
_ZN7rocksdb13IsOptionEqualIbEEbPKvS2_:
 1137|   622k|bool IsOptionEqual(const void* offset1, const void* offset2) {
 1138|   622k|  return (*static_cast<const T*>(offset1) == *static_cast<const T*>(offset2));
 1139|   622k|}
_ZN7rocksdb13IsOptionEqualIiEEbPKvS2_:
 1137|   252k|bool IsOptionEqual(const void* offset1, const void* offset2) {
 1138|   252k|  return (*static_cast<const T*>(offset1) == *static_cast<const T*>(offset2));
 1139|   252k|}
_ZN7rocksdb13IsOptionEqualIjEEbPKvS2_:
 1137|   126k|bool IsOptionEqual(const void* offset1, const void* offset2) {
 1138|   126k|  return (*static_cast<const T*>(offset1) == *static_cast<const T*>(offset2));
 1139|   126k|}
_ZN7rocksdb13IsOptionEqualIhEEbPKvS2_:
 1137|  9.02k|bool IsOptionEqual(const void* offset1, const void* offset2) {
 1138|  9.02k|  return (*static_cast<const T*>(offset1) == *static_cast<const T*>(offset2));
 1139|  9.02k|}
_ZN7rocksdb13IsOptionEqualINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEbPKvS9_:
 1137|  27.0k|bool IsOptionEqual(const void* offset1, const void* offset2) {
 1138|  27.0k|  return (*static_cast<const T*>(offset1) == *static_cast<const T*>(offset2));
 1139|  27.0k|}
options_helper.cc:_ZN7rocksdbL15AreEqualDoublesEdd:
 1141|  54.1k|static bool AreEqualDoubles(const double a, const double b) {
 1142|  54.1k|  return (fabs(a - b) < 0.00001);
 1143|  54.1k|}
_ZN7rocksdb13IsOptionEqualINS_15CompactionStyleEEEbPKvS3_:
 1137|  9.02k|bool IsOptionEqual(const void* offset1, const void* offset2) {
 1138|  9.02k|  return (*static_cast<const T*>(offset1) == *static_cast<const T*>(offset2));
 1139|  9.02k|}
_ZN7rocksdb13IsOptionEqualINS_19CompactionStopStyleEEEbPKvS3_:
 1137|  9.02k|bool IsOptionEqual(const void* offset1, const void* offset2) {
 1138|  9.02k|  return (*static_cast<const T*>(offset1) == *static_cast<const T*>(offset2));
 1139|  9.02k|}
_ZN7rocksdb13IsOptionEqualINS_13CompactionPriEEEbPKvS3_:
 1137|  9.02k|bool IsOptionEqual(const void* offset1, const void* offset2) {
 1138|  9.02k|  return (*static_cast<const T*>(offset1) == *static_cast<const T*>(offset2));
 1139|  9.02k|}
_ZN7rocksdb13IsOptionEqualINS_15CompressionTypeEEEbPKvS3_:
 1137|  36.1k|bool IsOptionEqual(const void* offset1, const void* offset2) {
 1138|  36.1k|  return (*static_cast<const T*>(offset1) == *static_cast<const T*>(offset2));
 1139|  36.1k|}
_ZN7rocksdb13IsOptionEqualINS_12ChecksumTypeEEEbPKvS3_:
 1137|  9.02k|bool IsOptionEqual(const void* offset1, const void* offset2) {
 1138|  9.02k|  return (*static_cast<const T*>(offset1) == *static_cast<const T*>(offset2));
 1139|  9.02k|}
_ZN7rocksdb13IsOptionEqualINS_11TemperatureEEEbPKvS3_:
 1137|  18.0k|bool IsOptionEqual(const void* offset1, const void* offset2) {
 1138|  18.0k|  return (*static_cast<const T*>(offset1) == *static_cast<const T*>(offset2));
 1139|  18.0k|}
_ZN7rocksdb16ConfigureFromMapINS_19ColumnFamilyOptionsEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__113unordered_mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESD_NS6_4hashISD_EENS6_8equal_toISD_EENSB_INS6_4pairIKSD_SD_EEEEEERSJ_PNS_12ConfigurableEPT_:
  579|  9.02k|    const std::string& option_name, Configurable* config, T* new_opts) {
  580|  9.02k|  Status s = config->ConfigureFromMap(config_options, opt_map);
  581|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (581:7): [True: 9.02k, False: 0]
  ------------------
  582|  9.02k|    *new_opts = *(config->GetOptions<T>(option_name));
  583|  9.02k|  }
  584|  9.02k|  return s;
  585|  9.02k|}
_ZN7rocksdb16ConfigureFromMapINS_9DBOptionsEEENS_6StatusERKNS_13ConfigOptionsERKNSt3__113unordered_mapINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESD_NS6_4hashISD_EENS6_8equal_toISD_EENSB_INS6_4pairIKSD_SD_EEEEEERSJ_PNS_12ConfigurableEPT_:
  579|  9.02k|    const std::string& option_name, Configurable* config, T* new_opts) {
  580|  9.02k|  Status s = config->ConfigureFromMap(config_options, opt_map);
  581|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (581:7): [True: 9.02k, False: 0]
  ------------------
  582|  9.02k|    *new_opts = *(config->GetOptions<T>(option_name));
  583|  9.02k|  }
  584|  9.02k|  return s;
  585|  9.02k|}

_ZN7rocksdb23IsSupportedChecksumTypeENS_12ChecksumTypeE:
   34|  4.48k|inline bool IsSupportedChecksumType(ChecksumType type) {
   35|       |  // Avoid annoying compiler warning-as-error (-Werror=type-limits)
   36|  4.48k|  auto min = kNoChecksum;
   37|  4.48k|  auto max = kXXH3;
   38|  4.48k|  return type >= min && type <= max;
  ------------------
  |  Branch (38:10): [True: 4.48k, False: 0]
  |  Branch (38:25): [True: 4.48k, False: 0]
  ------------------
   39|  4.48k|}

_ZN7rocksdb21PersistRocksDBOptionsERKNS_12WriteOptionsERKNS_9DBOptionsERKNSt3__16vectorINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENSB_ISD_EEEERKNS7_INS_19ColumnFamilyOptionsENSB_ISI_EEEERKSD_PNS_10FileSystemE:
   42|  9.02k|                             const std::string& file_name, FileSystem* fs) {
   43|  9.02k|  ConfigOptions
   44|  9.02k|      config_options;  // Use default for escaped(true) and check (exact)
   45|  9.02k|  config_options.delimiter = "\n  ";
   46|       |  // Do not invoke PrepareOptions when we are doing validation.
   47|  9.02k|  config_options.invoke_prepare_options = false;
   48|       |  // If a readahead size was set in the input options, use it
   49|  9.02k|  if (db_opt.log_readahead_size > 0) {
  ------------------
  |  Branch (49:7): [True: 0, False: 9.02k]
  ------------------
   50|      0|    config_options.file_readahead_size = db_opt.log_readahead_size;
   51|      0|  }
   52|  9.02k|  return PersistRocksDBOptions(write_options, config_options, db_opt, cf_names,
   53|  9.02k|                               cf_opts, file_name, fs);
   54|  9.02k|}
_ZN7rocksdb21PersistRocksDBOptionsERKNS_12WriteOptionsERKNS_13ConfigOptionsERKNS_9DBOptionsERKNSt3__16vectorINS9_12basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEENSE_ISG_EEEERKNSA_INS_19ColumnFamilyOptionsENSE_ISL_EEEERKSG_PNS_10FileSystemE:
   61|  9.02k|                             const std::string& file_name, FileSystem* fs) {
   62|  9.02k|  ConfigOptions config_options = config_options_in;
   63|  9.02k|  config_options.delimiter = "\n  ";  // Override the default to nl
   64|       |
   65|  9.02k|  TEST_SYNC_POINT("PersistRocksDBOptions:start");
   66|  9.02k|  if (cf_names.size() != cf_opts.size()) {
  ------------------
  |  Branch (66:7): [True: 0, False: 9.02k]
  ------------------
   67|      0|    return Status::InvalidArgument(
   68|      0|        "cf_names.size() and cf_opts.size() must be the same");
   69|      0|  }
   70|  9.02k|  std::unique_ptr<FSWritableFile> wf;
   71|       |
   72|  9.02k|  Status s =
   73|  9.02k|      fs->NewWritableFile(file_name, FileOptions(), &wf, nullptr);
   74|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (74:7): [True: 0, False: 9.02k]
  ------------------
   75|      0|    return s;
   76|      0|  }
   77|  9.02k|  std::unique_ptr<WritableFileWriter> writable;
   78|  9.02k|  writable.reset(new WritableFileWriter(std::move(wf), file_name, EnvOptions(),
   79|  9.02k|                                        nullptr /* statistics */));
   80|  9.02k|  TEST_SYNC_POINT("PersistRocksDBOptions:create");
   81|       |
   82|  9.02k|  std::string options_file_content;
   83|       |
   84|  9.02k|  IOOptions opts;
   85|  9.02k|  s = WritableFileWriter::PrepareIOOptions(write_options, opts);
   86|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (86:7): [True: 9.02k, False: 0]
  ------------------
   87|  9.02k|    s = writable->Append(opts, option_file_header + "[" +
   88|  9.02k|                                   opt_section_titles[kOptionSectionVersion] +
   89|  9.02k|                                   "]\n"
   90|  9.02k|                                   "  rocksdb_version=" +
   91|  9.02k|                                   std::to_string(ROCKSDB_MAJOR) + "." +
  ------------------
  |  |   14|  9.02k|#define ROCKSDB_MAJOR 9
  ------------------
   92|  9.02k|                                   std::to_string(ROCKSDB_MINOR) + "." +
  ------------------
  |  |   15|  9.02k|#define ROCKSDB_MINOR 6
  ------------------
   93|  9.02k|                                   std::to_string(ROCKSDB_PATCH) + "\n");
  ------------------
  |  |   16|  9.02k|#define ROCKSDB_PATCH 0
  ------------------
   94|  9.02k|  }
   95|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (95:7): [True: 9.02k, False: 0]
  ------------------
   96|  9.02k|    s = writable->Append(
   97|  9.02k|        opts,
   98|  9.02k|        "  options_file_version=" + std::to_string(ROCKSDB_OPTION_FILE_MAJOR) +
  ------------------
  |  |   21|  9.02k|#define ROCKSDB_OPTION_FILE_MAJOR 1
  ------------------
   99|  9.02k|            "." + std::to_string(ROCKSDB_OPTION_FILE_MINOR) + "\n");
  ------------------
  |  |   22|  9.02k|#define ROCKSDB_OPTION_FILE_MINOR 1
  ------------------
  100|  9.02k|  }
  101|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (101:7): [True: 9.02k, False: 0]
  ------------------
  102|  9.02k|    s = writable->Append(
  103|  9.02k|        opts, "\n[" + opt_section_titles[kOptionSectionDBOptions] + "]\n  ");
  104|  9.02k|  }
  105|       |
  106|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (106:7): [True: 9.02k, False: 0]
  ------------------
  107|  9.02k|    s = GetStringFromDBOptions(config_options, db_opt, &options_file_content);
  108|  9.02k|  }
  109|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (109:7): [True: 9.02k, False: 0]
  ------------------
  110|  9.02k|    s = writable->Append(opts, options_file_content + "\n");
  111|  9.02k|  }
  112|       |
  113|  18.0k|  for (size_t i = 0; s.ok() && i < cf_opts.size(); ++i) {
  ------------------
  |  Branch (113:22): [True: 18.0k, False: 0]
  |  Branch (113:32): [True: 9.02k, False: 9.02k]
  ------------------
  114|       |    // CFOptions section
  115|  9.02k|    s = writable->Append(
  116|  9.02k|        opts, "\n[" + opt_section_titles[kOptionSectionCFOptions] + " \"" +
  117|  9.02k|                  EscapeOptionString(cf_names[i]) + "\"]\n  ");
  118|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (118:9): [True: 9.02k, False: 0]
  ------------------
  119|  9.02k|      s = GetStringFromColumnFamilyOptions(config_options, cf_opts[i],
  120|  9.02k|                                           &options_file_content);
  121|  9.02k|    }
  122|  9.02k|    if (s.ok()) {
  ------------------
  |  Branch (122:9): [True: 9.02k, False: 0]
  ------------------
  123|  9.02k|      s = writable->Append(opts, options_file_content + "\n");
  124|  9.02k|    }
  125|       |    // TableOptions section
  126|  9.02k|    auto* tf = cf_opts[i].table_factory.get();
  127|  9.02k|    if (tf != nullptr) {
  ------------------
  |  Branch (127:9): [True: 9.02k, False: 0]
  ------------------
  128|  9.02k|      if (s.ok()) {
  ------------------
  |  Branch (128:11): [True: 9.02k, False: 0]
  ------------------
  129|  9.02k|        s = writable->Append(
  130|  9.02k|            opts, "[" + opt_section_titles[kOptionSectionTableOptions] +
  131|  9.02k|                      tf->Name() + " \"" + EscapeOptionString(cf_names[i]) +
  132|  9.02k|                      "\"]\n  ");
  133|  9.02k|      }
  134|  9.02k|      if (s.ok()) {
  ------------------
  |  Branch (134:11): [True: 9.02k, False: 0]
  ------------------
  135|  9.02k|        options_file_content.clear();
  136|  9.02k|        s = tf->GetOptionString(config_options, &options_file_content);
  137|  9.02k|      }
  138|  9.02k|      if (s.ok()) {
  ------------------
  |  Branch (138:11): [True: 9.02k, False: 0]
  ------------------
  139|  9.02k|        s = writable->Append(opts, options_file_content + "\n");
  140|  9.02k|      }
  141|  9.02k|    }
  142|  9.02k|  }
  143|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (143:7): [True: 9.02k, False: 0]
  ------------------
  144|  9.02k|    s = writable->Sync(opts, true /* use_fsync */);
  145|  9.02k|  }
  146|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (146:7): [True: 9.02k, False: 0]
  ------------------
  147|  9.02k|    s = writable->Close(opts);
  148|  9.02k|  }
  149|  9.02k|  TEST_SYNC_POINT("PersistRocksDBOptions:written");
  150|  9.02k|  if (s.ok()) {
  ------------------
  |  Branch (150:7): [True: 9.02k, False: 0]
  ------------------
  151|  9.02k|    return RocksDBOptionsParser::VerifyRocksDBOptionsFromFile(
  152|  9.02k|        config_options, db_opt, cf_names, cf_opts, file_name, fs);
  153|  9.02k|  }
  154|      0|  return s;
  155|  9.02k|}
_ZN7rocksdb20RocksDBOptionsParserC2Ev:
  157|  9.02k|RocksDBOptionsParser::RocksDBOptionsParser() { Reset(); }
_ZN7rocksdb20RocksDBOptionsParser5ResetEv:
  159|  18.0k|void RocksDBOptionsParser::Reset() {
  160|  18.0k|  db_opt_ = DBOptions();
  161|  18.0k|  db_opt_map_.clear();
  162|  18.0k|  cf_names_.clear();
  163|  18.0k|  cf_opts_.clear();
  164|  18.0k|  cf_opt_maps_.clear();
  165|  18.0k|  has_version_section_ = false;
  166|  18.0k|  has_db_options_ = false;
  167|  18.0k|  has_default_cf_options_ = false;
  168|  72.2k|  for (int i = 0; i < 3; ++i) {
  ------------------
  |  Branch (168:19): [True: 54.1k, False: 18.0k]
  ------------------
  169|  54.1k|    db_version[i] = 0;
  170|  54.1k|    opt_file_version[i] = 0;
  171|  54.1k|  }
  172|  18.0k|}
_ZN7rocksdb20RocksDBOptionsParser9IsSectionERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  174|  1.77M|bool RocksDBOptionsParser::IsSection(const std::string& line) {
  175|  1.77M|  if (line.size() < 2) {
  ------------------
  |  Branch (175:7): [True: 0, False: 1.77M]
  ------------------
  176|      0|    return false;
  177|      0|  }
  178|  1.77M|  if (line[0] != '[' || line[line.size() - 1] != ']') {
  ------------------
  |  Branch (178:7): [True: 1.74M, False: 36.1k]
  |  Branch (178:25): [True: 0, False: 36.1k]
  ------------------
  179|  1.74M|    return false;
  180|  1.74M|  }
  181|  36.1k|  return true;
  182|  1.77M|}
_ZN7rocksdb20RocksDBOptionsParser12ParseSectionEPNS_13OptionSectionEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_RKS9_i:
  188|  36.1k|                                          const int line_num) {
  189|  36.1k|  *section = kOptionSectionUnknown;
  190|       |  // A section is of the form [<SectionName> "<SectionArg>"], where
  191|       |  // "<SectionArg>" is optional.
  192|  36.1k|  size_t arg_start_pos = line.find('\"');
  193|  36.1k|  size_t arg_end_pos = line.rfind('\"');
  194|       |  // The following if-then check tries to identify whether the input
  195|       |  // section has the optional section argument.
  196|  36.1k|  if (arg_start_pos != std::string::npos && arg_start_pos != arg_end_pos) {
  ------------------
  |  Branch (196:7): [True: 18.0k, False: 18.0k]
  |  Branch (196:45): [True: 18.0k, False: 0]
  ------------------
  197|  18.0k|    *title = TrimAndRemoveComment(line.substr(1, arg_start_pos - 1), true);
  198|  18.0k|    *argument = UnescapeOptionString(
  199|  18.0k|        line.substr(arg_start_pos + 1, arg_end_pos - arg_start_pos - 1));
  200|  18.0k|  } else {
  201|  18.0k|    *title = TrimAndRemoveComment(line.substr(1, line.size() - 2), true);
  202|  18.0k|    *argument = "";
  203|  18.0k|  }
  204|  90.2k|  for (int i = 0; i < kOptionSectionUnknown; ++i) {
  ------------------
  |  Branch (204:19): [True: 90.2k, False: 0]
  ------------------
  205|  90.2k|    if (title->find(opt_section_titles[i]) == 0) {
  ------------------
  |  Branch (205:9): [True: 36.1k, False: 54.1k]
  ------------------
  206|  36.1k|      if (i == kOptionSectionVersion || i == kOptionSectionDBOptions ||
  ------------------
  |  Branch (206:11): [True: 9.02k, False: 27.0k]
  |  Branch (206:41): [True: 9.02k, False: 18.0k]
  ------------------
  207|  36.1k|          i == kOptionSectionCFOptions) {
  ------------------
  |  Branch (207:11): [True: 9.02k, False: 9.02k]
  ------------------
  208|  27.0k|        if (title->size() == opt_section_titles[i].size()) {
  ------------------
  |  Branch (208:13): [True: 27.0k, False: 0]
  ------------------
  209|       |          // if true, then it indicats equal
  210|  27.0k|          *section = static_cast<OptionSection>(i);
  211|  27.0k|          return CheckSection(*section, *argument, line_num);
  212|  27.0k|        }
  213|  27.0k|      } else if (i == kOptionSectionTableOptions) {
  ------------------
  |  Branch (213:18): [True: 9.02k, False: 0]
  ------------------
  214|       |        // This type of sections has a sufffix at the end of the
  215|       |        // section title
  216|  9.02k|        if (title->size() > opt_section_titles[i].size()) {
  ------------------
  |  Branch (216:13): [True: 9.02k, False: 0]
  ------------------
  217|  9.02k|          *section = static_cast<OptionSection>(i);
  218|  9.02k|          return CheckSection(*section, *argument, line_num);
  219|  9.02k|        }
  220|  9.02k|      }
  221|  36.1k|    }
  222|  90.2k|  }
  223|      0|  return Status::InvalidArgument(std::string("Unknown section ") + line);
  224|  36.1k|}
_ZN7rocksdb20RocksDBOptionsParser14ParseStatementEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES8_RKS7_i:
  236|  1.74M|                                            const int line_num) {
  237|  1.74M|  size_t eq_pos = line.find('=');
  238|  1.74M|  if (eq_pos == std::string::npos) {
  ------------------
  |  Branch (238:7): [True: 0, False: 1.74M]
  ------------------
  239|      0|    return InvalidArgument(line_num, "A valid statement must have a '='.");
  240|      0|  }
  241|       |
  242|  1.74M|  *name = TrimAndRemoveComment(line.substr(0, eq_pos), true);
  243|  1.74M|  *value =
  244|  1.74M|      TrimAndRemoveComment(line.substr(eq_pos + 1, line.size() - eq_pos - 1));
  245|  1.74M|  if (name->empty()) {
  ------------------
  |  Branch (245:7): [True: 0, False: 1.74M]
  ------------------
  246|      0|    return InvalidArgument(line_num,
  247|      0|                           "A valid statement must have a variable name.");
  248|      0|  }
  249|  1.74M|  return Status::OK();
  250|  1.74M|}
_ZN7rocksdb20RocksDBOptionsParser5ParseERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS_10FileSystemE:
  266|  9.02k|                                   FileSystem* fs) {
  267|  9.02k|  Reset();
  268|  9.02k|  ConfigOptions config_options = config_options_in;
  269|       |
  270|  9.02k|  std::unique_ptr<FSSequentialFile> seq_file;
  271|  9.02k|  Status s = fs->NewSequentialFile(file_name, FileOptions(), &seq_file,
  272|  9.02k|                                   nullptr);
  273|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (273:7): [True: 0, False: 9.02k]
  ------------------
  274|      0|    return s;
  275|      0|  }
  276|  9.02k|  LineFileReader lf_reader(std::move(seq_file), file_name,
  277|  9.02k|                           config_options.file_readahead_size);
  278|       |
  279|  9.02k|  OptionSection section = kOptionSectionUnknown;
  280|  9.02k|  std::string title;
  281|  9.02k|  std::string argument;
  282|  9.02k|  std::unordered_map<std::string, std::string> opt_map;
  283|  9.02k|  std::string line;
  284|       |  // we only support single-lined statement.
  285|  1.88M|  while (lf_reader.ReadLine(&line, Env::IO_TOTAL /* rate_limiter_priority */)) {
  ------------------
  |  Branch (285:10): [True: 1.87M, False: 9.02k]
  ------------------
  286|  1.87M|    int line_num = static_cast<int>(lf_reader.GetLineNumber());
  287|  1.87M|    line = TrimAndRemoveComment(line);
  288|  1.87M|    if (line.empty()) {
  ------------------
  |  Branch (288:9): [True: 99.3k, False: 1.77M]
  ------------------
  289|  99.3k|      continue;
  290|  99.3k|    }
  291|  1.77M|    if (IsSection(line)) {
  ------------------
  |  Branch (291:9): [True: 36.1k, False: 1.74M]
  ------------------
  292|  36.1k|      s = EndSection(config_options, section, title, argument, opt_map);
  293|  36.1k|      opt_map.clear();
  294|  36.1k|      if (!s.ok()) {
  ------------------
  |  Branch (294:11): [True: 0, False: 36.1k]
  ------------------
  295|      0|        return s;
  296|      0|      }
  297|       |
  298|       |      // If the option file is not generated by a higher minor version,
  299|       |      // there shouldn't be any unknown option.
  300|  36.1k|      if (config_options.ignore_unknown_options &&
  ------------------
  |  Branch (300:11): [True: 0, False: 36.1k]
  ------------------
  301|  36.1k|          section == kOptionSectionVersion) {
  ------------------
  |  Branch (301:11): [True: 0, False: 0]
  ------------------
  302|      0|        if (db_version[0] < ROCKSDB_MAJOR || (db_version[0] == ROCKSDB_MAJOR &&
  ------------------
  |  |   14|      0|#define ROCKSDB_MAJOR 9
  ------------------
                      if (db_version[0] < ROCKSDB_MAJOR || (db_version[0] == ROCKSDB_MAJOR &&
  ------------------
  |  |   14|      0|#define ROCKSDB_MAJOR 9
  ------------------
  |  Branch (302:13): [True: 0, False: 0]
  |  Branch (302:47): [True: 0, False: 0]
  ------------------
  303|      0|                                              db_version[1] <= ROCKSDB_MINOR)) {
  ------------------
  |  |   15|      0|#define ROCKSDB_MINOR 6
  ------------------
  |  Branch (303:47): [True: 0, False: 0]
  ------------------
  304|      0|          config_options.ignore_unknown_options = false;
  305|      0|        }
  306|      0|      }
  307|       |
  308|  36.1k|      s = ParseSection(&section, &title, &argument, line, line_num);
  309|  36.1k|      if (!s.ok()) {
  ------------------
  |  Branch (309:11): [True: 0, False: 36.1k]
  ------------------
  310|      0|        return s;
  311|      0|      }
  312|  1.74M|    } else {
  313|  1.74M|      std::string name;
  314|  1.74M|      std::string value;
  315|  1.74M|      s = ParseStatement(&name, &value, line, line_num);
  316|  1.74M|      if (!s.ok()) {
  ------------------
  |  Branch (316:11): [True: 0, False: 1.74M]
  ------------------
  317|      0|        return s;
  318|      0|      }
  319|  1.74M|      opt_map.insert({name, value});
  320|  1.74M|    }
  321|  1.77M|  }
  322|  9.02k|  s = lf_reader.GetStatus();
  323|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (323:7): [True: 0, False: 9.02k]
  ------------------
  324|      0|    return s;
  325|      0|  }
  326|       |
  327|  9.02k|  s = EndSection(config_options, section, title, argument, opt_map);
  328|  9.02k|  opt_map.clear();
  329|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (329:7): [True: 0, False: 9.02k]
  ------------------
  330|      0|    return s;
  331|      0|  }
  332|  9.02k|  return ValidityCheck();
  333|  9.02k|}
_ZN7rocksdb20RocksDBOptionsParser12CheckSectionENS_13OptionSectionERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEi:
  337|  36.1k|                                          const int line_num) {
  338|  36.1k|  if (section == kOptionSectionDBOptions) {
  ------------------
  |  Branch (338:7): [True: 9.02k, False: 27.0k]
  ------------------
  339|  9.02k|    if (has_db_options_) {
  ------------------
  |  Branch (339:9): [True: 0, False: 9.02k]
  ------------------
  340|      0|      return InvalidArgument(
  341|      0|          line_num,
  342|      0|          "More than one DBOption section found in the option config file");
  343|      0|    }
  344|  9.02k|    has_db_options_ = true;
  345|  27.0k|  } else if (section == kOptionSectionCFOptions) {
  ------------------
  |  Branch (345:14): [True: 9.02k, False: 18.0k]
  ------------------
  346|  9.02k|    bool is_default_cf = (section_arg == kDefaultColumnFamilyName);
  347|  9.02k|    if (cf_opts_.size() == 0 && !is_default_cf) {
  ------------------
  |  Branch (347:9): [True: 9.02k, False: 0]
  |  Branch (347:33): [True: 0, False: 9.02k]
  ------------------
  348|      0|      return InvalidArgument(
  349|      0|          line_num,
  350|      0|          "Default column family must be the first CFOptions section "
  351|      0|          "in the option config file");
  352|  9.02k|    } else if (cf_opts_.size() != 0 && is_default_cf) {
  ------------------
  |  Branch (352:16): [True: 0, False: 9.02k]
  |  Branch (352:40): [True: 0, False: 0]
  ------------------
  353|      0|      return InvalidArgument(
  354|      0|          line_num,
  355|      0|          "Default column family must be the first CFOptions section "
  356|      0|          "in the optio/n config file");
  357|  9.02k|    } else if (GetCFOptions(section_arg) != nullptr) {
  ------------------
  |  Branch (357:16): [True: 0, False: 9.02k]
  ------------------
  358|      0|      return InvalidArgument(
  359|      0|          line_num,
  360|      0|          "Two identical column families found in option config file");
  361|      0|    }
  362|  9.02k|    has_default_cf_options_ |= is_default_cf;
  363|  18.0k|  } else if (section == kOptionSectionTableOptions) {
  ------------------
  |  Branch (363:14): [True: 9.02k, False: 9.02k]
  ------------------
  364|  9.02k|    if (GetCFOptions(section_arg) == nullptr) {
  ------------------
  |  Branch (364:9): [True: 0, False: 9.02k]
  ------------------
  365|      0|      return InvalidArgument(
  366|      0|          line_num, std::string(
  367|      0|                        "Does not find a matched column family name in "
  368|      0|                        "TableOptions section.  Column Family Name:") +
  369|      0|                        section_arg);
  370|      0|    }
  371|  9.02k|  } else if (section == kOptionSectionVersion) {
  ------------------
  |  Branch (371:14): [True: 9.02k, False: 0]
  ------------------
  372|  9.02k|    if (has_version_section_) {
  ------------------
  |  Branch (372:9): [True: 0, False: 9.02k]
  ------------------
  373|      0|      return InvalidArgument(
  374|      0|          line_num,
  375|      0|          "More than one Version section found in the option config file.");
  376|      0|    }
  377|  9.02k|    has_version_section_ = true;
  378|  9.02k|  }
  379|  36.1k|  return Status::OK();
  380|  36.1k|}
_ZN7rocksdb20RocksDBOptionsParser18ParseVersionNumberERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_iPi:
  385|  18.0k|                                                int* version) {
  386|  18.0k|  int version_index = 0;
  387|  18.0k|  int current_number = 0;
  388|  18.0k|  int current_digit_count = 0;
  389|  18.0k|  bool has_dot = false;
  390|  63.1k|  for (int i = 0; i < max_count; ++i) {
  ------------------
  |  Branch (390:19): [True: 45.1k, False: 18.0k]
  ------------------
  391|  45.1k|    version[i] = 0;
  392|  45.1k|  }
  393|  18.0k|  constexpr int kBufferSize = 200;
  394|  18.0k|  char buffer[kBufferSize];
  395|  90.2k|  for (size_t i = 0; i < ver_string.size(); ++i) {
  ------------------
  |  Branch (395:22): [True: 72.2k, False: 18.0k]
  ------------------
  396|  72.2k|    if (ver_string[i] == '.') {
  ------------------
  |  Branch (396:9): [True: 27.0k, False: 45.1k]
  ------------------
  397|  27.0k|      if (version_index >= max_count - 1) {
  ------------------
  |  Branch (397:11): [True: 0, False: 27.0k]
  ------------------
  398|      0|        snprintf(buffer, sizeof(buffer) - 1,
  399|      0|                 "A valid %s can only contains at most %d dots.",
  400|      0|                 ver_name.c_str(), max_count - 1);
  401|      0|        return Status::InvalidArgument(buffer);
  402|      0|      }
  403|  27.0k|      if (current_digit_count == 0) {
  ------------------
  |  Branch (403:11): [True: 0, False: 27.0k]
  ------------------
  404|      0|        snprintf(buffer, sizeof(buffer) - 1,
  405|      0|                 "A valid %s must have at least one digit before each dot.",
  406|      0|                 ver_name.c_str());
  407|      0|        return Status::InvalidArgument(buffer);
  408|      0|      }
  409|  27.0k|      version[version_index++] = current_number;
  410|  27.0k|      current_number = 0;
  411|  27.0k|      current_digit_count = 0;
  412|  27.0k|      has_dot = true;
  413|  45.1k|    } else if (isdigit(ver_string[i])) {
  ------------------
  |  Branch (413:16): [True: 45.1k, False: 0]
  ------------------
  414|  45.1k|      current_number = current_number * 10 + (ver_string[i] - '0');
  415|  45.1k|      current_digit_count++;
  416|  45.1k|    } else {
  417|      0|      snprintf(buffer, sizeof(buffer) - 1,
  418|      0|               "A valid %s can only contains dots and numbers.",
  419|      0|               ver_name.c_str());
  420|      0|      return Status::InvalidArgument(buffer);
  421|      0|    }
  422|  72.2k|  }
  423|  18.0k|  version[version_index] = current_number;
  424|  18.0k|  if (has_dot && current_digit_count == 0) {
  ------------------
  |  Branch (424:7): [True: 18.0k, False: 0]
  |  Branch (424:18): [True: 0, False: 18.0k]
  ------------------
  425|      0|    snprintf(buffer, sizeof(buffer) - 1,
  426|      0|             "A valid %s must have at least one digit after each dot.",
  427|      0|             ver_name.c_str());
  428|      0|    return Status::InvalidArgument(buffer);
  429|      0|  }
  430|  18.0k|  return Status::OK();
  431|  18.0k|}
_ZN7rocksdb20RocksDBOptionsParser10EndSectionERKNS_13ConfigOptionsENS_13OptionSectionERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESD_RKNS5_13unordered_mapISB_SB_NS5_4hashISB_EENS5_8equal_toISB_EENS9_INS5_4pairISC_SB_EEEEEE:
  436|  45.1k|    const std::unordered_map<std::string, std::string>& opt_map) {
  437|  45.1k|  Status s;
  438|  45.1k|  if (section == kOptionSectionDBOptions) {
  ------------------
  |  Branch (438:7): [True: 9.02k, False: 36.1k]
  ------------------
  439|  9.02k|    s = GetDBOptionsFromMap(config_options, DBOptions(), opt_map, &db_opt_);
  440|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (440:9): [True: 0, False: 9.02k]
  ------------------
  441|      0|      return s;
  442|      0|    }
  443|  9.02k|    db_opt_map_ = opt_map;
  444|  36.1k|  } else if (section == kOptionSectionCFOptions) {
  ------------------
  |  Branch (444:14): [True: 9.02k, False: 27.0k]
  ------------------
  445|       |    // This condition should be ensured earlier in ParseSection
  446|       |    // so we make an assertion here.
  447|  9.02k|    assert(GetCFOptions(section_arg) == nullptr);
  448|  9.02k|    cf_names_.emplace_back(section_arg);
  449|  9.02k|    cf_opts_.emplace_back();
  450|  9.02k|    s = GetColumnFamilyOptionsFromMap(config_options, ColumnFamilyOptions(),
  451|  9.02k|                                      opt_map, &cf_opts_.back());
  452|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (452:9): [True: 0, False: 9.02k]
  ------------------
  453|      0|      return s;
  454|      0|    }
  455|       |    // keep the parsed string.
  456|  9.02k|    cf_opt_maps_.emplace_back(opt_map);
  457|  27.0k|  } else if (section == kOptionSectionTableOptions) {
  ------------------
  |  Branch (457:14): [True: 9.02k, False: 18.0k]
  ------------------
  458|  9.02k|    assert(GetCFOptions(section_arg) != nullptr);
  459|  9.02k|    auto* cf_opt = GetCFOptionsImpl(section_arg);
  460|  9.02k|    if (cf_opt == nullptr) {
  ------------------
  |  Branch (460:9): [True: 0, False: 9.02k]
  ------------------
  461|      0|      return Status::InvalidArgument(
  462|      0|          "The specified column family must be defined before the "
  463|      0|          "TableOptions section:",
  464|      0|          section_arg);
  465|      0|    }
  466|       |    // Ignore error as table factory deserialization is optional
  467|  9.02k|    cf_opt->table_factory.reset();
  468|  9.02k|    s = TableFactory::CreateFromString(
  469|  9.02k|        config_options,
  470|  9.02k|        section_title.substr(
  471|  9.02k|            opt_section_titles[kOptionSectionTableOptions].size()),
  472|  9.02k|        &(cf_opt->table_factory));
  473|  9.02k|    if (s.ok() && cf_opt->table_factory != nullptr) {
  ------------------
  |  Branch (473:9): [True: 9.02k, False: 0]
  |  Branch (473:19): [True: 9.02k, False: 0]
  ------------------
  474|  9.02k|      s = cf_opt->table_factory->ConfigureFromMap(config_options, opt_map);
  475|       |      // Translate any errors (NotFound, NotSupported, to InvalidArgument
  476|  9.02k|      if (s.ok() || s.IsInvalidArgument()) {
  ------------------
  |  Branch (476:11): [True: 9.02k, False: 0]
  |  Branch (476:21): [True: 0, False: 0]
  ------------------
  477|  9.02k|        return s;
  478|  9.02k|      } else {
  479|      0|        return Status::InvalidArgument(s.getState());
  480|      0|      }
  481|  9.02k|    } else {
  482|       |      // Return OK for not supported table factories as TableFactory
  483|       |      // Deserialization is optional.
  484|      0|      cf_opt->table_factory.reset();
  485|      0|      return Status::OK();
  486|      0|    }
  487|  18.0k|  } else if (section == kOptionSectionVersion) {
  ------------------
  |  Branch (487:14): [True: 9.02k, False: 9.02k]
  ------------------
  488|  18.0k|    for (const auto& pair : opt_map) {
  ------------------
  |  Branch (488:27): [True: 18.0k, False: 9.02k]
  ------------------
  489|  18.0k|      if (pair.first == "rocksdb_version") {
  ------------------
  |  Branch (489:11): [True: 9.02k, False: 9.02k]
  ------------------
  490|  9.02k|        s = ParseVersionNumber(pair.first, pair.second, 3, db_version);
  491|  9.02k|        if (!s.ok()) {
  ------------------
  |  Branch (491:13): [True: 0, False: 9.02k]
  ------------------
  492|      0|          return s;
  493|      0|        }
  494|  9.02k|      } else if (pair.first == "options_file_version") {
  ------------------
  |  Branch (494:18): [True: 9.02k, False: 0]
  ------------------
  495|  9.02k|        s = ParseVersionNumber(pair.first, pair.second, 2, opt_file_version);
  496|  9.02k|        if (!s.ok()) {
  ------------------
  |  Branch (496:13): [True: 0, False: 9.02k]
  ------------------
  497|      0|          return s;
  498|      0|        }
  499|  9.02k|        if (opt_file_version[0] < 1) {
  ------------------
  |  Branch (499:13): [True: 0, False: 9.02k]
  ------------------
  500|      0|          return Status::InvalidArgument(
  501|      0|              "A valid options_file_version must be at least 1.");
  502|      0|        }
  503|  9.02k|      }
  504|  18.0k|    }
  505|  9.02k|  }
  506|  36.1k|  return s;
  507|  45.1k|}
_ZN7rocksdb20RocksDBOptionsParser13ValidityCheckEv:
  509|  9.02k|Status RocksDBOptionsParser::ValidityCheck() {
  510|  9.02k|  if (!has_db_options_) {
  ------------------
  |  Branch (510:7): [True: 0, False: 9.02k]
  ------------------
  511|      0|    return Status::Corruption(
  512|      0|        "A RocksDB Option file must have a single DBOptions section");
  513|      0|  }
  514|  9.02k|  if (!has_default_cf_options_) {
  ------------------
  |  Branch (514:7): [True: 0, False: 9.02k]
  ------------------
  515|      0|    return Status::Corruption(
  516|      0|        "A RocksDB Option file must have a single CFOptions:default section");
  517|      0|  }
  518|       |
  519|  9.02k|  return Status::OK();
  520|  9.02k|}
_ZN7rocksdb20RocksDBOptionsParser20TrimAndRemoveCommentERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEb:
  523|  5.39M|                                                       bool trim_only) {
  524|  5.39M|  size_t start = 0;
  525|  5.39M|  size_t end = line.size();
  526|       |
  527|       |  // we only support "#" style comment
  528|  5.39M|  if (!trim_only) {
  ------------------
  |  Branch (528:7): [True: 3.62M, False: 1.77M]
  ------------------
  529|  3.62M|    size_t search_pos = 0;
  530|  3.62M|    while (search_pos < line.size()) {
  ------------------
  |  Branch (530:12): [True: 3.59M, False: 27.0k]
  ------------------
  531|  3.59M|      size_t comment_pos = line.find('#', search_pos);
  532|  3.59M|      if (comment_pos == std::string::npos) {
  ------------------
  |  Branch (532:11): [True: 3.54M, False: 45.1k]
  ------------------
  533|  3.54M|        break;
  534|  3.54M|      }
  535|  45.1k|      if (comment_pos == 0 || line[comment_pos - 1] != '\\') {
  ------------------
  |  Branch (535:11): [True: 45.1k, False: 0]
  |  Branch (535:31): [True: 0, False: 0]
  ------------------
  536|  45.1k|        end = comment_pos;
  537|  45.1k|        break;
  538|  45.1k|      }
  539|      0|      search_pos = comment_pos + 1;
  540|      0|    }
  541|  3.62M|  }
  542|       |
  543|  8.93M|  while (start < end && isspace(line[start]) != 0) {
  ------------------
  |  Branch (543:10): [True: 8.83M, False: 99.3k]
  |  Branch (543:25): [True: 3.53M, False: 5.29M]
  ------------------
  544|  3.53M|    ++start;
  545|  3.53M|  }
  546|       |
  547|       |  // start < end implies end > 0.
  548|  5.41M|  while (start < end && isspace(line[end - 1]) != 0) {
  ------------------
  |  Branch (548:10): [True: 5.31M, False: 99.3k]
  |  Branch (548:25): [True: 18.0k, False: 5.29M]
  ------------------
  549|  18.0k|    --end;
  550|  18.0k|  }
  551|       |
  552|  5.39M|  if (start < end) {
  ------------------
  |  Branch (552:7): [True: 5.29M, False: 99.3k]
  ------------------
  553|  5.29M|    return line.substr(start, end - start);
  554|  5.29M|  }
  555|       |
  556|  99.3k|  return "";
  557|  5.39M|}
_ZN7rocksdb20RocksDBOptionsParser28VerifyRocksDBOptionsFromFileERKNS_13ConfigOptionsERKNS_9DBOptionsERKNSt3__16vectorINS7_12basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEENSC_ISE_EEEERKNS8_INS_19ColumnFamilyOptionsENSC_ISJ_EEEERKSE_PNS_10FileSystemE:
  563|  9.02k|    const std::string& file_name, FileSystem* fs) {
  564|  9.02k|  RocksDBOptionsParser parser;
  565|  9.02k|  ConfigOptions config_options = config_options_in;
  566|  9.02k|  config_options.invoke_prepare_options =
  567|  9.02k|      false;  // No need to do a prepare for verify
  568|  9.02k|  if (config_options.sanity_level < ConfigOptions::kSanityLevelExactMatch) {
  ------------------
  |  Branch (568:7): [True: 0, False: 9.02k]
  ------------------
  569|       |    // If we are not doing an exact comparison, we should ignore
  570|       |    // unsupported options, as they may cause the Parse to fail
  571|       |    // (if the ObjectRegistry is not initialized)
  572|      0|    config_options.ignore_unsupported_options = true;
  573|      0|  }
  574|  9.02k|  Status s = parser.Parse(config_options, file_name, fs);
  575|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (575:7): [True: 0, False: 9.02k]
  ------------------
  576|      0|    return s;
  577|      0|  }
  578|       |
  579|       |  // Verify DBOptions
  580|  9.02k|  s = VerifyDBOptions(config_options, db_opt, *parser.db_opt(),
  581|  9.02k|                      parser.db_opt_map());
  582|  9.02k|  if (!s.ok()) {
  ------------------
  |  Branch (582:7): [True: 0, False: 9.02k]
  ------------------
  583|      0|    return s;
  584|      0|  }
  585|       |
  586|       |  // Verify ColumnFamily Name
  587|  9.02k|  if (cf_names.size() != parser.cf_names()->size()) {
  ------------------
  |  Branch (587:7): [True: 0, False: 9.02k]
  ------------------
  588|      0|    if (config_options.sanity_level >=
  ------------------
  |  Branch (588:9): [True: 0, False: 0]
  ------------------
  589|      0|        ConfigOptions::kSanityLevelLooselyCompatible) {
  590|      0|      return Status::InvalidArgument(
  591|      0|          "[RocksDBOptionParser Error] The persisted options does not have "
  592|      0|          "the same number of column family names as the db instance.");
  593|      0|    } else if (cf_opts.size() > parser.cf_opts()->size()) {
  ------------------
  |  Branch (593:16): [True: 0, False: 0]
  ------------------
  594|      0|      return Status::InvalidArgument(
  595|      0|          "[RocksDBOptionsParser Error]",
  596|      0|          "The persisted options file has less number of column family "
  597|      0|          "names than that of the specified one.");
  598|      0|    }
  599|      0|  }
  600|  18.0k|  for (size_t i = 0; i < cf_names.size(); ++i) {
  ------------------
  |  Branch (600:22): [True: 9.02k, False: 9.02k]
  ------------------
  601|  9.02k|    if (cf_names[i] != parser.cf_names()->at(i)) {
  ------------------
  |  Branch (601:9): [True: 0, False: 9.02k]
  ------------------
  602|      0|      return Status::InvalidArgument(
  603|      0|          "[RocksDBOptionParser Error] The persisted options and the db"
  604|      0|          "instance does not have the same name for column family ",
  605|      0|          std::to_string(i));
  606|      0|    }
  607|  9.02k|  }
  608|       |
  609|       |  // Verify Column Family Options
  610|  9.02k|  if (cf_opts.size() != parser.cf_opts()->size()) {
  ------------------
  |  Branch (610:7): [True: 0, False: 9.02k]
  ------------------
  611|      0|    if (config_options.sanity_level >=
  ------------------
  |  Branch (611:9): [True: 0, False: 0]
  ------------------
  612|      0|        ConfigOptions::kSanityLevelLooselyCompatible) {
  613|      0|      return Status::InvalidArgument(
  614|      0|          "[RocksDBOptionsParser Error]",
  615|      0|          "The persisted options does not have the same number of "
  616|      0|          "column families as the db instance.");
  617|      0|    } else if (cf_opts.size() > parser.cf_opts()->size()) {
  ------------------
  |  Branch (617:16): [True: 0, False: 0]
  ------------------
  618|      0|      return Status::InvalidArgument(
  619|      0|          "[RocksDBOptionsParser Error]",
  620|      0|          "The persisted options file has less number of column families "
  621|      0|          "than that of the specified number.");
  622|      0|    }
  623|      0|  }
  624|  18.0k|  for (size_t i = 0; i < cf_opts.size(); ++i) {
  ------------------
  |  Branch (624:22): [True: 9.02k, False: 9.02k]
  ------------------
  625|  9.02k|    s = VerifyCFOptions(config_options, cf_opts[i], parser.cf_opts()->at(i),
  626|  9.02k|                        &(parser.cf_opt_maps()->at(i)));
  627|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (627:9): [True: 0, False: 9.02k]
  ------------------
  628|      0|      return s;
  629|      0|    }
  630|  9.02k|    s = VerifyTableFactory(config_options, cf_opts[i].table_factory.get(),
  631|  9.02k|                           parser.cf_opts()->at(i).table_factory.get());
  632|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (632:9): [True: 0, False: 9.02k]
  ------------------
  633|      0|      return s;
  634|      0|    }
  635|  9.02k|  }
  636|       |
  637|  9.02k|  return Status::OK();
  638|  9.02k|}
_ZN7rocksdb20RocksDBOptionsParser15VerifyDBOptionsERKNS_13ConfigOptionsERKNS_9DBOptionsES6_PKNSt3__113unordered_mapINS7_12basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEESE_NS7_4hashISE_EENS7_8equal_toISE_EENSC_INS7_4pairIKSE_SE_EEEEEE:
  643|  9.02k|    const std::unordered_map<std::string, std::string>* opt_map) {
  644|  9.02k|  auto base_config = DBOptionsAsConfigurable(base_opt, opt_map);
  645|  9.02k|  auto file_config = DBOptionsAsConfigurable(file_opt, opt_map);
  646|  9.02k|  std::string mismatch;
  647|  9.02k|  if (!base_config->AreEquivalent(config_options, file_config.get(),
  ------------------
  |  Branch (647:7): [True: 0, False: 9.02k]
  ------------------
  648|  9.02k|                                  &mismatch)) {
  649|      0|    const size_t kBufferSize = 2048;
  650|      0|    char buffer[kBufferSize];
  651|      0|    std::string base_value;
  652|      0|    std::string file_value;
  653|      0|    int offset = snprintf(buffer, sizeof(buffer),
  654|      0|                          "[RocksDBOptionsParser]: "
  655|      0|                          "failed the verification on DBOptions::%s -- ",
  656|      0|                          mismatch.c_str());
  657|      0|    Status s = base_config->GetOption(config_options, mismatch, &base_value);
  658|      0|    if (s.ok()) {
  ------------------
  |  Branch (658:9): [True: 0, False: 0]
  ------------------
  659|      0|      s = file_config->GetOption(config_options, mismatch, &file_value);
  660|      0|    }
  661|      0|    assert(offset >= 0);
  662|      0|    assert(static_cast<size_t>(offset) < sizeof(buffer));
  663|      0|    if (s.ok()) {
  ------------------
  |  Branch (663:9): [True: 0, False: 0]
  ------------------
  664|      0|      snprintf(buffer + offset, sizeof(buffer) - static_cast<size_t>(offset),
  665|      0|               "-- The specified one is %s while the persisted one is %s.\n",
  666|      0|               base_value.c_str(), file_value.c_str());
  667|      0|    } else {
  668|      0|      snprintf(buffer + offset, sizeof(buffer) - static_cast<size_t>(offset),
  669|      0|               "-- Unable to re-serialize an option: %s.\n",
  670|      0|               s.ToString().c_str());
  671|      0|    }
  672|      0|    return Status::InvalidArgument(Slice(buffer, strlen(buffer)));
  673|      0|  }
  674|  9.02k|  return Status::OK();
  675|  9.02k|}
_ZN7rocksdb20RocksDBOptionsParser15VerifyCFOptionsERKNS_13ConfigOptionsERKNS_19ColumnFamilyOptionsES6_PKNSt3__113unordered_mapINS7_12basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEESE_NS7_4hashISE_EENS7_8equal_toISE_EENSC_INS7_4pairIKSE_SE_EEEEEE:
  680|  9.02k|    const std::unordered_map<std::string, std::string>* opt_map) {
  681|  9.02k|  auto base_config = CFOptionsAsConfigurable(base_opt, opt_map);
  682|  9.02k|  auto file_config = CFOptionsAsConfigurable(file_opt, opt_map);
  683|  9.02k|  std::string mismatch;
  684|  9.02k|  if (!base_config->AreEquivalent(config_options, file_config.get(),
  ------------------
  |  Branch (684:7): [True: 0, False: 9.02k]
  ------------------
  685|  9.02k|                                  &mismatch)) {
  686|      0|    std::string base_value;
  687|      0|    std::string file_value;
  688|       |    // The options do not match
  689|      0|    const size_t kBufferSize = 2048;
  690|      0|    char buffer[kBufferSize];
  691|      0|    Status s = base_config->GetOption(config_options, mismatch, &base_value);
  692|      0|    if (s.ok()) {
  ------------------
  |  Branch (692:9): [True: 0, False: 0]
  ------------------
  693|      0|      s = file_config->GetOption(config_options, mismatch, &file_value);
  694|       |      // In file_opt, certain options like MergeOperator may be nullptr due to
  695|       |      //   factor methods not available. So we use opt_map to get
  696|       |      //   option value to use in the error message below.
  697|      0|      if (s.ok() && file_value == kNullptrString && opt_map) {
  ------------------
  |  Branch (697:11): [True: 0, False: 0]
  |  Branch (697:21): [True: 0, False: 0]
  |  Branch (697:53): [True: 0, False: 0]
  ------------------
  698|      0|        auto const& opt_val_str = (opt_map->find(mismatch));
  699|      0|        if (opt_val_str != opt_map->end()) {
  ------------------
  |  Branch (699:13): [True: 0, False: 0]
  ------------------
  700|      0|          file_value = opt_val_str->second;
  701|      0|        }
  702|      0|      }
  703|      0|    }
  704|      0|    int offset = snprintf(buffer, sizeof(buffer),
  705|      0|                          "[RocksDBOptionsParser]: "
  706|      0|                          "failed the verification on ColumnFamilyOptions::%s",
  707|      0|                          mismatch.c_str());
  708|      0|    assert(offset >= 0);
  709|      0|    assert(static_cast<size_t>(offset) < sizeof(buffer));
  710|      0|    if (s.ok()) {
  ------------------
  |  Branch (710:9): [True: 0, False: 0]
  ------------------
  711|      0|      snprintf(buffer + offset, sizeof(buffer) - static_cast<size_t>(offset),
  712|      0|               "--- The specified one is %s while the persisted one is %s.\n",
  713|      0|               base_value.c_str(), file_value.c_str());
  714|      0|    } else {
  715|      0|      snprintf(buffer + offset, sizeof(buffer) - static_cast<size_t>(offset),
  716|      0|               "--- Unable to re-serialize an option: %s.\n",
  717|      0|               s.ToString().c_str());
  718|      0|    }
  719|      0|    return Status::InvalidArgument(Slice(buffer, sizeof(buffer)));
  720|      0|  }  // For each option
  721|  9.02k|  return Status::OK();
  722|  9.02k|}
_ZN7rocksdb20RocksDBOptionsParser18VerifyTableFactoryERKNS_13ConfigOptionsEPKNS_12TableFactoryES6_:
  726|  9.02k|    const TableFactory* file_tf) {
  727|  9.02k|  std::string mismatch;
  728|  9.02k|  if (base_tf && file_tf) {
  ------------------
  |  Branch (728:7): [True: 9.02k, False: 0]
  |  Branch (728:18): [True: 9.02k, False: 0]
  ------------------
  729|  9.02k|    if (config_options.sanity_level > ConfigOptions::kSanityLevelNone &&
  ------------------
  |  Branch (729:9): [True: 9.02k, False: 0]
  |  Branch (729:9): [True: 0, False: 9.02k]
  ------------------
  730|  9.02k|        std::string(base_tf->Name()) != std::string(file_tf->Name())) {
  ------------------
  |  Branch (730:9): [True: 0, False: 9.02k]
  ------------------
  731|      0|      return Status::Corruption(
  732|      0|          "[RocksDBOptionsParser]: "
  733|      0|          "failed the verification on TableFactory->Name()");
  734|  9.02k|    } else if (!base_tf->AreEquivalent(config_options, file_tf, &mismatch)) {
  ------------------
  |  Branch (734:16): [True: 0, False: 9.02k]
  ------------------
  735|      0|      return Status::Corruption(std::string("[RocksDBOptionsParser]:"
  736|      0|                                            "failed the verification on ") +
  737|      0|                                    base_tf->Name() + "::",
  738|      0|                                mismatch);
  739|      0|    }
  740|  9.02k|  } else {
  741|       |    // TODO(yhchiang): further support sanity check here
  742|      0|  }
  743|  9.02k|  return Status::OK();
  744|  9.02k|}

_ZN7rocksdb20RocksDBOptionsParserD2Ev:
   50|  9.02k|  ~RocksDBOptionsParser() {}
_ZNK7rocksdb20RocksDBOptionsParser6db_optEv:
   64|  9.02k|  const DBOptions* db_opt() const { return &db_opt_; }
_ZNK7rocksdb20RocksDBOptionsParser10db_opt_mapEv:
   65|  9.02k|  const std::unordered_map<std::string, std::string>* db_opt_map() const {
   66|  9.02k|    return &db_opt_map_;
   67|  9.02k|  }
_ZNK7rocksdb20RocksDBOptionsParser7cf_optsEv:
   68|  27.0k|  const std::vector<ColumnFamilyOptions>* cf_opts() const { return &cf_opts_; }
_ZNK7rocksdb20RocksDBOptionsParser8cf_namesEv:
   69|  18.0k|  const std::vector<std::string>* cf_names() const { return &cf_names_; }
_ZNK7rocksdb20RocksDBOptionsParser11cf_opt_mapsEv:
   71|  9.02k|      const {
   72|  9.02k|    return &cf_opt_maps_;
   73|  9.02k|  }
_ZN7rocksdb20RocksDBOptionsParser12GetCFOptionsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   75|  18.0k|  const ColumnFamilyOptions* GetCFOptions(const std::string& name) {
   76|  18.0k|    return GetCFOptionsImpl(name);
   77|  18.0k|  }
_ZN7rocksdb20RocksDBOptionsParser16GetCFOptionsImplERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  127|  27.0k|  ColumnFamilyOptions* GetCFOptionsImpl(const std::string& name) {
  128|  27.0k|    assert(cf_names_.size() == cf_opts_.size());
  129|  27.0k|    for (size_t i = 0; i < cf_names_.size(); ++i) {
  ------------------
  |  Branch (129:24): [True: 18.0k, False: 9.02k]
  ------------------
  130|  18.0k|      if (cf_names_[i] == name) {
  ------------------
  |  Branch (130:11): [True: 18.0k, False: 0]
  ------------------
  131|  18.0k|        return &cf_opts_[i];
  132|  18.0k|      }
  133|  18.0k|    }
  134|  9.02k|    return nullptr;
  135|  27.0k|  }

_ZN7rocksdb4port5MutexC2Eb:
   59|  9.32M|Mutex::Mutex(bool adaptive) {
   60|  9.32M|  (void)adaptive;
   61|  9.32M|#ifdef ROCKSDB_PTHREAD_ADAPTIVE_MUTEX
   62|  9.32M|  if (!adaptive) {
  ------------------
  |  Branch (62:7): [True: 9.32M, False: 0]
  ------------------
   63|  9.32M|    PthreadCall("init mutex", pthread_mutex_init(&mu_, nullptr));
   64|  9.32M|  } else {
   65|      0|    pthread_mutexattr_t mutex_attr;
   66|      0|    PthreadCall("init mutex attr", pthread_mutexattr_init(&mutex_attr));
   67|      0|    PthreadCall("set mutex attr", pthread_mutexattr_settype(
   68|      0|                                      &mutex_attr, PTHREAD_MUTEX_ADAPTIVE_NP));
   69|      0|    PthreadCall("init mutex", pthread_mutex_init(&mu_, &mutex_attr));
   70|      0|    PthreadCall("destroy mutex attr", pthread_mutexattr_destroy(&mutex_attr));
   71|      0|  }
   72|       |#else
   73|       |  PthreadCall("init mutex", pthread_mutex_init(&mu_, nullptr));
   74|       |#endif  // ROCKSDB_PTHREAD_ADAPTIVE_MUTEX
   75|  9.32M|}
_ZN7rocksdb4port5MutexD2Ev:
   77|  9.32M|Mutex::~Mutex() { PthreadCall("destroy mutex", pthread_mutex_destroy(&mu_)); }
_ZN7rocksdb4port5Mutex4LockEv:
   79|  11.6M|void Mutex::Lock() {
   80|  11.6M|  PthreadCall("lock", pthread_mutex_lock(&mu_));
   81|       |#ifndef NDEBUG
   82|       |  locked_ = true;
   83|       |#endif
   84|  11.6M|}
_ZN7rocksdb4port5Mutex6UnlockEv:
   86|  11.6M|void Mutex::Unlock() {
   87|       |#ifndef NDEBUG
   88|       |  locked_ = false;
   89|       |#endif
   90|  11.6M|  PthreadCall("unlock", pthread_mutex_unlock(&mu_));
   91|  11.6M|}
_ZNK7rocksdb4port5Mutex10AssertHeldEv:
  103|   361k|void Mutex::AssertHeld() const {
  104|       |#ifndef NDEBUG
  105|       |  assert(locked_);
  106|       |#endif
  107|   361k|}
_ZN7rocksdb4port7CondVarC2EPNS0_5MutexE:
  109|   108k|CondVar::CondVar(Mutex* mu) : mu_(mu) {
  110|   108k|  PthreadCall("init cv", pthread_cond_init(&cv_, nullptr));
  111|   108k|}
_ZN7rocksdb4port7CondVarD2Ev:
  113|   108k|CondVar::~CondVar() { PthreadCall("destroy cv", pthread_cond_destroy(&cv_)); }
_ZN7rocksdb4port7CondVar4WaitEv:
  115|     23|void CondVar::Wait() {
  116|       |#ifndef NDEBUG
  117|       |  mu_->locked_ = false;
  118|       |#endif
  119|     23|  PthreadCall("wait", pthread_cond_wait(&cv_, &mu_->mu_));
  120|       |#ifndef NDEBUG
  121|       |  mu_->locked_ = true;
  122|       |#endif
  123|     23|}
_ZN7rocksdb4port7CondVar9TimedWaitEm:
  125|  9.03k|bool CondVar::TimedWait(uint64_t abs_time_us) {
  126|  9.03k|  struct timespec ts;
  127|  9.03k|  ts.tv_sec = static_cast<time_t>(abs_time_us / 1000000);
  128|  9.03k|  ts.tv_nsec = static_cast<suseconds_t>((abs_time_us % 1000000) * 1000);
  129|       |
  130|       |#ifndef NDEBUG
  131|       |  mu_->locked_ = false;
  132|       |#endif
  133|  9.03k|  int err = pthread_cond_timedwait(&cv_, &mu_->mu_, &ts);
  134|       |#ifndef NDEBUG
  135|       |  mu_->locked_ = true;
  136|       |#endif
  137|  9.03k|  if (err == ETIMEDOUT) {
  ------------------
  |  Branch (137:7): [True: 0, False: 9.03k]
  ------------------
  138|      0|    return true;
  139|      0|  }
  140|  9.03k|  if (err != 0) {
  ------------------
  |  Branch (140:7): [True: 0, False: 9.03k]
  ------------------
  141|      0|    PthreadCall("timedwait", err);
  142|      0|  }
  143|  9.03k|  return false;
  144|  9.03k|}
_ZN7rocksdb4port7CondVar6SignalEv:
  146|  9.02k|void CondVar::Signal() { PthreadCall("signal", pthread_cond_signal(&cv_)); }
_ZN7rocksdb4port7CondVar9SignalAllEv:
  148|  91.2k|void CondVar::SignalAll() {
  149|  91.2k|  PthreadCall("broadcast", pthread_cond_broadcast(&cv_));
  150|  91.2k|}
_ZN7rocksdb4port7RWMutexC2Ev:
  152|      2|RWMutex::RWMutex() {
  153|      2|  PthreadCall("init mutex", pthread_rwlock_init(&mu_, nullptr));
  154|      2|}
_ZN7rocksdb4port7RWMutex8ReadLockEv:
  160|  9.02k|void RWMutex::ReadLock() {
  161|  9.02k|  PthreadCall("read lock", pthread_rwlock_rdlock(&mu_));
  162|  9.02k|}
_ZN7rocksdb4port7RWMutex9WriteLockEv:
  164|  18.0k|void RWMutex::WriteLock() {
  165|  18.0k|  PthreadCall("write lock", pthread_rwlock_wrlock(&mu_));
  166|  18.0k|}
_ZN7rocksdb4port7RWMutex10ReadUnlockEv:
  168|  9.02k|void RWMutex::ReadUnlock() {
  169|  9.02k|  PthreadCall("read unlock", pthread_rwlock_unlock(&mu_));
  170|  9.02k|}
_ZN7rocksdb4port7RWMutex11WriteUnlockEv:
  172|  18.0k|void RWMutex::WriteUnlock() {
  173|  18.0k|  PthreadCall("write unlock", pthread_rwlock_unlock(&mu_));
  174|  18.0k|}
_ZN7rocksdb4port14PhysicalCoreIDEv:
  176|  2.90k|int PhysicalCoreID() {
  177|  2.90k|#if defined(ROCKSDB_SCHED_GETCPU_PRESENT) && defined(__x86_64__) && \
  178|  2.90k|    (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 22))
  179|       |  // sched_getcpu uses VDSO getcpu() syscall since 2.22. I believe Linux offers
  180|       |  // VDSO support only on x86_64. This is the fastest/preferred method if
  181|       |  // available.
  182|  2.90k|  int cpuno = sched_getcpu();
  183|  2.90k|  if (cpuno < 0) {
  ------------------
  |  Branch (183:7): [True: 0, False: 2.90k]
  ------------------
  184|      0|    return -1;
  185|      0|  }
  186|  2.90k|  return cpuno;
  187|       |#elif defined(__x86_64__) || defined(__i386__)
  188|       |  // clang/gcc both provide cpuid.h, which defines __get_cpuid(), for x86_64 and
  189|       |  // i386.
  190|       |  unsigned eax, ebx = 0, ecx, edx;
  191|       |  if (!__get_cpuid(1, &eax, &ebx, &ecx, &edx)) {
  192|       |    return -1;
  193|       |  }
  194|       |  return ebx >> 24;
  195|       |#else
  196|       |  // give up, the caller can generate a random number or something.
  197|       |  return -1;
  198|       |#endif
  199|  2.90k|}
_ZN7rocksdb4port23cacheline_aligned_allocEm:
  227|   103k|void* cacheline_aligned_alloc(size_t size) {
  228|       |#if __GNUC__ < 5 && defined(__SANITIZE_ADDRESS__)
  229|       |  return malloc(size);
  230|       |#elif (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__APPLE__))
  231|       |  void* m;
  232|   103k|  errno = posix_memalign(&m, CACHE_LINE_SIZE, size);
  ------------------
  |  |  205|   103k|#define CACHE_LINE_SIZE 64U
  ------------------
  233|   103k|  return errno ? nullptr : m;
  234|       |#else
  235|       |  return malloc(size);
  236|       |#endif
  237|   103k|}
_ZN7rocksdb4port22cacheline_aligned_freeEPv:
  239|   103k|void cacheline_aligned_free(void* memblock) { free(memblock); }
_ZN7rocksdb4port12GetProcessIDEv:
  283|  9.07k|int64_t GetProcessID() { return getpid(); }
_ZN7rocksdb4port15GenerateRfcUuidEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  285|  4.51k|bool GenerateRfcUuid(std::string* output) {
  286|  4.51k|  output->clear();
  287|  4.51k|  std::ifstream f("/proc/sys/kernel/random/uuid");
  288|  4.51k|  std::getline(f, /*&*/ *output);
  289|  4.51k|  if (output->size() == 36) {
  ------------------
  |  Branch (289:7): [True: 4.51k, False: 0]
  ------------------
  290|  4.51k|    return true;
  291|  4.51k|  } else {
  292|      0|    output->clear();
  293|      0|    return false;
  294|      0|  }
  295|  4.51k|}
port_posix.cc:_ZN7rocksdb4portL11PthreadCallEPKci:
   51|  42.3M|static int PthreadCall(const char* label, int result) {
   52|  42.3M|  if (result != 0 && result != ETIMEDOUT && result != EBUSY) {
  ------------------
  |  Branch (52:7): [True: 0, False: 42.3M]
  |  Branch (52:22): [True: 0, False: 0]
  |  Branch (52:45): [True: 0, False: 0]
  ------------------
   53|      0|    fprintf(stderr, "pthread %s: %s\n", label, errnoStr(result).c_str());
   54|      0|    abort();
   55|      0|  }
   56|  42.3M|  return result;
   57|  42.3M|}
port_posix.cc:_ZN7rocksdb4portL11GetPageSizeEv:
  241|      2|static size_t GetPageSize() {
  242|      2|#if defined(OS_LINUX) || defined(_SC_PAGESIZE)
  243|      2|  long v = sysconf(_SC_PAGESIZE);
  244|      2|  if (v >= 1024) {
  ------------------
  |  Branch (244:7): [True: 2, False: 0]
  ------------------
  245|      2|    return static_cast<size_t>(v);
  246|      2|  }
  247|      0|#endif
  248|       |  // Default assume 4KB
  249|      0|  return 4U * 1024U;
  250|      2|}

_ZN7rocksdb4port5Mutex5kNameEv:
   98|  9.02k|  static const char* kName() { return "pthread_mutex_t"; }
_ZN7rocksdb4port5Mutex4lockEv:
  117|  7.37M|  inline void lock() { Lock(); }
_ZN7rocksdb4port5Mutex6unlockEv:
  118|  7.37M|  inline void unlock() { Unlock(); }

_ZN7rocksdb4port12GetTimeOfDayEP7timevalP8timezone:
   51|  4.07M|inline void GetTimeOfDay(TimeVal* tv, struct timezone* tz) {
   52|  4.07M|  gettimeofday(tv, tz);
   53|  4.07M|}
_ZN7rocksdb4port10LocalTimeREPKlP2tm:
   55|  1.97M|inline struct tm* LocalTimeR(const time_t* timep, struct tm* result) {
   56|  1.97M|  return localtime_r(timep, result);
   57|  1.97M|}

_ZN7rocksdb23BinarySearchIndexReader6CreateEPKNS_15BlockBasedTableERKNS_11ReadOptionsEPNS_18FilePrefetchBufferEbbbPNS_23BlockCacheLookupContextEPNSt3__110unique_ptrINS1_11IndexReaderENSB_14default_deleteISD_EEEE:
   16|  4.48k|    std::unique_ptr<IndexReader>* index_reader) {
   17|  4.48k|  assert(table != nullptr);
   18|  4.48k|  assert(table->get_rep());
   19|  4.48k|  assert(!pin || prefetch);
   20|  4.48k|  assert(index_reader != nullptr);
   21|       |
   22|  4.48k|  CachableEntry<Block> index_block;
   23|  4.48k|  if (prefetch || !use_cache) {
  ------------------
  |  Branch (23:7): [True: 4.48k, False: 0]
  |  Branch (23:19): [True: 0, False: 0]
  ------------------
   24|  4.48k|    const Status s =
   25|  4.48k|        ReadIndexBlock(table, prefetch_buffer, ro, use_cache,
   26|  4.48k|                       /*get_context=*/nullptr, lookup_context, &index_block);
   27|  4.48k|    if (!s.ok()) {
  ------------------
  |  Branch (27:9): [True: 0, False: 4.48k]
  ------------------
   28|      0|      return s;
   29|      0|    }
   30|       |
   31|  4.48k|    if (use_cache && !pin) {
  ------------------
  |  Branch (31:9): [True: 0, False: 4.48k]
  |  Branch (31:22): [True: 0, False: 0]
  ------------------
   32|      0|      index_block.Reset();
   33|      0|    }
   34|  4.48k|  }
   35|       |
   36|  4.48k|  index_reader->reset(
   37|  4.48k|      new BinarySearchIndexReader(table, std::move(index_block)));
   38|       |
   39|  4.48k|  return Status::OK();
   40|  4.48k|}
_ZN7rocksdb23BinarySearchIndexReader11NewIteratorERKNS_11ReadOptionsEbPNS_14IndexBlockIterEPNS_10GetContextEPNS_23BlockCacheLookupContextE:
   45|  8.96k|    BlockCacheLookupContext* lookup_context) {
   46|  8.96k|  const BlockBasedTable::Rep* rep = table()->get_rep();
   47|  8.96k|  CachableEntry<Block> index_block;
   48|  8.96k|  const Status s = GetOrReadIndexBlock(get_context, lookup_context,
   49|  8.96k|                                       &index_block, read_options);
   50|  8.96k|  if (!s.ok()) {
  ------------------
  |  Branch (50:7): [True: 0, False: 8.96k]
  ------------------
   51|      0|    if (iter != nullptr) {
  ------------------
  |  Branch (51:9): [True: 0, False: 0]
  ------------------
   52|      0|      iter->Invalidate(s);
   53|      0|      return iter;
   54|      0|    }
   55|       |
   56|      0|    return NewErrorInternalIterator<IndexValue>(s);
   57|      0|  }
   58|       |
   59|  8.96k|  Statistics* kNullStats = nullptr;
   60|       |  // We don't return pinned data from index blocks, so no need
   61|       |  // to set `block_contents_pinned`.
   62|  8.96k|  auto it = index_block.GetValue()->NewIndexIterator(
   63|  8.96k|      internal_comparator()->user_comparator(),
   64|  8.96k|      rep->get_global_seqno(BlockType::kIndex), iter, kNullStats, true,
   65|  8.96k|      index_has_first_key(), index_key_includes_seq(), index_value_is_full(),
   66|  8.96k|      false /* block_contents_pinned */, user_defined_timestamps_persisted());
   67|       |
   68|  8.96k|  assert(it != nullptr);
   69|  8.96k|  index_block.TransferTo(it);
   70|       |
   71|  8.96k|  return it;
   72|  8.96k|}

_ZN7rocksdb23BinarySearchIndexReaderC2EPKNS_15BlockBasedTableEONS_13CachableEntryINS_5BlockEEE:
   46|  4.48k|      : IndexReaderCommon(t, std::move(index_block)) {}

_ZN7rocksdb13DataBlockIter8NextImplEv:
  155|   296k|void DataBlockIter::NextImpl() {
  156|       |#ifndef NDEBUG
  157|       |  if (TEST_Corrupt_Callback("DataBlockIter::NextImpl")) {
  158|       |    return;
  159|       |  }
  160|       |#endif
  161|   296k|  bool is_shared = false;
  162|   296k|  ParseNextDataKey(&is_shared);
  163|   296k|  ++cur_entry_idx_;
  164|   296k|}
_ZN7rocksdb13MetaBlockIter8NextImplEv:
  166|   167k|void MetaBlockIter::NextImpl() {
  167|   167k|  bool is_shared = false;
  168|   167k|  ParseNextKey<CheckAndDecodeEntry>(&is_shared);
  169|   167k|  ++cur_entry_idx_;
  170|   167k|}
_ZN7rocksdb14IndexBlockIter8NextImplEv:
  172|  8.85k|void IndexBlockIter::NextImpl() {
  173|  8.85k|  ParseNextIndexKey();
  174|  8.85k|  ++cur_entry_idx_;
  175|  8.85k|}
_ZN7rocksdb13MetaBlockIter8SeekImplERKNS_5SliceE:
  318|  17.9k|void MetaBlockIter::SeekImpl(const Slice& target) {
  319|  17.9k|  Slice seek_key = target;
  320|  17.9k|  PERF_TIMER_GUARD(block_seek_nanos);
  ------------------
  |  |   46|  17.9k|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  17.9k|  perf_step_timer_##metric.Start();
  ------------------
  321|  17.9k|  if (data_ == nullptr) {  // Not init yet
  ------------------
  |  Branch (321:7): [True: 0, False: 17.9k]
  ------------------
  322|      0|    return;
  323|      0|  }
  324|  17.9k|  uint32_t index = 0;
  325|  17.9k|  bool skip_linear_scan = false;
  326|  17.9k|  bool ok = BinarySeek<DecodeKey>(seek_key, &index, &skip_linear_scan);
  327|       |
  328|  17.9k|  if (!ok) {
  ------------------
  |  Branch (328:7): [True: 0, False: 17.9k]
  ------------------
  329|      0|    return;
  330|      0|  }
  331|  17.9k|  FindKeyAfterBinarySeek(seek_key, index, skip_linear_scan);
  332|  17.9k|}
_ZN7rocksdb13DataBlockIter15SeekToFirstImplEv:
  561|  14.6k|void DataBlockIter::SeekToFirstImpl() {
  562|  14.6k|  if (data_ == nullptr) {  // Not init yet
  ------------------
  |  Branch (562:7): [True: 0, False: 14.6k]
  ------------------
  563|      0|    return;
  564|      0|  }
  565|  14.6k|  SeekToRestartPoint(0);
  566|  14.6k|  bool is_shared = false;
  567|  14.6k|  ParseNextDataKey(&is_shared);
  568|  14.6k|  cur_entry_idx_ = 0;
  569|  14.6k|}
_ZN7rocksdb13MetaBlockIter15SeekToFirstImplEv:
  571|  4.48k|void MetaBlockIter::SeekToFirstImpl() {
  572|  4.48k|  if (data_ == nullptr) {  // Not init yet
  ------------------
  |  Branch (572:7): [True: 0, False: 4.48k]
  ------------------
  573|      0|    return;
  574|      0|  }
  575|  4.48k|  SeekToRestartPoint(0);
  576|  4.48k|  bool is_shared = false;
  577|  4.48k|  ParseNextKey<CheckAndDecodeEntry>(&is_shared);
  578|  4.48k|  cur_entry_idx_ = 0;
  579|  4.48k|}
_ZN7rocksdb14IndexBlockIter15SeekToFirstImplEv:
  581|  4.48k|void IndexBlockIter::SeekToFirstImpl() {
  582|       |#ifndef NDEBUG
  583|       |  if (TEST_Corrupt_Callback("IndexBlockIter::SeekToFirstImpl")) {
  584|       |    return;
  585|       |  }
  586|       |#endif
  587|  4.48k|  if (data_ == nullptr) {  // Not init yet
  ------------------
  |  Branch (587:7): [True: 0, False: 4.48k]
  ------------------
  588|      0|    return;
  589|      0|  }
  590|  4.48k|  status_ = Status::OK();
  591|  4.48k|  SeekToRestartPoint(0);
  592|  4.48k|  ParseNextIndexKey();
  593|  4.48k|  cur_entry_idx_ = 0;
  594|  4.48k|}
_ZNK7rocksdb5Block11NumRestartsEv:
 1018|  25.2k|uint32_t Block::NumRestarts() const {
 1019|  25.2k|  assert(size_ >= 2 * sizeof(uint32_t));
 1020|  25.2k|  uint32_t block_footer = DecodeFixed32(data_ + size_ - sizeof(uint32_t));
 1021|  25.2k|  uint32_t num_restarts = block_footer;
 1022|  25.2k|  if (size_ > kMaxBlockSizeSupportedByHashIndex) {
  ------------------
  |  Branch (1022:7): [True: 905, False: 24.3k]
  ------------------
 1023|       |    // In BlockBuilder, we have ensured a block with HashIndex is less than
 1024|       |    // kMaxBlockSizeSupportedByHashIndex (64KiB).
 1025|       |    //
 1026|       |    // Therefore, if we encounter a block with a size > 64KiB, the block
 1027|       |    // cannot have HashIndex. So the footer will directly interpreted as
 1028|       |    // num_restarts.
 1029|       |    //
 1030|       |    // Such check is for backward compatibility. We can ensure legacy block
 1031|       |    // with a vary large num_restarts i.e. >= 0x80000000 can be interpreted
 1032|       |    // correctly as no HashIndex even if the MSB of num_restarts is set.
 1033|    905|    return num_restarts;
 1034|    905|  }
 1035|  24.3k|  BlockBasedTableOptions::DataBlockIndexType index_type;
 1036|  24.3k|  UnPackIndexTypeAndNumRestarts(block_footer, &index_type, &num_restarts);
 1037|  24.3k|  return num_restarts;
 1038|  25.2k|}
_ZNK7rocksdb5Block9IndexTypeEv:
 1040|  25.2k|BlockBasedTableOptions::DataBlockIndexType Block::IndexType() const {
 1041|  25.2k|  assert(size_ >= 2 * sizeof(uint32_t));
 1042|  25.2k|  if (size_ > kMaxBlockSizeSupportedByHashIndex) {
  ------------------
  |  Branch (1042:7): [True: 905, False: 24.3k]
  ------------------
 1043|       |    // The check is for the same reason as that in NumRestarts()
 1044|    905|    return BlockBasedTableOptions::kDataBlockBinarySearch;
 1045|    905|  }
 1046|  24.3k|  uint32_t block_footer = DecodeFixed32(data_ + size_ - sizeof(uint32_t));
 1047|  24.3k|  uint32_t num_restarts = block_footer;
 1048|  24.3k|  BlockBasedTableOptions::DataBlockIndexType index_type;
 1049|  24.3k|  UnPackIndexTypeAndNumRestarts(block_footer, &index_type, &num_restarts);
 1050|  24.3k|  return index_type;
 1051|  25.2k|}
_ZN7rocksdb5BlockD2Ev:
 1053|  25.2k|Block::~Block() {
 1054|       |  // This sync point can be re-enabled if RocksDB can control the
 1055|       |  // initialization order of any/all static options created by the user.
 1056|       |  // TEST_SYNC_POINT("Block::~Block");
 1057|  25.2k|  delete[] kv_checksum_;
 1058|  25.2k|}
_ZN7rocksdb5BlockC2EONS_13BlockContentsEmPNS_10StatisticsE:
 1066|  25.2k|      num_restarts_(0) {
 1067|  25.2k|  TEST_SYNC_POINT("Block::Block:0");
 1068|  25.2k|  if (size_ < sizeof(uint32_t)) {
  ------------------
  |  Branch (1068:7): [True: 0, False: 25.2k]
  ------------------
 1069|      0|    size_ = 0;  // Error marker
 1070|  25.2k|  } else {
 1071|       |    // Should only decode restart points for uncompressed blocks
 1072|  25.2k|    num_restarts_ = NumRestarts();
 1073|  25.2k|    switch (IndexType()) {
 1074|  25.2k|      case BlockBasedTableOptions::kDataBlockBinarySearch:
  ------------------
  |  Branch (1074:7): [True: 25.2k, False: 0]
  ------------------
 1075|  25.2k|        restart_offset_ = static_cast<uint32_t>(size_) -
 1076|  25.2k|                          (1 + num_restarts_) * sizeof(uint32_t);
 1077|  25.2k|        if (restart_offset_ > size_ - sizeof(uint32_t)) {
  ------------------
  |  Branch (1077:13): [True: 0, False: 25.2k]
  ------------------
 1078|       |          // The size is too small for NumRestarts() and therefore
 1079|       |          // restart_offset_ wrapped around.
 1080|      0|          size_ = 0;
 1081|      0|        }
 1082|  25.2k|        break;
 1083|      0|      case BlockBasedTableOptions::kDataBlockBinaryAndHash:
  ------------------
  |  Branch (1083:7): [True: 0, False: 25.2k]
  ------------------
 1084|      0|        if (size_ < sizeof(uint32_t) /* block footer */ +
  ------------------
  |  Branch (1084:13): [True: 0, False: 0]
  ------------------
 1085|      0|                        sizeof(uint16_t) /* NUM_BUCK */) {
 1086|      0|          size_ = 0;
 1087|      0|          break;
 1088|      0|        }
 1089|       |
 1090|      0|        uint16_t map_offset;
 1091|      0|        data_block_hash_index_.Initialize(
 1092|      0|            data_, static_cast<uint16_t>(size_ - sizeof(uint32_t)), /*chop off
 1093|       |                                                                NUM_RESTARTS*/
 1094|      0|            &map_offset);
 1095|       |
 1096|      0|        restart_offset_ = map_offset - num_restarts_ * sizeof(uint32_t);
 1097|       |
 1098|      0|        if (restart_offset_ > map_offset) {
  ------------------
  |  Branch (1098:13): [True: 0, False: 0]
  ------------------
 1099|       |          // map_offset is too small for NumRestarts() and
 1100|       |          // therefore restart_offset_ wrapped around.
 1101|      0|          size_ = 0;
 1102|      0|          break;
 1103|      0|        }
 1104|      0|        break;
 1105|      0|      default:
  ------------------
  |  Branch (1105:7): [True: 0, False: 25.2k]
  ------------------
 1106|      0|        size_ = 0;  // Error marker
 1107|  25.2k|    }
 1108|  25.2k|  }
 1109|  25.2k|  if (read_amp_bytes_per_bit != 0 && statistics && size_ != 0) {
  ------------------
  |  Branch (1109:7): [True: 0, False: 25.2k]
  |  Branch (1109:38): [True: 0, False: 0]
  |  Branch (1109:52): [True: 0, False: 0]
  ------------------
 1110|      0|    read_amp_bitmap_.reset(new BlockReadAmpBitmap(
 1111|      0|        restart_offset_, read_amp_bytes_per_bit, statistics));
 1112|      0|  }
 1113|  25.2k|}
_ZN7rocksdb5Block33InitializeDataBlockProtectionInfoEhPKNS_10ComparatorE:
 1116|  11.7k|                                              const Comparator* raw_ucmp) {
 1117|  11.7k|  protection_bytes_per_key_ = 0;
 1118|  11.7k|  if (protection_bytes_per_key > 0 && num_restarts_ > 0) {
  ------------------
  |  Branch (1118:7): [True: 0, False: 11.7k]
  |  Branch (1118:39): [True: 0, False: 0]
  ------------------
 1119|       |    // NewDataIterator() is called with protection_bytes_per_key_ = 0.
 1120|       |    // This is intended since checksum is not constructed yet.
 1121|       |    //
 1122|       |    // We do not know global_seqno yet, so checksum computation and
 1123|       |    // verification all assume global_seqno = 0.
 1124|       |    // TODO(yuzhangyu): handle the implication of padding timestamp for kv
 1125|       |    // protection.
 1126|      0|    std::unique_ptr<DataBlockIter> iter{NewDataIterator(
 1127|      0|        raw_ucmp, kDisableGlobalSequenceNumber, nullptr /* iter */,
 1128|      0|        nullptr /* stats */, true /* block_contents_pinned */,
 1129|      0|        true /* user_defined_timestamps_persisted */)};
 1130|      0|    if (iter->status().ok()) {
  ------------------
  |  Branch (1130:9): [True: 0, False: 0]
  ------------------
 1131|      0|      block_restart_interval_ = iter->GetRestartInterval();
 1132|      0|    }
 1133|      0|    uint32_t num_keys = 0;
 1134|      0|    if (iter->status().ok()) {
  ------------------
  |  Branch (1134:9): [True: 0, False: 0]
  ------------------
 1135|      0|      num_keys = iter->NumberOfKeys(block_restart_interval_);
 1136|      0|    }
 1137|      0|    if (iter->status().ok()) {
  ------------------
  |  Branch (1137:9): [True: 0, False: 0]
  ------------------
 1138|      0|      checksum_size_ = num_keys * protection_bytes_per_key;
 1139|      0|      kv_checksum_ = new char[(size_t)checksum_size_];
 1140|      0|      size_t i = 0;
 1141|      0|      iter->SeekToFirst();
 1142|      0|      while (iter->Valid()) {
  ------------------
  |  Branch (1142:14): [True: 0, False: 0]
  ------------------
 1143|      0|        GenerateKVChecksum(kv_checksum_ + i, protection_bytes_per_key,
 1144|      0|                           iter->key(), iter->value());
 1145|      0|        iter->Next();
 1146|      0|        i += protection_bytes_per_key;
 1147|      0|      }
 1148|      0|      assert(!iter->status().ok() || i == num_keys * protection_bytes_per_key);
 1149|      0|    }
 1150|      0|    if (!iter->status().ok()) {
  ------------------
  |  Branch (1150:9): [True: 0, False: 0]
  ------------------
 1151|      0|      size_ = 0;  // Error marker
 1152|      0|      return;
 1153|      0|    }
 1154|      0|    protection_bytes_per_key_ = protection_bytes_per_key;
 1155|      0|  }
 1156|  11.7k|}
_ZN7rocksdb5Block34InitializeIndexBlockProtectionInfoEhPKNS_10ComparatorEbb:
 1161|  4.48k|                                               bool index_has_first_key) {
 1162|  4.48k|  protection_bytes_per_key_ = 0;
 1163|  4.48k|  if (num_restarts_ > 0 && protection_bytes_per_key > 0) {
  ------------------
  |  Branch (1163:7): [True: 4.48k, False: 0]
  |  Branch (1163:28): [True: 0, False: 4.48k]
  ------------------
 1164|       |    // Note that `global_seqno` and `key_includes_seq` are hardcoded here. They
 1165|       |    // do not impact how the index block is parsed. During checksum
 1166|       |    // construction/verification, we use the entire key buffer from
 1167|       |    // raw_key_.GetKey() returned by iter->key() as the `key` part of key-value
 1168|       |    // checksum, and the content of this buffer do not change for different
 1169|       |    // values of `global_seqno` or `key_includes_seq`.
 1170|       |    // TODO(yuzhangyu): handle the implication of padding timestamp for kv
 1171|       |    // protection.
 1172|      0|    std::unique_ptr<IndexBlockIter> iter{NewIndexIterator(
 1173|      0|        raw_ucmp, kDisableGlobalSequenceNumber /* global_seqno */, nullptr,
 1174|      0|        nullptr /* Statistics */, true /* total_order_seek */,
 1175|      0|        index_has_first_key /* have_first_key */, false /* key_includes_seq */,
 1176|      0|        value_is_full, true /* block_contents_pinned */,
 1177|      0|        true /* user_defined_timestamps_persisted*/,
 1178|      0|        nullptr /* prefix_index */)};
 1179|      0|    if (iter->status().ok()) {
  ------------------
  |  Branch (1179:9): [True: 0, False: 0]
  ------------------
 1180|      0|      block_restart_interval_ = iter->GetRestartInterval();
 1181|      0|    }
 1182|      0|    uint32_t num_keys = 0;
 1183|      0|    if (iter->status().ok()) {
  ------------------
  |  Branch (1183:9): [True: 0, False: 0]
  ------------------
 1184|      0|      num_keys = iter->NumberOfKeys(block_restart_interval_);
 1185|      0|    }
 1186|      0|    if (iter->status().ok()) {
  ------------------
  |  Branch (1186:9): [True: 0, False: 0]
  ------------------
 1187|      0|      checksum_size_ = num_keys * protection_bytes_per_key;
 1188|      0|      kv_checksum_ = new char[(size_t)checksum_size_];
 1189|      0|      iter->SeekToFirst();
 1190|      0|      size_t i = 0;
 1191|      0|      while (iter->Valid()) {
  ------------------
  |  Branch (1191:14): [True: 0, False: 0]
  ------------------
 1192|      0|        GenerateKVChecksum(kv_checksum_ + i, protection_bytes_per_key,
 1193|      0|                           iter->key(), iter->raw_value());
 1194|      0|        iter->Next();
 1195|      0|        i += protection_bytes_per_key;
 1196|      0|      }
 1197|      0|      assert(!iter->status().ok() || i == num_keys * protection_bytes_per_key);
 1198|      0|    }
 1199|      0|    if (!iter->status().ok()) {
  ------------------
  |  Branch (1199:9): [True: 0, False: 0]
  ------------------
 1200|      0|      size_ = 0;  // Error marker
 1201|      0|      return;
 1202|      0|    }
 1203|      0|    protection_bytes_per_key_ = protection_bytes_per_key;
 1204|      0|  }
 1205|  4.48k|}
_ZN7rocksdb5Block38InitializeMetaIndexBlockProtectionInfoEh:
 1208|  4.48k|    uint8_t protection_bytes_per_key) {
 1209|  4.48k|  protection_bytes_per_key_ = 0;
 1210|  4.48k|  if (num_restarts_ > 0 && protection_bytes_per_key > 0) {
  ------------------
  |  Branch (1210:7): [True: 4.48k, False: 0]
  |  Branch (1210:28): [True: 0, False: 4.48k]
  ------------------
 1211|      0|    std::unique_ptr<MetaBlockIter> iter{
 1212|      0|        NewMetaIterator(true /* block_contents_pinned */)};
 1213|      0|    if (iter->status().ok()) {
  ------------------
  |  Branch (1213:9): [True: 0, False: 0]
  ------------------
 1214|      0|      block_restart_interval_ = iter->GetRestartInterval();
 1215|      0|    }
 1216|      0|    uint32_t num_keys = 0;
 1217|      0|    if (iter->status().ok()) {
  ------------------
  |  Branch (1217:9): [True: 0, False: 0]
  ------------------
 1218|      0|      num_keys = iter->NumberOfKeys(block_restart_interval_);
 1219|      0|    }
 1220|      0|    if (iter->status().ok()) {
  ------------------
  |  Branch (1220:9): [True: 0, False: 0]
  ------------------
 1221|      0|      checksum_size_ = num_keys * protection_bytes_per_key;
 1222|      0|      kv_checksum_ = new char[(size_t)checksum_size_];
 1223|      0|      iter->SeekToFirst();
 1224|      0|      size_t i = 0;
 1225|      0|      while (iter->Valid()) {
  ------------------
  |  Branch (1225:14): [True: 0, False: 0]
  ------------------
 1226|      0|        GenerateKVChecksum(kv_checksum_ + i, protection_bytes_per_key,
 1227|      0|                           iter->key(), iter->value());
 1228|      0|        iter->Next();
 1229|      0|        i += protection_bytes_per_key;
 1230|      0|      }
 1231|      0|      assert(!iter->status().ok() || i == num_keys * protection_bytes_per_key);
 1232|      0|    }
 1233|      0|    if (!iter->status().ok()) {
  ------------------
  |  Branch (1233:9): [True: 0, False: 0]
  ------------------
 1234|      0|      size_ = 0;  // Error marker
 1235|      0|      return;
 1236|      0|    }
 1237|      0|    protection_bytes_per_key_ = protection_bytes_per_key;
 1238|      0|  }
 1239|  4.48k|}
_ZN7rocksdb5Block15NewMetaIteratorEb:
 1241|  8.96k|MetaBlockIter* Block::NewMetaIterator(bool block_contents_pinned) {
 1242|  8.96k|  MetaBlockIter* iter = new MetaBlockIter();
 1243|  8.96k|  if (size_ < 2 * sizeof(uint32_t)) {
  ------------------
  |  Branch (1243:7): [True: 0, False: 8.96k]
  ------------------
 1244|      0|    iter->Invalidate(Status::Corruption("bad block contents"));
 1245|      0|    return iter;
 1246|  8.96k|  } else if (num_restarts_ == 0) {
  ------------------
  |  Branch (1246:14): [True: 0, False: 8.96k]
  ------------------
 1247|       |    // Empty block.
 1248|      0|    iter->Invalidate(Status::OK());
 1249|  8.96k|  } else {
 1250|  8.96k|    iter->Initialize(data_, restart_offset_, num_restarts_,
 1251|  8.96k|                     block_contents_pinned, protection_bytes_per_key_,
 1252|  8.96k|                     kv_checksum_, block_restart_interval_);
 1253|  8.96k|  }
 1254|  8.96k|  return iter;
 1255|  8.96k|}
_ZN7rocksdb5Block15NewDataIteratorEPKNS_10ComparatorEmPNS_13DataBlockIterEPNS_10StatisticsEbb:
 1261|  11.7k|                                      bool user_defined_timestamps_persisted) {
 1262|  11.7k|  DataBlockIter* ret_iter;
 1263|  11.7k|  if (iter != nullptr) {
  ------------------
  |  Branch (1263:7): [True: 11.7k, False: 0]
  ------------------
 1264|  11.7k|    ret_iter = iter;
 1265|  11.7k|  } else {
 1266|      0|    ret_iter = new DataBlockIter;
 1267|      0|  }
 1268|  11.7k|  if (size_ < 2 * sizeof(uint32_t)) {
  ------------------
  |  Branch (1268:7): [True: 0, False: 11.7k]
  ------------------
 1269|      0|    ret_iter->Invalidate(Status::Corruption("bad block contents"));
 1270|      0|    return ret_iter;
 1271|      0|  }
 1272|  11.7k|  if (num_restarts_ == 0) {
  ------------------
  |  Branch (1272:7): [True: 0, False: 11.7k]
  ------------------
 1273|       |    // Empty block.
 1274|      0|    ret_iter->Invalidate(Status::OK());
 1275|      0|    return ret_iter;
 1276|  11.7k|  } else {
 1277|  11.7k|    ret_iter->Initialize(
 1278|  11.7k|        raw_ucmp, data_, restart_offset_, num_restarts_, global_seqno,
 1279|  11.7k|        read_amp_bitmap_.get(), block_contents_pinned,
 1280|  11.7k|        user_defined_timestamps_persisted,
 1281|  11.7k|        data_block_hash_index_.Valid() ? &data_block_hash_index_ : nullptr,
  ------------------
  |  Branch (1281:9): [True: 0, False: 11.7k]
  ------------------
 1282|  11.7k|        protection_bytes_per_key_, kv_checksum_, block_restart_interval_);
 1283|  11.7k|    if (read_amp_bitmap_) {
  ------------------
  |  Branch (1283:9): [True: 0, False: 11.7k]
  ------------------
 1284|      0|      if (read_amp_bitmap_->GetStatistics() != stats) {
  ------------------
  |  Branch (1284:11): [True: 0, False: 0]
  ------------------
 1285|       |        // DB changed the Statistics pointer, we need to notify read_amp_bitmap_
 1286|      0|        read_amp_bitmap_->SetStatistics(stats);
 1287|      0|      }
 1288|      0|    }
 1289|  11.7k|  }
 1290|       |
 1291|  11.7k|  return ret_iter;
 1292|  11.7k|}
_ZN7rocksdb5Block16NewIndexIteratorEPKNS_10ComparatorEmPNS_14IndexBlockIterEPNS_10StatisticsEbbbbbbPNS_16BlockPrefixIndexE:
 1299|  8.96k|    BlockPrefixIndex* prefix_index) {
 1300|  8.96k|  IndexBlockIter* ret_iter;
 1301|  8.96k|  if (iter != nullptr) {
  ------------------
  |  Branch (1301:7): [True: 0, False: 8.96k]
  ------------------
 1302|      0|    ret_iter = iter;
 1303|  8.96k|  } else {
 1304|  8.96k|    ret_iter = new IndexBlockIter;
 1305|  8.96k|  }
 1306|  8.96k|  if (size_ < 2 * sizeof(uint32_t)) {
  ------------------
  |  Branch (1306:7): [True: 0, False: 8.96k]
  ------------------
 1307|      0|    ret_iter->Invalidate(Status::Corruption("bad block contents"));
 1308|      0|    return ret_iter;
 1309|      0|  }
 1310|  8.96k|  if (num_restarts_ == 0) {
  ------------------
  |  Branch (1310:7): [True: 0, False: 8.96k]
  ------------------
 1311|       |    // Empty block.
 1312|      0|    ret_iter->Invalidate(Status::OK());
 1313|      0|    return ret_iter;
 1314|  8.96k|  } else {
 1315|  8.96k|    BlockPrefixIndex* prefix_index_ptr =
 1316|  8.96k|        total_order_seek ? nullptr : prefix_index;
  ------------------
  |  Branch (1316:9): [True: 8.96k, False: 0]
  ------------------
 1317|  8.96k|    ret_iter->Initialize(
 1318|  8.96k|        raw_ucmp, data_, restart_offset_, num_restarts_, global_seqno,
 1319|  8.96k|        prefix_index_ptr, have_first_key, key_includes_seq, value_is_full,
 1320|  8.96k|        block_contents_pinned, user_defined_timestamps_persisted,
 1321|  8.96k|        protection_bytes_per_key_, kv_checksum_, block_restart_interval_);
 1322|  8.96k|  }
 1323|       |
 1324|  8.96k|  return ret_iter;
 1325|  8.96k|}
_ZNK7rocksdb5Block22ApproximateMemoryUsageEv:
 1327|  11.7k|size_t Block::ApproximateMemoryUsage() const {
 1328|  11.7k|  size_t usage = usable_size();
 1329|  11.7k|#ifdef ROCKSDB_MALLOC_USABLE_SIZE
 1330|  11.7k|  usage += malloc_usable_size((void*)this);
 1331|       |#else
 1332|       |  usage += sizeof(*this);
 1333|       |#endif  // ROCKSDB_MALLOC_USABLE_SIZE
 1334|  11.7k|  if (read_amp_bitmap_) {
  ------------------
  |  Branch (1334:7): [True: 0, False: 11.7k]
  ------------------
 1335|      0|    usage += read_amp_bitmap_->ApproximateMemoryUsage();
 1336|      0|  }
 1337|  11.7k|  usage += checksum_size_;
 1338|  11.7k|  return usage;
 1339|  11.7k|}
_ZN7rocksdb13DataBlockIter16ParseNextDataKeyEPb:
  689|   311k|bool DataBlockIter::ParseNextDataKey(bool* is_shared) {
  690|   311k|  if (ParseNextKey<DecodeEntry>(is_shared)) {
  ------------------
  |  Branch (690:7): [True: 296k, False: 14.6k]
  ------------------
  691|       |#ifndef NDEBUG
  692|       |    if (global_seqno_ != kDisableGlobalSequenceNumber) {
  693|       |      // If we are reading a file with a global sequence number we should
  694|       |      // expect that all encoded sequence numbers are zeros and any value
  695|       |      // type is kTypeValue, kTypeMerge, kTypeDeletion,
  696|       |      // kTypeDeletionWithTimestamp, kTypeRangeDeletion, or
  697|       |      // kTypeWideColumnEntity.
  698|       |      uint64_t packed = ExtractInternalKeyFooter(raw_key_.GetKey());
  699|       |      SequenceNumber seqno;
  700|       |      ValueType value_type;
  701|       |      UnPackSequenceAndType(packed, &seqno, &value_type);
  702|       |      assert(value_type == ValueType::kTypeValue ||
  703|       |             value_type == ValueType::kTypeMerge ||
  704|       |             value_type == ValueType::kTypeDeletion ||
  705|       |             value_type == ValueType::kTypeDeletionWithTimestamp ||
  706|       |             value_type == ValueType::kTypeRangeDeletion ||
  707|       |             value_type == ValueType::kTypeWideColumnEntity);
  708|       |      assert(seqno == 0);
  709|       |    }
  710|       |#endif  // NDEBUG
  711|   296k|    return true;
  712|   296k|  } else {
  713|  14.6k|    return false;
  714|  14.6k|  }
  715|   311k|}
_ZN7rocksdb9BlockIterINS_5SliceEE12ParseNextKeyINS_11DecodeEntryEEEbPb:
  639|   311k|bool BlockIter<TValue>::ParseNextKey(bool* is_shared) {
  640|   311k|  current_ = NextEntryOffset();
  641|   311k|  const char* p = data_ + current_;
  642|   311k|  const char* limit = data_ + restarts_;  // Restarts come right after data
  643|       |
  644|   311k|  if (p >= limit) {
  ------------------
  |  Branch (644:7): [True: 14.6k, False: 296k]
  ------------------
  645|       |    // No more entries to return.  Mark as invalid.
  646|  14.6k|    current_ = restarts_;
  647|  14.6k|    restart_index_ = num_restarts_;
  648|  14.6k|    return false;
  649|  14.6k|  }
  650|       |  // Decode next entry
  651|   296k|  uint32_t shared, non_shared, value_length;
  652|   296k|  p = DecodeEntryFunc()(p, limit, &shared, &non_shared, &value_length);
  653|   296k|  if (p == nullptr || raw_key_.Size() < shared) {
  ------------------
  |  Branch (653:7): [True: 0, False: 296k]
  |  Branch (653:23): [True: 0, False: 296k]
  ------------------
  654|      0|    CorruptionError();
  655|      0|    return false;
  656|   296k|  } else {
  657|   296k|    if (shared == 0) {
  ------------------
  |  Branch (657:9): [True: 286k, False: 10.2k]
  ------------------
  658|   286k|      *is_shared = false;
  659|       |      // If this key doesn't share any bytes with prev key, and no min timestamp
  660|       |      // needs to be padded to the key, then we don't need to decode it and
  661|       |      // can use its address in the block directly (no copy).
  662|   286k|      UpdateRawKeyAndMaybePadMinTimestamp(Slice(p, non_shared));
  663|   286k|    } else {
  664|       |      // This key share `shared` bytes with prev key, we need to decode it
  665|  10.2k|      *is_shared = true;
  666|       |      // If user-defined timestamp is stripped from user key before keys are
  667|       |      // delta encoded, the decoded key consisting of the shared and non shared
  668|       |      // bytes do not have user-defined timestamp yet. We need to pad min
  669|       |      // timestamp to it.
  670|  10.2k|      if (pad_min_timestamp_) {
  ------------------
  |  Branch (670:11): [True: 0, False: 10.2k]
  ------------------
  671|      0|        raw_key_.TrimAppendWithTimestamp(shared, p, non_shared, ts_sz_);
  672|  10.2k|      } else {
  673|  10.2k|        raw_key_.TrimAppend(shared, p, non_shared);
  674|  10.2k|      }
  675|  10.2k|    }
  676|   296k|    value_ = Slice(p + non_shared, value_length);
  677|   296k|    if (shared == 0) {
  ------------------
  |  Branch (677:9): [True: 286k, False: 10.2k]
  ------------------
  678|   538k|      while (restart_index_ + 1 < num_restarts_ &&
  ------------------
  |  Branch (678:14): [True: 516k, False: 21.8k]
  ------------------
  679|   538k|             GetRestartPoint(restart_index_ + 1) < current_) {
  ------------------
  |  Branch (679:14): [True: 252k, False: 264k]
  ------------------
  680|   252k|        ++restart_index_;
  681|   252k|      }
  682|   286k|    }
  683|       |    // else we are in the middle of a restart interval and the restart_index_
  684|       |    // thus has not changed
  685|   296k|    return true;
  686|   296k|  }
  687|   296k|}
_ZN7rocksdb11DecodeEntryclEPKcS2_PjS3_S3_:
   40|   326k|                                uint32_t* value_length) {
   41|       |    // We need 2 bytes for shared and non_shared size. We also need one more
   42|       |    // byte either for value size or the actual value in case of value delta
   43|       |    // encoding.
   44|   326k|    assert(limit - p >= 3);
   45|   326k|    *shared = reinterpret_cast<const unsigned char*>(p)[0];
   46|   326k|    *non_shared = reinterpret_cast<const unsigned char*>(p)[1];
   47|   326k|    *value_length = reinterpret_cast<const unsigned char*>(p)[2];
   48|   326k|    if ((*shared | *non_shared | *value_length) < 128) {
  ------------------
  |  Branch (48:9): [True: 240k, False: 86.3k]
  ------------------
   49|       |      // Fast path: all three values are encoded in one byte each
   50|   240k|      p += 3;
   51|   240k|    } else {
   52|  86.3k|      if ((p = GetVarint32Ptr(p, limit, shared)) == nullptr) {
  ------------------
  |  Branch (52:11): [True: 0, False: 86.3k]
  ------------------
   53|      0|        return nullptr;
   54|      0|      }
   55|  86.3k|      if ((p = GetVarint32Ptr(p, limit, non_shared)) == nullptr) {
  ------------------
  |  Branch (55:11): [True: 0, False: 86.3k]
  ------------------
   56|      0|        return nullptr;
   57|      0|      }
   58|  86.3k|      if ((p = GetVarint32Ptr(p, limit, value_length)) == nullptr) {
  ------------------
  |  Branch (58:11): [True: 0, False: 86.3k]
  ------------------
   59|      0|        return nullptr;
   60|      0|      }
   61|  86.3k|    }
   62|       |
   63|       |    // Using an assert in place of "return null" since we should not pay the
   64|       |    // cost of checking for corruption on every single key decoding
   65|   326k|    assert(!(static_cast<uint32_t>(limit - p) < (*non_shared + *value_length)));
   66|   326k|    return p;
   67|   326k|  }
_ZN7rocksdb14IndexBlockIter17ParseNextIndexKeyEv:
  717|  13.3k|bool IndexBlockIter::ParseNextIndexKey() {
  718|  13.3k|  bool is_shared = false;
  719|  13.3k|  bool ok = (value_delta_encoded_) ? ParseNextKey<DecodeEntryV4>(&is_shared)
  ------------------
  |  Branch (719:13): [True: 13.3k, False: 0]
  ------------------
  720|  13.3k|                                   : ParseNextKey<DecodeEntry>(&is_shared);
  721|  13.3k|  if (ok) {
  ------------------
  |  Branch (721:7): [True: 8.85k, False: 4.48k]
  ------------------
  722|  8.85k|    if (value_delta_encoded_ || global_seqno_state_ != nullptr ||
  ------------------
  |  Branch (722:9): [True: 8.85k, False: 0]
  |  Branch (722:33): [True: 0, False: 0]
  ------------------
  723|  8.85k|        pad_min_timestamp_) {
  ------------------
  |  Branch (723:9): [True: 0, False: 0]
  ------------------
  724|  8.85k|      DecodeCurrentValue(is_shared);
  725|  8.85k|    }
  726|  8.85k|  }
  727|  13.3k|  return ok;
  728|  13.3k|}
_ZN7rocksdb9BlockIterINS_10IndexValueEE12ParseNextKeyINS_13DecodeEntryV4EEEbPb:
  639|  13.3k|bool BlockIter<TValue>::ParseNextKey(bool* is_shared) {
  640|  13.3k|  current_ = NextEntryOffset();
  641|  13.3k|  const char* p = data_ + current_;
  642|  13.3k|  const char* limit = data_ + restarts_;  // Restarts come right after data
  643|       |
  644|  13.3k|  if (p >= limit) {
  ------------------
  |  Branch (644:7): [True: 4.48k, False: 8.85k]
  ------------------
  645|       |    // No more entries to return.  Mark as invalid.
  646|  4.48k|    current_ = restarts_;
  647|  4.48k|    restart_index_ = num_restarts_;
  648|  4.48k|    return false;
  649|  4.48k|  }
  650|       |  // Decode next entry
  651|  8.85k|  uint32_t shared, non_shared, value_length;
  652|  8.85k|  p = DecodeEntryFunc()(p, limit, &shared, &non_shared, &value_length);
  653|  8.85k|  if (p == nullptr || raw_key_.Size() < shared) {
  ------------------
  |  Branch (653:7): [True: 0, False: 8.85k]
  |  Branch (653:23): [True: 0, False: 8.85k]
  ------------------
  654|      0|    CorruptionError();
  655|      0|    return false;
  656|  8.85k|  } else {
  657|  8.85k|    if (shared == 0) {
  ------------------
  |  Branch (657:9): [True: 8.85k, False: 0]
  ------------------
  658|  8.85k|      *is_shared = false;
  659|       |      // If this key doesn't share any bytes with prev key, and no min timestamp
  660|       |      // needs to be padded to the key, then we don't need to decode it and
  661|       |      // can use its address in the block directly (no copy).
  662|  8.85k|      UpdateRawKeyAndMaybePadMinTimestamp(Slice(p, non_shared));
  663|  8.85k|    } else {
  664|       |      // This key share `shared` bytes with prev key, we need to decode it
  665|      0|      *is_shared = true;
  666|       |      // If user-defined timestamp is stripped from user key before keys are
  667|       |      // delta encoded, the decoded key consisting of the shared and non shared
  668|       |      // bytes do not have user-defined timestamp yet. We need to pad min
  669|       |      // timestamp to it.
  670|      0|      if (pad_min_timestamp_) {
  ------------------
  |  Branch (670:11): [True: 0, False: 0]
  ------------------
  671|      0|        raw_key_.TrimAppendWithTimestamp(shared, p, non_shared, ts_sz_);
  672|      0|      } else {
  673|      0|        raw_key_.TrimAppend(shared, p, non_shared);
  674|      0|      }
  675|      0|    }
  676|  8.85k|    value_ = Slice(p + non_shared, value_length);
  677|  8.85k|    if (shared == 0) {
  ------------------
  |  Branch (677:9): [True: 8.85k, False: 0]
  ------------------
  678|  13.1k|      while (restart_index_ + 1 < num_restarts_ &&
  ------------------
  |  Branch (678:14): [True: 10.0k, False: 3.08k]
  ------------------
  679|  13.1k|             GetRestartPoint(restart_index_ + 1) < current_) {
  ------------------
  |  Branch (679:14): [True: 4.31k, False: 5.76k]
  ------------------
  680|  4.31k|        ++restart_index_;
  681|  4.31k|      }
  682|  8.85k|    }
  683|       |    // else we are in the middle of a restart interval and the restart_index_
  684|       |    // thus has not changed
  685|  8.85k|    return true;
  686|  8.85k|  }
  687|  8.85k|}
_ZN7rocksdb13DecodeEntryV4clEPKcS2_PjS3_S3_:
  147|  8.85k|                                uint32_t* value_length) {
  148|  8.85k|    assert(value_length);
  149|       |
  150|  8.85k|    *value_length = 0;
  151|  8.85k|    return DecodeKeyV4()(p, limit, shared, non_shared);
  152|  8.85k|  }
_ZN7rocksdb11DecodeKeyV4clEPKcS2_PjS3_:
  120|  8.85k|                                uint32_t* shared, uint32_t* non_shared) {
  121|       |    // We need 2 bytes for shared and non_shared size. We also need one more
  122|       |    // byte either for value size or the actual value in case of value delta
  123|       |    // encoding.
  124|  8.85k|    if (limit - p < 3) {
  ------------------
  |  Branch (124:9): [True: 0, False: 8.85k]
  ------------------
  125|      0|      return nullptr;
  126|      0|    }
  127|  8.85k|    *shared = reinterpret_cast<const unsigned char*>(p)[0];
  128|  8.85k|    *non_shared = reinterpret_cast<const unsigned char*>(p)[1];
  129|  8.85k|    if ((*shared | *non_shared) < 128) {
  ------------------
  |  Branch (129:9): [True: 5.59k, False: 3.25k]
  ------------------
  130|       |      // Fast path: all three values are encoded in one byte each
  131|  5.59k|      p += 2;
  132|  5.59k|    } else {
  133|  3.25k|      if ((p = GetVarint32Ptr(p, limit, shared)) == nullptr) {
  ------------------
  |  Branch (133:11): [True: 0, False: 3.25k]
  ------------------
  134|      0|        return nullptr;
  135|      0|      }
  136|  3.25k|      if ((p = GetVarint32Ptr(p, limit, non_shared)) == nullptr) {
  ------------------
  |  Branch (136:11): [True: 0, False: 3.25k]
  ------------------
  137|      0|        return nullptr;
  138|      0|      }
  139|  3.25k|    }
  140|  8.85k|    return p;
  141|  8.85k|  }
_ZN7rocksdb14IndexBlockIter18DecodeCurrentValueEb:
  741|  8.85k|void IndexBlockIter::DecodeCurrentValue(bool is_shared) {
  742|  8.85k|  Slice v(value_.data(), data_ + restarts_ - value_.data());
  743|       |  // Delta encoding is used if `shared` != 0.
  744|  8.85k|  Status decode_s __attribute__((__unused__)) = decoded_value_.DecodeFrom(
  745|  8.85k|      &v, have_first_key_,
  746|  8.85k|      (value_delta_encoded_ && is_shared) ? &decoded_value_.handle : nullptr);
  ------------------
  |  Branch (746:8): [True: 8.85k, False: 0]
  |  Branch (746:32): [True: 0, False: 8.85k]
  ------------------
  747|  8.85k|  assert(decode_s.ok());
  748|  8.85k|  value_ = Slice(value_.data(), v.data() - value_.data());
  749|       |
  750|  8.85k|  if (global_seqno_state_ != nullptr) {
  ------------------
  |  Branch (750:7): [True: 0, False: 8.85k]
  ------------------
  751|       |    // Overwrite sequence number the same way as in DataBlockIter.
  752|       |
  753|      0|    IterKey& first_internal_key = global_seqno_state_->first_internal_key;
  754|      0|    first_internal_key.SetInternalKey(decoded_value_.first_internal_key,
  755|      0|                                      /* copy */ true);
  756|       |
  757|      0|    assert(GetInternalKeySeqno(first_internal_key.GetInternalKey()) == 0);
  758|       |
  759|      0|    ValueType value_type = ExtractValueType(first_internal_key.GetKey());
  760|      0|    assert(value_type == ValueType::kTypeValue ||
  761|      0|           value_type == ValueType::kTypeMerge ||
  762|      0|           value_type == ValueType::kTypeDeletion ||
  763|      0|           value_type == ValueType::kTypeRangeDeletion ||
  764|      0|           value_type == ValueType::kTypeWideColumnEntity);
  765|       |
  766|      0|    first_internal_key.UpdateInternalKey(global_seqno_state_->global_seqno,
  767|      0|                                         value_type);
  768|      0|    decoded_value_.first_internal_key = first_internal_key.GetKey();
  769|      0|  }
  770|  8.85k|  if (pad_min_timestamp_ && !decoded_value_.first_internal_key.empty()) {
  ------------------
  |  Branch (770:7): [True: 0, False: 8.85k]
  |  Branch (770:29): [True: 0, False: 0]
  ------------------
  771|      0|    first_internal_key_with_ts_.clear();
  772|      0|    PadInternalKeyWithMinTimestamp(&first_internal_key_with_ts_,
  773|      0|                                   decoded_value_.first_internal_key, ts_sz_);
  774|      0|    decoded_value_.first_internal_key = first_internal_key_with_ts_;
  775|      0|  }
  776|  8.85k|}
_ZN7rocksdb9DecodeKeyclEPKcS2_PjS3_:
  109|  29.8k|                                uint32_t* shared, uint32_t* non_shared) {
  110|  29.8k|    uint32_t value_length;
  111|  29.8k|    return DecodeEntry()(p, limit, shared, non_shared, &value_length);
  112|  29.8k|  }
_ZN7rocksdb9BlockIterINS_5SliceEE12ParseNextKeyINS_19CheckAndDecodeEntryEEEbPb:
  639|   171k|bool BlockIter<TValue>::ParseNextKey(bool* is_shared) {
  640|   171k|  current_ = NextEntryOffset();
  641|   171k|  const char* p = data_ + current_;
  642|   171k|  const char* limit = data_ + restarts_;  // Restarts come right after data
  643|       |
  644|   171k|  if (p >= limit) {
  ------------------
  |  Branch (644:7): [True: 6.06k, False: 165k]
  ------------------
  645|       |    // No more entries to return.  Mark as invalid.
  646|  6.06k|    current_ = restarts_;
  647|  6.06k|    restart_index_ = num_restarts_;
  648|  6.06k|    return false;
  649|  6.06k|  }
  650|       |  // Decode next entry
  651|   165k|  uint32_t shared, non_shared, value_length;
  652|   165k|  p = DecodeEntryFunc()(p, limit, &shared, &non_shared, &value_length);
  653|   165k|  if (p == nullptr || raw_key_.Size() < shared) {
  ------------------
  |  Branch (653:7): [True: 0, False: 165k]
  |  Branch (653:23): [True: 0, False: 165k]
  ------------------
  654|      0|    CorruptionError();
  655|      0|    return false;
  656|   165k|  } else {
  657|   165k|    if (shared == 0) {
  ------------------
  |  Branch (657:9): [True: 22.4k, False: 143k]
  ------------------
  658|  22.4k|      *is_shared = false;
  659|       |      // If this key doesn't share any bytes with prev key, and no min timestamp
  660|       |      // needs to be padded to the key, then we don't need to decode it and
  661|       |      // can use its address in the block directly (no copy).
  662|  22.4k|      UpdateRawKeyAndMaybePadMinTimestamp(Slice(p, non_shared));
  663|   143k|    } else {
  664|       |      // This key share `shared` bytes with prev key, we need to decode it
  665|   143k|      *is_shared = true;
  666|       |      // If user-defined timestamp is stripped from user key before keys are
  667|       |      // delta encoded, the decoded key consisting of the shared and non shared
  668|       |      // bytes do not have user-defined timestamp yet. We need to pad min
  669|       |      // timestamp to it.
  670|   143k|      if (pad_min_timestamp_) {
  ------------------
  |  Branch (670:11): [True: 0, False: 143k]
  ------------------
  671|      0|        raw_key_.TrimAppendWithTimestamp(shared, p, non_shared, ts_sz_);
  672|   143k|      } else {
  673|   143k|        raw_key_.TrimAppend(shared, p, non_shared);
  674|   143k|      }
  675|   143k|    }
  676|   165k|    value_ = Slice(p + non_shared, value_length);
  677|   165k|    if (shared == 0) {
  ------------------
  |  Branch (677:9): [True: 22.4k, False: 143k]
  ------------------
  678|  22.4k|      while (restart_index_ + 1 < num_restarts_ &&
  ------------------
  |  Branch (678:14): [True: 11.8k, False: 10.5k]
  ------------------
  679|  22.4k|             GetRestartPoint(restart_index_ + 1) < current_) {
  ------------------
  |  Branch (679:14): [True: 0, False: 11.8k]
  ------------------
  680|      0|        ++restart_index_;
  681|      0|      }
  682|  22.4k|    }
  683|       |    // else we are in the middle of a restart interval and the restart_index_
  684|       |    // thus has not changed
  685|   165k|    return true;
  686|   165k|  }
  687|   165k|}
_ZN7rocksdb19CheckAndDecodeEntryclEPKcS2_PjS3_S3_:
   75|   165k|                                uint32_t* value_length) {
   76|       |    // We need 2 bytes for shared and non_shared size. We also need one more
   77|       |    // byte either for value size or the actual value in case of value delta
   78|       |    // encoding.
   79|   165k|    if (limit - p < 3) {
  ------------------
  |  Branch (79:9): [True: 0, False: 165k]
  ------------------
   80|      0|      return nullptr;
   81|      0|    }
   82|   165k|    *shared = reinterpret_cast<const unsigned char*>(p)[0];
   83|   165k|    *non_shared = reinterpret_cast<const unsigned char*>(p)[1];
   84|   165k|    *value_length = reinterpret_cast<const unsigned char*>(p)[2];
   85|   165k|    if ((*shared | *non_shared | *value_length) < 128) {
  ------------------
  |  Branch (85:9): [True: 161k, False: 4.48k]
  ------------------
   86|       |      // Fast path: all three values are encoded in one byte each
   87|   161k|      p += 3;
   88|   161k|    } else {
   89|  4.48k|      if ((p = GetVarint32Ptr(p, limit, shared)) == nullptr) {
  ------------------
  |  Branch (89:11): [True: 0, False: 4.48k]
  ------------------
   90|      0|        return nullptr;
   91|      0|      }
   92|  4.48k|      if ((p = GetVarint32Ptr(p, limit, non_shared)) == nullptr) {
  ------------------
  |  Branch (92:11): [True: 0, False: 4.48k]
  ------------------
   93|      0|        return nullptr;
   94|      0|      }
   95|  4.48k|      if ((p = GetVarint32Ptr(p, limit, value_length)) == nullptr) {
  ------------------
  |  Branch (95:11): [True: 0, False: 4.48k]
  ------------------
   96|      0|        return nullptr;
   97|      0|      }
   98|  4.48k|    }
   99|       |
  100|   165k|    if (static_cast<uint32_t>(limit - p) < (*non_shared + *value_length)) {
  ------------------
  |  Branch (100:9): [True: 0, False: 165k]
  ------------------
  101|      0|      return nullptr;
  102|      0|    }
  103|   165k|    return p;
  104|   165k|  }
_ZN7rocksdb9BlockIterINS_5SliceEE10BinarySeekINS_9DecodeKeyEEEbRKS1_PjPb:
  830|  17.9k|                                   bool* skip_linear_scan) {
  831|  17.9k|  if (restarts_ == 0) {
  ------------------
  |  Branch (831:7): [True: 0, False: 17.9k]
  ------------------
  832|       |    // SST files dedicated to range tombstones are written with index blocks
  833|       |    // that have no keys while also having `num_restarts_ == 1`. This would
  834|       |    // cause a problem for `BinarySeek()` as it'd try to access the first key
  835|       |    // which does not exist. We identify such blocks by the offset at which
  836|       |    // their restarts are stored, and return false to prevent any attempted
  837|       |    // key accesses.
  838|      0|    return false;
  839|      0|  }
  840|       |
  841|  17.9k|  *skip_linear_scan = false;
  842|       |  // Loop invariants:
  843|       |  // - Restart key at index `left` is less than or equal to the target key. The
  844|       |  //   sentinel index `-1` is considered to have a key that is less than all
  845|       |  //   keys.
  846|       |  // - Any restart keys after index `right` are strictly greater than the target
  847|       |  //   key.
  848|  17.9k|  int64_t left = -1, right = num_restarts_ - 1;
  849|  47.7k|  while (left != right) {
  ------------------
  |  Branch (849:10): [True: 29.8k, False: 17.9k]
  ------------------
  850|       |    // The `mid` is computed by rounding up so it lands in (`left`, `right`].
  851|  29.8k|    int64_t mid = left + (right - left + 1) / 2;
  852|  29.8k|    uint32_t region_offset = GetRestartPoint(static_cast<uint32_t>(mid));
  853|  29.8k|    uint32_t shared, non_shared;
  854|  29.8k|    const char* key_ptr = DecodeKeyFunc()(
  855|  29.8k|        data_ + region_offset, data_ + restarts_, &shared, &non_shared);
  856|  29.8k|    if (key_ptr == nullptr || (shared != 0)) {
  ------------------
  |  Branch (856:9): [True: 0, False: 29.8k]
  |  Branch (856:31): [True: 0, False: 29.8k]
  ------------------
  857|      0|      CorruptionError();
  858|      0|      return false;
  859|      0|    }
  860|  29.8k|    Slice mid_key(key_ptr, non_shared);
  861|  29.8k|    UpdateRawKeyAndMaybePadMinTimestamp(mid_key);
  862|  29.8k|    int cmp = CompareCurrentKey(target);
  863|  29.8k|    if (cmp < 0) {
  ------------------
  |  Branch (863:9): [True: 7.63k, False: 22.1k]
  ------------------
  864|       |      // Key at "mid" is smaller than "target". Therefore all
  865|       |      // blocks before "mid" are uninteresting.
  866|  7.63k|      left = mid;
  867|  22.1k|    } else if (cmp > 0) {
  ------------------
  |  Branch (867:16): [True: 10.3k, False: 11.8k]
  ------------------
  868|       |      // Key at "mid" is >= "target". Therefore all blocks at or
  869|       |      // after "mid" are uninteresting.
  870|  10.3k|      right = mid - 1;
  871|  11.8k|    } else {
  872|  11.8k|      *skip_linear_scan = true;
  873|  11.8k|      left = right = mid;
  874|  11.8k|    }
  875|  29.8k|  }
  876|       |
  877|  17.9k|  if (left == -1) {
  ------------------
  |  Branch (877:7): [True: 4.48k, False: 13.4k]
  ------------------
  878|       |    // All keys in the block were strictly greater than `target`. So the very
  879|       |    // first key in the block is the final seek result.
  880|  4.48k|    *skip_linear_scan = true;
  881|  4.48k|    *index = 0;
  882|  13.4k|  } else {
  883|  13.4k|    *index = static_cast<uint32_t>(left);
  884|  13.4k|  }
  885|  17.9k|  return true;
  886|  17.9k|}
_ZN7rocksdb9BlockIterINS_5SliceEE22FindKeyAfterBinarySeekERKS1_jb:
  781|  17.9k|                                               bool skip_linear_scan) {
  782|       |  // SeekToRestartPoint() only does the lookup in the restart block. We need
  783|       |  // to follow it up with NextImpl() to position the iterator at the restart
  784|       |  // key.
  785|  17.9k|  SeekToRestartPoint(index);
  786|  17.9k|  cur_entry_idx_ = static_cast<int32_t>(index * block_restart_interval_) - 1;
  787|  17.9k|  NextImpl();
  788|       |
  789|  17.9k|  if (!skip_linear_scan) {
  ------------------
  |  Branch (789:7): [True: 1.57k, False: 16.3k]
  ------------------
  790|       |    // Linear search (within restart block) for first key >= target
  791|  1.57k|    uint32_t max_offset;
  792|  1.57k|    if (index + 1 < num_restarts_) {
  ------------------
  |  Branch (792:9): [True: 0, False: 1.57k]
  ------------------
  793|       |      // We are in a non-last restart interval. Since `BinarySeek()` guarantees
  794|       |      // the next restart key is strictly greater than `target`, we can
  795|       |      // terminate upon reaching it without any additional key comparison.
  796|      0|      max_offset = GetRestartPoint(index + 1);
  797|  1.57k|    } else {
  798|       |      // We are in the last restart interval. The while-loop will terminate by
  799|       |      // `Valid()` returning false upon advancing past the block's last key.
  800|  1.57k|      max_offset = std::numeric_limits<uint32_t>::max();
  801|  1.57k|    }
  802|  1.57k|    while (true) {
  ------------------
  |  Branch (802:12): [Folded - Ignored]
  ------------------
  803|  1.57k|      NextImpl();
  804|  1.57k|      if (!Valid()) {
  ------------------
  |  Branch (804:11): [True: 1.57k, False: 0]
  ------------------
  805|       |        // TODO(cbi): per key-value checksum will not be verified in UpdateKey()
  806|       |        //  since Valid() will returns false.
  807|  1.57k|        break;
  808|  1.57k|      }
  809|      0|      if (current_ == max_offset) {
  ------------------
  |  Branch (809:11): [True: 0, False: 0]
  ------------------
  810|      0|        assert(CompareCurrentKey(target) > 0);
  811|      0|        break;
  812|      0|      } else if (CompareCurrentKey(target) >= 0) {
  ------------------
  |  Branch (812:18): [True: 0, False: 0]
  ------------------
  813|      0|        break;
  814|      0|      }
  815|      0|    }
  816|  1.57k|  }
  817|  17.9k|}

_ZNK7rocksdb5Block4dataEv:
  167|  4.48k|  const char* data() const { return data_; }
_ZNK7rocksdb5Block11usable_sizeEv:
  169|  11.7k|  size_t usable_size() const { return contents_.usable_size(); }
_ZNK7rocksdb5Block9own_bytesEv:
  171|  11.7k|  bool own_bytes() const { return contents_.own_bytes(); }
_ZN7rocksdb13DataBlockIterC2Ev:
  694|  11.8k|      : BlockIter(), read_amp_bitmap_(nullptr), last_bitmap_offset_(0) {}
_ZN7rocksdb13DataBlockIter10InitializeEPKNS_10ComparatorEPKcjjmPNS_18BlockReadAmpBitmapEbbPNS_18DataBlockHashIndexEhS5_j:
  703|  11.7k|                  uint32_t block_restart_interval) {
  704|  11.7k|    InitializeBase(raw_ucmp, data, restarts, num_restarts, global_seqno,
  705|  11.7k|                   block_contents_pinned, user_defined_timestamps_persisted,
  706|  11.7k|                   protection_bytes_per_key, kv_checksum,
  707|  11.7k|                   block_restart_interval);
  708|  11.7k|    raw_key_.SetIsUserKey(false);
  709|  11.7k|    read_amp_bitmap_ = read_amp_bitmap;
  710|  11.7k|    last_bitmap_offset_ = current_ + 1;
  711|  11.7k|    data_block_hash_index_ = data_block_hash_index;
  712|  11.7k|  }
_ZNK7rocksdb13DataBlockIter5valueEv:
  714|   291k|  Slice value() const override {
  715|   291k|    assert(Valid());
  716|   291k|    if (read_amp_bitmap_ && current_ < restarts_ &&
  ------------------
  |  Branch (716:9): [True: 0, False: 291k]
  |  Branch (716:29): [True: 0, False: 0]
  ------------------
  717|   291k|        current_ != last_bitmap_offset_) {
  ------------------
  |  Branch (717:9): [True: 0, False: 0]
  ------------------
  718|      0|      read_amp_bitmap_->Mark(current_ /* current entry offset */,
  719|      0|                             NextEntryOffset() - 1);
  720|      0|      last_bitmap_offset_ = current_;
  721|      0|    }
  722|   291k|    return value_;
  723|   291k|  }
_ZN7rocksdb13DataBlockIter10InvalidateERKNS_6StatusE:
  740|  8.85k|  void Invalidate(const Status& s) override {
  741|  8.85k|    BlockIter::Invalidate(s);
  742|       |    // Clear prev entries cache.
  743|  8.85k|    prev_entries_keys_buff_.clear();
  744|  8.85k|    prev_entries_.clear();
  745|  8.85k|    prev_entries_idx_ = -1;
  746|  8.85k|  }
_ZN7rocksdb13MetaBlockIterC2Ev:
  799|  8.96k|  MetaBlockIter() : BlockIter() { raw_key_.SetIsUserKey(true); }
_ZN7rocksdb13MetaBlockIter10InitializeEPKcjjbhS2_j:
  802|  8.96k|                  const char* kv_checksum, uint32_t block_restart_interval) {
  803|       |    // Initializes the iterator with a BytewiseComparator and
  804|       |    // the raw key being a user key.
  805|  8.96k|    InitializeBase(BytewiseComparator(), data, restarts, num_restarts,
  806|  8.96k|                   kDisableGlobalSequenceNumber, block_contents_pinned,
  807|  8.96k|                   /* user_defined_timestamps_persisted */ true,
  808|  8.96k|                   protection_bytes_per_key, kv_checksum,
  809|  8.96k|                   block_restart_interval);
  810|  8.96k|    raw_key_.SetIsUserKey(true);
  811|  8.96k|  }
_ZNK7rocksdb13MetaBlockIter5valueEv:
  813|   159k|  Slice value() const override {
  814|   159k|    assert(Valid());
  815|   159k|    return value_;
  816|   159k|  }
_ZN7rocksdb14IndexBlockIterC2Ev:
  834|  8.96k|  IndexBlockIter() : BlockIter(), prefix_index_(nullptr) {}
_ZN7rocksdb14IndexBlockIter10InitializeEPKNS_10ComparatorEPKcjjmPNS_16BlockPrefixIndexEbbbbbhS5_j:
  847|  8.96k|                  uint32_t block_restart_interval) {
  848|  8.96k|    InitializeBase(raw_ucmp, data, restarts, num_restarts,
  849|  8.96k|                   kDisableGlobalSequenceNumber, block_contents_pinned,
  850|  8.96k|                   user_defined_timestamps_persisted, protection_bytes_per_key,
  851|  8.96k|                   kv_checksum, block_restart_interval);
  852|  8.96k|    raw_key_.SetIsUserKey(!key_includes_seq);
  853|  8.96k|    prefix_index_ = prefix_index;
  854|  8.96k|    value_delta_encoded_ = !value_is_full;
  855|  8.96k|    have_first_key_ = have_first_key;
  856|  8.96k|    if (have_first_key_ && global_seqno != kDisableGlobalSequenceNumber) {
  ------------------
  |  Branch (856:9): [True: 0, False: 8.96k]
  |  Branch (856:28): [True: 0, False: 0]
  ------------------
  857|      0|      global_seqno_state_.reset(new GlobalSeqnoState(global_seqno));
  858|  8.96k|    } else {
  859|  8.96k|      global_seqno_state_.reset();
  860|  8.96k|    }
  861|  8.96k|  }
_ZNK7rocksdb14IndexBlockIter5valueEv:
  868|  17.7k|  IndexValue value() const override {
  869|  17.7k|    assert(Valid());
  870|  17.7k|    if (value_delta_encoded_ || global_seqno_state_ != nullptr ||
  ------------------
  |  Branch (870:9): [True: 17.7k, False: 0]
  |  Branch (870:33): [True: 0, False: 0]
  ------------------
  871|  17.7k|        pad_min_timestamp_) {
  ------------------
  |  Branch (871:9): [True: 0, False: 0]
  ------------------
  872|  17.7k|      return decoded_value_;
  873|  17.7k|    } else {
  874|      0|      IndexValue entry;
  875|      0|      Slice v = value_;
  876|      0|      Status decode_s __attribute__((__unused__)) =
  877|      0|          entry.DecodeFrom(&v, have_first_key_, nullptr);
  878|      0|      assert(decode_s.ok());
  879|      0|      return entry;
  880|      0|    }
  881|  17.7k|  }
_ZN7rocksdb9BlockIterINS_5SliceEE14InitializeBaseEPKNS_10ComparatorEPKcjjmbbhS7_j:
  530|  20.7k|                      uint32_t block_restart_interval) {
  531|  20.7k|    assert(data_ == nullptr);  // Ensure it is called only once
  532|  20.7k|    assert(num_restarts > 0);  // Ensure the param is valid
  533|       |
  534|  20.7k|    icmp_ = std::make_unique<InternalKeyComparator>(raw_ucmp);
  535|  20.7k|    data_ = data;
  536|  20.7k|    restarts_ = restarts;
  537|  20.7k|    num_restarts_ = num_restarts;
  538|  20.7k|    current_ = restarts_;
  539|  20.7k|    restart_index_ = num_restarts_;
  540|  20.7k|    global_seqno_ = global_seqno;
  541|  20.7k|    if (raw_ucmp != nullptr) {
  ------------------
  |  Branch (541:9): [True: 20.7k, False: 0]
  ------------------
  542|  20.7k|      ts_sz_ = raw_ucmp->timestamp_size();
  543|  20.7k|    }
  544|  20.7k|    pad_min_timestamp_ = ts_sz_ > 0 && !user_defined_timestamp_persisted;
  ------------------
  |  Branch (544:26): [True: 0, False: 20.7k]
  |  Branch (544:40): [True: 0, False: 0]
  ------------------
  545|  20.7k|    block_contents_pinned_ = block_contents_pinned;
  546|  20.7k|    cache_handle_ = nullptr;
  547|  20.7k|    cur_entry_idx_ = -1;
  548|  20.7k|    protection_bytes_per_key_ = protection_bytes_per_key;
  549|  20.7k|    kv_checksum_ = kv_checksum;
  550|  20.7k|    block_restart_interval_ = block_restart_interval;
  551|       |    // Checksum related states are either all 0/nullptr or all non-zero.
  552|       |    // One exception is when num_restarts == 0, block_restart_interval can be 0
  553|       |    // since we are not able to compute it.
  554|  20.7k|    assert((protection_bytes_per_key == 0 && kv_checksum == nullptr) ||
  555|  20.7k|           (protection_bytes_per_key > 0 && kv_checksum != nullptr &&
  556|  20.7k|            (block_restart_interval > 0 || num_restarts == 1)));
  557|  20.7k|  }
_ZNK7rocksdb9BlockIterINS_5SliceEE15NextEntryOffsetEv:
  653|   483k|  inline uint32_t NextEntryOffset() const {
  654|       |    // NOTE: We don't support blocks bigger than 2GB
  655|   483k|    return static_cast<uint32_t>((value_.data() + value_.size()) - data_);
  656|   483k|  }
_ZN7rocksdb9BlockIterINS_5SliceEE9UpdateKeyEv:
  596|   481k|  void UpdateKey() {
  597|   481k|    key_buf_.Clear();
  598|   481k|    if (!Valid()) {
  ------------------
  |  Branch (598:9): [True: 20.7k, False: 461k]
  ------------------
  599|  20.7k|      return;
  600|  20.7k|    }
  601|   461k|    if (raw_key_.IsUserKey()) {
  ------------------
  |  Branch (601:9): [True: 164k, False: 296k]
  ------------------
  602|   164k|      assert(global_seqno_ == kDisableGlobalSequenceNumber);
  603|   164k|      key_ = raw_key_.GetUserKey();
  604|   164k|      key_pinned_ = raw_key_.IsKeyPinned();
  605|   296k|    } else if (global_seqno_ == kDisableGlobalSequenceNumber) {
  ------------------
  |  Branch (605:16): [True: 296k, False: 0]
  ------------------
  606|   296k|      key_ = raw_key_.GetInternalKey();
  607|   296k|      key_pinned_ = raw_key_.IsKeyPinned();
  608|   296k|    } else {
  609|      0|      key_buf_.SetInternalKey(raw_key_.GetUserKey(), global_seqno_,
  610|      0|                              ExtractValueType(raw_key_.GetInternalKey()));
  611|      0|      key_ = key_buf_.GetInternalKey();
  612|      0|      key_pinned_ = false;
  613|      0|    }
  614|   461k|    TEST_SYNC_POINT_CALLBACK("BlockIter::UpdateKey::value",
  615|   461k|                             (void*)value_.data());
  616|   461k|    TEST_SYNC_POINT_CALLBACK("Block::VerifyChecksum::checksum_len",
  617|   461k|                             &protection_bytes_per_key_);
  618|   461k|    if (protection_bytes_per_key_ > 0) {
  ------------------
  |  Branch (618:9): [True: 0, False: 461k]
  ------------------
  619|      0|      if (!ProtectionInfo64()
  ------------------
  |  Branch (619:11): [True: 0, False: 0]
  ------------------
  620|      0|               .ProtectKV(raw_key_.GetKey(), value_)
  621|      0|               .Verify(
  622|      0|                   protection_bytes_per_key_,
  623|      0|                   kv_checksum_ + protection_bytes_per_key_ * cur_entry_idx_)) {
  624|      0|        PerKVChecksumCorruptionError();
  625|      0|      }
  626|      0|    }
  627|   461k|  }
_ZN7rocksdb9BlockIterINS_5SliceEE10InvalidateERKNS_6StatusE:
  325|  8.85k|  virtual void Invalidate(const Status& s) {
  326|       |    // Assert that the BlockIter is never deleted while Pinning is Enabled.
  327|  8.85k|    assert(!pinned_iters_mgr_ || !pinned_iters_mgr_->PinningEnabled());
  328|       |
  329|  8.85k|    data_ = nullptr;
  330|  8.85k|    current_ = restarts_;
  331|  8.85k|    status_ = s;
  332|       |
  333|       |    // Call cleanup callbacks.
  334|  8.85k|    Cleanable::Reset();
  335|  8.85k|  }
_ZN7rocksdb9BlockIterINS_10IndexValueEE14InitializeBaseEPKNS_10ComparatorEPKcjjmbbhS7_j:
  530|  8.96k|                      uint32_t block_restart_interval) {
  531|  8.96k|    assert(data_ == nullptr);  // Ensure it is called only once
  532|  8.96k|    assert(num_restarts > 0);  // Ensure the param is valid
  533|       |
  534|  8.96k|    icmp_ = std::make_unique<InternalKeyComparator>(raw_ucmp);
  535|  8.96k|    data_ = data;
  536|  8.96k|    restarts_ = restarts;
  537|  8.96k|    num_restarts_ = num_restarts;
  538|  8.96k|    current_ = restarts_;
  539|  8.96k|    restart_index_ = num_restarts_;
  540|  8.96k|    global_seqno_ = global_seqno;
  541|  8.96k|    if (raw_ucmp != nullptr) {
  ------------------
  |  Branch (541:9): [True: 8.96k, False: 0]
  ------------------
  542|  8.96k|      ts_sz_ = raw_ucmp->timestamp_size();
  543|  8.96k|    }
  544|  8.96k|    pad_min_timestamp_ = ts_sz_ > 0 && !user_defined_timestamp_persisted;
  ------------------
  |  Branch (544:26): [True: 0, False: 8.96k]
  |  Branch (544:40): [True: 0, False: 0]
  ------------------
  545|  8.96k|    block_contents_pinned_ = block_contents_pinned;
  546|  8.96k|    cache_handle_ = nullptr;
  547|  8.96k|    cur_entry_idx_ = -1;
  548|  8.96k|    protection_bytes_per_key_ = protection_bytes_per_key;
  549|  8.96k|    kv_checksum_ = kv_checksum;
  550|  8.96k|    block_restart_interval_ = block_restart_interval;
  551|       |    // Checksum related states are either all 0/nullptr or all non-zero.
  552|       |    // One exception is when num_restarts == 0, block_restart_interval can be 0
  553|       |    // since we are not able to compute it.
  554|  8.96k|    assert((protection_bytes_per_key == 0 && kv_checksum == nullptr) ||
  555|  8.96k|           (protection_bytes_per_key > 0 && kv_checksum != nullptr &&
  556|  8.96k|            (block_restart_interval > 0 || num_restarts == 1)));
  557|  8.96k|  }
_ZNK7rocksdb9BlockIterINS_5SliceEE5ValidEv:
  337|   999k|  bool Valid() const override {
  338|       |    // When status_ is not ok, iter should be invalid.
  339|   999k|    assert(status_.ok() || current_ >= restarts_);
  340|   999k|    return current_ < restarts_;
  341|   999k|  }
_ZN7rocksdb9BlockIterINS_5SliceEE11SeekToFirstEv:
  343|  19.1k|  void SeekToFirst() override final {
  344|       |#ifndef NDEBUG
  345|       |    if (TEST_Corrupt_Callback("BlockIter::SeekToFirst")) return;
  346|       |#endif
  347|  19.1k|    SeekToFirstImpl();
  348|  19.1k|    UpdateKey();
  349|  19.1k|  }
_ZN7rocksdb9BlockIterINS_5SliceEE4SeekERKS1_:
  356|  17.9k|  void Seek(const Slice& target) override final {
  357|  17.9k|    SeekImpl(target);
  358|  17.9k|    UpdateKey();
  359|  17.9k|  }
_ZN7rocksdb9BlockIterINS_5SliceEE4NextEv:
  366|   444k|  void Next() override final {
  367|   444k|    NextImpl();
  368|   444k|    UpdateKey();
  369|   444k|  }
_ZNK7rocksdb9BlockIterINS_5SliceEE3keyEv:
  384|   752k|  Slice key() const override {
  385|   752k|    assert(Valid());
  386|   752k|    return key_;
  387|   752k|  }
_ZNK7rocksdb9BlockIterINS_5SliceEE6statusEv:
  382|   188k|  Status status() const override { return status_; }
_ZNK7rocksdb9BlockIterINS_5SliceEE11IsKeyPinnedEv:
  414|   262k|  bool IsKeyPinned() const override {
  415|   262k|    return block_contents_pinned_ && key_pinned_;
  ------------------
  |  Branch (415:12): [True: 262k, False: 0]
  |  Branch (415:38): [True: 262k, False: 0]
  ------------------
  416|   262k|  }
_ZNK7rocksdb9BlockIterINS_5SliceEE13IsValuePinnedEv:
  418|   131k|  bool IsValuePinned() const override { return block_contents_pinned_; }
_ZNK7rocksdb9BlockIterINS_5SliceEE15GetRestartPointEj:
  658|   595k|  uint32_t GetRestartPoint(uint32_t index) const {
  659|   595k|    assert(index < num_restarts_);
  660|   595k|    return DecodeFixed32(data_ + restarts_ + index * sizeof(uint32_t));
  661|   595k|  }
_ZN7rocksdb9BlockIterINS_5SliceEE18SeekToRestartPointEj:
  663|  37.0k|  void SeekToRestartPoint(uint32_t index) {
  664|  37.0k|    raw_key_.Clear();
  665|  37.0k|    restart_index_ = index;
  666|       |    // current_ will be fixed by ParseNextKey();
  667|       |
  668|       |    // ParseNextKey() starts at the end of value_, so set value_ accordingly
  669|  37.0k|    uint32_t offset = GetRestartPoint(index);
  670|  37.0k|    value_ = Slice(data_ + offset, 0);
  671|  37.0k|  }
_ZNK7rocksdb9BlockIterINS_10IndexValueEE5ValidEv:
  337|  26.6k|  bool Valid() const override {
  338|       |    // When status_ is not ok, iter should be invalid.
  339|  26.6k|    assert(status_.ok() || current_ >= restarts_);
  340|  26.6k|    return current_ < restarts_;
  341|  26.6k|  }
_ZN7rocksdb9BlockIterINS_10IndexValueEE11SeekToFirstEv:
  343|  4.48k|  void SeekToFirst() override final {
  344|       |#ifndef NDEBUG
  345|       |    if (TEST_Corrupt_Callback("BlockIter::SeekToFirst")) return;
  346|       |#endif
  347|  4.48k|    SeekToFirstImpl();
  348|  4.48k|    UpdateKey();
  349|  4.48k|  }
_ZN7rocksdb9BlockIterINS_10IndexValueEE9UpdateKeyEv:
  596|  13.3k|  void UpdateKey() {
  597|  13.3k|    key_buf_.Clear();
  598|  13.3k|    if (!Valid()) {
  ------------------
  |  Branch (598:9): [True: 4.48k, False: 8.85k]
  ------------------
  599|  4.48k|      return;
  600|  4.48k|    }
  601|  8.85k|    if (raw_key_.IsUserKey()) {
  ------------------
  |  Branch (601:9): [True: 8.85k, False: 0]
  ------------------
  602|  8.85k|      assert(global_seqno_ == kDisableGlobalSequenceNumber);
  603|  8.85k|      key_ = raw_key_.GetUserKey();
  604|  8.85k|      key_pinned_ = raw_key_.IsKeyPinned();
  605|  8.85k|    } else if (global_seqno_ == kDisableGlobalSequenceNumber) {
  ------------------
  |  Branch (605:16): [True: 0, False: 0]
  ------------------
  606|      0|      key_ = raw_key_.GetInternalKey();
  607|      0|      key_pinned_ = raw_key_.IsKeyPinned();
  608|      0|    } else {
  609|      0|      key_buf_.SetInternalKey(raw_key_.GetUserKey(), global_seqno_,
  610|      0|                              ExtractValueType(raw_key_.GetInternalKey()));
  611|      0|      key_ = key_buf_.GetInternalKey();
  612|      0|      key_pinned_ = false;
  613|      0|    }
  614|  8.85k|    TEST_SYNC_POINT_CALLBACK("BlockIter::UpdateKey::value",
  615|  8.85k|                             (void*)value_.data());
  616|  8.85k|    TEST_SYNC_POINT_CALLBACK("Block::VerifyChecksum::checksum_len",
  617|  8.85k|                             &protection_bytes_per_key_);
  618|  8.85k|    if (protection_bytes_per_key_ > 0) {
  ------------------
  |  Branch (618:9): [True: 0, False: 8.85k]
  ------------------
  619|      0|      if (!ProtectionInfo64()
  ------------------
  |  Branch (619:11): [True: 0, False: 0]
  ------------------
  620|      0|               .ProtectKV(raw_key_.GetKey(), value_)
  621|      0|               .Verify(
  622|      0|                   protection_bytes_per_key_,
  623|      0|                   kv_checksum_ + protection_bytes_per_key_ * cur_entry_idx_)) {
  624|      0|        PerKVChecksumCorruptionError();
  625|      0|      }
  626|      0|    }
  627|  8.85k|  }
_ZN7rocksdb9BlockIterINS_10IndexValueEE4NextEv:
  366|  8.85k|  void Next() override final {
  367|  8.85k|    NextImpl();
  368|  8.85k|    UpdateKey();
  369|  8.85k|  }
_ZNK7rocksdb9BlockIterINS_10IndexValueEE6statusEv:
  382|  8.96k|  Status status() const override { return status_; }
_ZNK7rocksdb9BlockIterINS_10IndexValueEE15GetRestartPointEj:
  658|  14.5k|  uint32_t GetRestartPoint(uint32_t index) const {
  659|  14.5k|    assert(index < num_restarts_);
  660|  14.5k|    return DecodeFixed32(data_ + restarts_ + index * sizeof(uint32_t));
  661|  14.5k|  }
_ZNK7rocksdb9BlockIterINS_10IndexValueEE15NextEntryOffsetEv:
  653|  13.3k|  inline uint32_t NextEntryOffset() const {
  654|       |    // NOTE: We don't support blocks bigger than 2GB
  655|  13.3k|    return static_cast<uint32_t>((value_.data() + value_.size()) - data_);
  656|  13.3k|  }
_ZN7rocksdb9BlockIterINS_10IndexValueEE18SeekToRestartPointEj:
  663|  4.48k|  void SeekToRestartPoint(uint32_t index) {
  664|  4.48k|    raw_key_.Clear();
  665|  4.48k|    restart_index_ = index;
  666|       |    // current_ will be fixed by ParseNextKey();
  667|       |
  668|       |    // ParseNextKey() starts at the end of value_, so set value_ accordingly
  669|  4.48k|    uint32_t offset = GetRestartPoint(index);
  670|  4.48k|    value_ = Slice(data_ + offset, 0);
  671|  4.48k|  }
_ZN7rocksdb9BlockIterINS_5SliceEE14SetCacheHandleEPNS_5Cache6HandleE:
  426|  11.7k|  void SetCacheHandle(Cache::Handle* handle) { cache_handle_ = handle; }
_ZN7rocksdb9BlockIterINS_5SliceEE35UpdateRawKeyAndMaybePadMinTimestampERKS1_:
  576|   338k|  void UpdateRawKeyAndMaybePadMinTimestamp(const Slice& key) {
  577|   338k|    if (pad_min_timestamp_) {
  ------------------
  |  Branch (577:9): [True: 0, False: 338k]
  ------------------
  578|      0|      std::string buf;
  579|      0|      if (raw_key_.IsUserKey()) {
  ------------------
  |  Branch (579:11): [True: 0, False: 0]
  ------------------
  580|      0|        AppendKeyWithMinTimestamp(&buf, key, ts_sz_);
  581|      0|      } else {
  582|      0|        PadInternalKeyWithMinTimestamp(&buf, key, ts_sz_);
  583|      0|      }
  584|      0|      raw_key_.SetKey(buf, true /* copy */);
  585|   338k|    } else {
  586|   338k|      raw_key_.SetKey(key, false /* copy */);
  587|   338k|    }
  588|   338k|  }
_ZN7rocksdb9BlockIterINS_10IndexValueEE35UpdateRawKeyAndMaybePadMinTimestampERKNS_5SliceE:
  576|  8.85k|  void UpdateRawKeyAndMaybePadMinTimestamp(const Slice& key) {
  577|  8.85k|    if (pad_min_timestamp_) {
  ------------------
  |  Branch (577:9): [True: 0, False: 8.85k]
  ------------------
  578|      0|      std::string buf;
  579|      0|      if (raw_key_.IsUserKey()) {
  ------------------
  |  Branch (579:11): [True: 0, False: 0]
  ------------------
  580|      0|        AppendKeyWithMinTimestamp(&buf, key, ts_sz_);
  581|      0|      } else {
  582|      0|        PadInternalKeyWithMinTimestamp(&buf, key, ts_sz_);
  583|      0|      }
  584|      0|      raw_key_.SetKey(buf, true /* copy */);
  585|  8.85k|    } else {
  586|  8.85k|      raw_key_.SetKey(key, false /* copy */);
  587|  8.85k|    }
  588|  8.85k|  }
_ZN7rocksdb9BlockIterINS_5SliceEE17CompareCurrentKeyERKS1_:
  632|  29.8k|  int CompareCurrentKey(const Slice& other) {
  633|  29.8k|    if (raw_key_.IsUserKey()) {
  ------------------
  |  Branch (633:9): [True: 29.8k, False: 0]
  ------------------
  634|  29.8k|      assert(global_seqno_ == kDisableGlobalSequenceNumber);
  635|  29.8k|      return icmp_->user_comparator()->Compare(raw_key_.GetUserKey(), other);
  636|  29.8k|    } else if (global_seqno_ == kDisableGlobalSequenceNumber) {
  ------------------
  |  Branch (636:16): [True: 0, False: 0]
  ------------------
  637|      0|      return icmp_->Compare(raw_key_.GetInternalKey(), other);
  638|      0|    }
  639|      0|    return icmp_->Compare(raw_key_.GetInternalKey(), global_seqno_, other,
  640|      0|                          kDisableGlobalSequenceNumber);
  641|  29.8k|  }

_ZN7rocksdb13CompressBlockERKNS_5SliceERKNS_15CompressionInfoEPNS_15CompressionTypeEjbPNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEESF_SF_:
  123|  13.3k|                    std::string* sampled_output_slow) {
  124|  13.3k|  assert(type);
  125|  13.3k|  assert(compressed_output);
  126|  13.3k|  assert(compressed_output->empty());
  127|       |
  128|       |  // If requested, we sample one in every N block with a
  129|       |  // fast and slow compression algorithm and report the stats.
  130|       |  // The users can use these stats to decide if it is worthwhile
  131|       |  // enabling compression and they also get a hint about which
  132|       |  // compression algorithm wil be beneficial.
  133|  13.3k|  if (allow_sample && info.SampleForCompression() &&
  ------------------
  |  Branch (133:7): [True: 8.85k, False: 4.48k]
  |  Branch (133:23): [True: 0, False: 8.85k]
  ------------------
  134|  13.3k|      Random::GetTLSInstance()->OneIn(
  ------------------
  |  Branch (134:7): [True: 0, False: 0]
  ------------------
  135|      0|          static_cast<int>(info.SampleForCompression()))) {
  136|       |    // Sampling with a fast compression algorithm
  137|      0|    if (sampled_output_fast && (LZ4_Supported() || Snappy_Supported())) {
  ------------------
  |  Branch (137:9): [True: 0, False: 0]
  |  Branch (137:33): [True: 0, False: 0]
  |  Branch (137:52): [True: 0, False: 0]
  ------------------
  138|      0|      CompressionType c =
  139|      0|          LZ4_Supported() ? kLZ4Compression : kSnappyCompression;
  ------------------
  |  Branch (139:11): [True: 0, False: 0]
  ------------------
  140|      0|      CompressionOptions options;
  141|      0|      CompressionContext context(c, options);
  142|      0|      CompressionInfo info_tmp(options, context,
  143|      0|                               CompressionDict::GetEmptyDict(), c,
  144|      0|                               info.SampleForCompression());
  145|       |
  146|      0|      CompressData(uncompressed_data, info_tmp,
  147|      0|                   GetCompressFormatForVersion(format_version),
  148|      0|                   sampled_output_fast);
  149|      0|    }
  150|       |
  151|       |    // Sampling with a slow but high-compression algorithm
  152|      0|    if (sampled_output_slow && (ZSTD_Supported() || Zlib_Supported())) {
  ------------------
  |  Branch (152:9): [True: 0, False: 0]
  |  Branch (152:33): [True: 0, False: 0]
  |  Branch (152:53): [True: 0, False: 0]
  ------------------
  153|      0|      CompressionType c = ZSTD_Supported() ? kZSTD : kZlibCompression;
  ------------------
  |  Branch (153:27): [True: 0, False: 0]
  ------------------
  154|      0|      CompressionOptions options;
  155|      0|      CompressionContext context(c, options);
  156|      0|      CompressionInfo info_tmp(options, context,
  157|      0|                               CompressionDict::GetEmptyDict(), c,
  158|      0|                               info.SampleForCompression());
  159|       |
  160|      0|      CompressData(uncompressed_data, info_tmp,
  161|      0|                   GetCompressFormatForVersion(format_version),
  162|      0|                   sampled_output_slow);
  163|      0|    }
  164|      0|  }
  165|       |
  166|  13.3k|  int max_compressed_bytes_per_kb = info.options().max_compressed_bytes_per_kb;
  167|  13.3k|  if (info.type() == kNoCompression || max_compressed_bytes_per_kb <= 0) {
  ------------------
  |  Branch (167:7): [True: 13.3k, False: 0]
  |  Branch (167:40): [True: 0, False: 0]
  ------------------
  168|  13.3k|    *type = kNoCompression;
  169|  13.3k|    return uncompressed_data;
  170|  13.3k|  }
  171|       |
  172|       |  // Actually compress the data; if the compression method is not supported,
  173|       |  // or the compression fails etc., just fall back to uncompressed
  174|      0|  if (!CompressData(uncompressed_data, info,
  ------------------
  |  Branch (174:7): [True: 0, False: 0]
  ------------------
  175|      0|                    GetCompressFormatForVersion(format_version),
  176|      0|                    compressed_output)) {
  177|      0|    *type = kNoCompression;
  178|      0|    return uncompressed_data;
  179|      0|  }
  180|       |
  181|       |  // Check the compression ratio; if it's not good enough, just fall back to
  182|       |  // uncompressed
  183|      0|  if (!GoodCompressionRatio(compressed_output->size(), uncompressed_data.size(),
  ------------------
  |  Branch (183:7): [True: 0, False: 0]
  ------------------
  184|      0|                            max_compressed_bytes_per_kb)) {
  185|      0|    *type = kNoCompression;
  186|      0|    return uncompressed_data;
  187|      0|  }
  188|       |
  189|      0|  *type = info.type();
  190|      0|  return *compressed_output;
  191|      0|}
_ZN7rocksdb22BlockBasedTableBuilderC2ERKNS_22BlockBasedTableOptionsERKNS_19TableBuilderOptionsEPNS_18WritableFileWriterE:
  966|  4.48k|    WritableFileWriter* file) {
  967|  4.48k|  BlockBasedTableOptions sanitized_table_options(table_options);
  968|  4.48k|  if (sanitized_table_options.format_version == 0 &&
  ------------------
  |  Branch (968:7): [True: 0, False: 4.48k]
  ------------------
  969|  4.48k|      sanitized_table_options.checksum != kCRC32c) {
  ------------------
  |  Branch (969:7): [True: 0, False: 0]
  ------------------
  970|      0|    ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  971|      0|        tbo.ioptions.logger,
  972|      0|        "Silently converting format_version to 1 because checksum is "
  973|      0|        "non-default");
  974|       |    // silently convert format_version to 1 to keep consistent with current
  975|       |    // behavior
  976|      0|    sanitized_table_options.format_version = 1;
  977|      0|  }
  978|  4.48k|  auto ucmp = tbo.internal_comparator.user_comparator();
  979|  4.48k|  assert(ucmp);
  980|  4.48k|  (void)ucmp;  // avoids unused variable error.
  981|  4.48k|  rep_ = new Rep(sanitized_table_options, tbo, file);
  982|       |
  983|  4.48k|  TEST_SYNC_POINT_CALLBACK(
  984|  4.48k|      "BlockBasedTableBuilder::BlockBasedTableBuilder:PreSetupBaseCacheKey",
  985|  4.48k|      const_cast<TableProperties*>(&rep_->props));
  986|       |
  987|  4.48k|  BlockBasedTable::SetupBaseCacheKey(&rep_->props, tbo.db_session_id,
  988|  4.48k|                                     tbo.cur_file_num, &rep_->base_cache_key);
  989|       |
  990|  4.48k|  if (rep_->IsParallelCompressionEnabled()) {
  ------------------
  |  Branch (990:7): [True: 0, False: 4.48k]
  ------------------
  991|      0|    StartParallelCompression();
  992|      0|  }
  993|  4.48k|}
_ZN7rocksdb22BlockBasedTableBuilderD2Ev:
  995|  4.48k|BlockBasedTableBuilder::~BlockBasedTableBuilder() {
  996|       |  // Catch errors where caller forgot to call Finish()
  997|  4.48k|  assert(rep_->state == Rep::State::kClosed);
  998|  4.48k|  delete rep_;
  999|  4.48k|}
_ZN7rocksdb22BlockBasedTableBuilder3AddERKNS_5SliceES3_:
 1001|   165k|void BlockBasedTableBuilder::Add(const Slice& key, const Slice& value) {
 1002|   165k|  Rep* r = rep_;
 1003|   165k|  assert(rep_->state != Rep::State::kClosed);
 1004|   165k|  if (!ok()) {
  ------------------
  |  Branch (1004:7): [True: 0, False: 165k]
  ------------------
 1005|      0|    return;
 1006|      0|  }
 1007|   165k|  ValueType value_type = ExtractValueType(key);
 1008|   165k|  if (IsValueType(value_type)) {
  ------------------
  |  Branch (1008:7): [True: 34.6k, False: 131k]
  ------------------
 1009|       |#ifndef NDEBUG
 1010|       |    if (r->props.num_entries > r->props.num_range_deletions) {
 1011|       |      assert(r->internal_comparator.Compare(key, Slice(r->last_key)) > 0);
 1012|       |    }
 1013|       |#endif  // !NDEBUG
 1014|       |
 1015|  34.6k|    auto should_flush = r->flush_block_policy->Update(key, value);
 1016|  34.6k|    if (should_flush) {
  ------------------
  |  Branch (1016:9): [True: 5.04k, False: 29.6k]
  ------------------
 1017|  5.04k|      assert(!r->data_block.empty());
 1018|  5.04k|      r->first_key_in_next_block = &key;
 1019|  5.04k|      Flush();
 1020|  5.04k|      if (r->state == Rep::State::kBuffered) {
  ------------------
  |  Branch (1020:11): [True: 0, False: 5.04k]
  ------------------
 1021|      0|        bool exceeds_buffer_limit =
 1022|      0|            (r->buffer_limit != 0 && r->data_begin_offset > r->buffer_limit);
  ------------------
  |  Branch (1022:14): [True: 0, False: 0]
  |  Branch (1022:38): [True: 0, False: 0]
  ------------------
 1023|      0|        bool exceeds_global_block_cache_limit = false;
 1024|       |
 1025|       |        // Increase cache charging for the last buffered data block
 1026|       |        // only if the block is not going to be unbuffered immediately
 1027|       |        // and there exists a cache reservation manager
 1028|      0|        if (!exceeds_buffer_limit &&
  ------------------
  |  Branch (1028:13): [True: 0, False: 0]
  ------------------
 1029|      0|            r->compression_dict_buffer_cache_res_mgr != nullptr) {
  ------------------
  |  Branch (1029:13): [True: 0, False: 0]
  ------------------
 1030|      0|          Status s =
 1031|      0|              r->compression_dict_buffer_cache_res_mgr->UpdateCacheReservation(
 1032|      0|                  r->data_begin_offset);
 1033|      0|          exceeds_global_block_cache_limit = s.IsMemoryLimit();
 1034|      0|        }
 1035|       |
 1036|      0|        if (exceeds_buffer_limit || exceeds_global_block_cache_limit) {
  ------------------
  |  Branch (1036:13): [True: 0, False: 0]
  |  Branch (1036:37): [True: 0, False: 0]
  ------------------
 1037|      0|          EnterUnbuffered();
 1038|      0|        }
 1039|      0|      }
 1040|       |
 1041|       |      // Add item to index block.
 1042|       |      // We do not emit the index entry for a block until we have seen the
 1043|       |      // first key for the next data block.  This allows us to use shorter
 1044|       |      // keys in the index block.  For example, consider a block boundary
 1045|       |      // between the keys "the quick brown fox" and "the who".  We can use
 1046|       |      // "the r" as the key for the index block entry since it is >= all
 1047|       |      // entries in the first block and < all entries in subsequent
 1048|       |      // blocks.
 1049|  5.04k|      if (ok() && r->state == Rep::State::kUnbuffered) {
  ------------------
  |  Branch (1049:11): [True: 5.04k, False: 0]
  |  Branch (1049:19): [True: 5.04k, False: 0]
  ------------------
 1050|  5.04k|        if (r->IsParallelCompressionEnabled()) {
  ------------------
  |  Branch (1050:13): [True: 0, False: 5.04k]
  ------------------
 1051|      0|          r->pc_rep->curr_block_keys->Clear();
 1052|  5.04k|        } else {
 1053|  5.04k|          r->index_builder->AddIndexEntry(r->last_key, &key, r->pending_handle,
 1054|  5.04k|                                          &r->index_separator_scratch);
 1055|  5.04k|        }
 1056|  5.04k|      }
 1057|  5.04k|    }
 1058|       |
 1059|       |    // Note: PartitionedFilterBlockBuilder requires key being added to filter
 1060|       |    // builder after being added to index builder.
 1061|  34.6k|    if (r->state == Rep::State::kUnbuffered) {
  ------------------
  |  Branch (1061:9): [True: 34.6k, False: 0]
  ------------------
 1062|  34.6k|      if (r->IsParallelCompressionEnabled()) {
  ------------------
  |  Branch (1062:11): [True: 0, False: 34.6k]
  ------------------
 1063|      0|        r->pc_rep->curr_block_keys->PushBack(key);
 1064|  34.6k|      } else {
 1065|  34.6k|        if (r->filter_builder != nullptr) {
  ------------------
  |  Branch (1065:13): [True: 0, False: 34.6k]
  ------------------
 1066|      0|          r->filter_builder->Add(
 1067|      0|              ExtractUserKeyAndStripTimestamp(key, r->ts_sz));
 1068|      0|        }
 1069|  34.6k|      }
 1070|  34.6k|    }
 1071|       |
 1072|  34.6k|    r->data_block.AddWithLastKey(key, value, r->last_key);
 1073|  34.6k|    r->last_key.assign(key.data(), key.size());
 1074|  34.6k|    if (r->state == Rep::State::kBuffered) {
  ------------------
  |  Branch (1074:9): [True: 0, False: 34.6k]
  ------------------
 1075|       |      // Buffered keys will be replayed from data_block_buffers during
 1076|       |      // `Finish()` once compression dictionary has been finalized.
 1077|  34.6k|    } else {
 1078|  34.6k|      if (!r->IsParallelCompressionEnabled()) {
  ------------------
  |  Branch (1078:11): [True: 34.6k, False: 0]
  ------------------
 1079|  34.6k|        r->index_builder->OnKeyAdded(key);
 1080|  34.6k|      }
 1081|  34.6k|    }
 1082|       |    // TODO offset passed in is not accurate for parallel compression case
 1083|  34.6k|    NotifyCollectTableCollectorsOnAdd(key, value, r->get_offset(),
 1084|  34.6k|                                      r->table_properties_collectors,
 1085|  34.6k|                                      r->ioptions.logger);
 1086|       |
 1087|   131k|  } else if (value_type == kTypeRangeDeletion) {
  ------------------
  |  Branch (1087:14): [True: 131k, False: 0]
  ------------------
 1088|   131k|    Slice persisted_end = value;
 1089|       |    // When timestamps should not be persisted, we physically strip away range
 1090|       |    // tombstone end key's user timestamp before passing it along to block
 1091|       |    // builder. Physically stripping away start key's user timestamp is
 1092|       |    // handled at the block builder level in the same way as the other data
 1093|       |    // blocks.
 1094|   131k|    if (r->ts_sz > 0 && !r->persist_user_defined_timestamps) {
  ------------------
  |  Branch (1094:9): [True: 0, False: 131k]
  |  Branch (1094:25): [True: 0, False: 0]
  ------------------
 1095|      0|      persisted_end = StripTimestampFromUserKey(value, r->ts_sz);
 1096|      0|    }
 1097|   131k|    r->range_del_block.Add(key, persisted_end);
 1098|       |    // TODO offset passed in is not accurate for parallel compression case
 1099|   131k|    NotifyCollectTableCollectorsOnAdd(key, value, r->get_offset(),
 1100|   131k|                                      r->table_properties_collectors,
 1101|   131k|                                      r->ioptions.logger);
 1102|   131k|  } else {
 1103|      0|    assert(false);
 1104|      0|    r->SetStatus(Status::InvalidArgument(
 1105|      0|        "BlockBasedBuilder::Add() received a key with invalid value type " +
 1106|      0|        std::to_string(static_cast<unsigned int>(value_type))));
 1107|      0|    return;
 1108|      0|  }
 1109|       |
 1110|   165k|  r->props.num_entries++;
 1111|   165k|  r->props.raw_key_size += key.size();
 1112|   165k|  if (!r->persist_user_defined_timestamps) {
  ------------------
  |  Branch (1112:7): [True: 0, False: 165k]
  ------------------
 1113|      0|    r->props.raw_key_size -= r->ts_sz;
 1114|      0|  }
 1115|   165k|  r->props.raw_value_size += value.size();
 1116|   165k|  if (value_type == kTypeDeletion || value_type == kTypeSingleDeletion ||
  ------------------
  |  Branch (1116:7): [True: 5.06k, False: 160k]
  |  Branch (1116:38): [True: 0, False: 160k]
  ------------------
 1117|   165k|      value_type == kTypeDeletionWithTimestamp) {
  ------------------
  |  Branch (1117:7): [True: 0, False: 160k]
  ------------------
 1118|  5.06k|    r->props.num_deletions++;
 1119|   160k|  } else if (value_type == kTypeRangeDeletion) {
  ------------------
  |  Branch (1119:14): [True: 131k, False: 29.5k]
  ------------------
 1120|   131k|    r->props.num_deletions++;
 1121|   131k|    r->props.num_range_deletions++;
 1122|   131k|  } else if (value_type == kTypeMerge) {
  ------------------
  |  Branch (1122:14): [True: 0, False: 29.5k]
  ------------------
 1123|      0|    r->props.num_merge_operands++;
 1124|      0|  }
 1125|   165k|}
_ZN7rocksdb22BlockBasedTableBuilder5FlushEv:
 1127|  9.52k|void BlockBasedTableBuilder::Flush() {
 1128|  9.52k|  Rep* r = rep_;
 1129|  9.52k|  assert(rep_->state != Rep::State::kClosed);
 1130|  9.52k|  if (!ok()) {
  ------------------
  |  Branch (1130:7): [True: 0, False: 9.52k]
  ------------------
 1131|      0|    return;
 1132|      0|  }
 1133|  9.52k|  if (r->data_block.empty()) {
  ------------------
  |  Branch (1133:7): [True: 671, False: 8.85k]
  ------------------
 1134|    671|    return;
 1135|    671|  }
 1136|  8.85k|  if (r->IsParallelCompressionEnabled() &&
  ------------------
  |  Branch (1136:7): [True: 0, False: 8.85k]
  ------------------
 1137|  8.85k|      r->state == Rep::State::kUnbuffered) {
  ------------------
  |  Branch (1137:7): [True: 0, False: 0]
  ------------------
 1138|      0|    r->data_block.Finish();
 1139|      0|    ParallelCompressionRep::BlockRep* block_rep = r->pc_rep->PrepareBlock(
 1140|      0|        r->compression_type, r->first_key_in_next_block, &(r->data_block));
 1141|      0|    assert(block_rep != nullptr);
 1142|      0|    r->pc_rep->file_size_estimator.EmitBlock(block_rep->data->size(),
 1143|      0|                                             r->get_offset());
 1144|      0|    r->pc_rep->EmitBlock(block_rep);
 1145|  8.85k|  } else {
 1146|  8.85k|    WriteBlock(&r->data_block, &r->pending_handle, BlockType::kData);
 1147|  8.85k|  }
 1148|  8.85k|}
_ZN7rocksdb22BlockBasedTableBuilder10WriteBlockEPNS_12BlockBuilderEPNS_11BlockHandleENS_9BlockTypeE:
 1152|  8.85k|                                        BlockType block_type) {
 1153|  8.85k|  block->Finish();
 1154|  8.85k|  std::string uncompressed_block_data;
 1155|  8.85k|  uncompressed_block_data.reserve(rep_->table_options.block_size);
 1156|  8.85k|  block->SwapAndReset(uncompressed_block_data);
 1157|  8.85k|  if (rep_->state == Rep::State::kBuffered) {
  ------------------
  |  Branch (1157:7): [True: 0, False: 8.85k]
  ------------------
 1158|      0|    assert(block_type == BlockType::kData);
 1159|      0|    rep_->data_block_buffers.emplace_back(std::move(uncompressed_block_data));
 1160|      0|    rep_->data_begin_offset += rep_->data_block_buffers.back().size();
 1161|      0|    return;
 1162|      0|  }
 1163|  8.85k|  WriteBlock(uncompressed_block_data, handle, block_type);
 1164|  8.85k|}
_ZN7rocksdb22BlockBasedTableBuilder10WriteBlockERKNS_5SliceEPNS_11BlockHandleENS_9BlockTypeE:
 1168|  13.3k|                                        BlockType block_type) {
 1169|  13.3k|  Rep* r = rep_;
 1170|  13.3k|  assert(r->state == Rep::State::kUnbuffered);
 1171|  13.3k|  Slice block_contents;
 1172|  13.3k|  CompressionType type;
 1173|  13.3k|  Status compress_status;
 1174|  13.3k|  bool is_data_block = block_type == BlockType::kData;
 1175|  13.3k|  CompressAndVerifyBlock(uncompressed_block_data, is_data_block,
 1176|  13.3k|                         *(r->compression_ctxs[0]), r->verify_ctxs[0].get(),
 1177|  13.3k|                         &(r->compressed_output), &(block_contents), &type,
 1178|  13.3k|                         &compress_status);
 1179|  13.3k|  r->SetStatus(compress_status);
 1180|  13.3k|  if (!ok()) {
  ------------------
  |  Branch (1180:7): [True: 0, False: 13.3k]
  ------------------
 1181|      0|    return;
 1182|      0|  }
 1183|       |
 1184|  13.3k|  TEST_SYNC_POINT_CALLBACK(
 1185|  13.3k|      "BlockBasedTableBuilder::WriteBlock:TamperWithCompressedData",
 1186|  13.3k|      &r->compressed_output);
 1187|  13.3k|  WriteMaybeCompressedBlock(block_contents, type, handle, block_type,
 1188|  13.3k|                            &uncompressed_block_data);
 1189|  13.3k|  r->compressed_output.clear();
 1190|  13.3k|  if (is_data_block) {
  ------------------
  |  Branch (1190:7): [True: 8.85k, False: 4.48k]
  ------------------
 1191|  8.85k|    r->props.data_size = r->get_offset();
 1192|  8.85k|    ++r->props.num_data_blocks;
 1193|  8.85k|  }
 1194|  13.3k|}
_ZN7rocksdb22BlockBasedTableBuilder22CompressAndVerifyBlockERKNS_5SliceEbRKNS_18CompressionContextEPNS_20UncompressionContextEPNSt3__112basic_stringIcNS9_11char_traitsIcEENS9_9allocatorIcEEEEPS1_PNS_15CompressionTypeEPNS_6StatusE:
 1215|  13.3k|    CompressionType* type, Status* out_status) {
 1216|  13.3k|  Rep* r = rep_;
 1217|  13.3k|  bool is_status_ok = ok();
 1218|  13.3k|  if (!r->IsParallelCompressionEnabled()) {
  ------------------
  |  Branch (1218:7): [True: 13.3k, False: 0]
  ------------------
 1219|  13.3k|    assert(is_status_ok);
 1220|  13.3k|  }
 1221|       |
 1222|  13.3k|  if (is_status_ok && uncompressed_block_data.size() < kCompressionSizeLimit) {
  ------------------
  |  Branch (1222:7): [True: 13.3k, False: 0]
  |  Branch (1222:23): [True: 13.3k, False: 0]
  ------------------
 1223|  13.3k|    StopWatchNano timer(
 1224|  13.3k|        r->ioptions.clock,
 1225|  13.3k|        ShouldReportDetailedTime(r->ioptions.env, r->ioptions.stats));
 1226|       |
 1227|  13.3k|    if (is_data_block) {
  ------------------
  |  Branch (1227:9): [True: 8.85k, False: 4.48k]
  ------------------
 1228|  8.85k|      r->compressible_input_data_bytes.fetch_add(uncompressed_block_data.size(),
 1229|  8.85k|                                                 std::memory_order_relaxed);
 1230|  8.85k|    }
 1231|  13.3k|    const CompressionDict* compression_dict;
 1232|  13.3k|    if (!is_data_block || r->compression_dict == nullptr) {
  ------------------
  |  Branch (1232:9): [True: 4.48k, False: 8.85k]
  |  Branch (1232:27): [True: 8.85k, False: 0]
  ------------------
 1233|  13.3k|      compression_dict = &CompressionDict::GetEmptyDict();
 1234|  13.3k|    } else {
 1235|      0|      compression_dict = r->compression_dict.get();
 1236|      0|    }
 1237|  13.3k|    assert(compression_dict != nullptr);
 1238|  13.3k|    CompressionInfo compression_info(r->compression_opts, compression_ctx,
 1239|  13.3k|                                     *compression_dict, r->compression_type,
 1240|  13.3k|                                     r->sample_for_compression);
 1241|       |
 1242|  13.3k|    std::string sampled_output_fast;
 1243|  13.3k|    std::string sampled_output_slow;
 1244|  13.3k|    *block_contents = CompressBlock(
 1245|  13.3k|        uncompressed_block_data, compression_info, type,
 1246|  13.3k|        r->table_options.format_version, is_data_block /* allow_sample */,
 1247|  13.3k|        compressed_output, &sampled_output_fast, &sampled_output_slow);
 1248|       |
 1249|  13.3k|    if (sampled_output_slow.size() > 0 || sampled_output_fast.size() > 0) {
  ------------------
  |  Branch (1249:9): [True: 0, False: 13.3k]
  |  Branch (1249:43): [True: 0, False: 13.3k]
  ------------------
 1250|       |      // Currently compression sampling is only enabled for data block.
 1251|      0|      assert(is_data_block);
 1252|      0|      r->sampled_input_data_bytes.fetch_add(uncompressed_block_data.size(),
 1253|      0|                                            std::memory_order_relaxed);
 1254|      0|      r->sampled_output_slow_data_bytes.fetch_add(sampled_output_slow.size(),
 1255|      0|                                                  std::memory_order_relaxed);
 1256|      0|      r->sampled_output_fast_data_bytes.fetch_add(sampled_output_fast.size(),
 1257|      0|                                                  std::memory_order_relaxed);
 1258|      0|    }
 1259|       |    // notify collectors on block add
 1260|  13.3k|    NotifyCollectTableCollectorsOnBlockAdd(
 1261|  13.3k|        r->table_properties_collectors, uncompressed_block_data.size(),
 1262|  13.3k|        sampled_output_fast.size(), sampled_output_slow.size());
 1263|       |
 1264|       |    // Some of the compression algorithms are known to be unreliable. If
 1265|       |    // the verify_compression flag is set then try to de-compress the
 1266|       |    // compressed data and compare to the input.
 1267|  13.3k|    if (*type != kNoCompression && r->table_options.verify_compression) {
  ------------------
  |  Branch (1267:9): [True: 0, False: 13.3k]
  |  Branch (1267:36): [True: 0, False: 0]
  ------------------
 1268|       |      // Retrieve the uncompressed contents into a new buffer
 1269|      0|      const UncompressionDict* verify_dict;
 1270|      0|      if (!is_data_block || r->verify_dict == nullptr) {
  ------------------
  |  Branch (1270:11): [True: 0, False: 0]
  |  Branch (1270:29): [True: 0, False: 0]
  ------------------
 1271|      0|        verify_dict = &UncompressionDict::GetEmptyDict();
 1272|      0|      } else {
 1273|      0|        verify_dict = r->verify_dict.get();
 1274|      0|      }
 1275|      0|      assert(verify_dict != nullptr);
 1276|      0|      BlockContents contents;
 1277|      0|      UncompressionInfo uncompression_info(*verify_ctx, *verify_dict,
 1278|      0|                                           r->compression_type);
 1279|      0|      Status uncompress_status = UncompressBlockData(
 1280|      0|          uncompression_info, block_contents->data(), block_contents->size(),
 1281|      0|          &contents, r->table_options.format_version, r->ioptions);
 1282|       |
 1283|      0|      if (uncompress_status.ok()) {
  ------------------
  |  Branch (1283:11): [True: 0, False: 0]
  ------------------
 1284|      0|        bool data_match = contents.data.compare(uncompressed_block_data) == 0;
 1285|      0|        if (!data_match) {
  ------------------
  |  Branch (1285:13): [True: 0, False: 0]
  ------------------
 1286|       |          // The result of the compression was invalid. abort.
 1287|      0|          const char* const msg =
 1288|      0|              "Decompressed block did not match pre-compression block";
 1289|      0|          ROCKS_LOG_ERROR(r->ioptions.logger, "%s", msg);
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1290|      0|          *out_status = Status::Corruption(msg);
 1291|      0|          *type = kNoCompression;
 1292|      0|        }
 1293|      0|      } else {
 1294|       |        // Decompression reported an error. abort.
 1295|      0|        *out_status = Status::Corruption(std::string("Could not decompress: ") +
 1296|      0|                                         uncompress_status.getState());
 1297|      0|        *type = kNoCompression;
 1298|      0|      }
 1299|      0|    }
 1300|  13.3k|    if (timer.IsStarted()) {
  ------------------
  |  Branch (1300:9): [True: 0, False: 13.3k]
  ------------------
 1301|      0|      RecordTimeToHistogram(r->ioptions.stats, COMPRESSION_TIMES_NANOS,
 1302|      0|                            timer.ElapsedNanos());
 1303|      0|    }
 1304|  13.3k|  } else {
 1305|       |    // Status is not OK, or block is too big to be compressed.
 1306|      0|    if (is_data_block) {
  ------------------
  |  Branch (1306:9): [True: 0, False: 0]
  ------------------
 1307|      0|      r->uncompressible_input_data_bytes.fetch_add(
 1308|      0|          uncompressed_block_data.size(), std::memory_order_relaxed);
 1309|      0|    }
 1310|      0|    *type = kNoCompression;
 1311|      0|  }
 1312|  13.3k|  if (is_data_block) {
  ------------------
  |  Branch (1312:7): [True: 8.85k, False: 4.48k]
  ------------------
 1313|  8.85k|    r->uncompressible_input_data_bytes.fetch_add(kBlockTrailerSize,
 1314|  8.85k|                                                 std::memory_order_relaxed);
 1315|  8.85k|  }
 1316|       |
 1317|       |  // Abort compression if the block is too big, or did not pass
 1318|       |  // verification.
 1319|  13.3k|  if (*type == kNoCompression) {
  ------------------
  |  Branch (1319:7): [True: 13.3k, False: 0]
  ------------------
 1320|  13.3k|    *block_contents = uncompressed_block_data;
 1321|  13.3k|    bool compression_attempted = !compressed_output->empty();
 1322|  13.3k|    RecordTick(r->ioptions.stats, compression_attempted
  ------------------
  |  Branch (1322:35): [True: 0, False: 13.3k]
  ------------------
 1323|  13.3k|                                      ? NUMBER_BLOCK_COMPRESSION_REJECTED
 1324|  13.3k|                                      : NUMBER_BLOCK_COMPRESSION_BYPASSED);
 1325|  13.3k|    RecordTick(r->ioptions.stats,
 1326|  13.3k|               compression_attempted ? BYTES_COMPRESSION_REJECTED
  ------------------
  |  Branch (1326:16): [True: 0, False: 13.3k]
  ------------------
 1327|  13.3k|                                     : BYTES_COMPRESSION_BYPASSED,
 1328|  13.3k|               uncompressed_block_data.size());
 1329|  13.3k|  } else {
 1330|      0|    RecordTick(r->ioptions.stats, NUMBER_BLOCK_COMPRESSED);
 1331|      0|    RecordTick(r->ioptions.stats, BYTES_COMPRESSED_FROM,
 1332|      0|               uncompressed_block_data.size());
 1333|      0|    RecordTick(r->ioptions.stats, BYTES_COMPRESSED_TO,
 1334|      0|               compressed_output->size());
 1335|      0|  }
 1336|  13.3k|}
_ZN7rocksdb22BlockBasedTableBuilder25WriteMaybeCompressedBlockERKNS_5SliceENS_15CompressionTypeEPNS_11BlockHandleENS_9BlockTypeEPS2_:
 1340|  25.2k|    BlockType block_type, const Slice* uncompressed_block_data) {
 1341|       |  // File format contains a sequence of blocks where each block has:
 1342|       |  //    block_data: uint8[n]
 1343|       |  //    compression_type: uint8
 1344|       |  //    checksum: uint32
 1345|  25.2k|  Rep* r = rep_;
 1346|  25.2k|  bool is_data_block = block_type == BlockType::kData;
 1347|  25.2k|  IOOptions io_options;
 1348|  25.2k|  IOStatus io_s =
 1349|  25.2k|      WritableFileWriter::PrepareIOOptions(r->write_options, io_options);
 1350|  25.2k|  if (!io_s.ok()) {
  ------------------
  |  Branch (1350:7): [True: 0, False: 25.2k]
  ------------------
 1351|      0|    r->SetIOStatus(io_s);
 1352|      0|    return;
 1353|      0|  }
 1354|       |  // Old, misleading name of this function: WriteRawBlock
 1355|  25.2k|  StopWatch sw(r->ioptions.clock, r->ioptions.stats, WRITE_RAW_BLOCK_MICROS);
 1356|  25.2k|  const uint64_t offset = r->get_offset();
 1357|  25.2k|  handle->set_offset(offset);
 1358|  25.2k|  handle->set_size(block_contents.size());
 1359|  25.2k|  assert(status().ok());
 1360|  25.2k|  assert(io_status().ok());
 1361|  25.2k|  if (uncompressed_block_data == nullptr) {
  ------------------
  |  Branch (1361:7): [True: 11.8k, False: 13.3k]
  ------------------
 1362|  11.8k|    uncompressed_block_data = &block_contents;
 1363|  11.8k|    assert(comp_type == kNoCompression);
 1364|  11.8k|  }
 1365|       |
 1366|  25.2k|  {
 1367|  25.2k|    io_s = r->file->Append(io_options, block_contents);
 1368|  25.2k|    if (!io_s.ok()) {
  ------------------
  |  Branch (1368:9): [True: 0, False: 25.2k]
  ------------------
 1369|      0|      r->SetIOStatus(io_s);
 1370|      0|      return;
 1371|      0|    }
 1372|  25.2k|  }
 1373|       |
 1374|  25.2k|  std::array<char, kBlockTrailerSize> trailer;
 1375|  25.2k|  trailer[0] = comp_type;
 1376|  25.2k|  uint32_t checksum = ComputeBuiltinChecksumWithLastByte(
 1377|  25.2k|      r->table_options.checksum, block_contents.data(), block_contents.size(),
 1378|  25.2k|      /*last_byte*/ comp_type);
 1379|  25.2k|  checksum += ChecksumModifierForContext(r->base_context_checksum, offset);
 1380|       |
 1381|  25.2k|  if (block_type == BlockType::kFilter) {
  ------------------
  |  Branch (1381:7): [True: 0, False: 25.2k]
  ------------------
 1382|      0|    Status s = r->filter_builder->MaybePostVerifyFilter(block_contents);
 1383|      0|    if (!s.ok()) {
  ------------------
  |  Branch (1383:9): [True: 0, False: 0]
  ------------------
 1384|      0|      r->SetStatus(s);
 1385|      0|      return;
 1386|      0|    }
 1387|      0|  }
 1388|       |
 1389|  25.2k|  EncodeFixed32(trailer.data() + 1, checksum);
 1390|  25.2k|  TEST_SYNC_POINT_CALLBACK(
 1391|  25.2k|      "BlockBasedTableBuilder::WriteMaybeCompressedBlock:TamperWithChecksum",
 1392|  25.2k|      trailer.data());
 1393|  25.2k|  {
 1394|  25.2k|    io_s = r->file->Append(io_options, Slice(trailer.data(), trailer.size()));
 1395|  25.2k|    if (!io_s.ok()) {
  ------------------
  |  Branch (1395:9): [True: 0, False: 25.2k]
  ------------------
 1396|      0|      r->SetIOStatus(io_s);
 1397|      0|      return;
 1398|      0|    }
 1399|  25.2k|  }
 1400|       |
 1401|  25.2k|  {
 1402|  25.2k|    bool warm_cache;
 1403|  25.2k|    switch (r->table_options.prepopulate_block_cache) {
 1404|      0|      case BlockBasedTableOptions::PrepopulateBlockCache::kFlushOnly:
  ------------------
  |  Branch (1404:7): [True: 0, False: 25.2k]
  ------------------
 1405|      0|        warm_cache = (r->reason == TableFileCreationReason::kFlush);
 1406|      0|        break;
 1407|  25.2k|      case BlockBasedTableOptions::PrepopulateBlockCache::kDisable:
  ------------------
  |  Branch (1407:7): [True: 25.2k, False: 0]
  ------------------
 1408|  25.2k|        warm_cache = false;
 1409|  25.2k|        break;
 1410|      0|      default:
  ------------------
  |  Branch (1410:7): [True: 0, False: 25.2k]
  ------------------
 1411|       |        // missing case
 1412|      0|        assert(false);
 1413|      0|        warm_cache = false;
 1414|  25.2k|    }
 1415|  25.2k|    if (warm_cache) {
  ------------------
  |  Branch (1415:9): [True: 0, False: 25.2k]
  ------------------
 1416|      0|      Status s = InsertBlockInCacheHelper(*uncompressed_block_data, handle,
 1417|      0|                                          block_type);
 1418|      0|      if (!s.ok()) {
  ------------------
  |  Branch (1418:11): [True: 0, False: 0]
  ------------------
 1419|      0|        r->SetStatus(s);
 1420|      0|        return;
 1421|      0|      }
 1422|      0|    }
 1423|  25.2k|  }
 1424|       |
 1425|  25.2k|  r->set_offset(r->get_offset() + block_contents.size() + kBlockTrailerSize);
 1426|  25.2k|  if (r->table_options.block_align && is_data_block) {
  ------------------
  |  Branch (1426:7): [True: 0, False: 25.2k]
  |  Branch (1426:39): [True: 0, False: 0]
  ------------------
 1427|      0|    size_t pad_bytes =
 1428|      0|        (r->alignment -
 1429|      0|         ((block_contents.size() + kBlockTrailerSize) & (r->alignment - 1))) &
 1430|      0|        (r->alignment - 1);
 1431|       |
 1432|      0|    io_s = r->file->Pad(io_options, pad_bytes);
 1433|      0|    if (io_s.ok()) {
  ------------------
  |  Branch (1433:9): [True: 0, False: 0]
  ------------------
 1434|      0|      r->set_offset(r->get_offset() + pad_bytes);
 1435|      0|    } else {
 1436|      0|      r->SetIOStatus(io_s);
 1437|      0|      return;
 1438|      0|    }
 1439|      0|  }
 1440|       |
 1441|  25.2k|  if (r->IsParallelCompressionEnabled()) {
  ------------------
  |  Branch (1441:7): [True: 0, False: 25.2k]
  ------------------
 1442|      0|    if (is_data_block) {
  ------------------
  |  Branch (1442:9): [True: 0, False: 0]
  ------------------
 1443|      0|      r->pc_rep->file_size_estimator.ReapBlock(block_contents.size(),
 1444|      0|                                               r->get_offset());
 1445|      0|    } else {
 1446|      0|      r->pc_rep->file_size_estimator.SetEstimatedFileSize(r->get_offset());
 1447|      0|    }
 1448|      0|  }
 1449|  25.2k|}
_ZNK7rocksdb22BlockBasedTableBuilder6statusEv:
 1528|   251k|Status BlockBasedTableBuilder::status() const { return rep_->GetStatus(); }
_ZNK7rocksdb22BlockBasedTableBuilder9io_statusEv:
 1530|  4.48k|IOStatus BlockBasedTableBuilder::io_status() const {
 1531|  4.48k|  return rep_->GetIOStatus();
 1532|  4.48k|}
_ZN7rocksdb22BlockBasedTableBuilder16WriteFilterBlockEPNS_16MetaIndexBuilderE:
 1561|  4.48k|    MetaIndexBuilder* meta_index_builder) {
 1562|  4.48k|  if (rep_->filter_builder == nullptr || rep_->filter_builder->IsEmpty()) {
  ------------------
  |  Branch (1562:7): [True: 4.48k, False: 0]
  |  Branch (1562:42): [True: 0, False: 0]
  ------------------
 1563|       |    // No filter block needed
 1564|  4.48k|    return;
 1565|  4.48k|  }
 1566|      0|  BlockHandle filter_block_handle;
 1567|      0|  bool is_partitioned_filter = rep_->table_options.partition_filters;
 1568|      0|  if (ok()) {
  ------------------
  |  Branch (1568:7): [True: 0, False: 0]
  ------------------
 1569|      0|    rep_->props.num_filter_entries +=
 1570|      0|        rep_->filter_builder->EstimateEntriesAdded();
 1571|      0|    Status s = Status::Incomplete();
 1572|      0|    while (ok() && s.IsIncomplete()) {
  ------------------
  |  Branch (1572:12): [True: 0, False: 0]
  |  Branch (1572:20): [True: 0, False: 0]
  ------------------
 1573|       |      // filter_data is used to store the transferred filter data payload from
 1574|       |      // FilterBlockBuilder and deallocate the payload by going out of scope.
 1575|       |      // Otherwise, the payload will unnecessarily remain until
 1576|       |      // BlockBasedTableBuilder is deallocated.
 1577|       |      //
 1578|       |      // See FilterBlockBuilder::Finish() for more on the difference in
 1579|       |      // transferred filter data payload among different FilterBlockBuilder
 1580|       |      // subtypes.
 1581|      0|      std::unique_ptr<const char[]> filter_data;
 1582|      0|      Slice filter_content =
 1583|      0|          rep_->filter_builder->Finish(filter_block_handle, &s, &filter_data);
 1584|       |
 1585|      0|      assert(s.ok() || s.IsIncomplete() || s.IsCorruption());
 1586|      0|      if (s.IsCorruption()) {
  ------------------
  |  Branch (1586:11): [True: 0, False: 0]
  ------------------
 1587|      0|        rep_->SetStatus(s);
 1588|      0|        break;
 1589|      0|      }
 1590|       |
 1591|      0|      rep_->props.filter_size += filter_content.size();
 1592|       |
 1593|      0|      BlockType btype = is_partitioned_filter && /* last */ s.ok()
  ------------------
  |  Branch (1593:25): [True: 0, False: 0]
  |  Branch (1593:61): [True: 0, False: 0]
  ------------------
 1594|      0|                            ? BlockType::kFilterPartitionIndex
 1595|      0|                            : BlockType::kFilter;
 1596|      0|      WriteMaybeCompressedBlock(filter_content, kNoCompression,
 1597|      0|                                &filter_block_handle, btype);
 1598|      0|    }
 1599|      0|    rep_->filter_builder->ResetFilterBitsBuilder();
 1600|      0|  }
 1601|      0|  if (ok()) {
  ------------------
  |  Branch (1601:7): [True: 0, False: 0]
  ------------------
 1602|       |    // Add mapping from "<filter_block_prefix>.Name" to location
 1603|       |    // of filter data.
 1604|      0|    std::string key;
 1605|      0|    key = is_partitioned_filter ? BlockBasedTable::kPartitionedFilterBlockPrefix
  ------------------
  |  Branch (1605:11): [True: 0, False: 0]
  ------------------
 1606|      0|                                : BlockBasedTable::kFullFilterBlockPrefix;
 1607|      0|    key.append(rep_->table_options.filter_policy->CompatibilityName());
 1608|      0|    meta_index_builder->Add(key, filter_block_handle);
 1609|      0|  }
 1610|      0|}
_ZN7rocksdb22BlockBasedTableBuilder15WriteIndexBlockEPNS_16MetaIndexBuilderEPNS_11BlockHandleE:
 1613|  4.48k|    MetaIndexBuilder* meta_index_builder, BlockHandle* index_block_handle) {
 1614|  4.48k|  if (!ok()) {
  ------------------
  |  Branch (1614:7): [True: 0, False: 4.48k]
  ------------------
 1615|      0|    return;
 1616|      0|  }
 1617|  4.48k|  IndexBuilder::IndexBlocks index_blocks;
 1618|  4.48k|  auto index_builder_status = rep_->index_builder->Finish(&index_blocks);
 1619|  4.48k|  if (index_builder_status.IsIncomplete()) {
  ------------------
  |  Branch (1619:7): [True: 0, False: 4.48k]
  ------------------
 1620|       |    // We we have more than one index partition then meta_blocks are not
 1621|       |    // supported for the index. Currently meta_blocks are used only by
 1622|       |    // HashIndexBuilder which is not multi-partition.
 1623|      0|    assert(index_blocks.meta_blocks.empty());
 1624|  4.48k|  } else if (ok() && !index_builder_status.ok()) {
  ------------------
  |  Branch (1624:14): [True: 4.48k, False: 0]
  |  Branch (1624:22): [True: 0, False: 4.48k]
  ------------------
 1625|      0|    rep_->SetStatus(index_builder_status);
 1626|      0|  }
 1627|  4.48k|  if (ok()) {
  ------------------
  |  Branch (1627:7): [True: 4.48k, False: 0]
  ------------------
 1628|  4.48k|    for (const auto& item : index_blocks.meta_blocks) {
  ------------------
  |  Branch (1628:27): [True: 0, False: 4.48k]
  ------------------
 1629|      0|      BlockHandle block_handle;
 1630|      0|      WriteBlock(item.second, &block_handle, BlockType::kIndex);
 1631|      0|      if (!ok()) {
  ------------------
  |  Branch (1631:11): [True: 0, False: 0]
  ------------------
 1632|      0|        break;
 1633|      0|      }
 1634|      0|      meta_index_builder->Add(item.first, block_handle);
 1635|      0|    }
 1636|  4.48k|  }
 1637|  4.48k|  if (ok()) {
  ------------------
  |  Branch (1637:7): [True: 4.48k, False: 0]
  ------------------
 1638|  4.48k|    if (rep_->table_options.enable_index_compression) {
  ------------------
  |  Branch (1638:9): [True: 4.48k, False: 0]
  ------------------
 1639|  4.48k|      WriteBlock(index_blocks.index_block_contents, index_block_handle,
 1640|  4.48k|                 BlockType::kIndex);
 1641|  4.48k|    } else {
 1642|      0|      WriteMaybeCompressedBlock(index_blocks.index_block_contents,
 1643|      0|                                kNoCompression, index_block_handle,
 1644|      0|                                BlockType::kIndex);
 1645|      0|    }
 1646|  4.48k|  }
 1647|       |  // If there are more index partitions, finish them and write them out
 1648|  4.48k|  if (index_builder_status.IsIncomplete()) {
  ------------------
  |  Branch (1648:7): [True: 0, False: 4.48k]
  ------------------
 1649|      0|    bool index_building_finished = false;
 1650|      0|    while (ok() && !index_building_finished) {
  ------------------
  |  Branch (1650:12): [True: 0, False: 0]
  |  Branch (1650:20): [True: 0, False: 0]
  ------------------
 1651|      0|      Status s =
 1652|      0|          rep_->index_builder->Finish(&index_blocks, *index_block_handle);
 1653|      0|      if (s.ok()) {
  ------------------
  |  Branch (1653:11): [True: 0, False: 0]
  ------------------
 1654|      0|        index_building_finished = true;
 1655|      0|      } else if (s.IsIncomplete()) {
  ------------------
  |  Branch (1655:18): [True: 0, False: 0]
  ------------------
 1656|       |        // More partitioned index after this one
 1657|      0|        assert(!index_building_finished);
 1658|      0|      } else {
 1659|       |        // Error
 1660|      0|        rep_->SetStatus(s);
 1661|      0|        return;
 1662|      0|      }
 1663|       |
 1664|      0|      if (rep_->table_options.enable_index_compression) {
  ------------------
  |  Branch (1664:11): [True: 0, False: 0]
  ------------------
 1665|      0|        WriteBlock(index_blocks.index_block_contents, index_block_handle,
 1666|      0|                   BlockType::kIndex);
 1667|      0|      } else {
 1668|      0|        WriteMaybeCompressedBlock(index_blocks.index_block_contents,
 1669|      0|                                  kNoCompression, index_block_handle,
 1670|      0|                                  BlockType::kIndex);
 1671|      0|      }
 1672|       |      // The last index_block_handle will be for the partition index block
 1673|      0|    }
 1674|      0|  }
 1675|       |  // If success and need to record in metaindex rather than footer...
 1676|  4.48k|  if (!FormatVersionUsesIndexHandleInFooter(
  ------------------
  |  Branch (1676:7): [True: 4.48k, False: 0]
  ------------------
 1677|  4.48k|          rep_->table_options.format_version)) {
 1678|  4.48k|    meta_index_builder->Add(kIndexBlockName, *index_block_handle);
 1679|  4.48k|  }
 1680|  4.48k|}
_ZN7rocksdb22BlockBasedTableBuilder20WritePropertiesBlockEPNS_16MetaIndexBuilderE:
 1683|  4.48k|    MetaIndexBuilder* meta_index_builder) {
 1684|  4.48k|  BlockHandle properties_block_handle;
 1685|  4.48k|  if (ok()) {
  ------------------
  |  Branch (1685:7): [True: 4.48k, False: 0]
  ------------------
 1686|  4.48k|    PropertyBlockBuilder property_block_builder;
 1687|  4.48k|    rep_->props.filter_policy_name =
 1688|  4.48k|        rep_->table_options.filter_policy != nullptr
  ------------------
  |  Branch (1688:9): [True: 0, False: 4.48k]
  ------------------
 1689|  4.48k|            ? rep_->table_options.filter_policy->Name()
 1690|  4.48k|            : "";
 1691|  4.48k|    rep_->props.index_size =
 1692|  4.48k|        rep_->index_builder->IndexSize() + kBlockTrailerSize;
 1693|  4.48k|    rep_->props.comparator_name = rep_->ioptions.user_comparator != nullptr
  ------------------
  |  Branch (1693:35): [True: 4.48k, False: 0]
  ------------------
 1694|  4.48k|                                      ? rep_->ioptions.user_comparator->Name()
 1695|  4.48k|                                      : "nullptr";
 1696|  4.48k|    rep_->props.merge_operator_name =
 1697|  4.48k|        rep_->ioptions.merge_operator != nullptr
  ------------------
  |  Branch (1697:9): [True: 0, False: 4.48k]
  ------------------
 1698|  4.48k|            ? rep_->ioptions.merge_operator->Name()
 1699|  4.48k|            : "nullptr";
 1700|  4.48k|    rep_->props.compression_name =
 1701|  4.48k|        CompressionTypeToString(rep_->compression_type);
 1702|  4.48k|    rep_->props.compression_options =
 1703|  4.48k|        CompressionOptionsToString(rep_->compression_opts);
 1704|  4.48k|    rep_->props.prefix_extractor_name =
 1705|  4.48k|        rep_->prefix_extractor ? rep_->prefix_extractor->AsString() : "nullptr";
  ------------------
  |  Branch (1705:9): [True: 0, False: 4.48k]
  ------------------
 1706|  4.48k|    std::string property_collectors_names = "[";
 1707|  4.48k|    for (size_t i = 0;
 1708|  4.48k|         i < rep_->ioptions.table_properties_collector_factories.size(); ++i) {
  ------------------
  |  Branch (1708:10): [True: 0, False: 4.48k]
  ------------------
 1709|      0|      if (i != 0) {
  ------------------
  |  Branch (1709:11): [True: 0, False: 0]
  ------------------
 1710|      0|        property_collectors_names += ",";
 1711|      0|      }
 1712|      0|      property_collectors_names +=
 1713|      0|          rep_->ioptions.table_properties_collector_factories[i]->Name();
 1714|      0|    }
 1715|  4.48k|    property_collectors_names += "]";
 1716|  4.48k|    rep_->props.property_collectors_names = property_collectors_names;
 1717|  4.48k|    if (rep_->table_options.index_type ==
  ------------------
  |  Branch (1717:9): [True: 0, False: 4.48k]
  ------------------
 1718|  4.48k|        BlockBasedTableOptions::kTwoLevelIndexSearch) {
 1719|      0|      assert(rep_->p_index_builder_ != nullptr);
 1720|      0|      rep_->props.index_partitions = rep_->p_index_builder_->NumPartitions();
 1721|      0|      rep_->props.top_level_index_size =
 1722|      0|          rep_->p_index_builder_->TopLevelIndexSize(rep_->offset);
 1723|      0|    }
 1724|  4.48k|    rep_->props.index_key_is_user_key =
 1725|  4.48k|        !rep_->index_builder->seperator_is_key_plus_seq();
 1726|  4.48k|    rep_->props.index_value_is_delta_encoded =
 1727|  4.48k|        rep_->use_delta_encoding_for_index_values;
 1728|  4.48k|    if (rep_->sampled_input_data_bytes > 0) {
  ------------------
  |  Branch (1728:9): [True: 0, False: 4.48k]
  ------------------
 1729|      0|      rep_->props.slow_compression_estimated_data_size = static_cast<uint64_t>(
 1730|      0|          static_cast<double>(rep_->sampled_output_slow_data_bytes) /
 1731|      0|              rep_->sampled_input_data_bytes *
 1732|      0|              rep_->compressible_input_data_bytes +
 1733|      0|          rep_->uncompressible_input_data_bytes + 0.5);
 1734|      0|      rep_->props.fast_compression_estimated_data_size = static_cast<uint64_t>(
 1735|      0|          static_cast<double>(rep_->sampled_output_fast_data_bytes) /
 1736|      0|              rep_->sampled_input_data_bytes *
 1737|      0|              rep_->compressible_input_data_bytes +
 1738|      0|          rep_->uncompressible_input_data_bytes + 0.5);
 1739|  4.48k|    } else if (rep_->sample_for_compression > 0) {
  ------------------
  |  Branch (1739:16): [True: 0, False: 4.48k]
  ------------------
 1740|       |      // We tried to sample but none were found. Assume worst-case (compression
 1741|       |      // ratio 1.0) so data is complete and aggregatable.
 1742|      0|      rep_->props.slow_compression_estimated_data_size =
 1743|      0|          rep_->compressible_input_data_bytes +
 1744|      0|          rep_->uncompressible_input_data_bytes;
 1745|      0|      rep_->props.fast_compression_estimated_data_size =
 1746|      0|          rep_->compressible_input_data_bytes +
 1747|      0|          rep_->uncompressible_input_data_bytes;
 1748|      0|    }
 1749|  4.48k|    rep_->props.user_defined_timestamps_persisted =
 1750|  4.48k|        rep_->persist_user_defined_timestamps;
 1751|       |
 1752|       |    // Add basic properties
 1753|  4.48k|    property_block_builder.AddTableProperty(rep_->props);
 1754|       |
 1755|       |    // Add use collected properties
 1756|  4.48k|    NotifyCollectTableCollectorsOnFinish(
 1757|  4.48k|        rep_->table_properties_collectors, rep_->ioptions.logger,
 1758|  4.48k|        &property_block_builder, rep_->props.user_collected_properties,
 1759|  4.48k|        rep_->props.readable_properties);
 1760|       |
 1761|  4.48k|    Slice block_data = property_block_builder.Finish();
 1762|  4.48k|    TEST_SYNC_POINT_CALLBACK(
 1763|  4.48k|        "BlockBasedTableBuilder::WritePropertiesBlock:BlockData", &block_data);
 1764|  4.48k|    WriteMaybeCompressedBlock(block_data, kNoCompression,
 1765|  4.48k|                              &properties_block_handle, BlockType::kProperties);
 1766|  4.48k|  }
 1767|  4.48k|  if (ok()) {
  ------------------
  |  Branch (1767:7): [True: 4.48k, False: 0]
  ------------------
 1768|       |#ifndef NDEBUG
 1769|       |    {
 1770|       |      uint64_t props_block_offset = properties_block_handle.offset();
 1771|       |      uint64_t props_block_size = properties_block_handle.size();
 1772|       |      TEST_SYNC_POINT_CALLBACK(
 1773|       |          "BlockBasedTableBuilder::WritePropertiesBlock:GetPropsBlockOffset",
 1774|       |          &props_block_offset);
 1775|       |      TEST_SYNC_POINT_CALLBACK(
 1776|       |          "BlockBasedTableBuilder::WritePropertiesBlock:GetPropsBlockSize",
 1777|       |          &props_block_size);
 1778|       |    }
 1779|       |#endif  // !NDEBUG
 1780|       |
 1781|  4.48k|    const std::string* properties_block_meta = &kPropertiesBlockName;
 1782|  4.48k|    TEST_SYNC_POINT_CALLBACK(
 1783|  4.48k|        "BlockBasedTableBuilder::WritePropertiesBlock:Meta",
 1784|  4.48k|        &properties_block_meta);
 1785|  4.48k|    meta_index_builder->Add(*properties_block_meta, properties_block_handle);
 1786|  4.48k|  }
 1787|  4.48k|}
_ZN7rocksdb22BlockBasedTableBuilder25WriteCompressionDictBlockEPNS_16MetaIndexBuilderE:
 1790|  4.48k|    MetaIndexBuilder* meta_index_builder) {
 1791|  4.48k|  if (rep_->compression_dict != nullptr &&
  ------------------
  |  Branch (1791:7): [True: 0, False: 4.48k]
  |  Branch (1791:7): [True: 0, False: 4.48k]
  ------------------
 1792|  4.48k|      rep_->compression_dict->GetRawDict().size()) {
  ------------------
  |  Branch (1792:7): [True: 0, False: 0]
  ------------------
 1793|      0|    BlockHandle compression_dict_block_handle;
 1794|      0|    if (ok()) {
  ------------------
  |  Branch (1794:9): [True: 0, False: 0]
  ------------------
 1795|      0|      WriteMaybeCompressedBlock(rep_->compression_dict->GetRawDict(),
 1796|      0|                                kNoCompression, &compression_dict_block_handle,
 1797|      0|                                BlockType::kCompressionDictionary);
 1798|       |#ifndef NDEBUG
 1799|       |      Slice compression_dict = rep_->compression_dict->GetRawDict();
 1800|       |      TEST_SYNC_POINT_CALLBACK(
 1801|       |          "BlockBasedTableBuilder::WriteCompressionDictBlock:RawDict",
 1802|       |          &compression_dict);
 1803|       |#endif  // NDEBUG
 1804|      0|    }
 1805|      0|    if (ok()) {
  ------------------
  |  Branch (1805:9): [True: 0, False: 0]
  ------------------
 1806|      0|      meta_index_builder->Add(kCompressionDictBlockName,
 1807|      0|                              compression_dict_block_handle);
 1808|      0|    }
 1809|      0|  }
 1810|  4.48k|}
_ZN7rocksdb22BlockBasedTableBuilder18WriteRangeDelBlockEPNS_16MetaIndexBuilderE:
 1813|  4.48k|    MetaIndexBuilder* meta_index_builder) {
 1814|  4.48k|  if (ok() && !rep_->range_del_block.empty()) {
  ------------------
  |  Branch (1814:7): [True: 4.48k, False: 0]
  |  Branch (1814:15): [True: 2.90k, False: 1.57k]
  ------------------
 1815|  2.90k|    BlockHandle range_del_block_handle;
 1816|  2.90k|    WriteMaybeCompressedBlock(rep_->range_del_block.Finish(), kNoCompression,
 1817|  2.90k|                              &range_del_block_handle,
 1818|  2.90k|                              BlockType::kRangeDeletion);
 1819|  2.90k|    meta_index_builder->Add(kRangeDelBlockName, range_del_block_handle);
 1820|  2.90k|  }
 1821|  4.48k|}
_ZN7rocksdb22BlockBasedTableBuilder11WriteFooterERNS_11BlockHandleES2_:
 1824|  4.48k|                                         BlockHandle& index_block_handle) {
 1825|  4.48k|  assert(ok());
 1826|  4.48k|  Rep* r = rep_;
 1827|       |  // this is guaranteed by BlockBasedTableBuilder's constructor
 1828|  4.48k|  assert(r->table_options.checksum == kCRC32c ||
 1829|  4.48k|         r->table_options.format_version != 0);
 1830|  4.48k|  FooterBuilder footer;
 1831|  4.48k|  Status s = footer.Build(kBlockBasedTableMagicNumber,
 1832|  4.48k|                          r->table_options.format_version, r->get_offset(),
 1833|  4.48k|                          r->table_options.checksum, metaindex_block_handle,
 1834|  4.48k|                          index_block_handle, r->base_context_checksum);
 1835|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (1835:7): [True: 0, False: 4.48k]
  ------------------
 1836|      0|    r->SetStatus(s);
 1837|      0|    return;
 1838|      0|  }
 1839|  4.48k|  IOOptions io_options;
 1840|  4.48k|  IOStatus ios =
 1841|  4.48k|      WritableFileWriter::PrepareIOOptions(r->write_options, io_options);
 1842|  4.48k|  if (!ios.ok()) {
  ------------------
  |  Branch (1842:7): [True: 0, False: 4.48k]
  ------------------
 1843|      0|    r->SetIOStatus(ios);
 1844|      0|    return;
 1845|      0|  }
 1846|  4.48k|  ios = r->file->Append(io_options, footer.GetSlice());
 1847|  4.48k|  if (ios.ok()) {
  ------------------
  |  Branch (1847:7): [True: 4.48k, False: 0]
  ------------------
 1848|  4.48k|    r->set_offset(r->get_offset() + footer.GetSlice().size());
 1849|  4.48k|  } else {
 1850|      0|    r->SetIOStatus(ios);
 1851|      0|  }
 1852|  4.48k|}
_ZN7rocksdb22BlockBasedTableBuilder6FinishEv:
 2009|  4.48k|Status BlockBasedTableBuilder::Finish() {
 2010|  4.48k|  Rep* r = rep_;
 2011|  4.48k|  assert(r->state != Rep::State::kClosed);
 2012|  4.48k|  bool empty_data_block = r->data_block.empty();
 2013|  4.48k|  r->first_key_in_next_block = nullptr;
 2014|  4.48k|  Flush();
 2015|  4.48k|  if (r->state == Rep::State::kBuffered) {
  ------------------
  |  Branch (2015:7): [True: 0, False: 4.48k]
  ------------------
 2016|      0|    EnterUnbuffered();
 2017|      0|  }
 2018|  4.48k|  if (r->IsParallelCompressionEnabled()) {
  ------------------
  |  Branch (2018:7): [True: 0, False: 4.48k]
  ------------------
 2019|      0|    StopParallelCompression();
 2020|       |#ifndef NDEBUG
 2021|       |    for (const auto& br : r->pc_rep->block_rep_buf) {
 2022|       |      assert(br.status.ok());
 2023|       |    }
 2024|       |#endif  // !NDEBUG
 2025|  4.48k|  } else {
 2026|       |    // To make sure properties block is able to keep the accurate size of index
 2027|       |    // block, we will finish writing all index entries first.
 2028|  4.48k|    if (ok() && !empty_data_block) {
  ------------------
  |  Branch (2028:9): [True: 4.48k, False: 0]
  |  Branch (2028:17): [True: 3.81k, False: 671]
  ------------------
 2029|  3.81k|      r->index_builder->AddIndexEntry(
 2030|  3.81k|          r->last_key, nullptr /* no next data block */, r->pending_handle,
 2031|  3.81k|          &r->index_separator_scratch);
 2032|  3.81k|    }
 2033|  4.48k|  }
 2034|       |
 2035|  4.48k|  r->props.tail_start_offset = r->offset;
 2036|       |
 2037|       |  // Write meta blocks, metaindex block and footer in the following order.
 2038|       |  //    1. [meta block: filter]
 2039|       |  //    2. [meta block: index]
 2040|       |  //    3. [meta block: compression dictionary]
 2041|       |  //    4. [meta block: range deletion tombstone]
 2042|       |  //    5. [meta block: properties]
 2043|       |  //    6. [metaindex block]
 2044|       |  //    7. Footer
 2045|  4.48k|  BlockHandle metaindex_block_handle, index_block_handle;
 2046|  4.48k|  MetaIndexBuilder meta_index_builder;
 2047|  4.48k|  WriteFilterBlock(&meta_index_builder);
 2048|  4.48k|  WriteIndexBlock(&meta_index_builder, &index_block_handle);
 2049|  4.48k|  WriteCompressionDictBlock(&meta_index_builder);
 2050|  4.48k|  WriteRangeDelBlock(&meta_index_builder);
 2051|  4.48k|  WritePropertiesBlock(&meta_index_builder);
 2052|  4.48k|  if (ok()) {
  ------------------
  |  Branch (2052:7): [True: 4.48k, False: 0]
  ------------------
 2053|       |    // flush the meta index block
 2054|  4.48k|    WriteMaybeCompressedBlock(meta_index_builder.Finish(), kNoCompression,
 2055|  4.48k|                              &metaindex_block_handle, BlockType::kMetaIndex);
 2056|  4.48k|  }
 2057|  4.48k|  if (ok()) {
  ------------------
  |  Branch (2057:7): [True: 4.48k, False: 0]
  ------------------
 2058|  4.48k|    WriteFooter(metaindex_block_handle, index_block_handle);
 2059|  4.48k|  }
 2060|  4.48k|  r->state = Rep::State::kClosed;
 2061|  4.48k|  r->tail_size = r->offset - r->props.tail_start_offset;
 2062|       |
 2063|  4.48k|  Status ret_status = r->CopyStatus();
 2064|  4.48k|  IOStatus ios = r->GetIOStatus();
 2065|  4.48k|  if (!ios.ok() && ret_status.ok()) {
  ------------------
  |  Branch (2065:7): [True: 0, False: 4.48k]
  |  Branch (2065:20): [True: 0, False: 0]
  ------------------
 2066|       |    // Let io_status supersede ok status (otherwise status takes precedennce)
 2067|      0|    ret_status = ios;
 2068|      0|  }
 2069|  4.48k|  return ret_status;
 2070|  4.48k|}
_ZNK7rocksdb22BlockBasedTableBuilder7IsEmptyEv:
 2088|  4.48k|bool BlockBasedTableBuilder::IsEmpty() const {
 2089|  4.48k|  return rep_->props.num_entries == 0 && rep_->props.num_range_deletions == 0;
  ------------------
  |  Branch (2089:10): [True: 0, False: 4.48k]
  |  Branch (2089:42): [True: 0, False: 0]
  ------------------
 2090|  4.48k|}
_ZNK7rocksdb22BlockBasedTableBuilder8FileSizeEv:
 2092|  4.48k|uint64_t BlockBasedTableBuilder::FileSize() const { return rep_->offset; }
_ZNK7rocksdb22BlockBasedTableBuilder11GetTailSizeEv:
 2104|  4.48k|uint64_t BlockBasedTableBuilder::GetTailSize() const { return rep_->tail_size; }
_ZNK7rocksdb22BlockBasedTableBuilder11NeedCompactEv:
 2106|  4.48k|bool BlockBasedTableBuilder::NeedCompact() const {
 2107|  4.48k|  for (const auto& collector : rep_->table_properties_collectors) {
  ------------------
  |  Branch (2107:30): [True: 4.48k, False: 4.48k]
  ------------------
 2108|  4.48k|    if (collector->NeedCompact()) {
  ------------------
  |  Branch (2108:9): [True: 0, False: 4.48k]
  ------------------
 2109|      0|      return true;
 2110|      0|    }
 2111|  4.48k|  }
 2112|  4.48k|  return false;
 2113|  4.48k|}
_ZNK7rocksdb22BlockBasedTableBuilder18GetTablePropertiesEv:
 2115|  4.48k|TableProperties BlockBasedTableBuilder::GetTableProperties() const {
 2116|  4.48k|  return rep_->props;
 2117|  4.48k|}
_ZN7rocksdb22BlockBasedTableBuilder27SetSeqnoTimeTablePropertiesERKNS_18SeqnoToTimeMappingEm:
 2135|  4.48k|    const SeqnoToTimeMapping& relevant_mapping, uint64_t oldest_ancestor_time) {
 2136|  4.48k|  assert(rep_->props.seqno_to_time_mapping.empty());
 2137|  4.48k|  relevant_mapping.EncodeTo(rep_->props.seqno_to_time_mapping);
 2138|  4.48k|  rep_->props.creation_time = oldest_ancestor_time;
 2139|  4.48k|}
_ZN7rocksdb22BlockBasedTableBuilder3RepC2ERKNS_22BlockBasedTableOptionsERKNS_19TableBuilderOptionsEPNS_18WritableFileWriterE:
  504|  4.48k|        io_status_ok(true) {
  505|  4.48k|    if (tbo.target_file_size == 0) {
  ------------------
  |  Branch (505:9): [True: 4.48k, False: 0]
  ------------------
  506|  4.48k|      buffer_limit = compression_opts.max_dict_buffer_bytes;
  507|  4.48k|    } else if (compression_opts.max_dict_buffer_bytes == 0) {
  ------------------
  |  Branch (507:16): [True: 0, False: 0]
  ------------------
  508|      0|      buffer_limit = tbo.target_file_size;
  509|      0|    } else {
  510|      0|      buffer_limit = std::min(tbo.target_file_size,
  511|      0|                              compression_opts.max_dict_buffer_bytes);
  512|      0|    }
  513|       |
  514|  4.48k|    const auto compress_dict_build_buffer_charged =
  515|  4.48k|        table_options.cache_usage_options.options_overrides
  516|  4.48k|            .at(CacheEntryRole::kCompressionDictionaryBuildingBuffer)
  517|  4.48k|            .charged;
  518|  4.48k|    if (table_options.block_cache &&
  ------------------
  |  Branch (518:9): [True: 4.48k, False: 0]
  ------------------
  519|  4.48k|        (compress_dict_build_buffer_charged ==
  ------------------
  |  Branch (519:10): [True: 0, False: 4.48k]
  ------------------
  520|  4.48k|             CacheEntryRoleOptions::Decision::kEnabled ||
  521|  4.48k|         compress_dict_build_buffer_charged ==
  ------------------
  |  Branch (521:10): [True: 4.48k, False: 0]
  ------------------
  522|  4.48k|             CacheEntryRoleOptions::Decision::kFallback)) {
  523|  4.48k|      compression_dict_buffer_cache_res_mgr =
  524|  4.48k|          std::make_shared<CacheReservationManagerImpl<
  525|  4.48k|              CacheEntryRole::kCompressionDictionaryBuildingBuffer>>(
  526|  4.48k|              table_options.block_cache);
  527|  4.48k|    } else {
  528|      0|      compression_dict_buffer_cache_res_mgr = nullptr;
  529|      0|    }
  530|       |
  531|  4.48k|    assert(compression_ctxs.size() >= compression_opts.parallel_threads);
  532|  8.96k|    for (uint32_t i = 0; i < compression_opts.parallel_threads; i++) {
  ------------------
  |  Branch (532:26): [True: 4.48k, False: 4.48k]
  ------------------
  533|  4.48k|      compression_ctxs[i].reset(
  534|  4.48k|          new CompressionContext(compression_type, compression_opts));
  535|  4.48k|    }
  536|  4.48k|    if (table_options.index_type ==
  ------------------
  |  Branch (536:9): [True: 0, False: 4.48k]
  ------------------
  537|  4.48k|        BlockBasedTableOptions::kTwoLevelIndexSearch) {
  538|      0|      p_index_builder_ = PartitionedIndexBuilder::CreateIndexBuilder(
  539|      0|          &internal_comparator, use_delta_encoding_for_index_values,
  540|      0|          table_options, ts_sz, persist_user_defined_timestamps);
  541|      0|      index_builder.reset(p_index_builder_);
  542|  4.48k|    } else {
  543|  4.48k|      index_builder.reset(IndexBuilder::CreateIndexBuilder(
  544|  4.48k|          table_options.index_type, &internal_comparator,
  545|  4.48k|          &this->internal_prefix_transform, use_delta_encoding_for_index_values,
  546|  4.48k|          table_options, ts_sz, persist_user_defined_timestamps));
  547|  4.48k|    }
  548|  4.48k|    if (ioptions.optimize_filters_for_hits && tbo.is_bottommost) {
  ------------------
  |  Branch (548:9): [True: 0, False: 4.48k]
  |  Branch (548:47): [True: 0, False: 0]
  ------------------
  549|       |      // Apply optimize_filters_for_hits setting here when applicable by
  550|       |      // skipping filter generation
  551|      0|      filter_builder.reset();
  552|  4.48k|    } else if (tbo.skip_filters) {
  ------------------
  |  Branch (552:16): [True: 0, False: 4.48k]
  ------------------
  553|       |      // For SstFileWriter skip_filters
  554|      0|      filter_builder.reset();
  555|  4.48k|    } else if (!table_options.filter_policy) {
  ------------------
  |  Branch (555:16): [True: 4.48k, False: 0]
  ------------------
  556|       |      // Null filter_policy -> no filter
  557|  4.48k|      filter_builder.reset();
  558|  4.48k|    } else {
  559|      0|      FilterBuildingContext filter_context(table_options);
  560|       |
  561|      0|      filter_context.info_log = ioptions.logger;
  562|      0|      filter_context.column_family_name = tbo.column_family_name;
  563|      0|      filter_context.reason = reason;
  564|       |
  565|       |      // Only populate other fields if known to be in LSM rather than
  566|       |      // generating external SST file
  567|      0|      if (reason != TableFileCreationReason::kMisc) {
  ------------------
  |  Branch (567:11): [True: 0, False: 0]
  ------------------
  568|      0|        filter_context.compaction_style = ioptions.compaction_style;
  569|      0|        filter_context.num_levels = ioptions.num_levels;
  570|      0|        filter_context.level_at_creation = tbo.level_at_creation;
  571|      0|        filter_context.is_bottommost = tbo.is_bottommost;
  572|      0|        assert(filter_context.level_at_creation < filter_context.num_levels);
  573|      0|      }
  574|       |
  575|      0|      filter_builder.reset(CreateFilterBlockBuilder(
  576|      0|          ioptions, tbo.moptions, filter_context,
  577|      0|          use_delta_encoding_for_index_values, p_index_builder_, ts_sz,
  578|      0|          persist_user_defined_timestamps));
  579|      0|    }
  580|       |
  581|  4.48k|    assert(tbo.internal_tbl_prop_coll_factories);
  582|  4.48k|    for (auto& factory : *tbo.internal_tbl_prop_coll_factories) {
  ------------------
  |  Branch (582:24): [True: 0, False: 4.48k]
  ------------------
  583|      0|      assert(factory);
  584|       |
  585|      0|      std::unique_ptr<InternalTblPropColl> collector{
  586|      0|          factory->CreateInternalTblPropColl(
  587|      0|              tbo.column_family_id, tbo.level_at_creation,
  588|      0|              tbo.ioptions.num_levels,
  589|      0|              tbo.last_level_inclusive_max_seqno_threshold)};
  590|      0|      if (collector) {
  ------------------
  |  Branch (590:11): [True: 0, False: 0]
  ------------------
  591|      0|        table_properties_collectors.emplace_back(std::move(collector));
  592|      0|      }
  593|      0|    }
  594|  4.48k|    table_properties_collectors.emplace_back(
  595|  4.48k|        new BlockBasedTablePropertiesCollector(
  596|  4.48k|            table_options.index_type, table_options.whole_key_filtering,
  597|  4.48k|            prefix_extractor != nullptr));
  598|  4.48k|    if (ts_sz > 0 && persist_user_defined_timestamps) {
  ------------------
  |  Branch (598:9): [True: 0, False: 4.48k]
  |  Branch (598:22): [True: 0, False: 0]
  ------------------
  599|      0|      table_properties_collectors.emplace_back(
  600|      0|          new TimestampTablePropertiesCollector(
  601|      0|              tbo.internal_comparator.user_comparator()));
  602|      0|    }
  603|  4.48k|    if (table_options.verify_compression) {
  ------------------
  |  Branch (603:9): [True: 0, False: 4.48k]
  ------------------
  604|      0|      for (uint32_t i = 0; i < compression_opts.parallel_threads; i++) {
  ------------------
  |  Branch (604:28): [True: 0, False: 0]
  ------------------
  605|      0|        verify_ctxs[i].reset(new UncompressionContext(compression_type));
  606|      0|      }
  607|      0|    }
  608|       |
  609|       |    // These are only needed for populating table properties
  610|  4.48k|    props.column_family_id = tbo.column_family_id;
  611|  4.48k|    props.column_family_name = tbo.column_family_name;
  612|  4.48k|    props.oldest_key_time = tbo.oldest_key_time;
  613|  4.48k|    props.file_creation_time = tbo.file_creation_time;
  614|  4.48k|    props.orig_file_number = tbo.cur_file_num;
  615|  4.48k|    props.db_id = tbo.db_id;
  616|  4.48k|    props.db_session_id = tbo.db_session_id;
  617|  4.48k|    props.db_host_id = ioptions.db_host_id;
  618|  4.48k|    if (!ReifyDbHostIdProperty(ioptions.env, &props.db_host_id).ok()) {
  ------------------
  |  Branch (618:9): [True: 0, False: 4.48k]
  ------------------
  619|      0|      ROCKS_LOG_INFO(ioptions.logger, "db_host_id property will not be set");
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  620|      0|    }
  621|       |
  622|  4.48k|    if (FormatVersionUsesContextChecksum(table_options.format_version)) {
  ------------------
  |  Branch (622:9): [True: 4.48k, False: 0]
  ------------------
  623|       |      // Must be non-zero and semi- or quasi-random
  624|       |      // TODO: ideally guaranteed different for related files (e.g. use file
  625|       |      // number and db_session, for benefit of SstFileWriter)
  626|  4.48k|      do {
  627|  4.48k|        base_context_checksum = Random::GetTLSInstance()->Next();
  628|  4.48k|      } while (UNLIKELY(base_context_checksum == 0));
  ------------------
  |  |   14|  4.48k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 4.48k]
  |  |  ------------------
  ------------------
  629|  4.48k|    } else {
  630|      0|      base_context_checksum = 0;
  631|      0|    }
  632|       |
  633|  4.48k|    if (alignment > 0 && compression_type != kNoCompression) {
  ------------------
  |  Branch (633:9): [True: 0, False: 4.48k]
  |  Branch (633:26): [True: 0, False: 0]
  ------------------
  634|       |      // With better sanitization in `CompactionPicker::CompactFiles()`, we
  635|       |      // would not need to handle this case here and could change it to an
  636|       |      // assertion instead.
  637|      0|      SetStatus(Status::InvalidArgument(
  638|      0|          "Enable block_align, but compression enabled"));
  639|      0|    }
  640|  4.48k|  }
_ZN7rocksdb22BlockBasedTableBuilder34BlockBasedTablePropertiesCollectorC2ENS_22BlockBasedTableOptions9IndexTypeEbb:
  219|  4.48k|        prefix_filtering_(prefix_filtering) {}
_ZN7rocksdb22BlockBasedTableBuilder34BlockBasedTablePropertiesCollector6FinishEPNSt3__13mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES9_NS2_4lessIS9_EENS7_INS2_4pairIKS9_S9_EEEEEE:
  235|  4.48k|  Status Finish(UserCollectedProperties* properties) override {
  236|  4.48k|    std::string val;
  237|  4.48k|    PutFixed32(&val, static_cast<uint32_t>(index_type_));
  238|  4.48k|    properties->insert({BlockBasedTablePropertyNames::kIndexType, val});
  239|  4.48k|    properties->insert({BlockBasedTablePropertyNames::kWholeKeyFiltering,
  240|  4.48k|                        whole_key_filtering_ ? kPropTrue : kPropFalse});
  ------------------
  |  Branch (240:25): [True: 4.48k, False: 0]
  ------------------
  241|  4.48k|    properties->insert({BlockBasedTablePropertyNames::kPrefixFiltering,
  242|  4.48k|                        prefix_filtering_ ? kPropTrue : kPropFalse});
  ------------------
  |  Branch (242:25): [True: 0, False: 4.48k]
  ------------------
  243|  4.48k|    return Status::OK();
  244|  4.48k|  }
_ZN7rocksdb22BlockBasedTableBuilder34BlockBasedTablePropertiesCollector11InternalAddERKNS_5SliceES4_m:
  222|   165k|                     uint64_t /*file_size*/) override {
  223|       |    // Intentionally left blank. Have no interest in collecting stats for
  224|       |    // individual key/value pairs.
  225|   165k|    return Status::OK();
  226|   165k|  }
_ZN7rocksdb22BlockBasedTableBuilder34BlockBasedTablePropertiesCollector8BlockAddEmmm:
  230|  13.3k|                uint64_t /* block_compressed_bytes_slow */) override {
  231|       |    // Intentionally left blank. No interest in collecting stats for
  232|       |    // blocks.
  233|  13.3k|  }
_ZNK7rocksdb22BlockBasedTableBuilder34BlockBasedTablePropertiesCollector21GetReadablePropertiesEv:
  251|  4.48k|  UserCollectedProperties GetReadableProperties() const override {
  252|       |    // Intentionally left blank.
  253|  4.48k|    return UserCollectedProperties();
  254|  4.48k|  }
_ZNK7rocksdb22BlockBasedTableBuilder3Rep28IsParallelCompressionEnabledEv:
  372|   130k|  bool IsParallelCompressionEnabled() const {
  373|   130k|    return compression_opts.parallel_threads > 1;
  374|   130k|  }
_ZN7rocksdb22BlockBasedTableBuilder3Rep10get_offsetEv:
  369|   233k|  uint64_t get_offset() { return offset.load(std::memory_order_relaxed); }
_ZN7rocksdb22BlockBasedTableBuilder3Rep9SetStatusENS_6StatusE:
  415|  13.3k|  void SetStatus(Status s) {
  416|  13.3k|    if (!s.ok() && status_ok.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (416:9): [True: 0, False: 13.3k]
  |  Branch (416:20): [True: 0, False: 0]
  ------------------
  417|       |      // Locking is an overkill for non compression_opts.parallel_threads
  418|       |      // case but since it's unlikely that s is not OK, we take this cost
  419|       |      // to be simplicity.
  420|      0|      std::lock_guard<std::mutex> lock(status_mutex);
  421|      0|      status = s;
  422|      0|      status_ok.store(false, std::memory_order_relaxed);
  423|      0|    }
  424|  13.3k|  }
_ZN7rocksdb22BlockBasedTableBuilder3Rep10set_offsetEm:
  370|  29.6k|  void set_offset(uint64_t o) { offset.store(o, std::memory_order_relaxed); }
_ZN7rocksdb22BlockBasedTableBuilder3Rep9GetStatusEv:
  376|   251k|  Status GetStatus() {
  377|       |    // We need to make modifications of status visible when status_ok is set
  378|       |    // to false, and this is ensured by status_mutex, so no special memory
  379|       |    // order for status_ok is required.
  380|   251k|    if (status_ok.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (380:9): [True: 251k, False: 0]
  ------------------
  381|   251k|      return Status::OK();
  382|   251k|    } else {
  383|      0|      return CopyStatus();
  384|      0|    }
  385|   251k|  }
_ZN7rocksdb22BlockBasedTableBuilder3Rep11GetIOStatusEv:
  392|  8.96k|  IOStatus GetIOStatus() {
  393|       |    // We need to make modifications of io_status visible when status_ok is set
  394|       |    // to false, and this is ensured by io_status_mutex, so no special memory
  395|       |    // order for io_status_ok is required.
  396|  8.96k|    if (io_status_ok.load(std::memory_order_relaxed)) {
  ------------------
  |  Branch (396:9): [True: 8.96k, False: 0]
  ------------------
  397|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED  // Avoid unnecessary lock acquisition
  398|       |      auto ios = CopyIOStatus();
  399|       |      ios.PermitUncheckedError();
  400|       |      // Assume no races in unit tests
  401|       |      assert(ios.ok());
  402|       |#endif  // ROCKSDB_ASSERT_STATUS_CHECKED
  403|  8.96k|      return IOStatus::OK();
  404|  8.96k|    } else {
  405|      0|      return CopyIOStatus();
  406|      0|    }
  407|  8.96k|  }
_ZN7rocksdb22BlockBasedTableBuilder3Rep10CopyStatusEv:
  387|  4.48k|  Status CopyStatus() {
  388|  4.48k|    std::lock_guard<std::mutex> lock(status_mutex);
  389|  4.48k|    return status;
  390|  4.48k|  }

_ZNK7rocksdb22BlockBasedTableBuilder2okEv:
  113|   251k|  bool ok() const { return status().ok(); }

_ZN7rocksdb17TailPrefetchStats19RecordEffectiveSizeEm:
   37|  4.48k|void TailPrefetchStats::RecordEffectiveSize(size_t len) {
   38|  4.48k|  MutexLock l(&mutex_);
   39|  4.48k|  if (num_records_ < kNumTracked) {
  ------------------
  |  Branch (39:7): [True: 4.48k, False: 0]
  ------------------
   40|  4.48k|    num_records_++;
   41|  4.48k|  }
   42|  4.48k|  records_[next_++] = len;
   43|  4.48k|  if (next_ == kNumTracked) {
  ------------------
  |  Branch (43:7): [True: 0, False: 4.48k]
  ------------------
   44|      0|    next_ = 0;
   45|      0|  }
   46|  4.48k|}
_ZN7rocksdb22BlockBasedTableFactoryC2ERKNS_22BlockBasedTableOptionsE:
  422|  94.7k|    : table_options_(_table_options) {
  423|  94.7k|  InitializeOptions();
  424|  94.7k|  RegisterOptions(&table_options_, &block_based_table_type_info);
  425|       |
  426|  94.7k|  const auto table_reader_charged =
  427|  94.7k|      table_options_.cache_usage_options.options_overrides
  428|  94.7k|          .at(CacheEntryRole::kBlockBasedTableReader)
  429|  94.7k|          .charged;
  430|  94.7k|  if (table_options_.block_cache &&
  ------------------
  |  Branch (430:7): [True: 94.7k, False: 0]
  ------------------
  431|  94.7k|      table_reader_charged == CacheEntryRoleOptions::Decision::kEnabled) {
  ------------------
  |  Branch (431:7): [True: 0, False: 94.7k]
  ------------------
  432|      0|    table_reader_cache_res_mgr_.reset(new ConcurrentCacheReservationManager(
  433|      0|        std::make_shared<CacheReservationManagerImpl<
  434|      0|            CacheEntryRole::kBlockBasedTableReader>>(
  435|      0|            table_options_.block_cache)));
  436|      0|  }
  437|  94.7k|}
_ZN7rocksdb22BlockBasedTableFactory17InitializeOptionsEv:
  439|  94.7k|void BlockBasedTableFactory::InitializeOptions() {
  440|  94.7k|  if (table_options_.flush_block_policy_factory == nullptr) {
  ------------------
  |  Branch (440:7): [True: 94.7k, False: 0]
  ------------------
  441|  94.7k|    table_options_.flush_block_policy_factory.reset(
  442|  94.7k|        new FlushBlockBySizePolicyFactory());
  443|  94.7k|  }
  444|  94.7k|  if (table_options_.no_block_cache) {
  ------------------
  |  Branch (444:7): [True: 0, False: 94.7k]
  ------------------
  445|      0|    table_options_.block_cache.reset();
  446|  94.7k|  } else if (table_options_.block_cache == nullptr) {
  ------------------
  |  Branch (446:14): [True: 94.7k, False: 0]
  ------------------
  447|  94.7k|    LRUCacheOptions co;
  448|       |    // 32MB, the recommended minimum size for 64 shards, to reduce contention
  449|  94.7k|    co.capacity = 32 << 20;
  450|  94.7k|    table_options_.block_cache = NewLRUCache(co);
  451|  94.7k|  }
  452|  94.7k|  if (table_options_.block_size_deviation < 0 ||
  ------------------
  |  Branch (452:7): [True: 0, False: 94.7k]
  ------------------
  453|  94.7k|      table_options_.block_size_deviation > 100) {
  ------------------
  |  Branch (453:7): [True: 0, False: 94.7k]
  ------------------
  454|      0|    table_options_.block_size_deviation = 0;
  455|      0|  }
  456|  94.7k|  if (table_options_.block_restart_interval < 1) {
  ------------------
  |  Branch (456:7): [True: 0, False: 94.7k]
  ------------------
  457|      0|    table_options_.block_restart_interval = 1;
  458|      0|  }
  459|  94.7k|  if (table_options_.index_block_restart_interval < 1) {
  ------------------
  |  Branch (459:7): [True: 0, False: 94.7k]
  ------------------
  460|      0|    table_options_.index_block_restart_interval = 1;
  461|      0|  }
  462|  94.7k|  if (table_options_.index_type == BlockBasedTableOptions::kHashSearch &&
  ------------------
  |  Branch (462:7): [True: 0, False: 94.7k]
  ------------------
  463|  94.7k|      table_options_.index_block_restart_interval != 1) {
  ------------------
  |  Branch (463:7): [True: 0, False: 0]
  ------------------
  464|       |    // Currently kHashSearch is incompatible with
  465|       |    // index_block_restart_interval > 1
  466|      0|    table_options_.index_block_restart_interval = 1;
  467|      0|  }
  468|  94.7k|  if (table_options_.partition_filters &&
  ------------------
  |  Branch (468:7): [True: 0, False: 94.7k]
  ------------------
  469|  94.7k|      table_options_.index_type !=
  ------------------
  |  Branch (469:7): [True: 0, False: 0]
  ------------------
  470|      0|          BlockBasedTableOptions::kTwoLevelIndexSearch) {
  471|       |    // We do not support partitioned filters without partitioning indexes
  472|      0|    table_options_.partition_filters = false;
  473|      0|  }
  474|  94.7k|  auto& options_overrides =
  475|  94.7k|      table_options_.cache_usage_options.options_overrides;
  476|  94.7k|  const auto options = table_options_.cache_usage_options.options;
  477|  1.42M|  for (std::uint32_t i = 0; i < kNumCacheEntryRoles; ++i) {
  ------------------
  |  Branch (477:29): [True: 1.32M, False: 94.7k]
  ------------------
  478|  1.32M|    CacheEntryRole role = static_cast<CacheEntryRole>(i);
  479|  1.32M|    auto options_overrides_iter = options_overrides.find(role);
  480|  1.32M|    if (options_overrides_iter == options_overrides.end()) {
  ------------------
  |  Branch (480:9): [True: 1.32M, False: 0]
  ------------------
  481|  1.32M|      options_overrides.insert({role, options});
  482|  1.32M|    } else if (options_overrides_iter->second.charged ==
  ------------------
  |  Branch (482:16): [True: 0, False: 0]
  ------------------
  483|      0|               CacheEntryRoleOptions::Decision::kFallback) {
  484|      0|      options_overrides_iter->second.charged = options.charged;
  485|      0|    }
  486|  1.32M|  }
  487|  94.7k|}
_ZNK7rocksdb22BlockBasedTableFactory14NewTableReaderERKNS_11ReadOptionsERKNS_18TableReaderOptionsEONSt3__110unique_ptrINS_22RandomAccessFileReaderENS7_14default_deleteIS9_EEEEmPNS8_INS_11TableReaderENSA_ISE_EEEEb:
  568|  4.48k|    bool prefetch_index_and_filter_in_cache) const {
  569|  4.48k|  return BlockBasedTable::Open(
  570|  4.48k|      ro, table_reader_options.ioptions, table_reader_options.env_options,
  571|  4.48k|      table_options_, table_reader_options.internal_comparator, std::move(file),
  572|  4.48k|      file_size, table_reader_options.block_protection_bytes_per_key,
  573|  4.48k|      table_reader, table_reader_options.tail_size, table_reader_cache_res_mgr_,
  574|  4.48k|      table_reader_options.prefix_extractor, prefetch_index_and_filter_in_cache,
  575|  4.48k|      table_reader_options.skip_filters, table_reader_options.level,
  576|  4.48k|      table_reader_options.immortal, table_reader_options.largest_seqno,
  577|  4.48k|      table_reader_options.force_direct_prefetch, &tail_prefetch_stats_,
  578|  4.48k|      table_reader_options.block_cache_tracer,
  579|  4.48k|      table_reader_options.max_file_size_for_l0_meta_pin,
  580|  4.48k|      table_reader_options.cur_db_session_id, table_reader_options.cur_file_num,
  581|  4.48k|      table_reader_options.unique_id,
  582|  4.48k|      table_reader_options.user_defined_timestamps_persisted);
  583|  4.48k|}
_ZNK7rocksdb22BlockBasedTableFactory15NewTableBuilderERKNS_19TableBuilderOptionsEPNS_18WritableFileWriterE:
  587|  4.48k|    WritableFileWriter* file) const {
  588|  4.48k|  return new BlockBasedTableBuilder(table_options_, table_builder_options,
  589|  4.48k|                                    file);
  590|  4.48k|}
_ZNK7rocksdb22BlockBasedTableFactory15ValidateOptionsERKNS_9DBOptionsERKNS_19ColumnFamilyOptionsE:
  593|  9.02k|    const DBOptions& db_opts, const ColumnFamilyOptions& cf_opts) const {
  594|  9.02k|  if (table_options_.index_type == BlockBasedTableOptions::kHashSearch &&
  ------------------
  |  Branch (594:7): [True: 0, False: 9.02k]
  ------------------
  595|  9.02k|      cf_opts.prefix_extractor == nullptr) {
  ------------------
  |  Branch (595:7): [True: 0, False: 0]
  ------------------
  596|      0|    return Status::InvalidArgument(
  597|      0|        "Hash index is specified for block-based "
  598|      0|        "table, but prefix_extractor is not given");
  599|      0|  }
  600|  9.02k|  if (table_options_.cache_index_and_filter_blocks &&
  ------------------
  |  Branch (600:7): [True: 0, False: 9.02k]
  ------------------
  601|  9.02k|      table_options_.no_block_cache) {
  ------------------
  |  Branch (601:7): [True: 0, False: 0]
  ------------------
  602|      0|    return Status::InvalidArgument(
  603|      0|        "Enable cache_index_and_filter_blocks, "
  604|      0|        ", but block cache is disabled");
  605|      0|  }
  606|  9.02k|  if (table_options_.pin_l0_filter_and_index_blocks_in_cache &&
  ------------------
  |  Branch (606:7): [True: 0, False: 9.02k]
  ------------------
  607|  9.02k|      table_options_.no_block_cache) {
  ------------------
  |  Branch (607:7): [True: 0, False: 0]
  ------------------
  608|      0|    return Status::InvalidArgument(
  609|      0|        "Enable pin_l0_filter_and_index_blocks_in_cache, "
  610|      0|        ", but block cache is disabled");
  611|      0|  }
  612|  9.02k|  if (!IsSupportedFormatVersion(table_options_.format_version)) {
  ------------------
  |  Branch (612:7): [True: 0, False: 9.02k]
  ------------------
  613|      0|    return Status::InvalidArgument(
  614|      0|        "Unsupported BlockBasedTable format_version. Please check "
  615|      0|        "include/rocksdb/table.h for more info");
  616|      0|  }
  617|  9.02k|  if (table_options_.block_align && (cf_opts.compression != kNoCompression)) {
  ------------------
  |  Branch (617:7): [True: 0, False: 9.02k]
  |  Branch (617:37): [True: 0, False: 0]
  ------------------
  618|      0|    return Status::InvalidArgument(
  619|      0|        "Enable block_align, but compression "
  620|      0|        "enabled");
  621|      0|  }
  622|  9.02k|  if (table_options_.block_align &&
  ------------------
  |  Branch (622:7): [True: 0, False: 9.02k]
  ------------------
  623|  9.02k|      cf_opts.bottommost_compression != kDisableCompressionOption &&
  ------------------
  |  Branch (623:7): [True: 0, False: 0]
  ------------------
  624|  9.02k|      cf_opts.bottommost_compression != kNoCompression) {
  ------------------
  |  Branch (624:7): [True: 0, False: 0]
  ------------------
  625|      0|    return Status::InvalidArgument(
  626|      0|        "Enable block_align, but bottommost_compression enabled");
  627|      0|  }
  628|  9.02k|  if (table_options_.block_align) {
  ------------------
  |  Branch (628:7): [True: 0, False: 9.02k]
  ------------------
  629|      0|    for (auto level_compression : cf_opts.compression_per_level) {
  ------------------
  |  Branch (629:33): [True: 0, False: 0]
  ------------------
  630|      0|      if (level_compression != kDisableCompressionOption &&
  ------------------
  |  Branch (630:11): [True: 0, False: 0]
  ------------------
  631|      0|          level_compression != kNoCompression) {
  ------------------
  |  Branch (631:11): [True: 0, False: 0]
  ------------------
  632|      0|        return Status::InvalidArgument(
  633|      0|            "Enable block_align, but compression_per_level enabled");
  634|      0|      }
  635|      0|    }
  636|      0|  }
  637|  9.02k|  if (table_options_.block_align &&
  ------------------
  |  Branch (637:7): [True: 0, False: 9.02k]
  ------------------
  638|  9.02k|      (table_options_.block_size & (table_options_.block_size - 1))) {
  ------------------
  |  Branch (638:7): [True: 0, False: 0]
  ------------------
  639|      0|    return Status::InvalidArgument(
  640|      0|        "Block alignment requested but block size is not a power of 2");
  641|      0|  }
  642|  9.02k|  if (table_options_.block_size > std::numeric_limits<uint32_t>::max()) {
  ------------------
  |  Branch (642:7): [True: 0, False: 9.02k]
  ------------------
  643|      0|    return Status::InvalidArgument(
  644|      0|        "block size exceeds maximum number (4GiB) allowed");
  645|      0|  }
  646|  9.02k|  if (table_options_.data_block_index_type ==
  ------------------
  |  Branch (646:7): [True: 0, False: 9.02k]
  ------------------
  647|  9.02k|          BlockBasedTableOptions::kDataBlockBinaryAndHash &&
  648|  9.02k|      table_options_.data_block_hash_table_util_ratio <= 0) {
  ------------------
  |  Branch (648:7): [True: 0, False: 0]
  ------------------
  649|      0|    return Status::InvalidArgument(
  650|      0|        "data_block_hash_table_util_ratio should be greater than 0 when "
  651|      0|        "data_block_index_type is set to kDataBlockBinaryAndHash");
  652|      0|  }
  653|  9.02k|  if (db_opts.unordered_write && cf_opts.max_successive_merges > 0) {
  ------------------
  |  Branch (653:7): [True: 0, False: 9.02k]
  |  Branch (653:34): [True: 0, False: 0]
  ------------------
  654|       |    // TODO(myabandeh): support it
  655|      0|    return Status::InvalidArgument(
  656|      0|        "max_successive_merges larger than 0 is currently inconsistent with "
  657|      0|        "unordered_write");
  658|      0|  }
  659|  9.02k|  const auto& options_overrides =
  660|  9.02k|      table_options_.cache_usage_options.options_overrides;
  661|  9.02k|  for (auto options_overrides_iter = options_overrides.cbegin();
  662|   135k|       options_overrides_iter != options_overrides.cend();
  ------------------
  |  Branch (662:8): [True: 126k, False: 9.02k]
  ------------------
  663|   126k|       ++options_overrides_iter) {
  664|   126k|    const CacheEntryRole role = options_overrides_iter->first;
  665|   126k|    const CacheEntryRoleOptions options = options_overrides_iter->second;
  666|   126k|    static const std::set<CacheEntryRole> kMemoryChargingSupported = {
  667|   126k|        CacheEntryRole::kCompressionDictionaryBuildingBuffer,
  668|   126k|        CacheEntryRole::kFilterConstruction,
  669|   126k|        CacheEntryRole::kBlockBasedTableReader, CacheEntryRole::kFileMetadata,
  670|   126k|        CacheEntryRole::kBlobCache};
  671|   126k|    if (options.charged != CacheEntryRoleOptions::Decision::kFallback &&
  ------------------
  |  Branch (671:9): [True: 0, False: 126k]
  ------------------
  672|   126k|        kMemoryChargingSupported.count(role) == 0) {
  ------------------
  |  Branch (672:9): [True: 0, False: 0]
  ------------------
  673|      0|      return Status::NotSupported(
  674|      0|          "Enable/Disable CacheEntryRoleOptions::charged"
  675|      0|          " for CacheEntryRole " +
  676|      0|          kCacheEntryRoleToCamelString[static_cast<uint32_t>(role)] +
  677|      0|          " is not supported");
  678|      0|    }
  679|   126k|    if (table_options_.no_block_cache &&
  ------------------
  |  Branch (679:9): [True: 0, False: 126k]
  ------------------
  680|   126k|        options.charged == CacheEntryRoleOptions::Decision::kEnabled) {
  ------------------
  |  Branch (680:9): [True: 0, False: 0]
  ------------------
  681|      0|      return Status::InvalidArgument(
  682|      0|          "Enable CacheEntryRoleOptions::charged"
  683|      0|          " for CacheEntryRole " +
  684|      0|          kCacheEntryRoleToCamelString[static_cast<uint32_t>(role)] +
  685|      0|          " but block cache is disabled");
  686|      0|    }
  687|   126k|    if (role == CacheEntryRole::kBlobCache &&
  ------------------
  |  Branch (687:9): [True: 9.02k, False: 117k]
  ------------------
  688|   126k|        options.charged == CacheEntryRoleOptions::Decision::kEnabled) {
  ------------------
  |  Branch (688:9): [True: 0, False: 9.02k]
  ------------------
  689|      0|      if (cf_opts.blob_cache == nullptr) {
  ------------------
  |  Branch (689:11): [True: 0, False: 0]
  ------------------
  690|      0|        return Status::InvalidArgument(
  691|      0|            "Enable CacheEntryRoleOptions::charged"
  692|      0|            " for CacheEntryRole " +
  693|      0|            kCacheEntryRoleToCamelString[static_cast<uint32_t>(role)] +
  694|      0|            " but blob cache is not configured");
  695|      0|      }
  696|      0|      if (table_options_.no_block_cache) {
  ------------------
  |  Branch (696:11): [True: 0, False: 0]
  ------------------
  697|      0|        return Status::InvalidArgument(
  698|      0|            "Enable CacheEntryRoleOptions::charged"
  699|      0|            " for CacheEntryRole " +
  700|      0|            kCacheEntryRoleToCamelString[static_cast<uint32_t>(role)] +
  701|      0|            " but block cache is disabled");
  702|      0|      }
  703|      0|      if (table_options_.block_cache == cf_opts.blob_cache) {
  ------------------
  |  Branch (703:11): [True: 0, False: 0]
  ------------------
  704|      0|        return Status::InvalidArgument(
  705|      0|            "Enable CacheEntryRoleOptions::charged"
  706|      0|            " for CacheEntryRole " +
  707|      0|            kCacheEntryRoleToCamelString[static_cast<uint32_t>(role)] +
  708|      0|            " but blob cache is the same as block cache");
  709|      0|      }
  710|      0|      if (cf_opts.blob_cache->GetCapacity() >
  ------------------
  |  Branch (710:11): [True: 0, False: 0]
  ------------------
  711|      0|          table_options_.block_cache->GetCapacity()) {
  712|      0|        return Status::InvalidArgument(
  713|      0|            "Enable CacheEntryRoleOptions::charged"
  714|      0|            " for CacheEntryRole " +
  715|      0|            kCacheEntryRoleToCamelString[static_cast<uint32_t>(role)] +
  716|      0|            " but blob cache capacity is larger than block cache capacity");
  717|      0|      }
  718|      0|    }
  719|   126k|  }
  720|  9.02k|  {
  721|  9.02k|    Status s = CheckCacheOptionCompatibility(table_options_);
  722|  9.02k|    if (!s.ok()) {
  ------------------
  |  Branch (722:9): [True: 0, False: 9.02k]
  ------------------
  723|      0|      return s;
  724|      0|    }
  725|  9.02k|  }
  726|  9.02k|  std::string garbage;
  727|  9.02k|  if (!SerializeEnum<ChecksumType>(checksum_type_string_map,
  ------------------
  |  Branch (727:7): [True: 0, False: 9.02k]
  ------------------
  728|  9.02k|                                   table_options_.checksum, &garbage)) {
  729|      0|    return Status::InvalidArgument(
  730|      0|        "Unrecognized ChecksumType for checksum: " +
  731|      0|        std::to_string(static_cast<uint32_t>(table_options_.checksum)));
  732|      0|  }
  733|  9.02k|  return TableFactory::ValidateOptions(db_opts, cf_opts);
  734|  9.02k|}
_ZNK7rocksdb22BlockBasedTableFactory19GetPrintableOptionsEv:
  736|  9.02k|std::string BlockBasedTableFactory::GetPrintableOptions() const {
  737|  9.02k|  std::string ret;
  738|  9.02k|  ret.reserve(20000);
  739|  9.02k|  const int kBufferSize = 200;
  740|  9.02k|  char buffer[kBufferSize];
  741|       |
  742|  9.02k|  snprintf(buffer, kBufferSize, "  flush_block_policy_factory: %s (%p)\n",
  743|  9.02k|           table_options_.flush_block_policy_factory->Name(),
  744|  9.02k|           static_cast<void*>(table_options_.flush_block_policy_factory.get()));
  745|  9.02k|  ret.append(buffer);
  746|  9.02k|  snprintf(buffer, kBufferSize, "  cache_index_and_filter_blocks: %d\n",
  747|  9.02k|           table_options_.cache_index_and_filter_blocks);
  748|  9.02k|  ret.append(buffer);
  749|  9.02k|  snprintf(buffer, kBufferSize,
  750|  9.02k|           "  cache_index_and_filter_blocks_with_high_priority: %d\n",
  751|  9.02k|           table_options_.cache_index_and_filter_blocks_with_high_priority);
  752|  9.02k|  ret.append(buffer);
  753|  9.02k|  snprintf(buffer, kBufferSize,
  754|  9.02k|           "  pin_l0_filter_and_index_blocks_in_cache: %d\n",
  755|  9.02k|           table_options_.pin_l0_filter_and_index_blocks_in_cache);
  756|  9.02k|  ret.append(buffer);
  757|  9.02k|  snprintf(buffer, kBufferSize, "  pin_top_level_index_and_filter: %d\n",
  758|  9.02k|           table_options_.pin_top_level_index_and_filter);
  759|  9.02k|  ret.append(buffer);
  760|  9.02k|  snprintf(buffer, kBufferSize, "  index_type: %d\n",
  761|  9.02k|           table_options_.index_type);
  762|  9.02k|  ret.append(buffer);
  763|  9.02k|  snprintf(buffer, kBufferSize, "  data_block_index_type: %d\n",
  764|  9.02k|           table_options_.data_block_index_type);
  765|  9.02k|  ret.append(buffer);
  766|  9.02k|  snprintf(buffer, kBufferSize, "  index_shortening: %d\n",
  767|  9.02k|           static_cast<int>(table_options_.index_shortening));
  768|  9.02k|  ret.append(buffer);
  769|  9.02k|  snprintf(buffer, kBufferSize, "  data_block_hash_table_util_ratio: %lf\n",
  770|  9.02k|           table_options_.data_block_hash_table_util_ratio);
  771|  9.02k|  ret.append(buffer);
  772|  9.02k|  snprintf(buffer, kBufferSize, "  checksum: %d\n", table_options_.checksum);
  773|  9.02k|  ret.append(buffer);
  774|  9.02k|  snprintf(buffer, kBufferSize, "  no_block_cache: %d\n",
  775|  9.02k|           table_options_.no_block_cache);
  776|  9.02k|  ret.append(buffer);
  777|  9.02k|  snprintf(buffer, kBufferSize, "  block_cache: %p\n",
  778|  9.02k|           static_cast<void*>(table_options_.block_cache.get()));
  779|  9.02k|  ret.append(buffer);
  780|  9.02k|  if (table_options_.block_cache) {
  ------------------
  |  Branch (780:7): [True: 9.02k, False: 0]
  ------------------
  781|  9.02k|    const char* block_cache_name = table_options_.block_cache->Name();
  782|  9.02k|    if (block_cache_name != nullptr) {
  ------------------
  |  Branch (782:9): [True: 9.02k, False: 0]
  ------------------
  783|  9.02k|      snprintf(buffer, kBufferSize, "  block_cache_name: %s\n",
  784|  9.02k|               block_cache_name);
  785|  9.02k|      ret.append(buffer);
  786|  9.02k|    }
  787|  9.02k|    ret.append("  block_cache_options:\n");
  788|  9.02k|    ret.append(table_options_.block_cache->GetPrintableOptions());
  789|  9.02k|  }
  790|  9.02k|  snprintf(buffer, kBufferSize, "  persistent_cache: %p\n",
  791|  9.02k|           static_cast<void*>(table_options_.persistent_cache.get()));
  792|  9.02k|  ret.append(buffer);
  793|  9.02k|  if (table_options_.persistent_cache) {
  ------------------
  |  Branch (793:7): [True: 0, False: 9.02k]
  ------------------
  794|      0|    snprintf(buffer, kBufferSize, "  persistent_cache_options:\n");
  795|      0|    ret.append(buffer);
  796|      0|    ret.append(table_options_.persistent_cache->GetPrintableOptions());
  797|      0|  }
  798|  9.02k|  snprintf(buffer, kBufferSize, "  block_size: %" PRIu64 "\n",
  799|  9.02k|           table_options_.block_size);
  800|  9.02k|  ret.append(buffer);
  801|  9.02k|  snprintf(buffer, kBufferSize, "  block_size_deviation: %d\n",
  802|  9.02k|           table_options_.block_size_deviation);
  803|  9.02k|  ret.append(buffer);
  804|  9.02k|  snprintf(buffer, kBufferSize, "  block_restart_interval: %d\n",
  805|  9.02k|           table_options_.block_restart_interval);
  806|  9.02k|  ret.append(buffer);
  807|  9.02k|  snprintf(buffer, kBufferSize, "  index_block_restart_interval: %d\n",
  808|  9.02k|           table_options_.index_block_restart_interval);
  809|  9.02k|  ret.append(buffer);
  810|  9.02k|  snprintf(buffer, kBufferSize, "  metadata_block_size: %" PRIu64 "\n",
  811|  9.02k|           table_options_.metadata_block_size);
  812|  9.02k|  ret.append(buffer);
  813|  9.02k|  snprintf(buffer, kBufferSize, "  partition_filters: %d\n",
  814|  9.02k|           table_options_.partition_filters);
  815|  9.02k|  ret.append(buffer);
  816|  9.02k|  snprintf(buffer, kBufferSize, "  use_delta_encoding: %d\n",
  817|  9.02k|           table_options_.use_delta_encoding);
  818|  9.02k|  ret.append(buffer);
  819|  9.02k|  snprintf(buffer, kBufferSize, "  filter_policy: %s\n",
  820|  9.02k|           table_options_.filter_policy == nullptr
  ------------------
  |  Branch (820:12): [True: 9.02k, False: 0]
  ------------------
  821|  9.02k|               ? "nullptr"
  822|  9.02k|               : table_options_.filter_policy->Name());
  823|  9.02k|  ret.append(buffer);
  824|  9.02k|  snprintf(buffer, kBufferSize, "  whole_key_filtering: %d\n",
  825|  9.02k|           table_options_.whole_key_filtering);
  826|  9.02k|  ret.append(buffer);
  827|  9.02k|  snprintf(buffer, kBufferSize, "  verify_compression: %d\n",
  828|  9.02k|           table_options_.verify_compression);
  829|  9.02k|  ret.append(buffer);
  830|  9.02k|  snprintf(buffer, kBufferSize, "  read_amp_bytes_per_bit: %d\n",
  831|  9.02k|           table_options_.read_amp_bytes_per_bit);
  832|  9.02k|  ret.append(buffer);
  833|  9.02k|  snprintf(buffer, kBufferSize, "  format_version: %d\n",
  834|  9.02k|           table_options_.format_version);
  835|  9.02k|  ret.append(buffer);
  836|  9.02k|  snprintf(buffer, kBufferSize, "  enable_index_compression: %d\n",
  837|  9.02k|           table_options_.enable_index_compression);
  838|  9.02k|  ret.append(buffer);
  839|  9.02k|  snprintf(buffer, kBufferSize, "  block_align: %d\n",
  840|  9.02k|           table_options_.block_align);
  841|  9.02k|  ret.append(buffer);
  842|  9.02k|  snprintf(buffer, kBufferSize,
  843|  9.02k|           "  max_auto_readahead_size: %" ROCKSDB_PRIszt "\n",
  844|  9.02k|           table_options_.max_auto_readahead_size);
  845|  9.02k|  ret.append(buffer);
  846|  9.02k|  snprintf(buffer, kBufferSize, "  prepopulate_block_cache: %d\n",
  847|  9.02k|           static_cast<int>(table_options_.prepopulate_block_cache));
  848|  9.02k|  ret.append(buffer);
  849|  9.02k|  snprintf(buffer, kBufferSize,
  850|  9.02k|           "  initial_auto_readahead_size: %" ROCKSDB_PRIszt "\n",
  851|  9.02k|           table_options_.initial_auto_readahead_size);
  852|  9.02k|  ret.append(buffer);
  853|  9.02k|  snprintf(buffer, kBufferSize,
  854|  9.02k|           "  num_file_reads_for_auto_readahead: %" PRIu64 "\n",
  855|  9.02k|           table_options_.num_file_reads_for_auto_readahead);
  856|  9.02k|  ret.append(buffer);
  857|  9.02k|  return ret;
  858|  9.02k|}
_ZNK7rocksdb22BlockBasedTableFactory13GetOptionsPtrERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  861|  72.2k|    const std::string& name) const {
  862|  72.2k|  if (name == kBlockCacheOpts()) {
  ------------------
  |  Branch (862:7): [True: 9.07k, False: 63.1k]
  ------------------
  863|  9.07k|    if (table_options_.no_block_cache) {
  ------------------
  |  Branch (863:9): [True: 0, False: 9.07k]
  ------------------
  864|      0|      return nullptr;
  865|  9.07k|    } else {
  866|  9.07k|      return table_options_.block_cache.get();
  867|  9.07k|    }
  868|  63.1k|  } else {
  869|  63.1k|    return TableFactory::GetOptionsPtr(name);
  870|  63.1k|  }
  871|  72.2k|}
_ZN7rocksdb22BlockBasedTableFactory11ParseOptionERKNS_13ConfigOptionsERKNS_14OptionTypeInfoERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEESF_Pv:
  915|   577k|                                           void* opt_ptr) {
  916|   577k|  Status status = TableFactory::ParseOption(config_options, opt_info, opt_name,
  917|   577k|                                            opt_value, opt_ptr);
  918|   577k|  if (config_options.input_strings_escaped && !status.ok()) {  // Got an error
  ------------------
  |  Branch (918:7): [True: 577k, False: 0]
  |  Branch (918:47): [True: 0, False: 577k]
  ------------------
  919|       |    // !input_strings_escaped indicates the old API, where everything is
  920|       |    // parsable.
  921|      0|    if (opt_info.IsByName()) {
  ------------------
  |  Branch (921:9): [True: 0, False: 0]
  ------------------
  922|      0|      status = Status::OK();
  923|      0|    }
  924|      0|  }
  925|   577k|  return status;
  926|   577k|}
block_based_table_factory.cc:_ZN7rocksdb12_GLOBAL__N_129CheckCacheOptionCompatibilityERKNS_22BlockBasedTableOptionsE:
  497|  9.02k|Status CheckCacheOptionCompatibility(const BlockBasedTableOptions& bbto) {
  498|  9.02k|  int cache_count = (bbto.block_cache != nullptr) +
  499|  9.02k|                    (bbto.persistent_cache != nullptr);
  500|  9.02k|  if (cache_count <= 1) {
  ------------------
  |  Branch (500:7): [True: 9.02k, False: 0]
  ------------------
  501|       |    // Nothing to share / overlap
  502|  9.02k|    return Status::OK();
  503|  9.02k|  }
  504|       |
  505|       |  // More complex test of shared key space, in case the instances are wrappers
  506|       |  // for some shared underlying cache.
  507|      0|  static Cache::CacheItemHelper kHelper{CacheEntryRole::kMisc};
  508|      0|  CacheKey sentinel_key = CacheKey::CreateUniqueForProcessLifetime();
  509|      0|  struct SentinelValue {
  510|      0|    explicit SentinelValue(char _c) : c(_c) {}
  511|      0|    char c;
  512|      0|  };
  513|      0|  static SentinelValue kRegularBlockCacheMarker{'b'};
  514|      0|  static char kPersistentCacheMarker{'p'};
  515|      0|  if (bbto.block_cache) {
  ------------------
  |  Branch (515:7): [True: 0, False: 0]
  ------------------
  516|      0|    bbto.block_cache
  517|      0|        ->Insert(sentinel_key.AsSlice(), &kRegularBlockCacheMarker, &kHelper, 1)
  518|      0|        .PermitUncheckedError();
  519|      0|  }
  520|      0|  if (bbto.persistent_cache) {
  ------------------
  |  Branch (520:7): [True: 0, False: 0]
  ------------------
  521|       |    // Note: persistent cache copies the data, not keeping the pointer
  522|      0|    bbto.persistent_cache
  523|      0|        ->Insert(sentinel_key.AsSlice(), &kPersistentCacheMarker, 1)
  524|      0|        .PermitUncheckedError();
  525|      0|  }
  526|       |  // If we get something different from what we inserted, that indicates
  527|       |  // dangerously overlapping key spaces.
  528|      0|  if (bbto.block_cache) {
  ------------------
  |  Branch (528:7): [True: 0, False: 0]
  ------------------
  529|      0|    auto handle = bbto.block_cache->Lookup(sentinel_key.AsSlice());
  530|      0|    if (handle) {
  ------------------
  |  Branch (530:9): [True: 0, False: 0]
  ------------------
  531|      0|      auto v = static_cast<SentinelValue*>(bbto.block_cache->Value(handle));
  532|      0|      char c = v->c;
  533|      0|      bbto.block_cache->Release(handle);
  534|      0|      if (c == kPersistentCacheMarker) {
  ------------------
  |  Branch (534:11): [True: 0, False: 0]
  ------------------
  535|      0|        return Status::InvalidArgument(
  536|      0|            "block_cache and persistent_cache share the same key space, "
  537|      0|            "which is not supported");
  538|      0|      } else if (v != &kRegularBlockCacheMarker) {
  ------------------
  |  Branch (538:18): [True: 0, False: 0]
  ------------------
  539|      0|        return Status::Corruption("Unexpected mutation to block_cache");
  540|      0|      }
  541|      0|    }
  542|      0|  }
  543|       |
  544|      0|  if (bbto.persistent_cache) {
  ------------------
  |  Branch (544:7): [True: 0, False: 0]
  ------------------
  545|      0|    std::unique_ptr<char[]> data;
  546|      0|    size_t size = 0;
  547|      0|    bbto.persistent_cache->Lookup(sentinel_key.AsSlice(), &data, &size)
  548|      0|        .PermitUncheckedError();
  549|      0|    if (data && size > 0) {
  ------------------
  |  Branch (549:9): [True: 0, False: 0]
  |  Branch (549:17): [True: 0, False: 0]
  ------------------
  550|      0|      if (data[0] == kRegularBlockCacheMarker.c) {
  ------------------
  |  Branch (550:11): [True: 0, False: 0]
  ------------------
  551|      0|        return Status::InvalidArgument(
  552|      0|            "persistent_cache and block_cache share the same key space, "
  553|      0|            "which is not supported");
  554|      0|      } else if (data[0] != kPersistentCacheMarker) {
  ------------------
  |  Branch (554:18): [True: 0, False: 0]
  ------------------
  555|      0|        return Status::Corruption("Unexpected mutation to persistent_cache");
  556|      0|      }
  557|      0|    }
  558|      0|  }
  559|      0|  return Status::OK();
  560|      0|}
block_based_table_factory.cc:_ZNK7rocksdb3$_0clERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESC_Pv:
  351|  18.0k|             const std::string& value, void* addr) {
  352|       |            // A workaround to fix a bug in 6.10, 6.11, 6.12, 6.13
  353|       |            // and 6.14. The bug will write out 8 bytes to OPTIONS file from the
  354|       |            // starting address of BlockBasedTableOptions.read_amp_bytes_per_bit
  355|       |            // which is actually a uint32. Consequently, the value of
  356|       |            // read_amp_bytes_per_bit written in the OPTIONS file is wrong.
  357|       |            // From 6.15, RocksDB will try to parse the read_amp_bytes_per_bit
  358|       |            // from OPTIONS file as a uint32. To be able to load OPTIONS file
  359|       |            // generated by affected releases before the fix, we need to
  360|       |            // manually parse read_amp_bytes_per_bit with this special hack.
  361|  18.0k|            uint64_t read_amp_bytes_per_bit = ParseUint64(value);
  362|  18.0k|            *(static_cast<uint32_t*>(addr)) =
  363|  18.0k|                static_cast<uint32_t>(read_amp_bytes_per_bit);
  364|  18.0k|            return Status::OK();
  365|  18.0k|          }}},

_ZN7rocksdb22BlockBasedTableFactoryD2Ev:
   55|  94.7k|  ~BlockBasedTableFactory() {}
_ZNK7rocksdb22BlockBasedTableFactory4NameEv:
   60|   726k|  const char* Name() const override { return kBlockBasedTableName(); }
_ZNK7rocksdb22BlockBasedTableFactory22IsDeleteRangeSupportedEv:
   80|  18.0k|  bool IsDeleteRangeSupported() const override { return true; }

_ZN7rocksdb23BlockBasedTableIterator11SeekToFirstEv:
   13|  4.48k|void BlockBasedTableIterator::SeekToFirst() { SeekImpl(nullptr, false); }
_ZN7rocksdb23BlockBasedTableIterator8SeekImplEPKNS_5SliceEb:
   37|  4.48k|                                       bool async_prefetch) {
   38|  4.48k|  bool is_first_pass = !async_read_in_progress_;
   39|       |
   40|  4.48k|  if (!is_first_pass) {
  ------------------
  |  Branch (40:7): [True: 0, False: 4.48k]
  ------------------
   41|      0|    SeekSecondPass(target);
   42|      0|    return;
   43|      0|  }
   44|       |
   45|  4.48k|  ResetBlockCacheLookupVar();
   46|       |
   47|  4.48k|  bool autotune_readaheadsize = is_first_pass &&
  ------------------
  |  Branch (47:33): [True: 4.48k, False: 0]
  ------------------
   48|  4.48k|                                read_options_.auto_readahead_size &&
  ------------------
  |  Branch (48:33): [True: 4.48k, False: 0]
  ------------------
   49|  4.48k|                                read_options_.iterate_upper_bound;
  ------------------
  |  Branch (49:33): [True: 0, False: 4.48k]
  ------------------
   50|       |
   51|  4.48k|  if (autotune_readaheadsize &&
  ------------------
  |  Branch (51:7): [True: 0, False: 4.48k]
  ------------------
   52|  4.48k|      table_->get_rep()->table_options.block_cache.get() &&
  ------------------
  |  Branch (52:7): [True: 0, False: 0]
  ------------------
   53|  4.48k|      direction_ == IterDirection::kForward) {
  ------------------
  |  Branch (53:7): [True: 0, False: 0]
  ------------------
   54|      0|    readahead_cache_lookup_ = true;
   55|      0|  }
   56|       |
   57|  4.48k|  is_out_of_bound_ = false;
   58|  4.48k|  is_at_first_key_from_index_ = false;
   59|  4.48k|  seek_stat_state_ = kNone;
   60|  4.48k|  bool filter_checked = false;
   61|  4.48k|  if (target &&
  ------------------
  |  Branch (61:7): [True: 0, False: 4.48k]
  ------------------
   62|  4.48k|      !CheckPrefixMayMatch(*target, IterDirection::kForward, &filter_checked)) {
  ------------------
  |  Branch (62:7): [True: 0, False: 0]
  ------------------
   63|      0|    ResetDataIter();
   64|      0|    RecordTick(table_->GetStatistics(), is_last_level_
  ------------------
  |  Branch (64:41): [True: 0, False: 0]
  ------------------
   65|      0|                                            ? LAST_LEVEL_SEEK_FILTERED
   66|      0|                                            : NON_LAST_LEVEL_SEEK_FILTERED);
   67|      0|    return;
   68|      0|  }
   69|  4.48k|  if (filter_checked) {
  ------------------
  |  Branch (69:7): [True: 0, False: 4.48k]
  ------------------
   70|      0|    seek_stat_state_ = kFilterUsed;
   71|      0|    RecordTick(table_->GetStatistics(), is_last_level_
  ------------------
  |  Branch (71:41): [True: 0, False: 0]
  ------------------
   72|      0|                                            ? LAST_LEVEL_SEEK_FILTER_MATCH
   73|      0|                                            : NON_LAST_LEVEL_SEEK_FILTER_MATCH);
   74|      0|  }
   75|       |
   76|  4.48k|  bool need_seek_index = true;
   77|       |
   78|       |  //  In case of readahead_cache_lookup_, index_iter_ could change to find the
   79|       |  //  readahead size in BlockCacheLookupForReadAheadSize so it needs to
   80|       |  //  reseek.
   81|  4.48k|  if (IsIndexAtCurr() && block_iter_points_to_real_block_ &&
  ------------------
  |  Branch (81:7): [True: 4.48k, False: 0]
  |  Branch (81:26): [True: 0, False: 4.48k]
  ------------------
   82|  4.48k|      block_iter_.Valid()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 0]
  ------------------
   83|       |    // Reseek.
   84|      0|    prev_block_offset_ = index_iter_->value().handle.offset();
   85|       |
   86|      0|    if (target) {
  ------------------
  |  Branch (86:9): [True: 0, False: 0]
  ------------------
   87|       |      // We can avoid an index seek if:
   88|       |      // 1. The new seek key is larger than the current key
   89|       |      // 2. The new seek key is within the upper bound of the block
   90|       |      // Since we don't necessarily know the internal key for either
   91|       |      // the current key or the upper bound, we check user keys and
   92|       |      // exclude the equality case. Considering internal keys can
   93|       |      // improve for the boundary cases, but it would complicate the
   94|       |      // code.
   95|      0|      if (user_comparator_.Compare(ExtractUserKey(*target),
  ------------------
  |  Branch (95:11): [True: 0, False: 0]
  |  Branch (95:11): [True: 0, False: 0]
  ------------------
   96|      0|                                   block_iter_.user_key()) > 0 &&
   97|      0|          user_comparator_.Compare(ExtractUserKey(*target),
  ------------------
  |  Branch (97:11): [True: 0, False: 0]
  ------------------
   98|      0|                                   index_iter_->user_key()) < 0) {
   99|      0|        need_seek_index = false;
  100|      0|      }
  101|      0|    }
  102|      0|  }
  103|       |
  104|  4.48k|  if (need_seek_index) {
  ------------------
  |  Branch (104:7): [True: 4.48k, False: 0]
  ------------------
  105|  4.48k|    if (target) {
  ------------------
  |  Branch (105:9): [True: 0, False: 4.48k]
  ------------------
  106|      0|      index_iter_->Seek(*target);
  107|  4.48k|    } else {
  108|  4.48k|      index_iter_->SeekToFirst();
  109|  4.48k|    }
  110|  4.48k|    is_index_at_curr_block_ = true;
  111|  4.48k|    if (!index_iter_->Valid()) {
  ------------------
  |  Branch (111:9): [True: 671, False: 3.81k]
  ------------------
  112|    671|      ResetDataIter();
  113|    671|      return;
  114|    671|    }
  115|  4.48k|  }
  116|       |
  117|       |  // After reseek, index_iter_ point to the right key i.e. target in
  118|       |  // case of readahead_cache_lookup_. So index_iter_ can be used directly.
  119|  3.81k|  IndexValue v = index_iter_->value();
  120|  3.81k|  const bool same_block = block_iter_points_to_real_block_ &&
  ------------------
  |  Branch (120:27): [True: 0, False: 3.81k]
  ------------------
  121|  3.81k|                          v.handle.offset() == prev_block_offset_;
  ------------------
  |  Branch (121:27): [True: 0, False: 0]
  ------------------
  122|       |
  123|  3.81k|  if (!v.first_internal_key.empty() && !same_block &&
  ------------------
  |  Branch (123:7): [True: 0, False: 3.81k]
  |  Branch (123:40): [True: 0, False: 0]
  ------------------
  124|  3.81k|      (!target || icomp_.Compare(*target, v.first_internal_key) <= 0) &&
  ------------------
  |  Branch (124:8): [True: 0, False: 0]
  |  Branch (124:19): [True: 0, False: 0]
  ------------------
  125|  3.81k|      allow_unprepared_value_) {
  ------------------
  |  Branch (125:7): [True: 0, False: 0]
  ------------------
  126|       |    // Index contains the first key of the block, and it's >= target.
  127|       |    // We can defer reading the block.
  128|      0|    is_at_first_key_from_index_ = true;
  129|       |    // ResetDataIter() will invalidate block_iter_. Thus, there is no need to
  130|       |    // call CheckDataBlockWithinUpperBound() to check for iterate_upper_bound
  131|       |    // as that will be done later when the data block is actually read.
  132|      0|    ResetDataIter();
  133|  3.81k|  } else {
  134|       |    // Need to use the data block.
  135|  3.81k|    if (!same_block) {
  ------------------
  |  Branch (135:9): [True: 3.81k, False: 0]
  ------------------
  136|  3.81k|      if (read_options_.async_io && async_prefetch) {
  ------------------
  |  Branch (136:11): [True: 0, False: 3.81k]
  |  Branch (136:37): [True: 0, False: 0]
  ------------------
  137|      0|        AsyncInitDataBlock(/*is_first_pass=*/true);
  138|      0|        if (async_read_in_progress_) {
  ------------------
  |  Branch (138:13): [True: 0, False: 0]
  ------------------
  139|       |          // Status::TryAgain indicates asynchronous request for retrieval of
  140|       |          // data blocks has been submitted. So it should return at this point
  141|       |          // and Seek should be called again to retrieve the requested block
  142|       |          // and execute the remaining code.
  143|      0|          return;
  144|      0|        }
  145|  3.81k|      } else {
  146|  3.81k|        InitDataBlock();
  147|  3.81k|      }
  148|  3.81k|    } else {
  149|       |      // When the user does a reseek, the iterate_upper_bound might have
  150|       |      // changed. CheckDataBlockWithinUpperBound() needs to be called
  151|       |      // explicitly if the reseek ends up in the same data block.
  152|       |      // If the reseek ends up in a different block, InitDataBlock() will do
  153|       |      // the iterator upper bound check.
  154|      0|      CheckDataBlockWithinUpperBound();
  155|      0|    }
  156|       |
  157|  3.81k|    if (target) {
  ------------------
  |  Branch (157:9): [True: 0, False: 3.81k]
  ------------------
  158|      0|      block_iter_.Seek(*target);
  159|  3.81k|    } else {
  160|  3.81k|      block_iter_.SeekToFirst();
  161|  3.81k|    }
  162|  3.81k|    FindKeyForward();
  163|  3.81k|  }
  164|       |
  165|  3.81k|  CheckOutOfBound();
  166|       |
  167|  3.81k|  if (target) {
  ------------------
  |  Branch (167:7): [True: 0, False: 3.81k]
  ------------------
  168|      0|    assert(!Valid() || icomp_.Compare(*target, key()) <= 0);
  169|      0|  }
  170|  3.81k|}
_ZN7rocksdb23BlockBasedTableIterator4NextEv:
  269|  34.6k|void BlockBasedTableIterator::Next() {
  270|  34.6k|  if (is_at_first_key_from_index_ && !MaterializeCurrentBlock()) {
  ------------------
  |  Branch (270:7): [True: 0, False: 34.6k]
  |  Branch (270:38): [True: 0, False: 0]
  ------------------
  271|      0|    return;
  272|      0|  }
  273|  34.6k|  assert(block_iter_points_to_real_block_);
  274|  34.6k|  block_iter_.Next();
  275|  34.6k|  FindKeyForward();
  276|  34.6k|  CheckOutOfBound();
  277|  34.6k|}
_ZN7rocksdb23BlockBasedTableIterator16NextAndGetResultEPNS_13IterateResultE:
  279|  34.6k|bool BlockBasedTableIterator::NextAndGetResult(IterateResult* result) {
  280|  34.6k|  Next();
  281|  34.6k|  bool is_valid = Valid();
  282|  34.6k|  if (is_valid) {
  ------------------
  |  Branch (282:7): [True: 30.8k, False: 3.81k]
  ------------------
  283|  30.8k|    result->key = key();
  284|  30.8k|    result->bound_check_result = UpperBoundCheckResult();
  285|  30.8k|    result->value_prepared = !is_at_first_key_from_index_;
  286|  30.8k|  }
  287|  34.6k|  return is_valid;
  288|  34.6k|}
_ZN7rocksdb23BlockBasedTableIterator13InitDataBlockEv:
  335|  8.85k|void BlockBasedTableIterator::InitDataBlock() {
  336|  8.85k|  BlockHandle data_block_handle;
  337|  8.85k|  bool is_in_cache = false;
  338|  8.85k|  bool use_block_cache_for_lookup = true;
  339|       |
  340|  8.85k|  if (DoesContainBlockHandles()) {
  ------------------
  |  Branch (340:7): [True: 0, False: 8.85k]
  ------------------
  341|      0|    data_block_handle = block_handles_->front().handle_;
  342|      0|    is_in_cache = block_handles_->front().is_cache_hit_;
  343|      0|    use_block_cache_for_lookup = false;
  344|  8.85k|  } else {
  345|  8.85k|    data_block_handle = index_iter_->value().handle;
  346|  8.85k|  }
  347|       |
  348|  8.85k|  if (!block_iter_points_to_real_block_ ||
  ------------------
  |  Branch (348:7): [True: 8.85k, False: 0]
  |  Branch (348:7): [True: 8.85k, False: 0]
  ------------------
  349|  8.85k|      data_block_handle.offset() != prev_block_offset_ ||
  ------------------
  |  Branch (349:7): [True: 0, False: 0]
  ------------------
  350|       |      // if previous attempt of reading the block missed cache, try again
  351|  8.85k|      block_iter_.status().IsIncomplete()) {
  ------------------
  |  Branch (351:7): [True: 0, False: 0]
  ------------------
  352|  8.85k|    if (block_iter_points_to_real_block_) {
  ------------------
  |  Branch (352:9): [True: 0, False: 8.85k]
  ------------------
  353|      0|      ResetDataIter();
  354|      0|    }
  355|       |
  356|  8.85k|    bool is_for_compaction =
  357|  8.85k|        lookup_context_.caller == TableReaderCaller::kCompaction;
  358|       |
  359|       |    // Initialize Data Block From CacheableEntry.
  360|  8.85k|    if (is_in_cache) {
  ------------------
  |  Branch (360:9): [True: 0, False: 8.85k]
  ------------------
  361|      0|      Status s;
  362|      0|      block_iter_.Invalidate(Status::OK());
  363|      0|      table_->NewDataBlockIterator<DataBlockIter>(
  364|      0|          read_options_, (block_handles_->front().cachable_entry_).As<Block>(),
  365|      0|          &block_iter_, s);
  366|  8.85k|    } else {
  367|  8.85k|      auto* rep = table_->get_rep();
  368|       |
  369|  8.85k|      std::function<void(bool, uint64_t&, uint64_t&)> readaheadsize_cb =
  370|  8.85k|          nullptr;
  371|  8.85k|      if (readahead_cache_lookup_) {
  ------------------
  |  Branch (371:11): [True: 0, False: 8.85k]
  ------------------
  372|      0|        readaheadsize_cb = std::bind(
  373|      0|            &BlockBasedTableIterator::BlockCacheLookupForReadAheadSize, this,
  374|      0|            std::placeholders::_1, std::placeholders::_2,
  375|      0|            std::placeholders::_3);
  376|      0|      }
  377|       |
  378|       |      // Prefetch additional data for range scans (iterators).
  379|       |      // Implicit auto readahead:
  380|       |      //   Enabled after 2 sequential IOs when ReadOptions.readahead_size == 0.
  381|       |      // Explicit user requested readahead:
  382|       |      //   Enabled from the very first IO when ReadOptions.readahead_size is
  383|       |      //   set.
  384|  8.85k|      block_prefetcher_.PrefetchIfNeeded(
  385|  8.85k|          rep, data_block_handle, read_options_.readahead_size,
  386|  8.85k|          is_for_compaction,
  387|  8.85k|          /*no_sequential_checking=*/false, read_options_, readaheadsize_cb,
  388|  8.85k|          read_options_.async_io);
  389|       |
  390|  8.85k|      Status s;
  391|  8.85k|      table_->NewDataBlockIterator<DataBlockIter>(
  392|  8.85k|          read_options_, data_block_handle, &block_iter_, BlockType::kData,
  393|  8.85k|          /*get_context=*/nullptr, &lookup_context_,
  394|  8.85k|          block_prefetcher_.prefetch_buffer(),
  395|  8.85k|          /*for_compaction=*/is_for_compaction, /*async_read=*/false, s,
  396|  8.85k|          use_block_cache_for_lookup);
  397|  8.85k|    }
  398|  8.85k|    block_iter_points_to_real_block_ = true;
  399|       |
  400|  8.85k|    CheckDataBlockWithinUpperBound();
  401|  8.85k|    if (!is_for_compaction &&
  ------------------
  |  Branch (401:9): [True: 8.85k, False: 0]
  ------------------
  402|  8.85k|        (seek_stat_state_ & kDataBlockReadSinceLastSeek) == 0) {
  ------------------
  |  Branch (402:9): [True: 3.81k, False: 5.04k]
  ------------------
  403|  3.81k|      RecordTick(table_->GetStatistics(), is_last_level_
  ------------------
  |  Branch (403:43): [True: 0, False: 3.81k]
  ------------------
  404|  3.81k|                                              ? LAST_LEVEL_SEEK_DATA
  405|  3.81k|                                              : NON_LAST_LEVEL_SEEK_DATA);
  406|  3.81k|      seek_stat_state_ = static_cast<SeekStatState>(
  407|  3.81k|          seek_stat_state_ | kDataBlockReadSinceLastSeek | kReportOnUseful);
  408|  3.81k|    }
  409|  8.85k|  }
  410|  8.85k|}
_ZN7rocksdb23BlockBasedTableIterator14FindKeyForwardEv:
  541|  38.4k|void BlockBasedTableIterator::FindKeyForward() {
  542|       |  // This method's code is kept short to make it likely to be inlined.
  543|  38.4k|  assert(!is_out_of_bound_);
  544|  38.4k|  assert(block_iter_points_to_real_block_);
  545|       |
  546|  38.4k|  if (!block_iter_.Valid()) {
  ------------------
  |  Branch (546:7): [True: 8.85k, False: 29.6k]
  ------------------
  547|       |    // This is the only call site of FindBlockForward(), but it's extracted into
  548|       |    // a separate method to keep FindKeyForward() short and likely to be
  549|       |    // inlined. When transitioning to a different block, we call
  550|       |    // FindBlockForward(), which is much longer and is probably not inlined.
  551|  8.85k|    FindBlockForward();
  552|  29.6k|  } else {
  553|       |    // This is the fast path that avoids a function call.
  554|  29.6k|  }
  555|  38.4k|}
_ZN7rocksdb23BlockBasedTableIterator16FindBlockForwardEv:
  557|  8.85k|void BlockBasedTableIterator::FindBlockForward() {
  558|       |  // TODO the while loop inherits from two-level-iterator. We don't know
  559|       |  // whether a block can be empty so it can be replaced by an "if".
  560|  8.85k|  do {
  561|  8.85k|    if (!block_iter_.status().ok()) {
  ------------------
  |  Branch (561:9): [True: 0, False: 8.85k]
  ------------------
  562|      0|      return;
  563|      0|    }
  564|       |    // Whether next data block is out of upper bound, if there is one.
  565|       |    //  index_iter_ can point to different block in case of
  566|       |    //  readahead_cache_lookup_. readahead_cache_lookup_ will be handle the
  567|       |    //  upper_bound check.
  568|  8.85k|    bool next_block_is_out_of_bound =
  569|  8.85k|        IsIndexAtCurr() && read_options_.iterate_upper_bound != nullptr &&
  ------------------
  |  Branch (569:9): [True: 8.85k, False: 0]
  |  Branch (569:28): [True: 0, False: 8.85k]
  ------------------
  570|  8.85k|        block_iter_points_to_real_block_ &&
  ------------------
  |  Branch (570:9): [True: 0, False: 0]
  ------------------
  571|  8.85k|        block_upper_bound_check_ == BlockUpperBound::kUpperBoundInCurBlock;
  ------------------
  |  Branch (571:9): [True: 0, False: 0]
  ------------------
  572|       |
  573|  8.85k|    assert(!next_block_is_out_of_bound ||
  574|  8.85k|           user_comparator_.CompareWithoutTimestamp(
  575|  8.85k|               *read_options_.iterate_upper_bound, /*a_has_ts=*/false,
  576|  8.85k|               index_iter_->user_key(), /*b_has_ts=*/true) <= 0);
  577|       |
  578|  8.85k|    ResetDataIter();
  579|       |
  580|  8.85k|    if (DoesContainBlockHandles()) {
  ------------------
  |  Branch (580:9): [True: 0, False: 8.85k]
  ------------------
  581|       |      // Advance and point to that next Block handle to make that block handle
  582|       |      // current.
  583|      0|      block_handles_->pop_front();
  584|      0|    }
  585|       |
  586|  8.85k|    if (!DoesContainBlockHandles()) {
  ------------------
  |  Branch (586:9): [True: 8.85k, False: 0]
  ------------------
  587|       |      // For readahead_cache_lookup_ enabled scenario -
  588|       |      // 1. In case of Seek, block_handle will be empty and it should be follow
  589|       |      //    as usual doing index_iter_->Next().
  590|       |      // 2. If block_handles is empty and index is not at current because of
  591|       |      //    lookup (during Next), it should skip doing index_iter_->Next(), as
  592|       |      //    it's already pointing to next block;
  593|       |      // 3. Last block could be out of bound and it won't iterate over that
  594|       |      // during BlockCacheLookup. We need to set for that block here.
  595|  8.85k|      if (IsIndexAtCurr() || is_index_out_of_bound_) {
  ------------------
  |  Branch (595:11): [True: 8.85k, False: 0]
  |  Branch (595:30): [True: 0, False: 0]
  ------------------
  596|  8.85k|        index_iter_->Next();
  597|  8.85k|        if (is_index_out_of_bound_) {
  ------------------
  |  Branch (597:13): [True: 0, False: 8.85k]
  ------------------
  598|      0|          next_block_is_out_of_bound = is_index_out_of_bound_;
  599|      0|          is_index_out_of_bound_ = false;
  600|      0|        }
  601|  8.85k|      } else {
  602|       |        // Skip Next as index_iter_ already points to correct index when it
  603|       |        // iterates in BlockCacheLookupForReadAheadSize.
  604|      0|        is_index_at_curr_block_ = true;
  605|      0|      }
  606|       |
  607|  8.85k|      if (next_block_is_out_of_bound) {
  ------------------
  |  Branch (607:11): [True: 0, False: 8.85k]
  ------------------
  608|       |        // The next block is out of bound. No need to read it.
  609|      0|        TEST_SYNC_POINT_CALLBACK("BlockBasedTableIterator:out_of_bound",
  610|      0|                                 nullptr);
  611|       |        // We need to make sure this is not the last data block before setting
  612|       |        // is_out_of_bound_, since the index key for the last data block can be
  613|       |        // larger than smallest key of the next file on the same level.
  614|      0|        if (index_iter_->Valid()) {
  ------------------
  |  Branch (614:13): [True: 0, False: 0]
  ------------------
  615|      0|          is_out_of_bound_ = true;
  616|      0|        }
  617|      0|        return;
  618|      0|      }
  619|       |
  620|  8.85k|      if (!index_iter_->Valid()) {
  ------------------
  |  Branch (620:11): [True: 3.81k, False: 5.04k]
  ------------------
  621|  3.81k|        return;
  622|  3.81k|      }
  623|  5.04k|      IndexValue v = index_iter_->value();
  624|       |
  625|  5.04k|      if (!v.first_internal_key.empty() && allow_unprepared_value_) {
  ------------------
  |  Branch (625:11): [True: 0, False: 5.04k]
  |  Branch (625:44): [True: 0, False: 0]
  ------------------
  626|       |        // Index contains the first key of the block. Defer reading the block.
  627|      0|        is_at_first_key_from_index_ = true;
  628|      0|        return;
  629|      0|      }
  630|  5.04k|    }
  631|  5.04k|    InitDataBlock();
  632|  5.04k|    block_iter_.SeekToFirst();
  633|  5.04k|  } while (!block_iter_.Valid());
  ------------------
  |  Branch (633:12): [True: 0, False: 5.04k]
  ------------------
  634|  8.85k|}
_ZN7rocksdb23BlockBasedTableIterator15CheckOutOfBoundEv:
  657|  38.4k|void BlockBasedTableIterator::CheckOutOfBound() {
  658|  38.4k|  if (read_options_.iterate_upper_bound != nullptr &&
  ------------------
  |  Branch (658:7): [True: 0, False: 38.4k]
  ------------------
  659|  38.4k|      block_upper_bound_check_ != BlockUpperBound::kUpperBoundBeyondCurBlock &&
  ------------------
  |  Branch (659:7): [True: 0, False: 0]
  ------------------
  660|  38.4k|      Valid()) {
  ------------------
  |  Branch (660:7): [True: 0, False: 0]
  ------------------
  661|      0|    is_out_of_bound_ =
  662|      0|        user_comparator_.CompareWithoutTimestamp(
  663|      0|            *read_options_.iterate_upper_bound, /*a_has_ts=*/false, user_key(),
  664|      0|            /*b_has_ts=*/true) <= 0;
  665|      0|  }
  666|  38.4k|}
_ZN7rocksdb23BlockBasedTableIterator30CheckDataBlockWithinUpperBoundEv:
  668|  8.85k|void BlockBasedTableIterator::CheckDataBlockWithinUpperBound() {
  669|  8.85k|  if (IsIndexAtCurr() && read_options_.iterate_upper_bound != nullptr &&
  ------------------
  |  Branch (669:7): [True: 8.85k, False: 0]
  |  Branch (669:26): [True: 0, False: 8.85k]
  ------------------
  670|  8.85k|      block_iter_points_to_real_block_) {
  ------------------
  |  Branch (670:7): [True: 0, False: 0]
  ------------------
  671|      0|    block_upper_bound_check_ = (user_comparator_.CompareWithoutTimestamp(
  ------------------
  |  Branch (671:32): [True: 0, False: 0]
  ------------------
  672|      0|                                    *read_options_.iterate_upper_bound,
  673|      0|                                    /*a_has_ts=*/false, index_iter_->user_key(),
  674|      0|                                    /*b_has_ts=*/true) > 0)
  675|      0|                                   ? BlockUpperBound::kUpperBoundBeyondCurBlock
  676|      0|                                   : BlockUpperBound::kUpperBoundInCurBlock;
  677|      0|  }
  678|  8.85k|}

_ZN7rocksdb23BlockBasedTableIteratorC2EPKNS_15BlockBasedTableERKNS_11ReadOptionsERKNS_21InternalKeyComparatorEONSt3__110unique_ptrINS_20InternalIteratorBaseINS_10IndexValueEEENSA_14default_deleteISE_EEEEbbPKNS_14SliceTransformENS_17TableReaderCallerEmb:
   48|  8.96k|        is_last_level_(table->IsLastLevel()) {}
_ZN7rocksdb23BlockBasedTableIteratorD2Ev:
   50|  8.96k|  ~BlockBasedTableIterator() override { ClearBlockHandles(); }
_ZNK7rocksdb23BlockBasedTableIterator5ValidEv:
   59|  43.6k|  bool Valid() const override {
   60|  43.6k|    return !is_out_of_bound_ &&
  ------------------
  |  Branch (60:12): [True: 43.6k, False: 0]
  ------------------
   61|  43.6k|           (is_at_first_key_from_index_ ||
  ------------------
  |  Branch (61:13): [True: 0, False: 43.6k]
  ------------------
   62|  43.6k|            (block_iter_points_to_real_block_ && block_iter_.Valid()));
  ------------------
  |  Branch (62:14): [True: 34.6k, False: 8.96k]
  |  Branch (62:50): [True: 34.6k, False: 0]
  ------------------
   63|  43.6k|  }
_ZNK7rocksdb23BlockBasedTableIterator3keyEv:
   69|  67.2k|  Slice key() const override {
   70|  67.2k|    assert(Valid());
   71|  67.2k|    if (is_at_first_key_from_index_) {
  ------------------
  |  Branch (71:9): [True: 0, False: 67.2k]
  ------------------
   72|      0|      return index_iter_->value().first_internal_key;
   73|  67.2k|    } else {
   74|  67.2k|      return block_iter_.key();
   75|  67.2k|    }
   76|  67.2k|  }
_ZN7rocksdb23BlockBasedTableIterator12PrepareValueEv:
   86|  2.99k|  bool PrepareValue() override {
   87|  2.99k|    assert(Valid());
   88|       |
   89|  2.99k|    if (!is_at_first_key_from_index_) {
  ------------------
  |  Branch (89:9): [True: 2.99k, False: 0]
  ------------------
   90|  2.99k|      return true;
   91|  2.99k|    }
   92|       |
   93|      0|    return const_cast<BlockBasedTableIterator*>(this)
   94|      0|        ->MaterializeCurrentBlock();
   95|  2.99k|  }
_ZNK7rocksdb23BlockBasedTableIterator15write_unix_timeEv:
   97|  29.5k|  uint64_t write_unix_time() const override {
   98|  29.5k|    assert(Valid());
   99|  29.5k|    ParsedInternalKey pikey;
  100|  29.5k|    SequenceNumber seqno;
  101|  29.5k|    const SeqnoToTimeMapping& seqno_to_time_mapping =
  102|  29.5k|        table_->GetSeqnoToTimeMapping();
  103|  29.5k|    Status s = ParseInternalKey(key(), &pikey, /*log_err_key=*/false);
  104|  29.5k|    if (!s.ok()) {
  ------------------
  |  Branch (104:9): [True: 0, False: 29.5k]
  ------------------
  105|      0|      return std::numeric_limits<uint64_t>::max();
  106|  29.5k|    } else if (kUnknownSeqnoBeforeAll == pikey.sequence) {
  ------------------
  |  Branch (106:16): [True: 0, False: 29.5k]
  ------------------
  107|      0|      return kUnknownTimeBeforeAll;
  108|  29.5k|    } else if (seqno_to_time_mapping.Empty()) {
  ------------------
  |  Branch (108:16): [True: 29.5k, False: 0]
  ------------------
  109|  29.5k|      return std::numeric_limits<uint64_t>::max();
  110|  29.5k|    } else if (kTypeValuePreferredSeqno == pikey.type) {
  ------------------
  |  Branch (110:16): [True: 0, False: 0]
  ------------------
  111|      0|      seqno = ParsePackedValueForSeqno(value());
  112|      0|    } else {
  113|      0|      seqno = pikey.sequence;
  114|      0|    }
  115|      0|    return seqno_to_time_mapping.GetProximalTimeBeforeSeqno(seqno);
  116|  29.5k|  }
_ZNK7rocksdb23BlockBasedTableIterator5valueEv:
  118|  29.5k|  Slice value() const override {
  119|       |    // PrepareValue() must have been called.
  120|  29.5k|    assert(!is_at_first_key_from_index_);
  121|  29.5k|    assert(Valid());
  122|       |
  123|  29.5k|    if (seek_stat_state_ & kReportOnUseful) {
  ------------------
  |  Branch (123:9): [True: 3.47k, False: 26.1k]
  ------------------
  124|  3.47k|      bool filter_used = (seek_stat_state_ & kFilterUsed) != 0;
  125|  3.47k|      RecordTick(
  126|  3.47k|          table_->GetStatistics(),
  127|  3.47k|          filter_used
  ------------------
  |  Branch (127:11): [True: 0, False: 3.47k]
  ------------------
  128|  3.47k|              ? (is_last_level_ ? LAST_LEVEL_SEEK_DATA_USEFUL_FILTER_MATCH
  ------------------
  |  Branch (128:18): [True: 0, False: 0]
  ------------------
  129|      0|                                : NON_LAST_LEVEL_SEEK_DATA_USEFUL_FILTER_MATCH)
  130|  3.47k|              : (is_last_level_ ? LAST_LEVEL_SEEK_DATA_USEFUL_NO_FILTER
  ------------------
  |  Branch (130:18): [True: 0, False: 3.47k]
  ------------------
  131|  3.47k|                                : NON_LAST_LEVEL_SEEK_DATA_USEFUL_NO_FILTER));
  132|  3.47k|      seek_stat_state_ = kDataBlockReadSinceLastSeek;
  133|  3.47k|    }
  134|       |
  135|  29.5k|    return block_iter_.value();
  136|  29.5k|  }
_ZNK7rocksdb23BlockBasedTableIterator6statusEv:
  137|  8.96k|  Status status() const override {
  138|       |    // In case of block cache readahead lookup, it won't add the block to
  139|       |    // block_handles if it's index is invalid. So index_iter_->status check can
  140|       |    // be skipped.
  141|       |    // Prefix index set status to NotFound when the prefix does not exist.
  142|  8.96k|    if (IsIndexAtCurr() && !index_iter_->status().ok() &&
  ------------------
  |  Branch (142:9): [True: 8.96k, False: 0]
  |  Branch (142:9): [True: 0, False: 8.96k]
  |  Branch (142:28): [True: 0, False: 8.96k]
  ------------------
  143|  8.96k|        !index_iter_->status().IsNotFound()) {
  ------------------
  |  Branch (143:9): [True: 0, False: 0]
  ------------------
  144|      0|      return index_iter_->status();
  145|  8.96k|    } else if (block_iter_points_to_real_block_) {
  ------------------
  |  Branch (145:16): [True: 0, False: 8.96k]
  ------------------
  146|      0|      return block_iter_.status();
  147|  8.96k|    } else if (async_read_in_progress_) {
  ------------------
  |  Branch (147:16): [True: 0, False: 8.96k]
  ------------------
  148|      0|      return Status::TryAgain("Async read in progress");
  149|  8.96k|    } else {
  150|  8.96k|      return Status::OK();
  151|  8.96k|    }
  152|  8.96k|  }
_ZN7rocksdb23BlockBasedTableIterator21UpperBoundCheckResultEv:
  154|  30.8k|  inline IterBoundCheck UpperBoundCheckResult() override {
  155|  30.8k|    if (is_out_of_bound_) {
  ------------------
  |  Branch (155:9): [True: 0, False: 30.8k]
  ------------------
  156|      0|      return IterBoundCheck::kOutOfBound;
  157|  30.8k|    } else if (block_upper_bound_check_ ==
  ------------------
  |  Branch (157:16): [True: 0, False: 30.8k]
  ------------------
  158|  30.8k|               BlockUpperBound::kUpperBoundBeyondCurBlock) {
  159|      0|      assert(!is_out_of_bound_);
  160|      0|      return IterBoundCheck::kInbound;
  161|  30.8k|    } else {
  162|  30.8k|      return IterBoundCheck::kUnknown;
  163|  30.8k|    }
  164|  30.8k|  }
_ZN7rocksdb23BlockBasedTableIterator17SetPinnedItersMgrEPNS_22PinnedIteratorsManagerE:
  166|  4.48k|  void SetPinnedItersMgr(PinnedIteratorsManager* pinned_iters_mgr) override {
  167|  4.48k|    pinned_iters_mgr_ = pinned_iters_mgr;
  168|  4.48k|  }
_ZN7rocksdb23BlockBasedTableIterator13ResetDataIterEv:
  185|  9.52k|  void ResetDataIter() {
  186|  9.52k|    if (block_iter_points_to_real_block_) {
  ------------------
  |  Branch (186:9): [True: 8.85k, False: 671]
  ------------------
  187|  8.85k|      if (pinned_iters_mgr_ != nullptr && pinned_iters_mgr_->PinningEnabled()) {
  ------------------
  |  Branch (187:11): [True: 8.85k, False: 0]
  |  Branch (187:43): [True: 0, False: 8.85k]
  ------------------
  188|      0|        block_iter_.DelegateCleanupsTo(pinned_iters_mgr_);
  189|      0|      }
  190|  8.85k|      block_iter_.Invalidate(Status::OK());
  191|  8.85k|      block_iter_points_to_real_block_ = false;
  192|  8.85k|    }
  193|  9.52k|    block_upper_bound_check_ = BlockUpperBound::kUnknown;
  194|  9.52k|  }
_ZNK7rocksdb23BlockBasedTableIterator13IsIndexAtCurrEv:
  297|  40.0k|  bool IsIndexAtCurr() const { return is_index_at_curr_block_; }
_ZN7rocksdb23BlockBasedTableIterator24ResetBlockCacheLookupVarEv:
  405|  4.48k|  void ResetBlockCacheLookupVar() {
  406|  4.48k|    is_index_out_of_bound_ = false;
  407|  4.48k|    readahead_cache_lookup_ = false;
  408|  4.48k|    ClearBlockHandles();
  409|  4.48k|  }
_ZN7rocksdb23BlockBasedTableIterator17ClearBlockHandlesEv:
  422|  13.4k|  void ClearBlockHandles() {
  423|  13.4k|    if (block_handles_ != nullptr) {
  ------------------
  |  Branch (423:9): [True: 0, False: 13.4k]
  ------------------
  424|      0|      block_handles_->clear();
  425|      0|    }
  426|  13.4k|  }
_ZN7rocksdb23BlockBasedTableIterator23DoesContainBlockHandlesEv:
  434|  26.5k|  bool DoesContainBlockHandles() {
  435|  26.5k|    return block_handles_ != nullptr && !block_handles_->empty();
  ------------------
  |  Branch (435:12): [True: 0, False: 26.5k]
  |  Branch (435:41): [True: 0, False: 0]
  ------------------
  436|  26.5k|  }

_ZN7rocksdb15BlockBasedTableD2Ev:
  138|  4.48k|BlockBasedTable::~BlockBasedTable() {
  139|  4.48k|  auto ua = rep_->uncache_aggressiveness.LoadRelaxed();
  140|  4.48k|  if (ua > 0 && rep_->table_options.block_cache) {
  ------------------
  |  Branch (140:7): [True: 0, False: 4.48k]
  |  Branch (140:17): [True: 0, False: 0]
  ------------------
  141|      0|    if (rep_->filter) {
  ------------------
  |  Branch (141:9): [True: 0, False: 0]
  ------------------
  142|      0|      rep_->filter->EraseFromCacheBeforeDestruction(ua);
  143|      0|    }
  144|      0|    if (rep_->index_reader) {
  ------------------
  |  Branch (144:9): [True: 0, False: 0]
  ------------------
  145|      0|      {
  146|       |        // TODO: Also uncache data blocks known after any gaps in partitioned
  147|       |        // index. Right now the iterator errors out as soon as there's an
  148|       |        // index partition not in cache.
  149|      0|        IndexBlockIter iiter_on_stack;
  150|      0|        ReadOptions ropts;
  151|      0|        ropts.read_tier = kBlockCacheTier;  // No I/O
  152|      0|        auto iiter = NewIndexIterator(
  153|      0|            ropts, /*disable_prefix_seek=*/false, &iiter_on_stack,
  154|      0|            /*get_context=*/nullptr, /*lookup_context=*/nullptr);
  155|      0|        std::unique_ptr<InternalIteratorBase<IndexValue>> iiter_unique_ptr;
  156|      0|        if (iiter != &iiter_on_stack) {
  ------------------
  |  Branch (156:13): [True: 0, False: 0]
  ------------------
  157|      0|          iiter_unique_ptr.reset(iiter);
  158|      0|        }
  159|       |        // Un-cache the data blocks the index iterator with tell us about
  160|       |        // without I/O. (NOTE: It's extremely unlikely that a data block
  161|       |        // will be in block cache without the index block pointing to it
  162|       |        // also in block cache.)
  163|      0|        UncacheAggressivenessAdvisor advisor(ua);
  164|      0|        for (iiter->SeekToFirst(); iiter->Valid() && advisor.ShouldContinue();
  ------------------
  |  Branch (164:36): [True: 0, False: 0]
  |  Branch (164:54): [True: 0, False: 0]
  ------------------
  165|      0|             iiter->Next()) {
  166|      0|          bool erased = EraseFromCache(iiter->value().handle);
  167|      0|          advisor.Report(erased);
  168|      0|        }
  169|      0|        iiter->status().PermitUncheckedError();
  170|      0|      }
  171|       |
  172|       |      // Un-cache the index block(s)
  173|      0|      rep_->index_reader->EraseFromCacheBeforeDestruction(ua);
  174|      0|    }
  175|      0|  }
  176|  4.48k|  delete rep_;
  177|  4.48k|}
_ZNK7rocksdb15BlockBasedTable22UpdateCacheMissMetricsENS_9BlockTypeEPNS_10GetContextE:
  318|  11.7k|                                             GetContext* get_context) const {
  319|  11.7k|  Statistics* const statistics = rep_->ioptions.stats;
  320|       |
  321|       |  // TODO: introduce aggregate (not per-level) block cache miss count
  322|  11.7k|  PERF_COUNTER_BY_LEVEL_ADD(block_cache_miss_count, 1,
  ------------------
  |  |   88|  11.7k|  if (perf_level >= PerfLevel::kEnableCount &&                        \
  |  |  ------------------
  |  |  |  Branch (88:7): [True: 11.7k, False: 0]
  |  |  ------------------
  |  |   89|  11.7k|      perf_context.per_level_perf_context_enabled &&                  \
  |  |  ------------------
  |  |  |  Branch (89:7): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |   90|  11.7k|      perf_context.level_to_perf_context) {                           \
  |  |  ------------------
  |  |  |  Branch (90:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   91|      0|    if ((*(perf_context.level_to_perf_context)).find(level) !=        \
  |  |  ------------------
  |  |  |  Branch (91:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   92|      0|        (*(perf_context.level_to_perf_context)).end()) {              \
  |  |   93|      0|      (*(perf_context.level_to_perf_context))[level].metric += value; \
  |  |   94|      0|    } else {                                                          \
  |  |   95|      0|      PerfContextByLevel empty_context;                               \
  |  |   96|      0|      (*(perf_context.level_to_perf_context))[level] = empty_context; \
  |  |   97|      0|      (*(perf_context.level_to_perf_context))[level].metric += value; \
  |  |   98|      0|    }                                                                 \
  |  |   99|      0|  }
  ------------------
  323|  11.7k|                            static_cast<uint32_t>(rep_->level));
  324|       |
  325|  11.7k|  if (get_context) {
  ------------------
  |  Branch (325:7): [True: 0, False: 11.7k]
  ------------------
  326|      0|    ++get_context->get_context_stats_.num_cache_miss;
  327|  11.7k|  } else {
  328|  11.7k|    RecordTick(statistics, BLOCK_CACHE_MISS);
  329|  11.7k|  }
  330|       |
  331|       |  // TODO: introduce perf counters for misses per block type
  332|  11.7k|  switch (block_type) {
  333|      0|    case BlockType::kFilter:
  ------------------
  |  Branch (333:5): [True: 0, False: 11.7k]
  ------------------
  334|      0|    case BlockType::kFilterPartitionIndex:
  ------------------
  |  Branch (334:5): [True: 0, False: 11.7k]
  ------------------
  335|      0|      if (get_context) {
  ------------------
  |  Branch (335:11): [True: 0, False: 0]
  ------------------
  336|      0|        ++get_context->get_context_stats_.num_cache_filter_miss;
  337|      0|      } else {
  338|      0|        RecordTick(statistics, BLOCK_CACHE_FILTER_MISS);
  339|      0|      }
  340|      0|      break;
  341|       |
  342|      0|    case BlockType::kCompressionDictionary:
  ------------------
  |  Branch (342:5): [True: 0, False: 11.7k]
  ------------------
  343|      0|      if (get_context) {
  ------------------
  |  Branch (343:11): [True: 0, False: 0]
  ------------------
  344|      0|        ++get_context->get_context_stats_.num_cache_compression_dict_miss;
  345|      0|      } else {
  346|      0|        RecordTick(statistics, BLOCK_CACHE_COMPRESSION_DICT_MISS);
  347|      0|      }
  348|      0|      break;
  349|       |
  350|      0|    case BlockType::kIndex:
  ------------------
  |  Branch (350:5): [True: 0, False: 11.7k]
  ------------------
  351|      0|      if (get_context) {
  ------------------
  |  Branch (351:11): [True: 0, False: 0]
  ------------------
  352|      0|        ++get_context->get_context_stats_.num_cache_index_miss;
  353|      0|      } else {
  354|      0|        RecordTick(statistics, BLOCK_CACHE_INDEX_MISS);
  355|      0|      }
  356|      0|      break;
  357|       |
  358|  11.7k|    default:
  ------------------
  |  Branch (358:5): [True: 11.7k, False: 0]
  ------------------
  359|       |      // TODO: introduce dedicated tickers/statistics/counters
  360|       |      // for range tombstones
  361|  11.7k|      if (get_context) {
  ------------------
  |  Branch (361:11): [True: 0, False: 11.7k]
  ------------------
  362|      0|        ++get_context->get_context_stats_.num_cache_data_miss;
  363|  11.7k|      } else {
  364|  11.7k|        RecordTick(statistics, BLOCK_CACHE_DATA_MISS);
  365|  11.7k|      }
  366|  11.7k|      break;
  367|  11.7k|  }
  368|  11.7k|}
_ZN7rocksdb15BlockBasedTable27UpdateCacheInsertionMetricsENS_9BlockTypeEPNS_10GetContextEmbPNS_10StatisticsE:
  372|  11.7k|    Statistics* const statistics) {
  373|       |  // TODO: introduce perf counters for block cache insertions
  374|  11.7k|  if (get_context) {
  ------------------
  |  Branch (374:7): [True: 0, False: 11.7k]
  ------------------
  375|      0|    ++get_context->get_context_stats_.num_cache_add;
  376|      0|    if (redundant) {
  ------------------
  |  Branch (376:9): [True: 0, False: 0]
  ------------------
  377|      0|      ++get_context->get_context_stats_.num_cache_add_redundant;
  378|      0|    }
  379|      0|    get_context->get_context_stats_.num_cache_bytes_write += usage;
  380|  11.7k|  } else {
  381|  11.7k|    RecordTick(statistics, BLOCK_CACHE_ADD);
  382|  11.7k|    if (redundant) {
  ------------------
  |  Branch (382:9): [True: 0, False: 11.7k]
  ------------------
  383|      0|      RecordTick(statistics, BLOCK_CACHE_ADD_REDUNDANT);
  384|      0|    }
  385|  11.7k|    RecordTick(statistics, BLOCK_CACHE_BYTES_WRITE, usage);
  386|  11.7k|  }
  387|       |
  388|  11.7k|  switch (block_type) {
  389|      0|    case BlockType::kFilter:
  ------------------
  |  Branch (389:5): [True: 0, False: 11.7k]
  ------------------
  390|      0|    case BlockType::kFilterPartitionIndex:
  ------------------
  |  Branch (390:5): [True: 0, False: 11.7k]
  ------------------
  391|      0|      if (get_context) {
  ------------------
  |  Branch (391:11): [True: 0, False: 0]
  ------------------
  392|      0|        ++get_context->get_context_stats_.num_cache_filter_add;
  393|      0|        if (redundant) {
  ------------------
  |  Branch (393:13): [True: 0, False: 0]
  ------------------
  394|      0|          ++get_context->get_context_stats_.num_cache_filter_add_redundant;
  395|      0|        }
  396|      0|        get_context->get_context_stats_.num_cache_filter_bytes_insert += usage;
  397|      0|      } else {
  398|      0|        RecordTick(statistics, BLOCK_CACHE_FILTER_ADD);
  399|      0|        if (redundant) {
  ------------------
  |  Branch (399:13): [True: 0, False: 0]
  ------------------
  400|      0|          RecordTick(statistics, BLOCK_CACHE_FILTER_ADD_REDUNDANT);
  401|      0|        }
  402|      0|        RecordTick(statistics, BLOCK_CACHE_FILTER_BYTES_INSERT, usage);
  403|      0|      }
  404|      0|      break;
  405|       |
  406|      0|    case BlockType::kCompressionDictionary:
  ------------------
  |  Branch (406:5): [True: 0, False: 11.7k]
  ------------------
  407|      0|      if (get_context) {
  ------------------
  |  Branch (407:11): [True: 0, False: 0]
  ------------------
  408|      0|        ++get_context->get_context_stats_.num_cache_compression_dict_add;
  409|      0|        if (redundant) {
  ------------------
  |  Branch (409:13): [True: 0, False: 0]
  ------------------
  410|      0|          ++get_context->get_context_stats_
  411|      0|                .num_cache_compression_dict_add_redundant;
  412|      0|        }
  413|      0|        get_context->get_context_stats_
  414|      0|            .num_cache_compression_dict_bytes_insert += usage;
  415|      0|      } else {
  416|      0|        RecordTick(statistics, BLOCK_CACHE_COMPRESSION_DICT_ADD);
  417|      0|        if (redundant) {
  ------------------
  |  Branch (417:13): [True: 0, False: 0]
  ------------------
  418|      0|          RecordTick(statistics, BLOCK_CACHE_COMPRESSION_DICT_ADD_REDUNDANT);
  419|      0|        }
  420|      0|        RecordTick(statistics, BLOCK_CACHE_COMPRESSION_DICT_BYTES_INSERT,
  421|      0|                   usage);
  422|      0|      }
  423|      0|      break;
  424|       |
  425|      0|    case BlockType::kIndex:
  ------------------
  |  Branch (425:5): [True: 0, False: 11.7k]
  ------------------
  426|      0|      if (get_context) {
  ------------------
  |  Branch (426:11): [True: 0, False: 0]
  ------------------
  427|      0|        ++get_context->get_context_stats_.num_cache_index_add;
  428|      0|        if (redundant) {
  ------------------
  |  Branch (428:13): [True: 0, False: 0]
  ------------------
  429|      0|          ++get_context->get_context_stats_.num_cache_index_add_redundant;
  430|      0|        }
  431|      0|        get_context->get_context_stats_.num_cache_index_bytes_insert += usage;
  432|      0|      } else {
  433|      0|        RecordTick(statistics, BLOCK_CACHE_INDEX_ADD);
  434|      0|        if (redundant) {
  ------------------
  |  Branch (434:13): [True: 0, False: 0]
  ------------------
  435|      0|          RecordTick(statistics, BLOCK_CACHE_INDEX_ADD_REDUNDANT);
  436|      0|        }
  437|      0|        RecordTick(statistics, BLOCK_CACHE_INDEX_BYTES_INSERT, usage);
  438|      0|      }
  439|      0|      break;
  440|       |
  441|  11.7k|    default:
  ------------------
  |  Branch (441:5): [True: 11.7k, False: 0]
  ------------------
  442|       |      // TODO: introduce dedicated tickers/statistics/counters
  443|       |      // for range tombstones
  444|  11.7k|      if (get_context) {
  ------------------
  |  Branch (444:11): [True: 0, False: 11.7k]
  ------------------
  445|      0|        ++get_context->get_context_stats_.num_cache_data_add;
  446|      0|        if (redundant) {
  ------------------
  |  Branch (446:13): [True: 0, False: 0]
  ------------------
  447|      0|          ++get_context->get_context_stats_.num_cache_data_add_redundant;
  448|      0|        }
  449|      0|        get_context->get_context_stats_.num_cache_data_bytes_insert += usage;
  450|  11.7k|      } else {
  451|  11.7k|        RecordTick(statistics, BLOCK_CACHE_DATA_ADD);
  452|  11.7k|        if (redundant) {
  ------------------
  |  Branch (452:13): [True: 0, False: 11.7k]
  ------------------
  453|      0|          RecordTick(statistics, BLOCK_CACHE_DATA_ADD_REDUNDANT);
  454|      0|        }
  455|  11.7k|        RecordTick(statistics, BLOCK_CACHE_DATA_BYTES_INSERT, usage);
  456|  11.7k|      }
  457|  11.7k|      break;
  458|  11.7k|  }
  459|  11.7k|}
_ZN7rocksdb15BlockBasedTable17SetupBaseCacheKeyEPKNS_15TablePropertiesERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEmPNS_18OffsetableCacheKeyEPb:
  565|  8.96k|                                        bool* out_is_stable) {
  566|       |  // Use a stable cache key if sufficient data is in table properties
  567|  8.96k|  std::string db_session_id;
  568|  8.96k|  uint64_t file_num;
  569|  8.96k|  std::string db_id;
  570|  8.96k|  if (properties && !properties->db_session_id.empty() &&
  ------------------
  |  Branch (570:7): [True: 8.96k, False: 0]
  |  Branch (570:21): [True: 8.96k, False: 0]
  ------------------
  571|  8.96k|      properties->orig_file_number > 0) {
  ------------------
  |  Branch (571:7): [True: 8.96k, False: 0]
  ------------------
  572|       |    // (Newer SST file case)
  573|       |    // We must have both properties to get a stable unique id because
  574|       |    // CreateColumnFamilyWithImport or IngestExternalFiles can change the
  575|       |    // file numbers on a file.
  576|  8.96k|    db_session_id = properties->db_session_id;
  577|  8.96k|    file_num = properties->orig_file_number;
  578|       |    // Less critical, populated in earlier release than above
  579|  8.96k|    db_id = properties->db_id;
  580|  8.96k|    if (out_is_stable) {
  ------------------
  |  Branch (580:9): [True: 0, False: 8.96k]
  ------------------
  581|      0|      *out_is_stable = true;
  582|      0|    }
  583|  8.96k|  } else {
  584|       |    // (Old SST file case)
  585|       |    // We use (unique) cache keys based on current identifiers. These are at
  586|       |    // least stable across table file close and re-open, but not across
  587|       |    // different DBs nor DB close and re-open.
  588|      0|    db_session_id = cur_db_session_id;
  589|      0|    file_num = cur_file_number;
  590|       |    // Plumbing through the DB ID to here would be annoying, and of limited
  591|       |    // value because of the case of VersionSet::Recover opening some table
  592|       |    // files and later setting the DB ID. So we just rely on uniqueness
  593|       |    // level provided by session ID.
  594|      0|    db_id = "unknown";
  595|      0|    if (out_is_stable) {
  ------------------
  |  Branch (595:9): [True: 0, False: 0]
  ------------------
  596|      0|      *out_is_stable = false;
  597|      0|    }
  598|      0|  }
  599|       |
  600|       |  // Too many tests to update to get these working
  601|       |  // assert(file_num > 0);
  602|       |  // assert(!db_session_id.empty());
  603|       |  // assert(!db_id.empty());
  604|       |
  605|       |  // Minimum block size is 5 bytes; therefore we can trim off two lower bits
  606|       |  // from offsets. See GetCacheKey.
  607|  8.96k|  *out_base_cache_key = OffsetableCacheKey(db_id, db_session_id, file_num);
  608|  8.96k|}
_ZN7rocksdb15BlockBasedTable11GetCacheKeyERKNS_18OffsetableCacheKeyERKNS_11BlockHandleE:
  611|  11.7k|                                      const BlockHandle& handle) {
  612|       |  // Minimum block size is 5 bytes; therefore we can trim off two lower bits
  613|       |  // from offet.
  614|  11.7k|  return base_cache_key.WithOffset(handle.offset() >> 2);
  615|  11.7k|}
_ZN7rocksdb15BlockBasedTable4OpenERKNS_11ReadOptionsERKNS_16ImmutableOptionsERKNS_10EnvOptionsERKNS_22BlockBasedTableOptionsERKNS_21InternalKeyComparatorEONSt3__110unique_ptrINS_22RandomAccessFileReaderENSG_14default_deleteISI_EEEEmhPNSH_INS_11TableReaderENSJ_ISN_EEEEmNSG_10shared_ptrINS_23CacheReservationManagerEEERKNSR_IKNS_14SliceTransformEEEbbibmbPNS_17TailPrefetchStatsEPNS_16BlockCacheTracerEmRKNSG_12basic_stringIcNSG_11char_traitsIcEENSG_9allocatorIcEEEEmNSG_5arrayImLm2EEEb:
  633|  4.48k|    const bool user_defined_timestamps_persisted) {
  634|  4.48k|  table_reader->reset();
  635|       |
  636|  4.48k|  Status s;
  637|  4.48k|  Footer footer;
  638|  4.48k|  std::unique_ptr<FilePrefetchBuffer> prefetch_buffer;
  639|       |
  640|       |  // From read_options, retain deadline, io_timeout, rate_limiter_priority, and
  641|       |  // verify_checksums. In future, we may retain more options.
  642|       |  // TODO: audit more ReadOptions and do this in a way that brings attention
  643|       |  // on new ReadOptions?
  644|  4.48k|  ReadOptions ro;
  645|  4.48k|  ro.deadline = read_options.deadline;
  646|  4.48k|  ro.io_timeout = read_options.io_timeout;
  647|  4.48k|  ro.rate_limiter_priority = read_options.rate_limiter_priority;
  648|  4.48k|  ro.verify_checksums = read_options.verify_checksums;
  649|  4.48k|  ro.io_activity = read_options.io_activity;
  650|       |
  651|       |  // prefetch both index and filters, down to all partitions
  652|  4.48k|  const bool prefetch_all = prefetch_index_and_filter_in_cache || level == 0;
  ------------------
  |  Branch (652:29): [True: 4.48k, False: 0]
  |  Branch (652:67): [True: 0, False: 0]
  ------------------
  653|  4.48k|  const bool preload_all = !table_options.cache_index_and_filter_blocks;
  654|       |
  655|  4.48k|  if (!ioptions.allow_mmap_reads && !env_options.use_mmap_reads) {
  ------------------
  |  Branch (655:7): [True: 4.48k, False: 0]
  |  Branch (655:37): [True: 4.48k, False: 0]
  ------------------
  656|  4.48k|    s = PrefetchTail(ro, file.get(), file_size, force_direct_prefetch,
  657|  4.48k|                     tail_prefetch_stats, prefetch_all, preload_all,
  658|  4.48k|                     &prefetch_buffer, ioptions.stats, tail_size,
  659|  4.48k|                     ioptions.logger);
  660|       |    // Return error in prefetch path to users.
  661|  4.48k|    if (!s.ok()) {
  ------------------
  |  Branch (661:9): [True: 0, False: 4.48k]
  ------------------
  662|      0|      return s;
  663|      0|    }
  664|  4.48k|  } else {
  665|       |    // Should not prefetch for mmap mode.
  666|      0|    prefetch_buffer.reset(new FilePrefetchBuffer(
  667|      0|        ReadaheadParams(), false /* enable */, true /* track_min_offset */));
  668|      0|  }
  669|       |
  670|       |  // Read in the following order:
  671|       |  //    1. Footer
  672|       |  //    2. [metaindex block]
  673|       |  //    3. [meta block: properties]
  674|       |  //    4. [meta block: range deletion tombstone]
  675|       |  //    5. [meta block: compression dictionary]
  676|       |  //    6. [meta block: index]
  677|       |  //    7. [meta block: filter]
  678|  4.48k|  IOOptions opts;
  679|  4.48k|  s = file->PrepareIOOptions(ro, opts);
  680|  4.48k|  if (s.ok()) {
  ------------------
  |  Branch (680:7): [True: 4.48k, False: 0]
  ------------------
  681|  4.48k|    s = ReadFooterFromFile(opts, file.get(), *ioptions.fs,
  682|  4.48k|                           prefetch_buffer.get(), file_size, &footer,
  683|  4.48k|                           kBlockBasedTableMagicNumber);
  684|  4.48k|  }
  685|       |  // If the footer is corrupted and the FS supports checksum verification and
  686|       |  // correction, try reading the footer again
  687|  4.48k|  if (s.IsCorruption()) {
  ------------------
  |  Branch (687:7): [True: 0, False: 4.48k]
  ------------------
  688|      0|    RecordTick(ioptions.statistics.get(), SST_FOOTER_CORRUPTION_COUNT);
  689|      0|    if (CheckFSFeatureSupport(ioptions.fs.get(),
  ------------------
  |  Branch (689:9): [True: 0, False: 0]
  ------------------
  690|      0|                              FSSupportedOps::kVerifyAndReconstructRead)) {
  691|      0|      IOOptions retry_opts = opts;
  692|      0|      retry_opts.verify_and_reconstruct_read = true;
  693|      0|      s = ReadFooterFromFile(retry_opts, file.get(), *ioptions.fs,
  694|      0|                             prefetch_buffer.get(), file_size, &footer,
  695|      0|                             kBlockBasedTableMagicNumber);
  696|      0|    }
  697|      0|  }
  698|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (698:7): [True: 0, False: 4.48k]
  ------------------
  699|      0|    return s;
  700|      0|  }
  701|  4.48k|  if (!IsSupportedFormatVersion(footer.format_version())) {
  ------------------
  |  Branch (701:7): [True: 0, False: 4.48k]
  ------------------
  702|      0|    return Status::Corruption(
  703|      0|        "Unknown Footer version. Maybe this file was created with newer "
  704|      0|        "version of RocksDB?");
  705|      0|  }
  706|       |
  707|  4.48k|  BlockCacheLookupContext lookup_context{TableReaderCaller::kPrefetch};
  708|  4.48k|  Rep* rep = new BlockBasedTable::Rep(
  709|  4.48k|      ioptions, env_options, table_options, internal_comparator, skip_filters,
  710|  4.48k|      file_size, level, immortal_table, user_defined_timestamps_persisted);
  711|  4.48k|  rep->file = std::move(file);
  712|  4.48k|  rep->footer = footer;
  713|       |
  714|       |  // For fully portable/stable cache keys, we need to read the properties
  715|       |  // block before setting up cache keys. TODO: consider setting up a bootstrap
  716|       |  // cache key for PersistentCache to use for metaindex and properties blocks.
  717|  4.48k|  rep->persistent_cache_options = PersistentCacheOptions();
  718|       |
  719|       |  // Meta-blocks are not dictionary compressed. Explicitly set the dictionary
  720|       |  // handle to null, otherwise it may be seen as uninitialized during the below
  721|       |  // meta-block reads.
  722|  4.48k|  rep->compression_dict_handle = BlockHandle::NullBlockHandle();
  723|       |
  724|  4.48k|  rep->create_context.protection_bytes_per_key = block_protection_bytes_per_key;
  725|       |  // Read metaindex
  726|  4.48k|  std::unique_ptr<BlockBasedTable> new_table(
  727|  4.48k|      new BlockBasedTable(rep, block_cache_tracer));
  728|  4.48k|  std::unique_ptr<Block> metaindex;
  729|  4.48k|  std::unique_ptr<InternalIterator> metaindex_iter;
  730|  4.48k|  s = new_table->ReadMetaIndexBlock(ro, prefetch_buffer.get(), &metaindex,
  731|  4.48k|                                    &metaindex_iter);
  732|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (732:7): [True: 0, False: 4.48k]
  ------------------
  733|      0|    return s;
  734|      0|  }
  735|       |
  736|       |  // Populates table_properties and some fields that depend on it,
  737|       |  // such as index_type.
  738|  4.48k|  s = new_table->ReadPropertiesBlock(ro, prefetch_buffer.get(),
  739|  4.48k|                                     metaindex_iter.get(), largest_seqno);
  740|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (740:7): [True: 0, False: 4.48k]
  ------------------
  741|      0|    return s;
  742|      0|  }
  743|       |
  744|       |  // Populate BlockCreateContext
  745|  4.48k|  bool blocks_definitely_zstd_compressed =
  746|  4.48k|      rep->table_properties &&
  ------------------
  |  Branch (746:7): [True: 4.48k, False: 0]
  ------------------
  747|  4.48k|      (rep->table_properties->compression_name ==
  ------------------
  |  Branch (747:8): [True: 0, False: 4.48k]
  ------------------
  748|  4.48k|           CompressionTypeToString(kZSTD) ||
  749|  4.48k|       rep->table_properties->compression_name ==
  ------------------
  |  Branch (749:8): [True: 0, False: 4.48k]
  ------------------
  750|  4.48k|           CompressionTypeToString(kZSTDNotFinalCompression));
  751|  4.48k|  rep->create_context = BlockCreateContext(
  752|  4.48k|      &rep->table_options, &rep->ioptions, rep->ioptions.stats,
  753|  4.48k|      blocks_definitely_zstd_compressed, block_protection_bytes_per_key,
  754|  4.48k|      rep->internal_comparator.user_comparator(), rep->index_value_is_full,
  755|  4.48k|      rep->index_has_first_key);
  756|       |
  757|       |  // Check expected unique id if provided
  758|  4.48k|  if (expected_unique_id != kNullUniqueId64x2) {
  ------------------
  |  Branch (758:7): [True: 4.48k, False: 0]
  ------------------
  759|  4.48k|    auto props = rep->table_properties;
  760|  4.48k|    if (!props) {
  ------------------
  |  Branch (760:9): [True: 0, False: 4.48k]
  ------------------
  761|      0|      return Status::Corruption("Missing table properties on file " +
  762|      0|                                std::to_string(cur_file_num) +
  763|      0|                                " with known unique ID");
  764|      0|    }
  765|  4.48k|    UniqueId64x2 actual_unique_id{};
  766|  4.48k|    s = GetSstInternalUniqueId(props->db_id, props->db_session_id,
  767|  4.48k|                               props->orig_file_number, &actual_unique_id,
  768|  4.48k|                               /*force*/ true);
  769|  4.48k|    assert(s.ok());  // because force=true
  770|  4.48k|    if (expected_unique_id != actual_unique_id) {
  ------------------
  |  Branch (770:9): [True: 0, False: 4.48k]
  ------------------
  771|      0|      return Status::Corruption(
  772|      0|          "Mismatch in unique ID on table file " +
  773|      0|          std::to_string(cur_file_num) +
  774|      0|          ". Expected: " + InternalUniqueIdToHumanString(&expected_unique_id) +
  775|      0|          " Actual: " + InternalUniqueIdToHumanString(&actual_unique_id));
  776|      0|    }
  777|  4.48k|    TEST_SYNC_POINT_CALLBACK("BlockBasedTable::Open::PassedVerifyUniqueId",
  778|  4.48k|                             &actual_unique_id);
  779|  4.48k|  } else {
  780|      0|    TEST_SYNC_POINT_CALLBACK("BlockBasedTable::Open::SkippedVerifyUniqueId",
  781|      0|                             nullptr);
  782|      0|    if (ioptions.verify_sst_unique_id_in_manifest && ioptions.logger) {
  ------------------
  |  Branch (782:9): [True: 0, False: 0]
  |  Branch (782:54): [True: 0, False: 0]
  ------------------
  783|       |      // A crude but isolated way of reporting unverified files. This should not
  784|       |      // be an ongoing concern so doesn't deserve a place in Statistics IMHO.
  785|      0|      static std::atomic<uint64_t> unverified_count{0};
  786|      0|      auto prev_count =
  787|      0|          unverified_count.fetch_add(1, std::memory_order_relaxed);
  788|      0|      if (prev_count == 0) {
  ------------------
  |  Branch (788:11): [True: 0, False: 0]
  ------------------
  789|      0|        ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  790|      0|            ioptions.logger,
  791|      0|            "At least one SST file opened without unique ID to verify: %" PRIu64
  792|      0|            ".sst",
  793|      0|            cur_file_num);
  794|      0|      } else if (prev_count % 1000 == 0) {
  ------------------
  |  Branch (794:18): [True: 0, False: 0]
  ------------------
  795|      0|        ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  796|      0|            ioptions.logger,
  797|      0|            "Another ~1000 SST files opened without unique ID to verify");
  798|      0|      }
  799|      0|    }
  800|      0|  }
  801|       |
  802|       |  // Set up prefix extracto as needed
  803|  4.48k|  bool force_null_table_prefix_extractor = false;
  804|  4.48k|  TEST_SYNC_POINT_CALLBACK(
  805|  4.48k|      "BlockBasedTable::Open::ForceNullTablePrefixExtractor",
  806|  4.48k|      &force_null_table_prefix_extractor);
  807|  4.48k|  if (force_null_table_prefix_extractor) {
  ------------------
  |  Branch (807:7): [True: 0, False: 4.48k]
  ------------------
  808|      0|    assert(!rep->table_prefix_extractor);
  809|  4.48k|  } else if (!PrefixExtractorChangedHelper(rep->table_properties.get(),
  ------------------
  |  Branch (809:14): [True: 0, False: 4.48k]
  ------------------
  810|  4.48k|                                           prefix_extractor.get())) {
  811|       |    // Establish fast path for unchanged prefix_extractor
  812|      0|    rep->table_prefix_extractor = prefix_extractor;
  813|  4.48k|  } else {
  814|       |    // Current prefix_extractor doesn't match table
  815|  4.48k|    if (rep->table_properties) {
  ------------------
  |  Branch (815:9): [True: 4.48k, False: 0]
  ------------------
  816|       |      //**TODO: If/When the DBOptions has a registry in it, the ConfigOptions
  817|       |      // will need to use it
  818|  4.48k|      ConfigOptions config_options;
  819|  4.48k|      Status st = SliceTransform::CreateFromString(
  820|  4.48k|          config_options, rep->table_properties->prefix_extractor_name,
  821|  4.48k|          &(rep->table_prefix_extractor));
  822|  4.48k|      if (!st.ok()) {
  ------------------
  |  Branch (822:11): [True: 0, False: 4.48k]
  ------------------
  823|       |        //**TODO: Should this be error be returned or swallowed?
  824|      0|        ROCKS_LOG_ERROR(rep->ioptions.logger,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  825|      0|                        "Failed to create prefix extractor[%s]: %s",
  826|      0|                        rep->table_properties->prefix_extractor_name.c_str(),
  827|      0|                        st.ToString().c_str());
  828|      0|      }
  829|  4.48k|    }
  830|  4.48k|  }
  831|       |
  832|       |  // With properties loaded, we can set up portable/stable cache keys
  833|  4.48k|  SetupBaseCacheKey(rep->table_properties.get(), cur_db_session_id,
  834|  4.48k|                    cur_file_num, &rep->base_cache_key);
  835|       |
  836|  4.48k|  rep->persistent_cache_options =
  837|  4.48k|      PersistentCacheOptions(rep->table_options.persistent_cache,
  838|  4.48k|                             rep->base_cache_key, rep->ioptions.stats);
  839|       |
  840|  4.48k|  s = new_table->ReadRangeDelBlock(ro, prefetch_buffer.get(),
  841|  4.48k|                                   metaindex_iter.get(), internal_comparator,
  842|  4.48k|                                   &lookup_context);
  843|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (843:7): [True: 0, False: 4.48k]
  ------------------
  844|      0|    return s;
  845|      0|  }
  846|  4.48k|  rep->verify_checksum_set_on_open = ro.verify_checksums;
  847|  4.48k|  s = new_table->PrefetchIndexAndFilterBlocks(
  848|  4.48k|      ro, prefetch_buffer.get(), metaindex_iter.get(), new_table.get(),
  849|  4.48k|      prefetch_all, table_options, level, file_size,
  850|  4.48k|      max_file_size_for_l0_meta_pin, &lookup_context);
  851|       |
  852|  4.48k|  if (s.ok()) {
  ------------------
  |  Branch (852:7): [True: 4.48k, False: 0]
  ------------------
  853|       |    // Update tail prefetch stats
  854|  4.48k|    assert(prefetch_buffer.get() != nullptr);
  855|  4.48k|    if (tail_prefetch_stats != nullptr) {
  ------------------
  |  Branch (855:9): [True: 4.48k, False: 0]
  ------------------
  856|  4.48k|      assert(prefetch_buffer->min_offset_read() < file_size);
  857|  4.48k|      tail_prefetch_stats->RecordEffectiveSize(
  858|  4.48k|          static_cast<size_t>(file_size) - prefetch_buffer->min_offset_read());
  859|  4.48k|    }
  860|  4.48k|  }
  861|       |
  862|  4.48k|  if (s.ok() && table_reader_cache_res_mgr) {
  ------------------
  |  Branch (862:7): [True: 4.48k, False: 0]
  |  Branch (862:17): [True: 0, False: 4.48k]
  ------------------
  863|      0|    std::size_t mem_usage = new_table->ApproximateMemoryUsage();
  864|      0|    s = table_reader_cache_res_mgr->MakeCacheReservation(
  865|      0|        mem_usage, &(rep->table_reader_cache_res_handle));
  866|      0|    if (s.IsMemoryLimit()) {
  ------------------
  |  Branch (866:9): [True: 0, False: 0]
  ------------------
  867|      0|      s = Status::MemoryLimit(
  868|      0|          "Can't allocate " +
  869|      0|          kCacheEntryRoleToCamelString[static_cast<std::uint32_t>(
  870|      0|              CacheEntryRole::kBlockBasedTableReader)] +
  871|      0|          " due to memory limit based on "
  872|      0|          "cache capacity for memory allocation");
  873|      0|    }
  874|      0|  }
  875|       |
  876|  4.48k|  if (s.ok()) {
  ------------------
  |  Branch (876:7): [True: 4.48k, False: 0]
  ------------------
  877|  4.48k|    *table_reader = std::move(new_table);
  878|  4.48k|  }
  879|  4.48k|  return s;
  880|  4.48k|}
_ZN7rocksdb15BlockBasedTable12PrefetchTailERKNS_11ReadOptionsEPNS_22RandomAccessFileReaderEmbPNS_17TailPrefetchStatsEbbPNSt3__110unique_ptrINS_18FilePrefetchBufferENS8_14default_deleteISA_EEEEPNS_10StatisticsEmPNS_6LoggerE:
  887|  4.48k|    uint64_t tail_size, Logger* const logger) {
  888|  4.48k|  assert(tail_size <= file_size);
  889|       |
  890|  4.48k|  size_t tail_prefetch_size = 0;
  891|  4.48k|  if (tail_size != 0) {
  ------------------
  |  Branch (891:7): [True: 4.48k, False: 0]
  ------------------
  892|  4.48k|    tail_prefetch_size = tail_size;
  893|  4.48k|  } else {
  894|       |    // Fallback for SST files, for which tail size is not recorded in the
  895|       |    // manifest. Eventually, this fallback might be removed, so it's
  896|       |    // better to make sure that such SST files get compacted.
  897|       |    // See https://github.com/facebook/rocksdb/issues/12664
  898|      0|    if (tail_prefetch_stats != nullptr) {
  ------------------
  |  Branch (898:9): [True: 0, False: 0]
  ------------------
  899|       |      // Multiple threads may get a 0 (no history) when running in parallel,
  900|       |      // but it will get cleared after the first of them finishes.
  901|      0|      tail_prefetch_size = tail_prefetch_stats->GetSuggestedPrefetchSize();
  902|      0|    }
  903|      0|    if (tail_prefetch_size == 0) {
  ------------------
  |  Branch (903:9): [True: 0, False: 0]
  ------------------
  904|       |      // Before read footer, readahead backwards to prefetch data. Do more
  905|       |      // readahead if we're going to read index/filter.
  906|       |      // TODO: This may incorrectly select small readahead in case partitioned
  907|       |      // index/filter is enabled and top-level partition pinning is enabled.
  908|       |      // That's because we need to issue readahead before we read the
  909|       |      // properties, at which point we don't yet know the index type.
  910|      0|      tail_prefetch_size = prefetch_all || preload_all ? 512 * 1024 : 4 * 1024;
  ------------------
  |  Branch (910:28): [True: 0, False: 0]
  |  Branch (910:44): [True: 0, False: 0]
  ------------------
  911|       |
  912|      0|      ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  913|      0|          logger,
  914|      0|          "[%s] Tail prefetch size %zu is calculated based on heuristics.",
  915|      0|          file->file_name().c_str(), tail_prefetch_size);
  916|      0|    } else {
  917|      0|      ROCKS_LOG_WARN(logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  918|      0|                     "[%s] Tail prefetch size %zu is calculated based on "
  919|      0|                     "TailPrefetchStats.",
  920|      0|                     file->file_name().c_str(), tail_prefetch_size);
  921|      0|    }
  922|      0|  }
  923|  4.48k|  size_t prefetch_off;
  924|  4.48k|  size_t prefetch_len;
  925|  4.48k|  if (file_size < tail_prefetch_size) {
  ------------------
  |  Branch (925:7): [True: 0, False: 4.48k]
  ------------------
  926|      0|    prefetch_off = 0;
  927|      0|    prefetch_len = static_cast<size_t>(file_size);
  928|  4.48k|  } else {
  929|  4.48k|    prefetch_off = static_cast<size_t>(file_size - tail_prefetch_size);
  930|  4.48k|    prefetch_len = tail_prefetch_size;
  931|  4.48k|  }
  932|       |
  933|       |#ifndef NDEBUG
  934|       |  std::pair<size_t*, size_t*> prefetch_off_len_pair = {&prefetch_off,
  935|       |                                                       &prefetch_len};
  936|       |  TEST_SYNC_POINT_CALLBACK("BlockBasedTable::Open::TailPrefetchLen",
  937|       |                           &prefetch_off_len_pair);
  938|       |#endif  // NDEBUG
  939|       |
  940|  4.48k|  IOOptions opts;
  941|  4.48k|  Status s = file->PrepareIOOptions(ro, opts);
  942|       |  // Try file system prefetch
  943|  4.48k|  if (s.ok() && !file->use_direct_io() && !force_direct_prefetch) {
  ------------------
  |  Branch (943:7): [True: 4.48k, False: 0]
  |  Branch (943:17): [True: 4.48k, False: 0]
  |  Branch (943:43): [True: 4.48k, False: 0]
  ------------------
  944|  4.48k|    if (!file->Prefetch(opts, prefetch_off, prefetch_len).IsNotSupported()) {
  ------------------
  |  Branch (944:9): [True: 4.48k, False: 0]
  ------------------
  945|  4.48k|      prefetch_buffer->reset(new FilePrefetchBuffer(
  946|  4.48k|          ReadaheadParams(), false /* enable */, true /* track_min_offset */));
  947|  4.48k|      return Status::OK();
  948|  4.48k|    }
  949|  4.48k|  }
  950|       |
  951|       |  // Use `FilePrefetchBuffer`
  952|      0|  prefetch_buffer->reset(new FilePrefetchBuffer(
  953|      0|      ReadaheadParams(), true /* enable */, true /* track_min_offset */,
  954|      0|      nullptr /* fs */, nullptr /* clock */, stats,
  955|      0|      /* readahead_cb */ nullptr,
  956|      0|      FilePrefetchBufferUsage::kTableOpenPrefetchTail));
  957|       |
  958|      0|  if (s.ok()) {
  ------------------
  |  Branch (958:7): [True: 0, False: 0]
  ------------------
  959|      0|    s = (*prefetch_buffer)->Prefetch(opts, file, prefetch_off, prefetch_len);
  960|      0|  }
  961|      0|  return s;
  962|  4.48k|}
_ZN7rocksdb15BlockBasedTable19ReadPropertiesBlockERKNS_11ReadOptionsEPNS_18FilePrefetchBufferEPNS_20InternalIteratorBaseINS_5SliceEEEm:
  966|  4.48k|    InternalIterator* meta_iter, const SequenceNumber largest_seqno) {
  967|  4.48k|  Status s;
  968|  4.48k|  BlockHandle handle;
  969|  4.48k|  s = FindOptionalMetaBlock(meta_iter, kPropertiesBlockName, &handle);
  970|       |
  971|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (971:7): [True: 0, False: 4.48k]
  ------------------
  972|      0|    ROCKS_LOG_WARN(rep_->ioptions.logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  973|      0|                   "Error when seeking to properties block from file: %s",
  974|      0|                   s.ToString().c_str());
  975|  4.48k|  } else if (!handle.IsNull()) {
  ------------------
  |  Branch (975:14): [True: 4.48k, False: 0]
  ------------------
  976|  4.48k|    s = meta_iter->status();
  977|  4.48k|    std::unique_ptr<TableProperties> table_properties;
  978|  4.48k|    if (s.ok()) {
  ------------------
  |  Branch (978:9): [True: 4.48k, False: 0]
  ------------------
  979|  4.48k|      s = ReadTablePropertiesHelper(
  980|  4.48k|          ro, handle, rep_->file.get(), prefetch_buffer, rep_->footer,
  981|  4.48k|          rep_->ioptions, &table_properties, nullptr /* memory_allocator */);
  982|  4.48k|    }
  983|  4.48k|    IGNORE_STATUS_IF_ERROR(s);
  984|       |
  985|  4.48k|    if (!s.ok()) {
  ------------------
  |  Branch (985:9): [True: 0, False: 4.48k]
  ------------------
  986|      0|      ROCKS_LOG_WARN(rep_->ioptions.logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  987|      0|                     "Encountered error while reading data from properties "
  988|      0|                     "block %s",
  989|      0|                     s.ToString().c_str());
  990|  4.48k|    } else {
  991|  4.48k|      assert(table_properties != nullptr);
  992|  4.48k|      rep_->table_properties = std::move(table_properties);
  993|       |
  994|  4.48k|      if (s.ok()) {
  ------------------
  |  Branch (994:11): [True: 4.48k, False: 0]
  ------------------
  995|  4.48k|        s = rep_->seqno_to_time_mapping.DecodeFrom(
  996|  4.48k|            rep_->table_properties->seqno_to_time_mapping);
  997|  4.48k|      }
  998|  4.48k|      if (!s.ok()) {
  ------------------
  |  Branch (998:11): [True: 0, False: 4.48k]
  ------------------
  999|      0|        ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1000|      0|            rep_->ioptions.logger,
 1001|      0|            "Problem reading or processing seqno-to-time mapping: %s",
 1002|      0|            s.ToString().c_str());
 1003|      0|      }
 1004|  4.48k|      rep_->blocks_maybe_compressed =
 1005|  4.48k|          rep_->table_properties->compression_name !=
 1006|  4.48k|          CompressionTypeToString(kNoCompression);
 1007|  4.48k|    }
 1008|  4.48k|  } else {
 1009|      0|    ROCKS_LOG_ERROR(rep_->ioptions.logger,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1010|      0|                    "Cannot find Properties block from file.");
 1011|      0|  }
 1012|       |
 1013|       |  // Read the table properties, if provided.
 1014|  4.48k|  if (rep_->table_properties) {
  ------------------
  |  Branch (1014:7): [True: 4.48k, False: 0]
  ------------------
 1015|  4.48k|    rep_->whole_key_filtering &=
 1016|  4.48k|        IsFeatureSupported(*(rep_->table_properties),
 1017|  4.48k|                           BlockBasedTablePropertyNames::kWholeKeyFiltering,
 1018|  4.48k|                           rep_->ioptions.logger);
 1019|  4.48k|    rep_->prefix_filtering &= IsFeatureSupported(
 1020|  4.48k|        *(rep_->table_properties),
 1021|  4.48k|        BlockBasedTablePropertyNames::kPrefixFiltering, rep_->ioptions.logger);
 1022|       |
 1023|  4.48k|    rep_->index_key_includes_seq =
 1024|  4.48k|        rep_->table_properties->index_key_is_user_key == 0;
 1025|  4.48k|    rep_->index_value_is_full =
 1026|  4.48k|        rep_->table_properties->index_value_is_delta_encoded == 0;
 1027|       |
 1028|       |    // Update index_type with the true type.
 1029|       |    // If table properties don't contain index type, we assume that the table
 1030|       |    // is in very old format and has kBinarySearch index type.
 1031|  4.48k|    auto& props = rep_->table_properties->user_collected_properties;
 1032|  4.48k|    auto index_type_pos = props.find(BlockBasedTablePropertyNames::kIndexType);
 1033|  4.48k|    if (index_type_pos != props.end()) {
  ------------------
  |  Branch (1033:9): [True: 4.48k, False: 0]
  ------------------
 1034|  4.48k|      rep_->index_type = static_cast<BlockBasedTableOptions::IndexType>(
 1035|  4.48k|          DecodeFixed32(index_type_pos->second.c_str()));
 1036|  4.48k|    }
 1037|  4.48k|    auto min_ts_pos = props.find("rocksdb.timestamp_min");
 1038|  4.48k|    if (min_ts_pos != props.end()) {
  ------------------
  |  Branch (1038:9): [True: 0, False: 4.48k]
  ------------------
 1039|      0|      rep_->min_timestamp = Slice(min_ts_pos->second);
 1040|      0|    }
 1041|  4.48k|    auto max_ts_pos = props.find("rocksdb.timestamp_max");
 1042|  4.48k|    if (max_ts_pos != props.end()) {
  ------------------
  |  Branch (1042:9): [True: 0, False: 4.48k]
  ------------------
 1043|      0|      rep_->max_timestamp = Slice(max_ts_pos->second);
 1044|      0|    }
 1045|       |
 1046|  4.48k|    rep_->index_has_first_key =
 1047|  4.48k|        rep_->index_type == BlockBasedTableOptions::kBinarySearchWithFirstKey;
 1048|       |
 1049|  4.48k|    s = GetGlobalSequenceNumber(*(rep_->table_properties), largest_seqno,
 1050|  4.48k|                                &(rep_->global_seqno));
 1051|  4.48k|    if (!s.ok()) {
  ------------------
  |  Branch (1051:9): [True: 0, False: 4.48k]
  ------------------
 1052|      0|      ROCKS_LOG_ERROR(rep_->ioptions.logger, "%s", s.ToString().c_str());
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1053|      0|    }
 1054|  4.48k|  }
 1055|  4.48k|  return s;
 1056|  4.48k|}
_ZN7rocksdb15BlockBasedTable17ReadRangeDelBlockERKNS_11ReadOptionsEPNS_18FilePrefetchBufferEPNS_20InternalIteratorBaseINS_5SliceEEERKNS_21InternalKeyComparatorEPNS_23BlockCacheLookupContextE:
 1062|  4.48k|    BlockCacheLookupContext* lookup_context) {
 1063|  4.48k|  Status s;
 1064|  4.48k|  BlockHandle range_del_handle;
 1065|  4.48k|  s = FindOptionalMetaBlock(meta_iter, kRangeDelBlockName, &range_del_handle);
 1066|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (1066:7): [True: 0, False: 4.48k]
  ------------------
 1067|      0|    ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1068|      0|        rep_->ioptions.logger,
 1069|      0|        "Error when seeking to range delete tombstones block from file: %s",
 1070|      0|        s.ToString().c_str());
 1071|  4.48k|  } else if (!range_del_handle.IsNull()) {
  ------------------
  |  Branch (1071:14): [True: 2.90k, False: 1.57k]
  ------------------
 1072|  2.90k|    Status tmp_status;
 1073|  2.90k|    std::unique_ptr<InternalIterator> iter(NewDataBlockIterator<DataBlockIter>(
 1074|  2.90k|        read_options, range_del_handle,
 1075|  2.90k|        /*input_iter=*/nullptr, BlockType::kRangeDeletion,
 1076|  2.90k|        /*get_context=*/nullptr, lookup_context, prefetch_buffer,
 1077|  2.90k|        /*for_compaction= */ false, /*async_read= */ false, tmp_status,
 1078|  2.90k|        /*use_block_cache_for_lookup=*/true));
 1079|  2.90k|    assert(iter != nullptr);
 1080|  2.90k|    s = iter->status();
 1081|  2.90k|    if (!s.ok()) {
  ------------------
  |  Branch (1081:9): [True: 0, False: 2.90k]
  ------------------
 1082|      0|      ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1083|      0|          rep_->ioptions.logger,
 1084|      0|          "Encountered error while reading data from range del block %s",
 1085|      0|          s.ToString().c_str());
 1086|      0|      IGNORE_STATUS_IF_ERROR(s);
 1087|  2.90k|    } else {
 1088|  2.90k|      std::vector<SequenceNumber> snapshots;
 1089|       |      // When user defined timestamps are not persisted, the range tombstone end
 1090|       |      // key read from the data block doesn't include user timestamp.
 1091|       |      // The range tombstone start key should already include user timestamp as
 1092|       |      // it's handled at block parsing level in the same way as the other data
 1093|       |      // blocks.
 1094|  2.90k|      rep_->fragmented_range_dels =
 1095|  2.90k|          std::make_shared<FragmentedRangeTombstoneList>(
 1096|  2.90k|              std::move(iter), internal_comparator, false /*for_compaction=*/,
 1097|  2.90k|              snapshots, rep_->user_defined_timestamps_persisted);
 1098|  2.90k|    }
 1099|  2.90k|  }
 1100|  4.48k|  return s;
 1101|  4.48k|}
_ZN7rocksdb15BlockBasedTable28PrefetchIndexAndFilterBlocksERKNS_11ReadOptionsEPNS_18FilePrefetchBufferEPNS_20InternalIteratorBaseINS_5SliceEEEPS0_bRKNS_22BlockBasedTableOptionsEimmPNS_23BlockCacheLookupContextE:
 1108|  4.48k|    BlockCacheLookupContext* lookup_context) {
 1109|       |  // Find filter handle and filter type
 1110|  4.48k|  if (rep_->filter_policy) {
  ------------------
  |  Branch (1110:7): [True: 0, False: 4.48k]
  ------------------
 1111|      0|    auto name = rep_->filter_policy->CompatibilityName();
 1112|      0|    bool builtin_compatible =
 1113|      0|        strcmp(name, BuiltinFilterPolicy::kCompatibilityName()) == 0;
 1114|       |
 1115|      0|    for (const auto& [filter_type, prefix] :
  ------------------
  |  Branch (1115:44): [True: 0, False: 0]
  ------------------
 1116|      0|         {std::make_pair(Rep::FilterType::kFullFilter, kFullFilterBlockPrefix),
 1117|      0|          std::make_pair(Rep::FilterType::kPartitionedFilter,
 1118|      0|                         kPartitionedFilterBlockPrefix),
 1119|      0|          std::make_pair(Rep::FilterType::kNoFilter,
 1120|      0|                         kObsoleteFilterBlockPrefix)}) {
 1121|      0|      if (builtin_compatible) {
  ------------------
  |  Branch (1121:11): [True: 0, False: 0]
  ------------------
 1122|       |        // This code is only here to deal with a hiccup in early 7.0.x where
 1123|       |        // there was an unintentional name change in the SST files metadata.
 1124|       |        // It should be OK to remove this in the future (late 2022) and just
 1125|       |        // have the 'else' code.
 1126|       |        // NOTE: the test:: names below are likely not needed but included
 1127|       |        // out of caution
 1128|      0|        static const std::unordered_set<std::string> kBuiltinNameAndAliases = {
 1129|      0|            BuiltinFilterPolicy::kCompatibilityName(),
 1130|      0|            test::LegacyBloomFilterPolicy::kClassName(),
 1131|      0|            test::FastLocalBloomFilterPolicy::kClassName(),
 1132|      0|            test::Standard128RibbonFilterPolicy::kClassName(),
 1133|      0|            "rocksdb.internal.DeprecatedBlockBasedBloomFilter",
 1134|      0|            BloomFilterPolicy::kClassName(),
 1135|      0|            RibbonFilterPolicy::kClassName(),
 1136|      0|        };
 1137|       |
 1138|       |        // For efficiency, do a prefix seek and see if the first match is
 1139|       |        // good.
 1140|      0|        meta_iter->Seek(prefix);
 1141|      0|        if (meta_iter->status().ok() && meta_iter->Valid()) {
  ------------------
  |  Branch (1141:13): [True: 0, False: 0]
  |  Branch (1141:13): [True: 0, False: 0]
  |  Branch (1141:41): [True: 0, False: 0]
  ------------------
 1142|      0|          Slice key = meta_iter->key();
 1143|      0|          if (key.starts_with(prefix)) {
  ------------------
  |  Branch (1143:15): [True: 0, False: 0]
  ------------------
 1144|      0|            key.remove_prefix(prefix.size());
 1145|      0|            if (kBuiltinNameAndAliases.find(key.ToString()) !=
  ------------------
  |  Branch (1145:17): [True: 0, False: 0]
  ------------------
 1146|      0|                kBuiltinNameAndAliases.end()) {
 1147|      0|              Slice v = meta_iter->value();
 1148|      0|              Status s = rep_->filter_handle.DecodeFrom(&v);
 1149|      0|              if (s.ok()) {
  ------------------
  |  Branch (1149:19): [True: 0, False: 0]
  ------------------
 1150|      0|                rep_->filter_type = filter_type;
 1151|      0|                if (filter_type == Rep::FilterType::kNoFilter) {
  ------------------
  |  Branch (1151:21): [True: 0, False: 0]
  ------------------
 1152|      0|                  ROCKS_LOG_WARN(rep_->ioptions.logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1153|      0|                                 "Detected obsolete filter type in %s. Read "
 1154|      0|                                 "performance might suffer until DB is fully "
 1155|      0|                                 "re-compacted.",
 1156|      0|                                 rep_->file->file_name().c_str());
 1157|      0|                }
 1158|      0|                break;
 1159|      0|              }
 1160|      0|            }
 1161|      0|          }
 1162|      0|        }
 1163|      0|      } else {
 1164|      0|        std::string filter_block_key = prefix + name;
 1165|      0|        if (FindMetaBlock(meta_iter, filter_block_key, &rep_->filter_handle)
  ------------------
  |  Branch (1165:13): [True: 0, False: 0]
  ------------------
 1166|      0|                .ok()) {
 1167|      0|          rep_->filter_type = filter_type;
 1168|      0|          if (filter_type == Rep::FilterType::kNoFilter) {
  ------------------
  |  Branch (1168:15): [True: 0, False: 0]
  ------------------
 1169|      0|            ROCKS_LOG_WARN(
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1170|      0|                rep_->ioptions.logger,
 1171|      0|                "Detected obsolete filter type in %s. Read performance might "
 1172|      0|                "suffer until DB is fully re-compacted.",
 1173|      0|                rep_->file->file_name().c_str());
 1174|      0|          }
 1175|      0|          break;
 1176|      0|        }
 1177|      0|      }
 1178|      0|    }
 1179|      0|  }
 1180|       |  // Partition filters cannot be enabled without partition indexes
 1181|  4.48k|  assert(rep_->filter_type != Rep::FilterType::kPartitionedFilter ||
 1182|  4.48k|         rep_->index_type == BlockBasedTableOptions::kTwoLevelIndexSearch);
 1183|       |
 1184|       |  // Find compression dictionary handle
 1185|  4.48k|  Status s = FindOptionalMetaBlock(meta_iter, kCompressionDictBlockName,
 1186|  4.48k|                                   &rep_->compression_dict_handle);
 1187|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (1187:7): [True: 0, False: 4.48k]
  ------------------
 1188|      0|    return s;
 1189|      0|  }
 1190|       |
 1191|  4.48k|  BlockBasedTableOptions::IndexType index_type = rep_->index_type;
 1192|       |
 1193|  4.48k|  const bool use_cache = table_options.cache_index_and_filter_blocks;
 1194|       |
 1195|  4.48k|  const bool maybe_flushed =
 1196|  4.48k|      level == 0 && file_size <= max_file_size_for_l0_meta_pin;
  ------------------
  |  Branch (1196:7): [True: 4.48k, False: 0]
  |  Branch (1196:21): [True: 4.48k, False: 0]
  ------------------
 1197|  4.48k|  std::function<bool(PinningTier, PinningTier)> is_pinned =
 1198|  4.48k|      [maybe_flushed, &is_pinned](PinningTier pinning_tier,
 1199|  4.48k|                                  PinningTier fallback_pinning_tier) {
 1200|       |        // Fallback to fallback would lead to infinite recursion. Disallow it.
 1201|  4.48k|        assert(fallback_pinning_tier != PinningTier::kFallback);
 1202|       |
 1203|  4.48k|        switch (pinning_tier) {
 1204|  4.48k|          case PinningTier::kFallback:
 1205|  4.48k|            return is_pinned(fallback_pinning_tier,
 1206|  4.48k|                             PinningTier::kNone /* fallback_pinning_tier */);
 1207|  4.48k|          case PinningTier::kNone:
 1208|  4.48k|            return false;
 1209|  4.48k|          case PinningTier::kFlushedAndSimilar:
 1210|  4.48k|            return maybe_flushed;
 1211|  4.48k|          case PinningTier::kAll:
 1212|  4.48k|            return true;
 1213|  4.48k|        };
 1214|       |
 1215|       |        // In GCC, this is needed to suppress `control reaches end of non-void
 1216|       |        // function [-Werror=return-type]`.
 1217|  4.48k|        assert(false);
 1218|  4.48k|        return false;
 1219|  4.48k|      };
 1220|  4.48k|  const bool pin_top_level_index = is_pinned(
 1221|  4.48k|      table_options.metadata_cache_options.top_level_index_pinning,
 1222|  4.48k|      table_options.pin_top_level_index_and_filter ? PinningTier::kAll
  ------------------
  |  Branch (1222:7): [True: 4.48k, False: 0]
  ------------------
 1223|  4.48k|                                                   : PinningTier::kNone);
 1224|  4.48k|  const bool pin_partition =
 1225|  4.48k|      is_pinned(table_options.metadata_cache_options.partition_pinning,
 1226|  4.48k|                table_options.pin_l0_filter_and_index_blocks_in_cache
  ------------------
  |  Branch (1226:17): [True: 0, False: 4.48k]
  ------------------
 1227|  4.48k|                    ? PinningTier::kFlushedAndSimilar
 1228|  4.48k|                    : PinningTier::kNone);
 1229|  4.48k|  const bool pin_unpartitioned =
 1230|  4.48k|      is_pinned(table_options.metadata_cache_options.unpartitioned_pinning,
 1231|  4.48k|                table_options.pin_l0_filter_and_index_blocks_in_cache
  ------------------
  |  Branch (1231:17): [True: 0, False: 4.48k]
  ------------------
 1232|  4.48k|                    ? PinningTier::kFlushedAndSimilar
 1233|  4.48k|                    : PinningTier::kNone);
 1234|       |
 1235|       |  // pin the first level of index
 1236|  4.48k|  const bool pin_index =
 1237|  4.48k|      index_type == BlockBasedTableOptions::kTwoLevelIndexSearch
  ------------------
  |  Branch (1237:7): [True: 0, False: 4.48k]
  ------------------
 1238|  4.48k|          ? pin_top_level_index
 1239|  4.48k|          : pin_unpartitioned;
 1240|       |  // prefetch the first level of index
 1241|       |  // WART: this might be redundant (unnecessary cache hit) if !pin_index,
 1242|       |  // depending on prepopulate_block_cache option
 1243|  4.48k|  const bool prefetch_index = prefetch_all || pin_index;
  ------------------
  |  Branch (1243:31): [True: 4.48k, False: 0]
  |  Branch (1243:47): [True: 0, False: 0]
  ------------------
 1244|       |
 1245|  4.48k|  std::unique_ptr<IndexReader> index_reader;
 1246|  4.48k|  s = new_table->CreateIndexReader(ro, prefetch_buffer, meta_iter, use_cache,
 1247|  4.48k|                                   prefetch_index, pin_index, lookup_context,
 1248|  4.48k|                                   &index_reader);
 1249|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (1249:7): [True: 0, False: 4.48k]
  ------------------
 1250|      0|    return s;
 1251|      0|  }
 1252|       |
 1253|  4.48k|  rep_->index_reader = std::move(index_reader);
 1254|       |
 1255|       |  // The partitions of partitioned index are always stored in cache. They
 1256|       |  // are hence follow the configuration for pin and prefetch regardless of
 1257|       |  // the value of cache_index_and_filter_blocks
 1258|  4.48k|  if (prefetch_all || pin_partition) {
  ------------------
  |  Branch (1258:7): [True: 4.48k, False: 0]
  |  Branch (1258:23): [True: 0, False: 0]
  ------------------
 1259|  4.48k|    s = rep_->index_reader->CacheDependencies(ro, pin_partition,
 1260|  4.48k|                                              prefetch_buffer);
 1261|  4.48k|  }
 1262|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (1262:7): [True: 0, False: 4.48k]
  ------------------
 1263|      0|    return s;
 1264|      0|  }
 1265|       |
 1266|       |  // pin the first level of filter
 1267|  4.48k|  const bool pin_filter =
 1268|  4.48k|      rep_->filter_type == Rep::FilterType::kPartitionedFilter
  ------------------
  |  Branch (1268:7): [True: 0, False: 4.48k]
  ------------------
 1269|  4.48k|          ? pin_top_level_index
 1270|  4.48k|          : pin_unpartitioned;
 1271|       |  // prefetch the first level of filter
 1272|       |  // WART: this might be redundant (unnecessary cache hit) if !pin_filter,
 1273|       |  // depending on prepopulate_block_cache option
 1274|  4.48k|  const bool prefetch_filter = prefetch_all || pin_filter;
  ------------------
  |  Branch (1274:32): [True: 4.48k, False: 0]
  |  Branch (1274:48): [True: 0, False: 0]
  ------------------
 1275|       |
 1276|  4.48k|  if (rep_->filter_policy) {
  ------------------
  |  Branch (1276:7): [True: 0, False: 4.48k]
  ------------------
 1277|      0|    auto filter = new_table->CreateFilterBlockReader(
 1278|      0|        ro, prefetch_buffer, use_cache, prefetch_filter, pin_filter,
 1279|      0|        lookup_context);
 1280|       |
 1281|      0|    if (filter) {
  ------------------
  |  Branch (1281:9): [True: 0, False: 0]
  ------------------
 1282|       |      // Refer to the comment above about paritioned indexes always being cached
 1283|      0|      if (prefetch_all || pin_partition) {
  ------------------
  |  Branch (1283:11): [True: 0, False: 0]
  |  Branch (1283:27): [True: 0, False: 0]
  ------------------
 1284|      0|        s = filter->CacheDependencies(ro, pin_partition, prefetch_buffer);
 1285|      0|        if (!s.ok()) {
  ------------------
  |  Branch (1285:13): [True: 0, False: 0]
  ------------------
 1286|      0|          return s;
 1287|      0|        }
 1288|      0|      }
 1289|      0|      rep_->filter = std::move(filter);
 1290|      0|    }
 1291|      0|  }
 1292|       |
 1293|  4.48k|  if (!rep_->compression_dict_handle.IsNull()) {
  ------------------
  |  Branch (1293:7): [True: 0, False: 4.48k]
  ------------------
 1294|      0|    std::unique_ptr<UncompressionDictReader> uncompression_dict_reader;
 1295|      0|    s = UncompressionDictReader::Create(
 1296|      0|        this, ro, prefetch_buffer, use_cache, prefetch_all || pin_unpartitioned,
  ------------------
  |  Branch (1296:47): [True: 0, False: 0]
  |  Branch (1296:63): [True: 0, False: 0]
  ------------------
 1297|      0|        pin_unpartitioned, lookup_context, &uncompression_dict_reader);
 1298|      0|    if (!s.ok()) {
  ------------------
  |  Branch (1298:9): [True: 0, False: 0]
  ------------------
 1299|      0|      return s;
 1300|      0|    }
 1301|       |
 1302|      0|    rep_->uncompression_dict_reader = std::move(uncompression_dict_reader);
 1303|      0|  }
 1304|       |
 1305|  4.48k|  assert(s.ok());
 1306|  4.48k|  return s;
 1307|  4.48k|}
_ZNK7rocksdb15BlockBasedTable18GetTablePropertiesEv:
 1312|  13.4k|    const {
 1313|  13.4k|  return rep_->table_properties;
 1314|  13.4k|}
_ZNK7rocksdb15BlockBasedTable21GetSeqnoToTimeMappingEv:
 1316|  29.5k|const SeqnoToTimeMapping& BlockBasedTable::GetSeqnoToTimeMapping() const {
 1317|  29.5k|  return rep_->seqno_to_time_mapping;
 1318|  29.5k|}
_ZN7rocksdb15BlockBasedTable18ReadMetaIndexBlockERKNS_11ReadOptionsEPNS_18FilePrefetchBufferEPNSt3__110unique_ptrINS_5BlockENS6_14default_deleteIS8_EEEEPNS7_INS_20InternalIteratorBaseINS_5SliceEEENS9_ISF_EEEE:
 1348|  4.48k|    std::unique_ptr<InternalIterator>* iter) {
 1349|       |  // TODO(sanjay): Skip this if footer.metaindex_handle() size indicates
 1350|       |  // it is an empty block.
 1351|  4.48k|  std::unique_ptr<Block_kMetaIndex> metaindex;
 1352|  4.48k|  Status s = ReadAndParseBlockFromFile(
 1353|  4.48k|      rep_->file.get(), prefetch_buffer, rep_->footer, ro,
 1354|  4.48k|      rep_->footer.metaindex_handle(), &metaindex, rep_->ioptions,
 1355|  4.48k|      rep_->create_context, true /*maybe_compressed*/,
 1356|  4.48k|      UncompressionDict::GetEmptyDict(), rep_->persistent_cache_options,
 1357|  4.48k|      GetMemoryAllocator(rep_->table_options), false /* for_compaction */,
 1358|  4.48k|      false /* async_read */);
 1359|       |
 1360|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (1360:7): [True: 0, False: 4.48k]
  ------------------
 1361|      0|    ROCKS_LOG_ERROR(rep_->ioptions.logger,
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 1362|      0|                    "Encountered error while reading data from properties"
 1363|      0|                    " block %s",
 1364|      0|                    s.ToString().c_str());
 1365|      0|    return s;
 1366|      0|  }
 1367|       |
 1368|  4.48k|  *metaindex_block = std::move(metaindex);
 1369|       |  // meta block uses bytewise comparator.
 1370|  4.48k|  iter->reset(metaindex_block->get()->NewMetaIterator());
 1371|  4.48k|  return Status::OK();
 1372|  4.48k|}
_ZNK7rocksdb15BlockBasedTable16NewIndexIteratorERKNS_11ReadOptionsEbPNS_14IndexBlockIterEPNS_10GetContextEPNS_23BlockCacheLookupContextE:
 1528|  8.96k|    BlockCacheLookupContext* lookup_context) const {
 1529|  8.96k|  assert(rep_ != nullptr);
 1530|  8.96k|  assert(rep_->index_reader != nullptr);
 1531|       |
 1532|       |  // We don't return pinned data from index blocks, so no need
 1533|       |  // to set `block_contents_pinned`.
 1534|  8.96k|  return rep_->index_reader->NewIterator(read_options, disable_prefix_seek,
 1535|  8.96k|                                         input_iter, get_context,
 1536|  8.96k|                                         lookup_context);
 1537|  8.96k|}
_ZN7rocksdb15BlockBasedTable17InitBlockIteratorINS_13DataBlockIterEEEPT_PKNS0_3RepEPNS_5BlockENS_9BlockTypeES4_b:
 1543|  11.7k|    DataBlockIter* input_iter, bool block_contents_pinned) {
 1544|  11.7k|  return block->NewDataIterator(rep->internal_comparator.user_comparator(),
 1545|  11.7k|                                rep->get_global_seqno(block_type), input_iter,
 1546|  11.7k|                                rep->ioptions.stats, block_contents_pinned,
 1547|  11.7k|                                rep->user_defined_timestamps_persisted);
 1548|  11.7k|}
_ZNK7rocksdb15BlockBasedTable22PrefixExtractorChangedEPKNS_14SliceTransformE:
 2043|  8.96k|    const SliceTransform* prefix_extractor) const {
 2044|  8.96k|  if (prefix_extractor == nullptr) {
  ------------------
  |  Branch (2044:7): [True: 8.96k, False: 0]
  ------------------
 2045|  8.96k|    return true;
 2046|  8.96k|  } else if (prefix_extractor == rep_->table_prefix_extractor.get()) {
  ------------------
  |  Branch (2046:14): [True: 0, False: 0]
  ------------------
 2047|      0|    return false;
 2048|      0|  } else {
 2049|      0|    return PrefixExtractorChangedHelper(rep_->table_properties.get(),
 2050|      0|                                        prefix_extractor);
 2051|      0|  }
 2052|  8.96k|}
_ZNK7rocksdb15BlockBasedTable13GetStatisticsEv:
 2054|  7.29k|Statistics* BlockBasedTable::GetStatistics() const {
 2055|  7.29k|  return rep_->ioptions.stats;
 2056|  7.29k|}
_ZNK7rocksdb15BlockBasedTable11IsLastLevelEv:
 2057|  8.96k|bool BlockBasedTable::IsLastLevel() const {
 2058|  8.96k|  return rep_->level == rep_->ioptions.num_levels - 1;
 2059|  8.96k|}
_ZN7rocksdb15BlockBasedTable11NewIteratorERKNS_11ReadOptionsEPKNS_14SliceTransformEPNS_5ArenaEbNS_17TableReaderCallerEmb:
 2064|  8.96k|    size_t compaction_readahead_size, bool allow_unprepared_value) {
 2065|  8.96k|  BlockCacheLookupContext lookup_context{caller};
 2066|  8.96k|  bool need_upper_bound_check =
 2067|  8.96k|      read_options.auto_prefix_mode || PrefixExtractorChanged(prefix_extractor);
  ------------------
  |  Branch (2067:7): [True: 0, False: 8.96k]
  |  Branch (2067:40): [True: 8.96k, False: 0]
  ------------------
 2068|  8.96k|  std::unique_ptr<InternalIteratorBase<IndexValue>> index_iter(NewIndexIterator(
 2069|  8.96k|      read_options,
 2070|  8.96k|      /*disable_prefix_seek=*/need_upper_bound_check &&
  ------------------
  |  Branch (2070:31): [True: 8.96k, False: 0]
  ------------------
 2071|  8.96k|          rep_->index_type == BlockBasedTableOptions::kHashSearch,
  ------------------
  |  Branch (2071:11): [True: 0, False: 8.96k]
  ------------------
 2072|  8.96k|      /*input_iter=*/nullptr, /*get_context=*/nullptr, &lookup_context));
 2073|  8.96k|  if (arena == nullptr) {
  ------------------
  |  Branch (2073:7): [True: 4.48k, False: 4.48k]
  ------------------
 2074|  4.48k|    return new BlockBasedTableIterator(
 2075|  4.48k|        this, read_options, rep_->internal_comparator, std::move(index_iter),
 2076|  4.48k|        !skip_filters && !read_options.total_order_seek &&
  ------------------
  |  Branch (2076:9): [True: 4.48k, False: 0]
  |  Branch (2076:26): [True: 4.48k, False: 0]
  ------------------
 2077|  4.48k|            prefix_extractor != nullptr,
  ------------------
  |  Branch (2077:13): [True: 0, False: 4.48k]
  ------------------
 2078|  4.48k|        need_upper_bound_check, prefix_extractor, caller,
 2079|  4.48k|        compaction_readahead_size, allow_unprepared_value);
 2080|  4.48k|  } else {
 2081|  4.48k|    auto* mem = arena->AllocateAligned(sizeof(BlockBasedTableIterator));
 2082|  4.48k|    return new (mem) BlockBasedTableIterator(
 2083|  4.48k|        this, read_options, rep_->internal_comparator, std::move(index_iter),
 2084|  4.48k|        !skip_filters && !read_options.total_order_seek &&
  ------------------
  |  Branch (2084:9): [True: 4.48k, False: 0]
  |  Branch (2084:26): [True: 4.48k, False: 0]
  ------------------
 2085|  4.48k|            prefix_extractor != nullptr,
  ------------------
  |  Branch (2085:13): [True: 0, False: 4.48k]
  ------------------
 2086|  4.48k|        need_upper_bound_check, prefix_extractor, caller,
 2087|  4.48k|        compaction_readahead_size, allow_unprepared_value);
 2088|  4.48k|  }
 2089|  8.96k|}
_ZN7rocksdb15BlockBasedTable25NewRangeTombstoneIteratorERKNS_11ReadOptionsE:
 2092|  4.48k|    const ReadOptions& read_options) {
 2093|  4.48k|  if (rep_->fragmented_range_dels == nullptr) {
  ------------------
  |  Branch (2093:7): [True: 1.57k, False: 2.90k]
  ------------------
 2094|  1.57k|    return nullptr;
 2095|  1.57k|  }
 2096|  2.90k|  SequenceNumber snapshot = kMaxSequenceNumber;
 2097|  2.90k|  if (read_options.snapshot != nullptr) {
  ------------------
  |  Branch (2097:7): [True: 0, False: 2.90k]
  ------------------
 2098|      0|    snapshot = read_options.snapshot->GetSequenceNumber();
 2099|      0|  }
 2100|  2.90k|  return new FragmentedRangeTombstoneIterator(rep_->fragmented_range_dels,
 2101|  2.90k|                                              rep_->internal_comparator,
 2102|  2.90k|                                              snapshot, read_options.timestamp);
 2103|  4.48k|}
_ZN7rocksdb15BlockBasedTable17CreateIndexReaderERKNS_11ReadOptionsEPNS_18FilePrefetchBufferEPNS_20InternalIteratorBaseINS_5SliceEEEbbbPNS_23BlockCacheLookupContextEPNSt3__110unique_ptrINS0_11IndexReaderENSC_14default_deleteISE_EEEE:
 2784|  4.48k|    std::unique_ptr<IndexReader>* index_reader) {
 2785|  4.48k|  if (FormatVersionUsesIndexHandleInFooter(rep_->footer.format_version())) {
  ------------------
  |  Branch (2785:7): [True: 0, False: 4.48k]
  ------------------
 2786|      0|    rep_->index_handle = rep_->footer.index_handle();
 2787|  4.48k|  } else {
 2788|  4.48k|    Status s = FindMetaBlock(meta_iter, kIndexBlockName, &rep_->index_handle);
 2789|  4.48k|    if (!s.ok()) {
  ------------------
  |  Branch (2789:9): [True: 0, False: 4.48k]
  ------------------
 2790|      0|      return s;
 2791|      0|    }
 2792|  4.48k|  }
 2793|       |
 2794|  4.48k|  switch (rep_->index_type) {
 2795|      0|    case BlockBasedTableOptions::kTwoLevelIndexSearch: {
  ------------------
  |  Branch (2795:5): [True: 0, False: 4.48k]
  ------------------
 2796|      0|      return PartitionIndexReader::Create(this, ro, prefetch_buffer, use_cache,
 2797|      0|                                          prefetch, pin, lookup_context,
 2798|      0|                                          index_reader);
 2799|      0|    }
 2800|  4.48k|    case BlockBasedTableOptions::kBinarySearch:
  ------------------
  |  Branch (2800:5): [True: 4.48k, False: 0]
  ------------------
 2801|  4.48k|      FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|  4.48k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 2802|  4.48k|    case BlockBasedTableOptions::kBinarySearchWithFirstKey: {
  ------------------
  |  Branch (2802:5): [True: 0, False: 4.48k]
  ------------------
 2803|  4.48k|      return BinarySearchIndexReader::Create(this, ro, prefetch_buffer,
 2804|  4.48k|                                             use_cache, prefetch, pin,
 2805|  4.48k|                                             lookup_context, index_reader);
 2806|  4.48k|    }
 2807|      0|    case BlockBasedTableOptions::kHashSearch: {
  ------------------
  |  Branch (2807:5): [True: 0, False: 4.48k]
  ------------------
 2808|      0|      if (!rep_->table_prefix_extractor) {
  ------------------
  |  Branch (2808:11): [True: 0, False: 0]
  ------------------
 2809|      0|        ROCKS_LOG_WARN(rep_->ioptions.logger,
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
 2810|      0|                       "Missing prefix extractor for hash index. Fall back to"
 2811|      0|                       " binary search index.");
 2812|      0|        return BinarySearchIndexReader::Create(this, ro, prefetch_buffer,
 2813|      0|                                               use_cache, prefetch, pin,
 2814|      0|                                               lookup_context, index_reader);
 2815|      0|      } else {
 2816|      0|        return HashIndexReader::Create(this, ro, prefetch_buffer, meta_iter,
 2817|      0|                                       use_cache, prefetch, pin, lookup_context,
 2818|      0|                                       index_reader);
 2819|      0|      }
 2820|      0|    }
 2821|      0|    default: {
  ------------------
  |  Branch (2821:5): [True: 0, False: 4.48k]
  ------------------
 2822|      0|      std::string error_message =
 2823|      0|          "Unrecognized index type: " + std::to_string(rep_->index_type);
 2824|      0|      return Status::InvalidArgument(error_message.c_str());
 2825|      0|    }
 2826|  4.48k|  }
 2827|  4.48k|}
_ZN7rocksdb15BlockBasedTable12MarkObsoleteEj:
 3292|  4.48k|void BlockBasedTable::MarkObsolete(uint32_t uncache_aggressiveness) {
 3293|  4.48k|  rep_->uncache_aggressiveness.StoreRelaxed(uncache_aggressiveness);
 3294|  4.48k|}
_ZNK7rocksdb15BlockBasedTable13RetrieveBlockINS_11Block_kDataEEENSt3__19enable_ifIXooeqsrT_15kCacheEntryRoleLNS_14CacheEntryRoleE13ELb1EENS_6StatusEE4typeEPNS_18FilePrefetchBufferERKNS_11ReadOptionsERKNS_11BlockHandleERKNS_17UncompressionDictEPNS_13CachableEntryIS5_EEPNS_10GetContextEPNS_23BlockCacheLookupContextEbbbb:
 1887|  11.7k|    bool use_cache, bool async_read, bool use_block_cache_for_lookup) const {
 1888|  11.7k|  assert(out_parsed_block);
 1889|  11.7k|  assert(out_parsed_block->IsEmpty());
 1890|       |
 1891|  11.7k|  Status s;
 1892|  11.7k|  if (use_cache) {
  ------------------
  |  Branch (1892:7): [True: 11.7k, False: 0]
  ------------------
 1893|  11.7k|    s = MaybeReadBlockAndLoadToCache(
 1894|  11.7k|        prefetch_buffer, ro, handle, uncompression_dict, for_compaction,
 1895|  11.7k|        out_parsed_block, get_context, lookup_context,
 1896|  11.7k|        /*contents=*/nullptr, async_read, use_block_cache_for_lookup);
 1897|       |
 1898|  11.7k|    if (!s.ok()) {
  ------------------
  |  Branch (1898:9): [True: 0, False: 11.7k]
  ------------------
 1899|      0|      return s;
 1900|      0|    }
 1901|       |
 1902|  11.7k|    if (out_parsed_block->GetValue() != nullptr ||
  ------------------
  |  Branch (1902:9): [True: 11.7k, False: 0]
  ------------------
 1903|  11.7k|        out_parsed_block->GetCacheHandle() != nullptr) {
  ------------------
  |  Branch (1903:9): [True: 0, False: 0]
  ------------------
 1904|  11.7k|      assert(s.ok());
 1905|  11.7k|      return s;
 1906|  11.7k|    }
 1907|  11.7k|  }
 1908|       |
 1909|      0|  assert(out_parsed_block->IsEmpty());
 1910|       |
 1911|      0|  const bool no_io = ro.read_tier == kBlockCacheTier;
 1912|      0|  if (no_io) {
  ------------------
  |  Branch (1912:7): [True: 0, False: 0]
  ------------------
 1913|      0|    return Status::Incomplete("no blocking io");
 1914|      0|  }
 1915|       |
 1916|      0|  const bool maybe_compressed =
 1917|      0|      TBlocklike::kBlockType != BlockType::kFilter &&
  ------------------
  |  Branch (1917:7): [Folded - Ignored]
  ------------------
 1918|      0|      TBlocklike::kBlockType != BlockType::kCompressionDictionary &&
  ------------------
  |  Branch (1918:7): [Folded - Ignored]
  ------------------
 1919|      0|      rep_->blocks_maybe_compressed;
  ------------------
  |  Branch (1919:7): [True: 0, False: 0]
  ------------------
 1920|      0|  std::unique_ptr<TBlocklike> block;
 1921|       |
 1922|      0|  {
 1923|      0|    Histograms histogram =
 1924|      0|        for_compaction ? READ_BLOCK_COMPACTION_MICROS : READ_BLOCK_GET_MICROS;
  ------------------
  |  Branch (1924:9): [True: 0, False: 0]
  ------------------
 1925|      0|    StopWatch sw(rep_->ioptions.clock, rep_->ioptions.stats, histogram);
 1926|      0|    s = ReadAndParseBlockFromFile(
 1927|      0|        rep_->file.get(), prefetch_buffer, rep_->footer, ro, handle, &block,
 1928|      0|        rep_->ioptions, rep_->create_context, maybe_compressed,
 1929|      0|        uncompression_dict, rep_->persistent_cache_options,
 1930|      0|        GetMemoryAllocator(rep_->table_options), for_compaction, async_read);
 1931|       |
 1932|      0|    if (get_context) {
  ------------------
  |  Branch (1932:9): [True: 0, False: 0]
  ------------------
 1933|      0|      switch (TBlocklike::kBlockType) {
 1934|      0|        case BlockType::kIndex:
  ------------------
  |  Branch (1934:9): [True: 0, False: 0]
  ------------------
 1935|      0|          ++(get_context->get_context_stats_.num_index_read);
 1936|      0|          break;
 1937|      0|        case BlockType::kFilter:
  ------------------
  |  Branch (1937:9): [True: 0, False: 0]
  ------------------
 1938|      0|        case BlockType::kFilterPartitionIndex:
  ------------------
  |  Branch (1938:9): [True: 0, False: 0]
  ------------------
 1939|      0|          ++(get_context->get_context_stats_.num_filter_read);
 1940|      0|          break;
 1941|      0|        default:
  ------------------
  |  Branch (1941:9): [True: 0, False: 0]
  ------------------
 1942|      0|          break;
 1943|      0|      }
 1944|      0|    }
 1945|      0|  }
 1946|       |
 1947|      0|  if (!s.ok()) {
  ------------------
  |  Branch (1947:7): [True: 0, False: 0]
  ------------------
 1948|      0|    return s;
 1949|      0|  }
 1950|       |
 1951|      0|  out_parsed_block->SetOwnedValue(std::move(block));
 1952|       |
 1953|      0|  assert(s.ok());
 1954|      0|  return s;
 1955|      0|}
_ZNK7rocksdb15BlockBasedTable28MaybeReadBlockAndLoadToCacheINS_11Block_kDataEEENSt3__19enable_ifIXooeqsrT_15kCacheEntryRoleLNS_14CacheEntryRoleE13ELb1EENS_6StatusEE4typeEPNS_18FilePrefetchBufferERKNS_11ReadOptionsERKNS_11BlockHandleERKNS_17UncompressionDictEbPNS_13CachableEntryIS5_EEPNS_10GetContextEPNS_23BlockCacheLookupContextEPNS_13BlockContentsEbb:
 1631|  11.7k|    bool use_block_cache_for_lookup) const {
 1632|  11.7k|  assert(out_parsed_block != nullptr);
 1633|  11.7k|  const bool no_io = (ro.read_tier == kBlockCacheTier);
 1634|  11.7k|  BlockCacheInterface<TBlocklike> block_cache{
 1635|  11.7k|      rep_->table_options.block_cache.get()};
 1636|       |  // First, try to get the block from the cache
 1637|       |  //
 1638|       |  // If either block cache is enabled, we'll try to read from it.
 1639|  11.7k|  Status s;
 1640|  11.7k|  CacheKey key_data;
 1641|  11.7k|  Slice key;
 1642|  11.7k|  bool is_cache_hit = false;
 1643|  11.7k|  if (block_cache) {
  ------------------
  |  Branch (1643:7): [True: 11.7k, False: 0]
  ------------------
 1644|       |    // create key for block cache
 1645|  11.7k|    key_data = GetCacheKey(rep_->base_cache_key, handle);
 1646|  11.7k|    key = key_data.AsSlice();
 1647|       |
 1648|  11.7k|    if (!contents) {
  ------------------
  |  Branch (1648:9): [True: 11.7k, False: 0]
  ------------------
 1649|  11.7k|      if (use_block_cache_for_lookup) {
  ------------------
  |  Branch (1649:11): [True: 11.7k, False: 0]
  ------------------
 1650|  11.7k|        s = GetDataBlockFromCache(key, block_cache, out_parsed_block,
 1651|  11.7k|                                  get_context, &uncompression_dict);
 1652|       |        // Value could still be null at this point, so check the cache handle
 1653|       |        // and update the read pattern for prefetching
 1654|  11.7k|        if (out_parsed_block->GetValue() ||
  ------------------
  |  Branch (1654:13): [True: 0, False: 11.7k]
  ------------------
 1655|  11.7k|            out_parsed_block->GetCacheHandle()) {
  ------------------
  |  Branch (1655:13): [True: 0, False: 11.7k]
  ------------------
 1656|       |          // TODO(haoyu): Differentiate cache hit on uncompressed block cache
 1657|       |          // and compressed block cache.
 1658|      0|          is_cache_hit = true;
 1659|      0|          if (prefetch_buffer) {
  ------------------
  |  Branch (1659:15): [True: 0, False: 0]
  ------------------
 1660|       |            // Update the block details so that PrefetchBuffer can use the read
 1661|       |            // pattern to determine if reads are sequential or not for
 1662|       |            // prefetching. It should also take in account blocks read from
 1663|       |            // cache.
 1664|      0|            prefetch_buffer->UpdateReadPattern(
 1665|      0|                handle.offset(), BlockSizeWithTrailer(handle),
 1666|      0|                ro.adaptive_readahead /*decrease_readahead_size*/);
 1667|      0|          }
 1668|      0|        }
 1669|  11.7k|      }
 1670|  11.7k|    }
 1671|       |
 1672|       |    // Can't find the block from the cache. If I/O is allowed, read from the
 1673|       |    // file.
 1674|  11.7k|    if (out_parsed_block->GetValue() == nullptr &&
  ------------------
  |  Branch (1674:9): [True: 11.7k, False: 0]
  ------------------
 1675|  11.7k|        out_parsed_block->GetCacheHandle() == nullptr && !no_io &&
  ------------------
  |  Branch (1675:9): [True: 11.7k, False: 0]
  |  Branch (1675:58): [True: 11.7k, False: 0]
  ------------------
 1676|  11.7k|        ro.fill_cache) {
  ------------------
  |  Branch (1676:9): [True: 11.7k, False: 0]
  ------------------
 1677|  11.7k|      Statistics* statistics = rep_->ioptions.stats;
 1678|  11.7k|      const bool maybe_compressed =
 1679|  11.7k|          TBlocklike::kBlockType != BlockType::kFilter &&
  ------------------
  |  Branch (1679:11): [Folded - Ignored]
  ------------------
 1680|  11.7k|          TBlocklike::kBlockType != BlockType::kCompressionDictionary &&
  ------------------
  |  Branch (1680:11): [Folded - Ignored]
  ------------------
 1681|  11.7k|          rep_->blocks_maybe_compressed;
  ------------------
  |  Branch (1681:11): [True: 0, False: 11.7k]
  ------------------
 1682|       |      // This flag, if true, tells BlockFetcher to return the uncompressed
 1683|       |      // block when ReadBlockContents() is called.
 1684|  11.7k|      const bool do_uncompress = maybe_compressed;
 1685|  11.7k|      CompressionType contents_comp_type;
 1686|       |      // Maybe serialized or uncompressed
 1687|  11.7k|      BlockContents tmp_contents;
 1688|  11.7k|      BlockContents uncomp_contents;
 1689|  11.7k|      BlockContents comp_contents;
 1690|  11.7k|      if (!contents) {
  ------------------
  |  Branch (1690:11): [True: 11.7k, False: 0]
  ------------------
 1691|  11.7k|        Histograms histogram = for_compaction ? READ_BLOCK_COMPACTION_MICROS
  ------------------
  |  Branch (1691:32): [True: 0, False: 11.7k]
  ------------------
 1692|  11.7k|                                              : READ_BLOCK_GET_MICROS;
 1693|  11.7k|        StopWatch sw(rep_->ioptions.clock, statistics, histogram);
 1694|       |        // Setting do_uncompress to false may cause an extra mempcy in the
 1695|       |        // following cases -
 1696|       |        // 1. Compression is enabled, but block is not actually compressed
 1697|       |        // 2. Compressed block is in the prefetch buffer
 1698|       |        // 3. Direct IO
 1699|       |        //
 1700|       |        // It would also cause a memory allocation to be used rather than
 1701|       |        // stack if the compressed block size is < 5KB
 1702|  11.7k|        BlockFetcher block_fetcher(
 1703|  11.7k|            rep_->file.get(), prefetch_buffer, rep_->footer, ro, handle,
 1704|  11.7k|            &tmp_contents, rep_->ioptions, do_uncompress, maybe_compressed,
 1705|  11.7k|            TBlocklike::kBlockType, uncompression_dict,
 1706|  11.7k|            rep_->persistent_cache_options,
 1707|  11.7k|            GetMemoryAllocator(rep_->table_options),
 1708|  11.7k|            /*allocator=*/nullptr);
 1709|       |
 1710|       |        // If prefetch_buffer is not allocated, it will fallback to synchronous
 1711|       |        // reading of block contents.
 1712|  11.7k|        if (async_read && prefetch_buffer != nullptr) {
  ------------------
  |  Branch (1712:13): [True: 0, False: 11.7k]
  |  Branch (1712:27): [True: 0, False: 0]
  ------------------
 1713|      0|          s = block_fetcher.ReadAsyncBlockContents();
 1714|      0|          if (!s.ok()) {
  ------------------
  |  Branch (1714:15): [True: 0, False: 0]
  ------------------
 1715|      0|            return s;
 1716|      0|          }
 1717|  11.7k|        } else {
 1718|  11.7k|          s = block_fetcher.ReadBlockContents();
 1719|  11.7k|        }
 1720|       |
 1721|  11.7k|        contents_comp_type = block_fetcher.get_compression_type();
 1722|  11.7k|        if (get_context) {
  ------------------
  |  Branch (1722:13): [True: 0, False: 11.7k]
  ------------------
 1723|      0|          switch (TBlocklike::kBlockType) {
 1724|      0|            case BlockType::kIndex:
  ------------------
  |  Branch (1724:13): [True: 0, False: 0]
  ------------------
 1725|      0|              ++get_context->get_context_stats_.num_index_read;
 1726|      0|              break;
 1727|      0|            case BlockType::kFilter:
  ------------------
  |  Branch (1727:13): [True: 0, False: 0]
  ------------------
 1728|      0|            case BlockType::kFilterPartitionIndex:
  ------------------
  |  Branch (1728:13): [True: 0, False: 0]
  ------------------
 1729|      0|              ++get_context->get_context_stats_.num_filter_read;
 1730|      0|              break;
 1731|      0|            default:
  ------------------
  |  Branch (1731:13): [True: 0, False: 0]
  ------------------
 1732|      0|              break;
 1733|      0|          }
 1734|      0|        }
 1735|  11.7k|        if (s.ok()) {
  ------------------
  |  Branch (1735:13): [True: 11.7k, False: 0]
  ------------------
 1736|  11.7k|          if (do_uncompress && contents_comp_type != kNoCompression) {
  ------------------
  |  Branch (1736:15): [True: 0, False: 11.7k]
  |  Branch (1736:32): [True: 0, False: 0]
  ------------------
 1737|      0|            comp_contents = BlockContents(block_fetcher.GetCompressedBlock());
 1738|      0|            uncomp_contents = std::move(tmp_contents);
 1739|  11.7k|          } else if (contents_comp_type != kNoCompression) {
  ------------------
  |  Branch (1739:22): [True: 0, False: 11.7k]
  ------------------
 1740|       |            // do_uncompress must be false, so output of BlockFetcher is
 1741|       |            // compressed
 1742|      0|            comp_contents = std::move(tmp_contents);
 1743|  11.7k|          } else {
 1744|  11.7k|            uncomp_contents = std::move(tmp_contents);
 1745|  11.7k|          }
 1746|       |
 1747|       |          // If filling cache is allowed and a cache is configured, try to put
 1748|       |          // the block to the cache. Do this here while block_fetcher is in
 1749|       |          // scope, since comp_contents will be a reference to the compressed
 1750|       |          // block in block_fetcher
 1751|  11.7k|          s = PutDataBlockToCache(
 1752|  11.7k|              key, block_cache, out_parsed_block, std::move(uncomp_contents),
 1753|  11.7k|              std::move(comp_contents), contents_comp_type, uncompression_dict,
 1754|  11.7k|              GetMemoryAllocator(rep_->table_options), get_context);
 1755|  11.7k|        }
 1756|  11.7k|      } else {
 1757|      0|        contents_comp_type = GetBlockCompressionType(*contents);
 1758|      0|        if (contents_comp_type != kNoCompression) {
  ------------------
  |  Branch (1758:13): [True: 0, False: 0]
  ------------------
 1759|      0|          comp_contents = std::move(*contents);
 1760|      0|        } else {
 1761|      0|          uncomp_contents = std::move(*contents);
 1762|      0|        }
 1763|       |
 1764|      0|        if (s.ok()) {
  ------------------
  |  Branch (1764:13): [True: 0, False: 0]
  ------------------
 1765|       |          // If filling cache is allowed and a cache is configured, try to put
 1766|       |          // the block to the cache.
 1767|      0|          s = PutDataBlockToCache(
 1768|      0|              key, block_cache, out_parsed_block, std::move(uncomp_contents),
 1769|      0|              std::move(comp_contents), contents_comp_type, uncompression_dict,
 1770|      0|              GetMemoryAllocator(rep_->table_options), get_context);
 1771|      0|        }
 1772|      0|      }
 1773|  11.7k|    }
 1774|  11.7k|  }
 1775|       |
 1776|       |  // TODO: optimize so that lookup_context != nullptr implies the others
 1777|  11.7k|  if (block_cache_tracer_ && block_cache_tracer_->is_tracing_enabled() &&
  ------------------
  |  Branch (1777:7): [True: 11.7k, False: 0]
  |  Branch (1777:30): [True: 0, False: 11.7k]
  ------------------
 1778|  11.7k|      lookup_context) {
  ------------------
  |  Branch (1778:7): [True: 0, False: 0]
  ------------------
 1779|      0|    SaveLookupContextOrTraceRecord(
 1780|      0|        key, is_cache_hit, ro, out_parsed_block->GetValue(), lookup_context);
 1781|      0|  }
 1782|       |
 1783|  11.7k|  assert(s.ok() || out_parsed_block->GetValue() == nullptr);
 1784|  11.7k|  return s;
 1785|  11.7k|}
_ZNK7rocksdb15BlockBasedTable13RetrieveBlockINS_12Block_kIndexEEENSt3__19enable_ifIXooeqsrT_15kCacheEntryRoleLNS_14CacheEntryRoleE13ELb1EENS_6StatusEE4typeEPNS_18FilePrefetchBufferERKNS_11ReadOptionsERKNS_11BlockHandleERKNS_17UncompressionDictEPNS_13CachableEntryIS5_EEPNS_10GetContextEPNS_23BlockCacheLookupContextEbbbb:
 1887|  4.48k|    bool use_cache, bool async_read, bool use_block_cache_for_lookup) const {
 1888|  4.48k|  assert(out_parsed_block);
 1889|  4.48k|  assert(out_parsed_block->IsEmpty());
 1890|       |
 1891|  4.48k|  Status s;
 1892|  4.48k|  if (use_cache) {
  ------------------
  |  Branch (1892:7): [True: 0, False: 4.48k]
  ------------------
 1893|      0|    s = MaybeReadBlockAndLoadToCache(
 1894|      0|        prefetch_buffer, ro, handle, uncompression_dict, for_compaction,
 1895|      0|        out_parsed_block, get_context, lookup_context,
 1896|      0|        /*contents=*/nullptr, async_read, use_block_cache_for_lookup);
 1897|       |
 1898|      0|    if (!s.ok()) {
  ------------------
  |  Branch (1898:9): [True: 0, False: 0]
  ------------------
 1899|      0|      return s;
 1900|      0|    }
 1901|       |
 1902|      0|    if (out_parsed_block->GetValue() != nullptr ||
  ------------------
  |  Branch (1902:9): [True: 0, False: 0]
  ------------------
 1903|      0|        out_parsed_block->GetCacheHandle() != nullptr) {
  ------------------
  |  Branch (1903:9): [True: 0, False: 0]
  ------------------
 1904|      0|      assert(s.ok());
 1905|      0|      return s;
 1906|      0|    }
 1907|      0|  }
 1908|       |
 1909|  4.48k|  assert(out_parsed_block->IsEmpty());
 1910|       |
 1911|  4.48k|  const bool no_io = ro.read_tier == kBlockCacheTier;
 1912|  4.48k|  if (no_io) {
  ------------------
  |  Branch (1912:7): [True: 0, False: 4.48k]
  ------------------
 1913|      0|    return Status::Incomplete("no blocking io");
 1914|      0|  }
 1915|       |
 1916|  4.48k|  const bool maybe_compressed =
 1917|  4.48k|      TBlocklike::kBlockType != BlockType::kFilter &&
  ------------------
  |  Branch (1917:7): [Folded - Ignored]
  ------------------
 1918|  4.48k|      TBlocklike::kBlockType != BlockType::kCompressionDictionary &&
  ------------------
  |  Branch (1918:7): [Folded - Ignored]
  ------------------
 1919|  4.48k|      rep_->blocks_maybe_compressed;
  ------------------
  |  Branch (1919:7): [True: 0, False: 4.48k]
  ------------------
 1920|  4.48k|  std::unique_ptr<TBlocklike> block;
 1921|       |
 1922|  4.48k|  {
 1923|  4.48k|    Histograms histogram =
 1924|  4.48k|        for_compaction ? READ_BLOCK_COMPACTION_MICROS : READ_BLOCK_GET_MICROS;
  ------------------
  |  Branch (1924:9): [True: 0, False: 4.48k]
  ------------------
 1925|  4.48k|    StopWatch sw(rep_->ioptions.clock, rep_->ioptions.stats, histogram);
 1926|  4.48k|    s = ReadAndParseBlockFromFile(
 1927|  4.48k|        rep_->file.get(), prefetch_buffer, rep_->footer, ro, handle, &block,
 1928|  4.48k|        rep_->ioptions, rep_->create_context, maybe_compressed,
 1929|  4.48k|        uncompression_dict, rep_->persistent_cache_options,
 1930|  4.48k|        GetMemoryAllocator(rep_->table_options), for_compaction, async_read);
 1931|       |
 1932|  4.48k|    if (get_context) {
  ------------------
  |  Branch (1932:9): [True: 0, False: 4.48k]
  ------------------
 1933|      0|      switch (TBlocklike::kBlockType) {
 1934|      0|        case BlockType::kIndex:
  ------------------
  |  Branch (1934:9): [True: 0, False: 0]
  ------------------
 1935|      0|          ++(get_context->get_context_stats_.num_index_read);
 1936|      0|          break;
 1937|      0|        case BlockType::kFilter:
  ------------------
  |  Branch (1937:9): [True: 0, False: 0]
  ------------------
 1938|      0|        case BlockType::kFilterPartitionIndex:
  ------------------
  |  Branch (1938:9): [True: 0, False: 0]
  ------------------
 1939|      0|          ++(get_context->get_context_stats_.num_filter_read);
 1940|      0|          break;
 1941|      0|        default:
  ------------------
  |  Branch (1941:9): [True: 0, False: 0]
  ------------------
 1942|      0|          break;
 1943|      0|      }
 1944|      0|    }
 1945|  4.48k|  }
 1946|       |
 1947|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (1947:7): [True: 0, False: 4.48k]
  ------------------
 1948|      0|    return s;
 1949|      0|  }
 1950|       |
 1951|  4.48k|  out_parsed_block->SetOwnedValue(std::move(block));
 1952|       |
 1953|  4.48k|  assert(s.ok());
 1954|  4.48k|  return s;
 1955|  4.48k|}
block_based_table_reader.cc:_ZN7rocksdb12_GLOBAL__N_128PrefixExtractorChangedHelperEPKNS_15TablePropertiesEPKNS_14SliceTransformE:
  224|  4.48k|    const SliceTransform* prefix_extractor) {
  225|       |  // BlockBasedTableOptions::kHashSearch requires prefix_extractor to be set.
  226|       |  // Turn off hash index in prefix_extractor is not set; if  prefix_extractor
  227|       |  // is set but prefix_extractor_block is not set, also disable hash index
  228|  4.48k|  if (prefix_extractor == nullptr || table_properties == nullptr ||
  ------------------
  |  Branch (228:7): [True: 4.48k, False: 0]
  |  Branch (228:38): [True: 0, False: 0]
  ------------------
  229|  4.48k|      table_properties->prefix_extractor_name.empty()) {
  ------------------
  |  Branch (229:7): [True: 0, False: 0]
  ------------------
  230|  4.48k|    return true;
  231|  4.48k|  }
  232|       |
  233|       |  // prefix_extractor and prefix_extractor_block are both non-empty
  234|      0|  if (table_properties->prefix_extractor_name != prefix_extractor->AsString()) {
  ------------------
  |  Branch (234:7): [True: 0, False: 0]
  ------------------
  235|      0|    return true;
  236|      0|  } else {
  237|      0|    return false;
  238|      0|  }
  239|      0|}
block_based_table_reader.cc:_ZN7rocksdb12_GLOBAL__N_118IsFeatureSupportedERKNS_15TablePropertiesERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS_6LoggerE:
  465|  8.96k|                        const std::string& user_prop_name, Logger* info_log) {
  466|  8.96k|  auto& props = table_properties.user_collected_properties;
  467|  8.96k|  auto pos = props.find(user_prop_name);
  468|       |  // Older version doesn't have this value set. Skip this check.
  469|  8.96k|  if (pos != props.end()) {
  ------------------
  |  Branch (469:7): [True: 8.96k, False: 0]
  ------------------
  470|  8.96k|    if (pos->second == kPropFalse) {
  ------------------
  |  Branch (470:9): [True: 4.48k, False: 4.48k]
  ------------------
  471|  4.48k|      return false;
  472|  4.48k|    } else if (pos->second != kPropTrue) {
  ------------------
  |  Branch (472:16): [True: 0, False: 4.48k]
  ------------------
  473|      0|      ROCKS_LOG_WARN(info_log, "Property %s has invalidate value %s",
  ------------------
  |  |   42|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::WARN_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  474|      0|                     user_prop_name.c_str(), pos->second.c_str());
  475|      0|    }
  476|  8.96k|  }
  477|  4.48k|  return true;
  478|  8.96k|}
block_based_table_reader.cc:_ZN7rocksdb12_GLOBAL__N_123GetGlobalSequenceNumberERKNS_15TablePropertiesEmPm:
  484|  4.48k|                               SequenceNumber* seqno) {
  485|  4.48k|  const auto& props = table_properties.user_collected_properties;
  486|  4.48k|  const auto version_pos = props.find(ExternalSstFilePropertyNames::kVersion);
  487|  4.48k|  const auto seqno_pos = props.find(ExternalSstFilePropertyNames::kGlobalSeqno);
  488|       |
  489|  4.48k|  *seqno = kDisableGlobalSequenceNumber;
  490|  4.48k|  if (version_pos == props.end()) {
  ------------------
  |  Branch (490:7): [True: 4.48k, False: 0]
  ------------------
  491|  4.48k|    if (seqno_pos != props.end()) {
  ------------------
  |  Branch (491:9): [True: 0, False: 4.48k]
  ------------------
  492|      0|      std::array<char, 200> msg_buf;
  493|       |      // This is not an external sst file, global_seqno is not supported.
  494|      0|      snprintf(
  495|      0|          msg_buf.data(), msg_buf.max_size(),
  496|      0|          "A non-external sst file have global seqno property with value %s",
  497|      0|          seqno_pos->second.c_str());
  498|      0|      return Status::Corruption(msg_buf.data());
  499|      0|    }
  500|  4.48k|    return Status::OK();
  501|  4.48k|  }
  502|       |
  503|      0|  uint32_t version = DecodeFixed32(version_pos->second.c_str());
  504|      0|  if (version != 2) {
  ------------------
  |  Branch (504:7): [True: 0, False: 0]
  ------------------
  505|      0|    std::array<char, 200> msg_buf;
  506|      0|    if (version != 1) {
  ------------------
  |  Branch (506:9): [True: 0, False: 0]
  ------------------
  507|      0|      snprintf(msg_buf.data(), msg_buf.max_size(),
  508|      0|               "An external sst file has corrupted version %u.", version);
  509|      0|      return Status::Corruption(msg_buf.data());
  510|      0|    }
  511|      0|    if (seqno_pos != props.end()) {
  ------------------
  |  Branch (511:9): [True: 0, False: 0]
  ------------------
  512|       |      // This is a v1 external sst file, global_seqno is not supported.
  513|      0|      snprintf(msg_buf.data(), msg_buf.max_size(),
  514|      0|               "An external sst file with version %u has global seqno "
  515|      0|               "property with value %s",
  516|      0|               version, seqno_pos->second.c_str());
  517|      0|      return Status::Corruption(msg_buf.data());
  518|      0|    }
  519|      0|    return Status::OK();
  520|      0|  }
  521|       |
  522|       |  // Since we have a plan to deprecate global_seqno, we do not return failure
  523|       |  // if seqno_pos == props.end(). We rely on version_pos to detect whether the
  524|       |  // SST is external.
  525|      0|  SequenceNumber global_seqno(0);
  526|      0|  if (seqno_pos != props.end()) {
  ------------------
  |  Branch (526:7): [True: 0, False: 0]
  ------------------
  527|      0|    global_seqno = DecodeFixed64(seqno_pos->second.c_str());
  528|      0|  }
  529|       |  // SstTableReader open table reader with kMaxSequenceNumber as largest_seqno
  530|       |  // to denote it is unknown.
  531|      0|  if (largest_seqno < kMaxSequenceNumber) {
  ------------------
  |  Branch (531:7): [True: 0, False: 0]
  ------------------
  532|      0|    if (global_seqno == 0) {
  ------------------
  |  Branch (532:9): [True: 0, False: 0]
  ------------------
  533|      0|      global_seqno = largest_seqno;
  534|      0|    }
  535|      0|    if (global_seqno != largest_seqno) {
  ------------------
  |  Branch (535:9): [True: 0, False: 0]
  ------------------
  536|      0|      std::array<char, 200> msg_buf;
  537|      0|      snprintf(
  538|      0|          msg_buf.data(), msg_buf.max_size(),
  539|      0|          "An external sst file with version %u have global seqno property "
  540|      0|          "with value %s, while largest seqno in the file is %llu",
  541|      0|          version, seqno_pos->second.c_str(),
  542|      0|          static_cast<unsigned long long>(largest_seqno));
  543|      0|      return Status::Corruption(msg_buf.data());
  544|      0|    }
  545|      0|  }
  546|      0|  *seqno = global_seqno;
  547|       |
  548|      0|  if (global_seqno > kMaxSequenceNumber) {
  ------------------
  |  Branch (548:7): [True: 0, False: 0]
  ------------------
  549|      0|    std::array<char, 200> msg_buf;
  550|      0|    snprintf(msg_buf.data(), msg_buf.max_size(),
  551|      0|             "An external sst file with version %u have global seqno property "
  552|      0|             "with value %llu, which is greater than kMaxSequenceNumber",
  553|      0|             version, static_cast<unsigned long long>(global_seqno));
  554|      0|    return Status::Corruption(msg_buf.data());
  555|      0|  }
  556|       |
  557|      0|  return Status::OK();
  558|      0|}
_ZNK7rocksdb15BlockBasedTable21GetDataBlockFromCacheINS_11Block_kDataEEENSt3__19enable_ifIXooeqsrT_15kCacheEntryRoleLNS_14CacheEntryRoleE13ELb1EENS_6StatusEE4typeERKNS_5SliceENS_23FullTypedCacheInterfaceIS5_NS_18BlockCreateContextEXsrS5_15kCacheEntryRoleEPNS_5CacheEEEPNS_13CachableEntryIS5_EEPNS_10GetContextEPKNS_17UncompressionDictE:
 1397|  11.7k|    const UncompressionDict* dict) const {
 1398|  11.7k|  assert(out_parsed_block);
 1399|  11.7k|  assert(out_parsed_block->IsEmpty());
 1400|       |
 1401|  11.7k|  Status s;
 1402|  11.7k|  Statistics* statistics = rep_->ioptions.statistics.get();
 1403|       |
 1404|       |  // Lookup uncompressed cache first
 1405|  11.7k|  if (block_cache) {
  ------------------
  |  Branch (1405:7): [True: 11.7k, False: 0]
  ------------------
 1406|  11.7k|    BlockCreateContext create_ctx = rep_->create_context;
 1407|  11.7k|    create_ctx.dict = dict;
 1408|  11.7k|    assert(!cache_key.empty());
 1409|  11.7k|    auto cache_handle = block_cache.LookupFull(
 1410|  11.7k|        cache_key, &create_ctx, GetCachePriority<TBlocklike>(), statistics,
 1411|  11.7k|        rep_->ioptions.lowest_used_cache_tier);
 1412|       |
 1413|       |    // Avoid updating metrics here if the handle is not complete yet. This
 1414|       |    // happens with MultiGet and secondary cache. So update the metrics only
 1415|       |    // if its a miss, or a hit and value is ready
 1416|  11.7k|    if (!cache_handle) {
  ------------------
  |  Branch (1416:9): [True: 11.7k, False: 0]
  ------------------
 1417|  11.7k|      UpdateCacheMissMetrics(TBlocklike::kBlockType, get_context);
 1418|  11.7k|    } else {
 1419|      0|      TBlocklike* value = block_cache.Value(cache_handle);
 1420|      0|      if (value) {
  ------------------
  |  Branch (1420:11): [True: 0, False: 0]
  ------------------
 1421|      0|        UpdateCacheHitMetrics(TBlocklike::kBlockType, get_context,
 1422|      0|                              block_cache.get()->GetUsage(cache_handle));
 1423|      0|      }
 1424|      0|      out_parsed_block->SetCachedValue(value, block_cache.get(), cache_handle);
 1425|      0|      return s;
 1426|      0|    }
 1427|  11.7k|  }
 1428|       |
 1429|       |  // If not found, search from the compressed block cache.
 1430|  11.7k|  assert(out_parsed_block->IsEmpty());
 1431|       |
 1432|  11.7k|  return s;
 1433|  11.7k|}
_ZNK7rocksdb15BlockBasedTable19PutDataBlockToCacheINS_11Block_kDataEEENSt3__19enable_ifIXooeqsrT_15kCacheEntryRoleLNS_14CacheEntryRoleE13ELb1EENS_6StatusEE4typeERKNS_5SliceENS_23FullTypedCacheInterfaceIS5_NS_18BlockCreateContextEXsrS5_15kCacheEntryRoleEPNS_5CacheEEEPNS_13CachableEntryIS5_EEONS_13BlockContentsESM_NS_15CompressionTypeERKNS_17UncompressionDictEPNS_15MemoryAllocatorEPNS_10GetContextE:
 1442|  11.7k|    MemoryAllocator* memory_allocator, GetContext* get_context) const {
 1443|  11.7k|  const ImmutableOptions& ioptions = rep_->ioptions;
 1444|  11.7k|  const uint32_t format_version = rep_->table_options.format_version;
 1445|  11.7k|  assert(out_parsed_block);
 1446|  11.7k|  assert(out_parsed_block->IsEmpty());
 1447|       |
 1448|  11.7k|  Status s;
 1449|  11.7k|  Statistics* statistics = ioptions.stats;
 1450|       |
 1451|  11.7k|  std::unique_ptr<TBlocklike> block_holder;
 1452|  11.7k|  if (block_comp_type != kNoCompression &&
  ------------------
  |  Branch (1452:7): [True: 0, False: 11.7k]
  ------------------
 1453|  11.7k|      uncompressed_block_contents.data.empty()) {
  ------------------
  |  Branch (1453:7): [True: 0, False: 0]
  ------------------
 1454|      0|    assert(compressed_block_contents.data.data());
 1455|       |    // Retrieve the uncompressed contents into a new buffer
 1456|      0|    UncompressionContext context(block_comp_type);
 1457|      0|    UncompressionInfo info(context, uncompression_dict, block_comp_type);
 1458|      0|    s = UncompressBlockData(info, compressed_block_contents.data.data(),
 1459|      0|                            compressed_block_contents.data.size(),
 1460|      0|                            &uncompressed_block_contents, format_version,
 1461|      0|                            ioptions, memory_allocator);
 1462|      0|    if (!s.ok()) {
  ------------------
  |  Branch (1462:9): [True: 0, False: 0]
  ------------------
 1463|      0|      return s;
 1464|      0|    }
 1465|      0|  }
 1466|  11.7k|  rep_->create_context.Create(&block_holder,
 1467|  11.7k|                              std::move(uncompressed_block_contents));
 1468|       |
 1469|       |  // insert into uncompressed block cache
 1470|  11.7k|  if (block_cache && block_holder->own_bytes()) {
  ------------------
  |  Branch (1470:7): [True: 11.7k, False: 0]
  |  Branch (1470:22): [True: 11.7k, False: 0]
  ------------------
 1471|  11.7k|    size_t charge = block_holder->ApproximateMemoryUsage();
 1472|  11.7k|    BlockCacheTypedHandle<TBlocklike>* cache_handle = nullptr;
 1473|  11.7k|    s = block_cache.InsertFull(cache_key, block_holder.get(), charge,
 1474|  11.7k|                               &cache_handle, GetCachePriority<TBlocklike>(),
 1475|  11.7k|                               rep_->ioptions.lowest_used_cache_tier,
 1476|  11.7k|                               compressed_block_contents.data, block_comp_type);
 1477|       |
 1478|  11.7k|    if (s.ok()) {
  ------------------
  |  Branch (1478:9): [True: 11.7k, False: 0]
  ------------------
 1479|  11.7k|      assert(cache_handle != nullptr);
 1480|  11.7k|      out_parsed_block->SetCachedValue(block_holder.release(),
 1481|  11.7k|                                       block_cache.get(), cache_handle);
 1482|       |
 1483|  11.7k|      UpdateCacheInsertionMetrics(TBlocklike::kBlockType, get_context, charge,
 1484|  11.7k|                                  s.IsOkOverwritten(), rep_->ioptions.stats);
 1485|  11.7k|    } else {
 1486|      0|      RecordTick(statistics, BLOCK_CACHE_ADD_FAILURES);
 1487|      0|    }
 1488|  11.7k|  } else {
 1489|      0|    out_parsed_block->SetOwnedValue(std::move(block_holder));
 1490|      0|  }
 1491|       |
 1492|  11.7k|  return s;
 1493|  11.7k|}
block_based_table_reader.cc:_ZN7rocksdb12_GLOBAL__N_125ReadAndParseBlockFromFileINS_12Block_kIndexEEENS_6StatusEPNS_22RandomAccessFileReaderEPNS_18FilePrefetchBufferERKNS_6FooterERKNS_11ReadOptionsERKNS_11BlockHandleEPNSt3__110unique_ptrIT_NSH_14default_deleteISJ_EEEERKNS_16ImmutableOptionsERNS_18BlockCreateContextEbRKNS_17UncompressionDictERKNS_22PersistentCacheOptionsEPNS_15MemoryAllocatorEbb:
  194|  4.48k|    MemoryAllocator* memory_allocator, bool for_compaction, bool async_read) {
  195|  4.48k|  assert(result);
  196|       |
  197|  4.48k|  BlockContents contents;
  198|  4.48k|  BlockFetcher block_fetcher(
  199|  4.48k|      file, prefetch_buffer, footer, options, handle, &contents, ioptions,
  200|  4.48k|      /*do_uncompress*/ maybe_compressed, maybe_compressed,
  201|  4.48k|      TBlocklike::kBlockType, uncompression_dict, cache_options,
  202|  4.48k|      memory_allocator, nullptr, for_compaction);
  203|  4.48k|  Status s;
  204|       |  // If prefetch_buffer is not allocated, it will fallback to synchronous
  205|       |  // reading of block contents.
  206|  4.48k|  if (async_read && prefetch_buffer != nullptr) {
  ------------------
  |  Branch (206:7): [True: 0, False: 4.48k]
  |  Branch (206:21): [True: 0, False: 0]
  ------------------
  207|      0|    s = block_fetcher.ReadAsyncBlockContents();
  208|      0|    if (!s.ok()) {
  ------------------
  |  Branch (208:9): [True: 0, False: 0]
  ------------------
  209|      0|      return s;
  210|      0|    }
  211|  4.48k|  } else {
  212|  4.48k|    s = block_fetcher.ReadBlockContents();
  213|  4.48k|  }
  214|  4.48k|  if (s.ok()) {
  ------------------
  |  Branch (214:7): [True: 4.48k, False: 0]
  ------------------
  215|  4.48k|    create_context.Create(result, std::move(contents));
  216|  4.48k|  }
  217|  4.48k|  return s;
  218|  4.48k|}
_ZNK7rocksdb15BlockBasedTable16GetCachePriorityINS_11Block_kDataEEENS_5Cache8PriorityEv:
 1375|  23.5k|Cache::Priority BlockBasedTable::GetCachePriority() const {
 1376|       |  // Here we treat the legacy name "...index_and_filter_blocks..." to mean all
 1377|       |  // metadata blocks that might go into block cache, EXCEPT only those needed
 1378|       |  // for the read path (Get, etc.). TableProperties should not be needed on the
 1379|       |  // read path (prefix extractor setting is an O(1) size special case that we
 1380|       |  // are working not to require from TableProperties), so it is not given
 1381|       |  // high-priority treatment if it should go into BlockCache.
 1382|  23.5k|  if constexpr (TBlocklike::kBlockType == BlockType::kData ||
  ------------------
  |  Branch (1382:17): [Folded - Ignored]
  |  Branch (1382:17): [Folded - Ignored]
  ------------------
 1383|  23.5k|                TBlocklike::kBlockType == BlockType::kProperties) {
  ------------------
  |  Branch (1383:17): [Folded - Ignored]
  ------------------
 1384|  23.5k|    return Cache::Priority::LOW;
 1385|  23.5k|  } else if (rep_->table_options
 1386|  23.5k|                 .cache_index_and_filter_blocks_with_high_priority) {
 1387|  23.5k|    return Cache::Priority::HIGH;
 1388|  23.5k|  } else {
 1389|  23.5k|    return Cache::Priority::LOW;
 1390|  23.5k|  }
 1391|  23.5k|}
block_based_table_reader.cc:_ZZN7rocksdb15BlockBasedTable28PrefetchIndexAndFilterBlocksERKNS_11ReadOptionsEPNS_18FilePrefetchBufferEPNS_20InternalIteratorBaseINS_5SliceEEEPS0_bRKNS_22BlockBasedTableOptionsEimmPNS_23BlockCacheLookupContextEENK3$_0clENS_11PinningTierESH_:
 1199|  26.9k|                                  PinningTier fallback_pinning_tier) {
 1200|       |        // Fallback to fallback would lead to infinite recursion. Disallow it.
 1201|  26.9k|        assert(fallback_pinning_tier != PinningTier::kFallback);
 1202|       |
 1203|  26.9k|        switch (pinning_tier) {
  ------------------
  |  Branch (1203:17): [True: 0, False: 26.9k]
  ------------------
 1204|  13.4k|          case PinningTier::kFallback:
  ------------------
  |  Branch (1204:11): [True: 13.4k, False: 13.4k]
  ------------------
 1205|  13.4k|            return is_pinned(fallback_pinning_tier,
 1206|  13.4k|                             PinningTier::kNone /* fallback_pinning_tier */);
 1207|  8.96k|          case PinningTier::kNone:
  ------------------
  |  Branch (1207:11): [True: 8.96k, False: 17.9k]
  ------------------
 1208|  8.96k|            return false;
 1209|      0|          case PinningTier::kFlushedAndSimilar:
  ------------------
  |  Branch (1209:11): [True: 0, False: 26.9k]
  ------------------
 1210|      0|            return maybe_flushed;
 1211|  4.48k|          case PinningTier::kAll:
  ------------------
  |  Branch (1211:11): [True: 4.48k, False: 22.4k]
  ------------------
 1212|  4.48k|            return true;
 1213|  26.9k|        };
 1214|       |
 1215|       |        // In GCC, this is needed to suppress `control reaches end of non-void
 1216|       |        // function [-Werror=return-type]`.
 1217|      0|        assert(false);
 1218|      0|        return false;
 1219|  26.9k|      };
block_based_table_reader.cc:_ZN7rocksdb12_GLOBAL__N_125ReadAndParseBlockFromFileINS_16Block_kMetaIndexEEENS_6StatusEPNS_22RandomAccessFileReaderEPNS_18FilePrefetchBufferERKNS_6FooterERKNS_11ReadOptionsERKNS_11BlockHandleEPNSt3__110unique_ptrIT_NSH_14default_deleteISJ_EEEERKNS_16ImmutableOptionsERNS_18BlockCreateContextEbRKNS_17UncompressionDictERKNS_22PersistentCacheOptionsEPNS_15MemoryAllocatorEbb:
  194|  4.48k|    MemoryAllocator* memory_allocator, bool for_compaction, bool async_read) {
  195|  4.48k|  assert(result);
  196|       |
  197|  4.48k|  BlockContents contents;
  198|  4.48k|  BlockFetcher block_fetcher(
  199|  4.48k|      file, prefetch_buffer, footer, options, handle, &contents, ioptions,
  200|  4.48k|      /*do_uncompress*/ maybe_compressed, maybe_compressed,
  201|  4.48k|      TBlocklike::kBlockType, uncompression_dict, cache_options,
  202|  4.48k|      memory_allocator, nullptr, for_compaction);
  203|  4.48k|  Status s;
  204|       |  // If prefetch_buffer is not allocated, it will fallback to synchronous
  205|       |  // reading of block contents.
  206|  4.48k|  if (async_read && prefetch_buffer != nullptr) {
  ------------------
  |  Branch (206:7): [True: 0, False: 4.48k]
  |  Branch (206:21): [True: 0, False: 0]
  ------------------
  207|      0|    s = block_fetcher.ReadAsyncBlockContents();
  208|      0|    if (!s.ok()) {
  ------------------
  |  Branch (208:9): [True: 0, False: 0]
  ------------------
  209|      0|      return s;
  210|      0|    }
  211|  4.48k|  } else {
  212|  4.48k|    s = block_fetcher.ReadBlockContents();
  213|  4.48k|  }
  214|  4.48k|  if (s.ok()) {
  ------------------
  |  Branch (214:7): [True: 4.48k, False: 0]
  ------------------
  215|  4.48k|    create_context.Create(result, std::move(contents));
  216|  4.48k|  }
  217|  4.48k|  return s;
  218|  4.48k|}

_ZN7rocksdb15BlockBasedTable11IndexReader17CacheDependenciesERKNS_11ReadOptionsEbPNS_18FilePrefetchBufferE:
  246|  4.48k|        FilePrefetchBuffer* /* tail_prefetch_buffer */) {
  247|  4.48k|      return Status::OK();
  248|  4.48k|    }
_ZN7rocksdb15BlockBasedTable20BlockSizeWithTrailerERKNS_11BlockHandleE:
  274|  9.90k|  static inline size_t BlockSizeWithTrailer(const BlockHandle& handle) {
  275|  9.90k|    return static_cast<size_t>(handle.size() + kBlockTrailerSize);
  276|  9.90k|  }
_ZN7rocksdb15BlockBasedTable23GetBlockCompressionTypeEPKcm:
  282|  25.2k|                                                        size_t block_size) {
  283|  25.2k|    return static_cast<CompressionType>(block_data[block_size]);
  284|  25.2k|  }
_ZNK7rocksdb15BlockBasedTable7get_repEv:
  304|  76.1k|  const Rep* get_rep() const { return rep_; }
_ZN7rocksdb15BlockBasedTableC2EPNS0_3RepEPNS_16BlockCacheTracerE:
  333|  4.48k|      : rep_(rep), block_cache_tracer_(block_cache_tracer) {}
_ZN7rocksdb15BlockBasedTable3RepC2ERKNS_16ImmutableOptionsERKNS_10EnvOptionsERKNS_22BlockBasedTableOptionsERKNS_21InternalKeyComparatorEbmibb:
  589|  4.48k|        user_defined_timestamps_persisted(_user_defined_timestamps_persisted) {}
_ZN7rocksdb15BlockBasedTable3RepD2Ev:
  590|  4.48k|  ~Rep() { status.PermitUncheckedError(); }
_ZNK7rocksdb15BlockBasedTable3Rep16get_global_seqnoENS_9BlockTypeE:
  686|  20.7k|  SequenceNumber get_global_seqno(BlockType block_type) const {
  687|  20.7k|    return (block_type == BlockType::kFilterPartitionIndex ||
  ------------------
  |  Branch (687:13): [True: 0, False: 20.7k]
  ------------------
  688|  20.7k|            block_type == BlockType::kCompressionDictionary)
  ------------------
  |  Branch (688:13): [True: 0, False: 20.7k]
  ------------------
  689|  20.7k|               ? kDisableGlobalSequenceNumber
  690|  20.7k|               : global_seqno;
  691|  20.7k|  }
_ZN7rocksdb15BlockBasedTable11IndexReaderD2Ev:
  225|  4.48k|    virtual ~IndexReader() = default;

_ZNK7rocksdb15BlockBasedTable20NewDataBlockIteratorINS_13DataBlockIterEEEPT_RKNS_11ReadOptionsERKNS_11BlockHandleES4_NS_9BlockTypeEPNS_10GetContextEPNS_23BlockCacheLookupContextEPNS_18FilePrefetchBufferEbbRNS_6StatusEb:
   52|  11.7k|    Status& s, bool use_block_cache_for_lookup) const {
   53|  11.7k|  using IterBlocklike = typename IterTraits<TBlockIter>::IterBlocklike;
   54|  11.7k|  PERF_TIMER_GUARD(new_table_block_iter_nanos);
  ------------------
  |  |   46|  11.7k|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  11.7k|  perf_step_timer_##metric.Start();
  ------------------
   55|       |
   56|  11.7k|  TBlockIter* iter = input_iter != nullptr ? input_iter : new TBlockIter;
  ------------------
  |  Branch (56:22): [True: 8.85k, False: 2.90k]
  ------------------
   57|  11.7k|  if (!s.ok()) {
  ------------------
  |  Branch (57:7): [True: 0, False: 11.7k]
  ------------------
   58|      0|    iter->Invalidate(s);
   59|      0|    return iter;
   60|      0|  }
   61|       |
   62|  11.7k|  CachableEntry<Block> block;
   63|  11.7k|  if (rep_->uncompression_dict_reader && block_type == BlockType::kData) {
  ------------------
  |  Branch (63:7): [True: 0, False: 11.7k]
  |  Branch (63:42): [True: 0, False: 0]
  ------------------
   64|      0|    CachableEntry<UncompressionDict> uncompression_dict;
   65|       |    // For async scans, don't use the prefetch buffer since an async prefetch
   66|       |    // might already be under way and this would invalidate it. Also, the
   67|       |    // uncompression dict is typically at the end of the file and would
   68|       |    // most likely break the sequentiality of the access pattern.
   69|       |    // Same is with auto_readahead_size. It iterates over index to lookup for
   70|       |    // data blocks. And this could break the the sequentiality of the access
   71|       |    // pattern.
   72|      0|    s = rep_->uncompression_dict_reader->GetOrReadUncompressionDictionary(
   73|      0|        ((ro.async_io || ro.auto_readahead_size) ? nullptr : prefetch_buffer),
  ------------------
  |  Branch (73:11): [True: 0, False: 0]
  |  Branch (73:26): [True: 0, False: 0]
  ------------------
   74|      0|        ro, get_context, lookup_context, &uncompression_dict);
   75|      0|    if (!s.ok()) {
  ------------------
  |  Branch (75:9): [True: 0, False: 0]
  ------------------
   76|      0|      iter->Invalidate(s);
   77|      0|      return iter;
   78|      0|    }
   79|      0|    const UncompressionDict& dict = uncompression_dict.GetValue()
  ------------------
  |  Branch (79:37): [True: 0, False: 0]
  ------------------
   80|      0|                                        ? *uncompression_dict.GetValue()
   81|      0|                                        : UncompressionDict::GetEmptyDict();
   82|      0|    s = RetrieveBlock(
   83|      0|        prefetch_buffer, ro, handle, dict, &block.As<IterBlocklike>(),
   84|      0|        get_context, lookup_context, for_compaction,
   85|      0|        /* use_cache */ true, async_read, use_block_cache_for_lookup);
   86|  11.7k|  } else {
   87|  11.7k|    s = RetrieveBlock(
   88|  11.7k|        prefetch_buffer, ro, handle, UncompressionDict::GetEmptyDict(),
   89|  11.7k|        &block.As<IterBlocklike>(), get_context, lookup_context, for_compaction,
   90|  11.7k|        /* use_cache */ true, async_read, use_block_cache_for_lookup);
   91|  11.7k|  }
   92|       |
   93|  11.7k|  if (s.IsTryAgain() && async_read) {
  ------------------
  |  Branch (93:7): [True: 0, False: 11.7k]
  |  Branch (93:25): [True: 0, False: 0]
  ------------------
   94|      0|    return iter;
   95|      0|  }
   96|       |
   97|  11.7k|  if (!s.ok()) {
  ------------------
  |  Branch (97:7): [True: 0, False: 11.7k]
  ------------------
   98|      0|    assert(block.IsEmpty());
   99|      0|    iter->Invalidate(s);
  100|      0|    return iter;
  101|      0|  }
  102|       |
  103|  11.7k|  assert(block.GetValue() != nullptr);
  104|       |
  105|       |  // Block contents are pinned and it is still pinned after the iterator
  106|       |  // is destroyed as long as cleanup functions are moved to another object,
  107|       |  // when:
  108|       |  // 1. block cache handle is set to be released in cleanup function, or
  109|       |  // 2. it's pointing to immortal source. If own_bytes is true then we are
  110|       |  //    not reading data from the original source, whether immortal or not.
  111|       |  //    Otherwise, the block is pinned iff the source is immortal.
  112|  11.7k|  const bool block_contents_pinned =
  113|  11.7k|      block.IsCached() ||
  ------------------
  |  Branch (113:7): [True: 11.7k, False: 0]
  ------------------
  114|  11.7k|      (!block.GetValue()->own_bytes() && rep_->immortal_table);
  ------------------
  |  Branch (114:8): [True: 0, False: 0]
  |  Branch (114:42): [True: 0, False: 0]
  ------------------
  115|  11.7k|  iter = InitBlockIterator<TBlockIter>(rep_, block.GetValue(), block_type, iter,
  116|  11.7k|                                       block_contents_pinned);
  117|       |
  118|  11.7k|  if (!block.IsCached()) {
  ------------------
  |  Branch (118:7): [True: 0, False: 11.7k]
  ------------------
  119|      0|    if (!ro.fill_cache) {
  ------------------
  |  Branch (119:9): [True: 0, False: 0]
  ------------------
  120|      0|      IterPlaceholderCacheInterface block_cache{
  121|      0|          rep_->table_options.block_cache.get()};
  122|      0|      if (block_cache) {
  ------------------
  |  Branch (122:11): [True: 0, False: 0]
  ------------------
  123|       |        // insert a dummy record to block cache to track the memory usage
  124|      0|        Cache::Handle* cache_handle = nullptr;
  125|      0|        CacheKey key =
  126|      0|            CacheKey::CreateUniqueForCacheLifetime(block_cache.get());
  127|      0|        s = block_cache.Insert(key.AsSlice(),
  128|      0|                               block.GetValue()->ApproximateMemoryUsage(),
  129|      0|                               &cache_handle);
  130|       |
  131|      0|        if (s.ok()) {
  ------------------
  |  Branch (131:13): [True: 0, False: 0]
  ------------------
  132|      0|          assert(cache_handle != nullptr);
  133|      0|          iter->RegisterCleanup(&ForceReleaseCachedEntry, block_cache.get(),
  134|      0|                                cache_handle);
  135|      0|        }
  136|      0|      }
  137|      0|    }
  138|  11.7k|  } else {
  139|  11.7k|    iter->SetCacheHandle(block.GetCacheHandle());
  140|  11.7k|  }
  141|       |
  142|  11.7k|  block.TransferTo(iter);
  143|       |
  144|  11.7k|  return iter;
  145|  11.7k|}

_ZN7rocksdb12BlockBuilderC2EibbNS_22BlockBasedTableOptions18DataBlockIndexTypeEdmbb:
   59|  26.9k|      finished_(false) {
   60|  26.9k|  switch (index_type) {
   61|  26.9k|    case BlockBasedTableOptions::kDataBlockBinarySearch:
  ------------------
  |  Branch (61:5): [True: 26.9k, False: 0]
  ------------------
   62|  26.9k|      break;
   63|      0|    case BlockBasedTableOptions::kDataBlockBinaryAndHash:
  ------------------
  |  Branch (63:5): [True: 0, False: 26.9k]
  ------------------
   64|      0|      data_block_hash_index_builder_.Initialize(
   65|      0|          data_block_hash_table_util_ratio);
   66|      0|      break;
   67|      0|    default:
  ------------------
  |  Branch (67:5): [True: 0, False: 26.9k]
  ------------------
   68|      0|      assert(0);
   69|  26.9k|  }
   70|  26.9k|  assert(block_restart_interval_ >= 1);
   71|  26.9k|  estimate_ = sizeof(uint32_t) + sizeof(uint32_t);
   72|  26.9k|}
_ZN7rocksdb12BlockBuilder5ResetEv:
   74|  8.85k|void BlockBuilder::Reset() {
   75|  8.85k|  buffer_.clear();
   76|  8.85k|  restarts_.resize(1);  // First restart point is at offset 0
   77|  8.85k|  assert(restarts_[0] == 0);
   78|  8.85k|  estimate_ = sizeof(uint32_t) + sizeof(uint32_t);
   79|  8.85k|  counter_ = 0;
   80|  8.85k|  finished_ = false;
   81|  8.85k|  last_key_.clear();
   82|  8.85k|  if (data_block_hash_index_builder_.Valid()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 8.85k]
  ------------------
   83|      0|    data_block_hash_index_builder_.Reset();
   84|      0|  }
   85|       |#ifndef NDEBUG
   86|       |  add_with_last_key_called_ = false;
   87|       |#endif
   88|  8.85k|}
_ZN7rocksdb12BlockBuilder12SwapAndResetERNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   90|  8.85k|void BlockBuilder::SwapAndReset(std::string& buffer) {
   91|  8.85k|  std::swap(buffer_, buffer);
   92|  8.85k|  Reset();
   93|  8.85k|}
_ZNK7rocksdb12BlockBuilder19EstimateSizeAfterKVERKNS_5SliceES3_:
   96|  26.5k|                                         const Slice& value) const {
   97|  26.5k|  size_t estimate = CurrentSizeEstimate();
   98|       |  // Note: this is an imprecise estimate as it accounts for the whole key size
   99|       |  // instead of non-shared key size.
  100|  26.5k|  estimate += key.size();
  101|  26.5k|  if (strip_ts_sz_ > 0) {
  ------------------
  |  Branch (101:7): [True: 0, False: 26.5k]
  ------------------
  102|      0|    estimate -= strip_ts_sz_;
  103|      0|  }
  104|       |  // In value delta encoding we estimate the value delta size as half the full
  105|       |  // value size since only the size field of block handle is encoded.
  106|  26.5k|  estimate +=
  107|  26.5k|      !use_value_delta_encoding_ || (counter_ >= block_restart_interval_)
  ------------------
  |  Branch (107:7): [True: 26.5k, False: 0]
  |  Branch (107:37): [True: 0, False: 0]
  ------------------
  108|  26.5k|          ? value.size()
  109|  26.5k|          : value.size() / 2;
  110|       |
  111|  26.5k|  if (counter_ >= block_restart_interval_) {
  ------------------
  |  Branch (111:7): [True: 307, False: 26.2k]
  ------------------
  112|    307|    estimate += sizeof(uint32_t);  // a new restart entry.
  113|    307|  }
  114|       |
  115|  26.5k|  estimate += sizeof(int32_t);  // varint for shared prefix length.
  116|       |  // Note: this is an imprecise estimate as we will have to encoded size, one
  117|       |  // for shared key and one for non-shared key.
  118|  26.5k|  estimate += VarintLength(key.size());  // varint for key length.
  119|  26.5k|  if (!use_value_delta_encoding_ || (counter_ >= block_restart_interval_)) {
  ------------------
  |  Branch (119:7): [True: 26.5k, False: 0]
  |  Branch (119:37): [True: 0, False: 0]
  ------------------
  120|  26.5k|    estimate += VarintLength(value.size());  // varint for value length.
  121|  26.5k|  }
  122|       |
  123|  26.5k|  return estimate;
  124|  26.5k|}
_ZN7rocksdb12BlockBuilder6FinishEv:
  126|  25.2k|Slice BlockBuilder::Finish() {
  127|       |  // Append restart array
  128|   191k|  for (size_t i = 0; i < restarts_.size(); i++) {
  ------------------
  |  Branch (128:22): [True: 166k, False: 25.2k]
  ------------------
  129|   166k|    PutFixed32(&buffer_, restarts_[i]);
  130|   166k|  }
  131|       |
  132|  25.2k|  uint32_t num_restarts = static_cast<uint32_t>(restarts_.size());
  133|  25.2k|  BlockBasedTableOptions::DataBlockIndexType index_type =
  134|  25.2k|      BlockBasedTableOptions::kDataBlockBinarySearch;
  135|  25.2k|  if (data_block_hash_index_builder_.Valid() &&
  ------------------
  |  Branch (135:7): [True: 0, False: 25.2k]
  ------------------
  136|  25.2k|      CurrentSizeEstimate() <= kMaxBlockSizeSupportedByHashIndex) {
  ------------------
  |  Branch (136:7): [True: 0, False: 0]
  ------------------
  137|      0|    data_block_hash_index_builder_.Finish(buffer_);
  138|      0|    index_type = BlockBasedTableOptions::kDataBlockBinaryAndHash;
  139|      0|  }
  140|       |
  141|       |  // footer is a packed format of data_block_index_type and num_restarts
  142|  25.2k|  uint32_t block_footer = PackIndexTypeAndNumRestarts(index_type, num_restarts);
  143|       |
  144|  25.2k|  PutFixed32(&buffer_, block_footer);
  145|  25.2k|  finished_ = true;
  146|  25.2k|  return Slice(buffer_);
  147|  25.2k|}
_ZN7rocksdb12BlockBuilder3AddERKNS_5SliceES3_PS2_:
  150|   308k|                       const Slice* const delta_value) {
  151|       |  // Ensure no unsafe mixing of Add and AddWithLastKey
  152|   308k|  assert(!add_with_last_key_called_);
  153|       |
  154|   308k|  AddWithLastKeyImpl(key, value, last_key_, delta_value, buffer_.size());
  155|   308k|  if (use_delta_encoding_) {
  ------------------
  |  Branch (155:7): [True: 308k, False: 0]
  ------------------
  156|       |    // Update state
  157|       |    // We used to just copy the changed data, but it appears to be
  158|       |    // faster to just copy the whole thing.
  159|   308k|    last_key_.assign(key.data(), key.size());
  160|   308k|  }
  161|   308k|}
_ZN7rocksdb12BlockBuilder14AddWithLastKeyERKNS_5SliceES3_S3_PS2_:
  165|  34.6k|                                  const Slice* const delta_value) {
  166|       |  // Ensure no unsafe mixing of Add and AddWithLastKey
  167|  34.6k|  assert(last_key_.empty());
  168|       |#ifndef NDEBUG
  169|       |  add_with_last_key_called_ = false;
  170|       |#endif
  171|       |
  172|       |  // Here we make sure to use an empty `last_key` on first call after creation
  173|       |  // or Reset. This is more convenient for the caller and we can be more
  174|       |  // clever inside BlockBuilder. On this hot code path, we want to avoid
  175|       |  // conditional jumps like `buffer_.empty() ? ... : ...` so we can use a
  176|       |  // fast arithmetic operation instead, with an assertion to be sure our logic
  177|       |  // is sound.
  178|  34.6k|  size_t buffer_size = buffer_.size();
  179|  34.6k|  size_t last_key_size = last_key_param.size();
  180|  34.6k|  assert(buffer_size == 0 || buffer_size >= last_key_size - strip_ts_sz_);
  181|       |
  182|  34.6k|  Slice last_key(last_key_param.data(), last_key_size * (buffer_size > 0));
  183|       |
  184|  34.6k|  AddWithLastKeyImpl(key, value, last_key, delta_value, buffer_size);
  185|  34.6k|}
_ZN7rocksdb12BlockBuilder18AddWithLastKeyImplERKNS_5SliceES3_S3_PS2_m:
  191|   343k|                                             size_t buffer_size) {
  192|   343k|  assert(!finished_);
  193|   343k|  assert(counter_ <= block_restart_interval_);
  194|   343k|  assert(!use_value_delta_encoding_ || delta_value);
  195|   343k|  std::string key_buf;
  196|   343k|  std::string last_key_buf;
  197|   343k|  const Slice key_to_persist = MaybeStripTimestampFromKey(&key_buf, key);
  198|       |  // For delta key encoding, the first key in each restart interval doesn't have
  199|       |  // a last key to share bytes with.
  200|   343k|  const Slice last_key_persisted =
  201|   343k|      last_key.size() == 0
  ------------------
  |  Branch (201:7): [True: 28.4k, False: 314k]
  ------------------
  202|   343k|          ? last_key
  203|   343k|          : MaybeStripTimestampFromKey(&last_key_buf, last_key);
  204|   343k|  size_t shared = 0;  // number of bytes shared with prev key
  205|   343k|  if (counter_ >= block_restart_interval_) {
  ------------------
  |  Branch (205:7): [True: 145k, False: 197k]
  ------------------
  206|       |    // Restart compression
  207|   145k|    restarts_.push_back(static_cast<uint32_t>(buffer_size));
  208|   145k|    estimate_ += sizeof(uint32_t);
  209|   145k|    counter_ = 0;
  210|   197k|  } else if (use_delta_encoding_) {
  ------------------
  |  Branch (210:14): [True: 197k, False: 0]
  ------------------
  211|       |    // See how much sharing to do with previous string
  212|   197k|    shared = key_to_persist.difference_offset(last_key_persisted);
  213|   197k|  }
  214|       |
  215|   343k|  const size_t non_shared = key_to_persist.size() - shared;
  216|       |
  217|   343k|  if (use_value_delta_encoding_) {
  ------------------
  |  Branch (217:7): [True: 17.7k, False: 325k]
  ------------------
  218|       |    // Add "<shared><non_shared>" to buffer_
  219|  17.7k|    PutVarint32Varint32(&buffer_, static_cast<uint32_t>(shared),
  220|  17.7k|                        static_cast<uint32_t>(non_shared));
  221|   325k|  } else {
  222|       |    // Add "<shared><non_shared><value_size>" to buffer_
  223|   325k|    PutVarint32Varint32Varint32(&buffer_, static_cast<uint32_t>(shared),
  224|   325k|                                static_cast<uint32_t>(non_shared),
  225|   325k|                                static_cast<uint32_t>(value.size()));
  226|   325k|  }
  227|       |
  228|       |  // Add string delta to buffer_ followed by value
  229|   343k|  buffer_.append(key_to_persist.data() + shared, non_shared);
  230|       |  // Use value delta encoding only when the key has shared bytes. This would
  231|       |  // simplify the decoding, where it can figure which decoding to use simply by
  232|       |  // looking at the shared bytes size.
  233|   343k|  if (shared != 0 && use_value_delta_encoding_) {
  ------------------
  |  Branch (233:7): [True: 153k, False: 189k]
  |  Branch (233:22): [True: 0, False: 153k]
  ------------------
  234|      0|    buffer_.append(delta_value->data(), delta_value->size());
  235|   343k|  } else {
  236|   343k|    buffer_.append(value.data(), value.size());
  237|   343k|  }
  238|       |
  239|       |  // TODO(yuzhangyu): make user defined timestamp work with block hash index.
  240|   343k|  if (data_block_hash_index_builder_.Valid()) {
  ------------------
  |  Branch (240:7): [True: 0, False: 343k]
  ------------------
  241|       |    // Only data blocks should be using `kDataBlockBinaryAndHash` index type.
  242|       |    // And data blocks should always be built with internal keys instead of
  243|       |    // user keys.
  244|      0|    assert(!is_user_key_);
  245|      0|    data_block_hash_index_builder_.Add(ExtractUserKey(key),
  246|      0|                                       restarts_.size() - 1);
  247|      0|  }
  248|       |
  249|   343k|  counter_++;
  250|   343k|  estimate_ += buffer_.size() - buffer_size;
  251|   343k|}
_ZN7rocksdb12BlockBuilder26MaybeStripTimestampFromKeyEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_5SliceE:
  254|   658k|                                                     const Slice& key) {
  255|   658k|  Slice stripped_key = key;
  256|   658k|  if (strip_ts_sz_ > 0) {
  ------------------
  |  Branch (256:7): [True: 0, False: 658k]
  ------------------
  257|      0|    if (is_user_key_) {
  ------------------
  |  Branch (257:9): [True: 0, False: 0]
  ------------------
  258|      0|      stripped_key.remove_suffix(strip_ts_sz_);
  259|      0|    } else {
  260|      0|      StripTimestampFromInternalKey(key_buf, key, strip_ts_sz_);
  261|      0|      stripped_key = *key_buf;
  262|      0|    }
  263|      0|  }
  264|   658k|  return stripped_key;
  265|   658k|}

_ZNK7rocksdb12BlockBuilder19CurrentSizeEstimateEv:
   71|  83.9k|  inline size_t CurrentSizeEstimate() const {
   72|  83.9k|    return estimate_ + (data_block_hash_index_builder_.Valid()
  ------------------
  |  Branch (72:25): [True: 0, False: 83.9k]
  ------------------
   73|  83.9k|                            ? data_block_hash_index_builder_.EstimateSize()
   74|  83.9k|                            : 0);
   75|  83.9k|  }
_ZNK7rocksdb12BlockBuilder5emptyEv:
   81|  53.1k|  bool empty() const { return buffer_.empty(); }

_ZN7rocksdb18BlockCreateContext6CreateEPNSt3__110unique_ptrINS_11Block_kDataENS1_14default_deleteIS3_EEEEONS_13BlockContentsE:
   13|  11.7k|                                BlockContents&& block) {
   14|  11.7k|  parsed_out->reset(new Block_kData(
   15|  11.7k|      std::move(block), table_options->read_amp_bytes_per_bit, statistics));
   16|  11.7k|  parsed_out->get()->InitializeDataBlockProtectionInfo(protection_bytes_per_key,
   17|  11.7k|                                                       raw_ucmp);
   18|  11.7k|}
_ZN7rocksdb18BlockCreateContext6CreateEPNSt3__110unique_ptrINS_12Block_kIndexENS1_14default_deleteIS3_EEEEONS_13BlockContentsE:
   20|  4.48k|                                BlockContents&& block) {
   21|  4.48k|  parsed_out->reset(new Block_kIndex(std::move(block),
   22|  4.48k|                                     /*read_amp_bytes_per_bit*/ 0, statistics));
   23|  4.48k|  parsed_out->get()->InitializeIndexBlockProtectionInfo(
   24|  4.48k|      protection_bytes_per_key, raw_ucmp, index_value_is_full,
   25|  4.48k|      index_has_first_key);
   26|  4.48k|}
_ZN7rocksdb18BlockCreateContext6CreateEPNSt3__110unique_ptrINS_16Block_kMetaIndexENS1_14default_deleteIS3_EEEEONS_13BlockContentsE:
   42|  4.48k|                                BlockContents&& block) {
   43|  4.48k|  parsed_out->reset(new Block_kMetaIndex(
   44|  4.48k|      std::move(block), /*read_amp_bytes_per_bit*/ 0, statistics));
   45|  4.48k|  parsed_out->get()->InitializeMetaIndexBlockProtectionInfo(
   46|  4.48k|      protection_bytes_per_key);
   47|  4.48k|}

_ZN7rocksdb18BlockCreateContextC2Ev:
   71|  4.48k|  BlockCreateContext() {}
_ZN7rocksdb18BlockCreateContextC2EPKNS_22BlockBasedTableOptionsEPKNS_16ImmutableOptionsEPNS_10StatisticsEbhPKNS_10ComparatorEbb:
   85|  8.96k|        index_has_first_key(_index_has_first_key) {}

_ZN7rocksdb15BlockPrefetcher16PrefetchIfNeededEPKNS_15BlockBasedTable3RepERKNS_11BlockHandleEmbbRKNS_11ReadOptionsERKNSt3__18functionIFvbRmSD_EEEb:
   20|  8.85k|    bool is_async_io_prefetch) {
   21|  8.85k|  if (read_options.read_tier == ReadTier::kBlockCacheTier) {
  ------------------
  |  Branch (21:7): [True: 0, False: 8.85k]
  ------------------
   22|       |    // Disable prefetching when IO disallowed. (Note that we haven't allocated
   23|       |    // any buffers yet despite the various tracked settings.)
   24|      0|    return;
   25|      0|  }
   26|       |
   27|  8.85k|  ReadaheadParams readahead_params;
   28|  8.85k|  readahead_params.initial_readahead_size = readahead_size;
   29|  8.85k|  readahead_params.max_readahead_size = readahead_size;
   30|  8.85k|  readahead_params.num_buffers = is_async_io_prefetch ? 2 : 1;
  ------------------
  |  Branch (30:34): [True: 0, False: 8.85k]
  ------------------
   31|       |
   32|  8.85k|  const size_t len = BlockBasedTable::BlockSizeWithTrailer(handle);
   33|  8.85k|  const size_t offset = handle.offset();
   34|  8.85k|  if (is_for_compaction) {
  ------------------
  |  Branch (34:7): [True: 0, False: 8.85k]
  ------------------
   35|      0|    if (!rep->file->use_direct_io() && compaction_readahead_size_ > 0) {
  ------------------
  |  Branch (35:9): [True: 0, False: 0]
  |  Branch (35:40): [True: 0, False: 0]
  ------------------
   36|       |      // If FS supports prefetching (readahead_limit_ will be non zero in that
   37|       |      // case) and current block exists in prefetch buffer then return.
   38|      0|      if (offset + len <= readahead_limit_) {
  ------------------
  |  Branch (38:11): [True: 0, False: 0]
  ------------------
   39|      0|        return;
   40|      0|      }
   41|      0|      IOOptions opts;
   42|      0|      Status s = rep->file->PrepareIOOptions(read_options, opts);
   43|      0|      if (!s.ok()) {
  ------------------
  |  Branch (43:11): [True: 0, False: 0]
  ------------------
   44|      0|        return;
   45|      0|      }
   46|      0|      s = rep->file->Prefetch(opts, offset, len + compaction_readahead_size_);
   47|      0|      if (s.ok()) {
  ------------------
  |  Branch (47:11): [True: 0, False: 0]
  ------------------
   48|      0|        readahead_limit_ = offset + len + compaction_readahead_size_;
   49|      0|        return;
   50|      0|      } else if (!s.IsNotSupported()) {
  ------------------
  |  Branch (50:18): [True: 0, False: 0]
  ------------------
   51|      0|        return;
   52|      0|      }
   53|      0|    }
   54|       |    // If FS prefetch is not supported, fall back to use internal prefetch
   55|       |    // buffer.
   56|       |    //
   57|       |    // num_file_reads is used  by FilePrefetchBuffer only when
   58|       |    // implicit_auto_readahead is set.
   59|      0|    readahead_params.initial_readahead_size = compaction_readahead_size_;
   60|      0|    readahead_params.max_readahead_size = compaction_readahead_size_;
   61|      0|    rep->CreateFilePrefetchBufferIfNotExists(readahead_params,
   62|      0|                                             &prefetch_buffer_,
   63|      0|                                             /*readaheadsize_cb=*/nullptr);
   64|      0|    return;
   65|      0|  }
   66|       |
   67|       |  // Explicit user requested readahead.
   68|  8.85k|  if (readahead_size > 0) {
  ------------------
  |  Branch (68:7): [True: 0, False: 8.85k]
  ------------------
   69|      0|    rep->CreateFilePrefetchBufferIfNotExists(
   70|      0|        readahead_params, &prefetch_buffer_, readaheadsize_cb,
   71|      0|        /*usage=*/FilePrefetchBufferUsage::kUserScanPrefetch);
   72|      0|    return;
   73|      0|  }
   74|       |
   75|       |  // Implicit readahead.
   76|       |
   77|       |  // If max_auto_readahead_size is set to be 0 by user, no data will be
   78|       |  // prefetched.
   79|  8.85k|  size_t max_auto_readahead_size = rep->table_options.max_auto_readahead_size;
   80|  8.85k|  if (max_auto_readahead_size == 0 || initial_auto_readahead_size_ == 0) {
  ------------------
  |  Branch (80:7): [True: 0, False: 8.85k]
  |  Branch (80:39): [True: 0, False: 8.85k]
  ------------------
   81|      0|    return;
   82|      0|  }
   83|       |
   84|  8.85k|  if (initial_auto_readahead_size_ > max_auto_readahead_size) {
  ------------------
  |  Branch (84:7): [True: 0, False: 8.85k]
  ------------------
   85|      0|    initial_auto_readahead_size_ = max_auto_readahead_size;
   86|      0|  }
   87|       |
   88|  8.85k|  readahead_params.initial_readahead_size = initial_auto_readahead_size_;
   89|  8.85k|  readahead_params.max_readahead_size = max_auto_readahead_size;
   90|  8.85k|  readahead_params.implicit_auto_readahead = true;
   91|  8.85k|  readahead_params.num_file_reads_for_auto_readahead =
   92|  8.85k|      rep->table_options.num_file_reads_for_auto_readahead;
   93|       |
   94|       |  // In case of no_sequential_checking, it will skip the num_file_reads_ and
   95|       |  // will always creates the FilePrefetchBuffer.
   96|  8.85k|  if (no_sequential_checking) {
  ------------------
  |  Branch (96:7): [True: 0, False: 8.85k]
  ------------------
   97|      0|    rep->CreateFilePrefetchBufferIfNotExists(
   98|      0|        readahead_params, &prefetch_buffer_, readaheadsize_cb,
   99|      0|        /*usage=*/FilePrefetchBufferUsage::kUserScanPrefetch);
  100|      0|    return;
  101|      0|  }
  102|       |
  103|       |  // If FS supports prefetching (readahead_limit_ will be non zero in that case)
  104|       |  // and current block exists in prefetch buffer then return.
  105|  8.85k|  if (offset + len <= readahead_limit_) {
  ------------------
  |  Branch (105:7): [True: 3.26k, False: 5.59k]
  ------------------
  106|  3.26k|    UpdateReadPattern(offset, len);
  107|  3.26k|    return;
  108|  3.26k|  }
  109|       |
  110|  5.59k|  if (!IsBlockSequential(offset)) {
  ------------------
  |  Branch (110:7): [True: 0, False: 5.59k]
  ------------------
  111|      0|    UpdateReadPattern(offset, len);
  112|      0|    ResetValues(rep->table_options.initial_auto_readahead_size);
  113|      0|    return;
  114|      0|  }
  115|  5.59k|  UpdateReadPattern(offset, len);
  116|       |
  117|       |  // Implicit auto readahead, which will be enabled if the number of reads
  118|       |  // reached `table_options.num_file_reads_for_auto_readahead` (default: 2)  and
  119|       |  // scans are sequential.
  120|  5.59k|  num_file_reads_++;
  121|  5.59k|  if (num_file_reads_ <= rep->table_options.num_file_reads_for_auto_readahead) {
  ------------------
  |  Branch (121:7): [True: 4.53k, False: 1.05k]
  ------------------
  122|  4.53k|    return;
  123|  4.53k|  }
  124|       |
  125|  1.05k|  readahead_params.num_file_reads = num_file_reads_;
  126|  1.05k|  if (rep->file->use_direct_io()) {
  ------------------
  |  Branch (126:7): [True: 0, False: 1.05k]
  ------------------
  127|      0|    rep->CreateFilePrefetchBufferIfNotExists(
  128|      0|        readahead_params, &prefetch_buffer_, readaheadsize_cb,
  129|      0|        /*usage=*/FilePrefetchBufferUsage::kUserScanPrefetch);
  130|      0|    return;
  131|      0|  }
  132|       |
  133|  1.05k|  if (readahead_size_ > max_auto_readahead_size) {
  ------------------
  |  Branch (133:7): [True: 0, False: 1.05k]
  ------------------
  134|      0|    readahead_size_ = max_auto_readahead_size;
  135|      0|  }
  136|       |
  137|       |  // If prefetch is not supported, fall back to use internal prefetch buffer.
  138|  1.05k|  IOOptions opts;
  139|  1.05k|  Status s = rep->file->PrepareIOOptions(read_options, opts);
  140|  1.05k|  if (!s.ok()) {
  ------------------
  |  Branch (140:7): [True: 0, False: 1.05k]
  ------------------
  141|      0|    return;
  142|      0|  }
  143|  1.05k|  s = rep->file->Prefetch(
  144|  1.05k|      opts, handle.offset(),
  145|  1.05k|      BlockBasedTable::BlockSizeWithTrailer(handle) + readahead_size_);
  146|  1.05k|  if (s.IsNotSupported()) {
  ------------------
  |  Branch (146:7): [True: 0, False: 1.05k]
  ------------------
  147|      0|    rep->CreateFilePrefetchBufferIfNotExists(
  148|      0|        readahead_params, &prefetch_buffer_, readaheadsize_cb,
  149|      0|        /*usage=*/FilePrefetchBufferUsage::kUserScanPrefetch);
  150|      0|    return;
  151|      0|  }
  152|       |
  153|  1.05k|  readahead_limit_ = offset + len + readahead_size_;
  154|       |  // Keep exponentially increasing readahead size until
  155|       |  // max_auto_readahead_size.
  156|  1.05k|  readahead_size_ = std::min(max_auto_readahead_size, readahead_size_ * 2);
  157|  1.05k|}

_ZN7rocksdb15BlockPrefetcherC2Emm:
   19|  8.96k|        initial_auto_readahead_size_(initial_auto_readahead_size) {}
_ZN7rocksdb15BlockPrefetcher15prefetch_bufferEv:
   27|  8.85k|  FilePrefetchBuffer* prefetch_buffer() { return prefetch_buffer_.get(); }
_ZN7rocksdb15BlockPrefetcher17UpdateReadPatternERKmS2_:
   29|  8.85k|  void UpdateReadPattern(const uint64_t& offset, const size_t& len) {
   30|  8.85k|    prev_offset_ = offset;
   31|  8.85k|    prev_len_ = len;
   32|  8.85k|  }
_ZN7rocksdb15BlockPrefetcher17IsBlockSequentialERKm:
   34|  5.59k|  bool IsBlockSequential(const uint64_t& offset) {
   35|  5.59k|    return (prev_len_ == 0 || (prev_offset_ + prev_len_ == offset));
  ------------------
  |  Branch (35:13): [True: 3.81k, False: 1.77k]
  |  Branch (35:31): [True: 1.77k, False: 0]
  ------------------
   36|  5.59k|  }

_ZN7rocksdb13CachableEntryINS_11Block_kDataEE15ReleaseResourceEb:
  208|  11.7k|  void ReleaseResource(bool erase_if_last_ref) noexcept {
  209|  11.7k|    if (LIKELY(cache_handle_ != nullptr)) {
  ------------------
  |  |   13|  11.7k|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 0, False: 11.7k]
  |  |  ------------------
  ------------------
  210|      0|      assert(cache_ != nullptr);
  211|      0|      cache_->Release(cache_handle_, erase_if_last_ref);
  212|  11.7k|    } else if (own_value_) {
  ------------------
  |  Branch (212:16): [True: 0, False: 11.7k]
  ------------------
  213|      0|      delete value_;
  214|      0|    }
  215|  11.7k|  }
_ZNK7rocksdb13CachableEntryINS_5BlockEE8GetValueEv:
  111|  29.6k|  T* GetValue() const { return value_; }
_ZNK7rocksdb13CachableEntryINS_11Block_kDataEE14GetCacheHandleEv:
  113|  23.5k|  Cache::Handle* GetCacheHandle() const { return cache_handle_; }
_ZN7rocksdb13CachableEntryINS_12Block_kIndexEE13SetOwnedValueEONSt3__110unique_ptrIS1_NS3_14default_deleteIS1_EEEE:
  139|  4.48k|  void SetOwnedValue(std::unique_ptr<T>&& value) {
  140|  4.48k|    assert(value.get() != nullptr);
  141|       |
  142|  4.48k|    if (UNLIKELY(value_ == value.get() && own_value_)) {
  ------------------
  |  |   14|  4.48k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 4.48k]
  |  |  |  Branch (14:40): [True: 0, False: 4.48k]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  143|      0|      assert(cache_ == nullptr && cache_handle_ == nullptr);
  144|      0|      return;
  145|      0|    }
  146|       |
  147|  4.48k|    Reset();
  148|       |
  149|  4.48k|    value_ = value.release();
  150|  4.48k|    own_value_ = true;
  151|  4.48k|  }
_ZN7rocksdb13CachableEntryINS_12Block_kIndexEE5ResetEv:
  116|  4.48k|  void Reset() {
  117|  4.48k|    ReleaseResource(/*erase_if_last_ref=*/false);
  118|  4.48k|    ResetFields();
  119|  4.48k|  }
_ZN7rocksdb13CachableEntryINS_12Block_kIndexEE15ReleaseResourceEb:
  208|  4.48k|  void ReleaseResource(bool erase_if_last_ref) noexcept {
  209|  4.48k|    if (LIKELY(cache_handle_ != nullptr)) {
  ------------------
  |  |   13|  4.48k|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 0, False: 4.48k]
  |  |  ------------------
  ------------------
  210|      0|      assert(cache_ != nullptr);
  211|      0|      cache_->Release(cache_handle_, erase_if_last_ref);
  212|  4.48k|    } else if (own_value_) {
  ------------------
  |  Branch (212:16): [True: 0, False: 4.48k]
  ------------------
  213|      0|      delete value_;
  214|      0|    }
  215|  4.48k|  }
_ZN7rocksdb13CachableEntryINS_12Block_kIndexEE11ResetFieldsEv:
  217|  4.48k|  void ResetFields() noexcept {
  218|  4.48k|    value_ = nullptr;
  219|  4.48k|    cache_ = nullptr;
  220|  4.48k|    cache_handle_ = nullptr;
  221|  4.48k|    own_value_ = false;
  222|  4.48k|  }
_ZNK7rocksdb13CachableEntryINS_11Block_kDataEE8GetValueEv:
  111|  35.2k|  T* GetValue() const { return value_; }
_ZN7rocksdb13CachableEntryINS_11Block_kDataEE5ResetEv:
  116|  11.7k|  void Reset() {
  117|  11.7k|    ReleaseResource(/*erase_if_last_ref=*/false);
  118|  11.7k|    ResetFields();
  119|  11.7k|  }
_ZN7rocksdb13CachableEntryINS_11Block_kDataEE11ResetFieldsEv:
  217|  11.7k|  void ResetFields() noexcept {
  218|  11.7k|    value_ = nullptr;
  219|  11.7k|    cache_ = nullptr;
  220|  11.7k|    cache_handle_ = nullptr;
  221|  11.7k|    own_value_ = false;
  222|  11.7k|  }
_ZN7rocksdb13CachableEntryINS_11Block_kDataEE14SetCachedValueEPS1_PNS_5CacheEPNS4_6HandleE:
  167|  11.7k|  void SetCachedValue(T* value, Cache* cache, Cache::Handle* cache_handle) {
  168|  11.7k|    assert(cache != nullptr);
  169|  11.7k|    assert(cache_handle != nullptr);
  170|       |
  171|  11.7k|    if (UNLIKELY(value_ == value && cache_ == cache &&
  ------------------
  |  |   14|  35.2k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 11.7k]
  |  |  |  Branch (14:40): [True: 0, False: 11.7k]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  172|  11.7k|                 cache_handle_ == cache_handle && !own_value_)) {
  173|      0|      return;
  174|      0|    }
  175|       |
  176|  11.7k|    Reset();
  177|       |
  178|  11.7k|    value_ = value;
  179|  11.7k|    cache_ = cache;
  180|  11.7k|    cache_handle_ = cache_handle;
  181|  11.7k|    assert(!own_value_);
  182|  11.7k|  }
_ZNK7rocksdb13CachableEntryINS_5BlockEE8IsCachedEv:
  105|  23.5k|  bool IsCached() const {
  106|  23.5k|    assert(!!cache_ == !!cache_handle_);
  107|       |
  108|  23.5k|    return cache_handle_ != nullptr;
  109|  23.5k|  }
_ZNK7rocksdb13CachableEntryINS_5BlockEE14GetCacheHandleEv:
  113|  11.7k|  Cache::Handle* GetCacheHandle() const { return cache_handle_; }
_ZN7rocksdb13CachableEntryINS_5BlockEE10TransferToEPNS_9CleanableE:
  126|  20.7k|  void TransferTo(Cleanable* cleanable) {
  127|  20.7k|    if (cleanable) {
  ------------------
  |  Branch (127:9): [True: 20.7k, False: 0]
  ------------------
  128|  20.7k|      if (cache_handle_ != nullptr) {
  ------------------
  |  Branch (128:11): [True: 11.7k, False: 8.96k]
  ------------------
  129|  11.7k|        assert(cache_ != nullptr);
  130|  11.7k|        cleanable->RegisterCleanup(&ReleaseCacheHandle, cache_, cache_handle_);
  131|  11.7k|      } else if (own_value_) {
  ------------------
  |  Branch (131:18): [True: 0, False: 8.96k]
  ------------------
  132|      0|        cleanable->RegisterCleanup(&DeleteValue, value_, nullptr);
  133|      0|      }
  134|  20.7k|    }
  135|       |
  136|  20.7k|    ResetFields();
  137|  20.7k|  }
_ZN7rocksdb13CachableEntryINS_5BlockEE18ReleaseCacheHandleEPvS3_:
  224|  11.7k|  static void ReleaseCacheHandle(void* arg1, void* arg2) {
  225|  11.7k|    Cache* const cache = static_cast<Cache*>(arg1);
  226|  11.7k|    assert(cache);
  227|       |
  228|  11.7k|    Cache::Handle* const cache_handle = static_cast<Cache::Handle*>(arg2);
  229|  11.7k|    assert(cache_handle);
  230|       |
  231|  11.7k|    cache->Release(cache_handle);
  232|  11.7k|  }
_ZN7rocksdb13CachableEntryINS_5BlockEE11ResetFieldsEv:
  217|  34.1k|  void ResetFields() noexcept {
  218|  34.1k|    value_ = nullptr;
  219|  34.1k|    cache_ = nullptr;
  220|  34.1k|    cache_handle_ = nullptr;
  221|  34.1k|    own_value_ = false;
  222|  34.1k|  }
_ZN7rocksdb13CachableEntryINS_5BlockEEC2Ev:
   46|  25.2k|  CachableEntry() = default;
_ZN7rocksdb13CachableEntryINS_5BlockEE2AsINS_11Block_kDataEEENSt3__19enable_ifIXaaeqstT_Lm88Eoosr3stdE12is_base_of_vIS7_S1_Esr3stdE12is_base_of_vIS1_S7_EERNS0_IS7_EEE4typeEv:
  193|  11.7k|  As() {
  194|  11.7k|    CachableEntry<TWrapper>* result_ptr =
  195|  11.7k|        reinterpret_cast<CachableEntry<TWrapper>*>(this);
  196|       |    // Ensure no weirdness in template instantiations
  197|  11.7k|    assert(static_cast<void*>(&this->value_) ==
  198|  11.7k|           static_cast<void*>(&result_ptr->value_));
  199|  11.7k|    assert(&this->cache_handle_ == &result_ptr->cache_handle_);
  200|       |    // This function depends on no arithmetic involved in the pointer
  201|       |    // conversion, which is not statically checkable.
  202|  11.7k|    assert(static_cast<void*>(this->value_) ==
  203|  11.7k|           static_cast<void*>(result_ptr->value_));
  204|  11.7k|    return *result_ptr;
  205|  11.7k|  }
_ZN7rocksdb13CachableEntryINS_5BlockEED2Ev:
   98|  29.6k|  ~CachableEntry() { ReleaseResource(/*erase_if_last_ref=*/false); }
_ZN7rocksdb13CachableEntryINS_5BlockEE15ReleaseResourceEb:
  208|  38.6k|  void ReleaseResource(bool erase_if_last_ref) noexcept {
  209|  38.6k|    if (LIKELY(cache_handle_ != nullptr)) {
  ------------------
  |  |   13|  38.6k|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 0, False: 38.6k]
  |  |  ------------------
  ------------------
  210|      0|      assert(cache_ != nullptr);
  211|      0|      cache_->Release(cache_handle_, erase_if_last_ref);
  212|  38.6k|    } else if (own_value_) {
  ------------------
  |  Branch (212:16): [True: 4.48k, False: 34.1k]
  ------------------
  213|  4.48k|      delete value_;
  214|  4.48k|    }
  215|  38.6k|  }
_ZN7rocksdb13CachableEntryINS_5BlockEEC2EOS2_:
   67|  4.48k|        own_value_(rhs.own_value_) {
   68|  4.48k|    assert(value_ != nullptr ||
   69|  4.48k|           (cache_ == nullptr && cache_handle_ == nullptr && !own_value_));
   70|  4.48k|    assert(!!cache_ == !!cache_handle_);
   71|  4.48k|    assert(!cache_handle_ || !own_value_);
   72|       |
   73|  4.48k|    rhs.ResetFields();
   74|  4.48k|  }
_ZN7rocksdb13CachableEntryINS_5BlockEE5ResetEv:
  116|  8.96k|  void Reset() {
  117|  8.96k|    ReleaseResource(/*erase_if_last_ref=*/false);
  118|  8.96k|    ResetFields();
  119|  8.96k|  }
_ZN7rocksdb13CachableEntryINS_5BlockEE2AsINS_12Block_kIndexEEENSt3__19enable_ifIXaaeqstT_Lm88Eoosr3stdE12is_base_of_vIS7_S1_Esr3stdE12is_base_of_vIS1_S7_EERNS0_IS7_EEE4typeEv:
  193|  4.48k|  As() {
  194|  4.48k|    CachableEntry<TWrapper>* result_ptr =
  195|  4.48k|        reinterpret_cast<CachableEntry<TWrapper>*>(this);
  196|       |    // Ensure no weirdness in template instantiations
  197|  4.48k|    assert(static_cast<void*>(&this->value_) ==
  198|  4.48k|           static_cast<void*>(&result_ptr->value_));
  199|  4.48k|    assert(&this->cache_handle_ == &result_ptr->cache_handle_);
  200|       |    // This function depends on no arithmetic involved in the pointer
  201|       |    // conversion, which is not statically checkable.
  202|  4.48k|    assert(static_cast<void*>(this->value_) ==
  203|  4.48k|           static_cast<void*>(result_ptr->value_));
  204|  4.48k|    return *result_ptr;
  205|  4.48k|  }
_ZNK7rocksdb13CachableEntryINS_5BlockEE7IsEmptyEv:
  100|  8.96k|  bool IsEmpty() const {
  101|  8.96k|    return value_ == nullptr && cache_ == nullptr && cache_handle_ == nullptr &&
  ------------------
  |  Branch (101:12): [True: 0, False: 8.96k]
  |  Branch (101:33): [True: 0, False: 0]
  |  Branch (101:54): [True: 0, False: 0]
  ------------------
  102|  8.96k|           !own_value_;
  ------------------
  |  Branch (102:12): [True: 0, False: 0]
  ------------------
  103|  8.96k|  }
_ZN7rocksdb13CachableEntryINS_5BlockEE15SetUnownedValueEPS1_:
  153|  8.96k|  void SetUnownedValue(T* value) {
  154|  8.96k|    assert(value != nullptr);
  155|       |
  156|  8.96k|    if (UNLIKELY(value_ == value && cache_ == nullptr &&
  ------------------
  |  |   14|  26.9k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 8.96k]
  |  |  |  Branch (14:40): [True: 0, False: 8.96k]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  |  Branch (14:40): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  157|  8.96k|                 cache_handle_ == nullptr && !own_value_)) {
  158|      0|      return;
  159|      0|    }
  160|       |
  161|  8.96k|    Reset();
  162|       |
  163|  8.96k|    value_ = value;
  164|  8.96k|    assert(!own_value_);
  165|  8.96k|  }

_ZN7rocksdb27PackIndexTypeAndNumRestartsENS_22BlockBasedTableOptions18DataBlockIndexTypeEj:
   26|  25.2k|    uint32_t num_restarts) {
   27|  25.2k|  if (num_restarts > kMaxNumRestarts) {
  ------------------
  |  Branch (27:7): [True: 0, False: 25.2k]
  ------------------
   28|      0|    assert(0);  // mute travis "unused" warning
   29|      0|  }
   30|       |
   31|  25.2k|  uint32_t block_footer = num_restarts;
   32|  25.2k|  if (index_type == BlockBasedTableOptions::kDataBlockBinaryAndHash) {
  ------------------
  |  Branch (32:7): [True: 0, False: 25.2k]
  ------------------
   33|      0|    block_footer |= 1u << kDataBlockIndexTypeBitShift;
   34|  25.2k|  } else if (index_type != BlockBasedTableOptions::kDataBlockBinarySearch) {
  ------------------
  |  Branch (34:14): [True: 0, False: 25.2k]
  ------------------
   35|      0|    assert(0);
   36|      0|  }
   37|       |
   38|  25.2k|  return block_footer;
   39|  25.2k|}
_ZN7rocksdb29UnPackIndexTypeAndNumRestartsEjPNS_22BlockBasedTableOptions18DataBlockIndexTypeEPj:
   44|  48.6k|    uint32_t* num_restarts) {
   45|  48.6k|  if (index_type) {
  ------------------
  |  Branch (45:7): [True: 48.6k, False: 0]
  ------------------
   46|  48.6k|    if (block_footer & 1u << kDataBlockIndexTypeBitShift) {
  ------------------
  |  Branch (46:9): [True: 0, False: 48.6k]
  ------------------
   47|      0|      *index_type = BlockBasedTableOptions::kDataBlockBinaryAndHash;
   48|  48.6k|    } else {
   49|  48.6k|      *index_type = BlockBasedTableOptions::kDataBlockBinarySearch;
   50|  48.6k|    }
   51|  48.6k|  }
   52|       |
   53|  48.6k|  if (num_restarts) {
  ------------------
  |  Branch (53:7): [True: 48.6k, False: 0]
  ------------------
   54|  48.6k|    *num_restarts = block_footer & kNumRestartsMask;
   55|  48.6k|    assert(*num_restarts <= kMaxNumRestarts);
   56|  48.6k|  }
   57|  48.6k|}

_ZN7rocksdb25DataBlockHashIndexBuilderC2Ev:
   79|  26.9k|        valid_(false) {}
_ZNK7rocksdb25DataBlockHashIndexBuilder5ValidEv:
   89|   461k|  inline bool Valid() const { return valid_ && bucket_per_key_ > 0; }
  ------------------
  |  Branch (89:38): [True: 0, False: 461k]
  |  Branch (89:48): [True: 0, False: 0]
  ------------------
_ZN7rocksdb18DataBlockHashIndexC2Ev:
  119|  25.2k|  DataBlockHashIndex() : num_buckets_(0) {}
_ZN7rocksdb18DataBlockHashIndex5ValidEv:
  125|  11.7k|  inline bool Valid() { return num_buckets_ != 0; }

_ZN7rocksdb12FilterPolicy16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIKS0_EE:
 1946|  18.0k|    std::shared_ptr<const FilterPolicy>* policy) {
 1947|  18.0k|  if (value == kNullptrString || value.empty()) {
  ------------------
  |  Branch (1947:7): [True: 18.0k, False: 0]
  |  Branch (1947:34): [True: 0, False: 0]
  ------------------
 1948|  18.0k|    policy->reset();
 1949|  18.0k|    return Status::OK();
 1950|  18.0k|  } else if (value == ReadOnlyBuiltinFilterPolicy::kClassName()) {
  ------------------
  |  Branch (1950:14): [True: 0, False: 0]
  ------------------
 1951|      0|    *policy = std::make_shared<ReadOnlyBuiltinFilterPolicy>();
 1952|      0|    return Status::OK();
 1953|      0|  }
 1954|       |
 1955|      0|  std::string id;
 1956|      0|  std::unordered_map<std::string, std::string> opt_map;
 1957|      0|  Status status =
 1958|      0|      Customizable::GetOptionsMap(options, policy->get(), value, &id, &opt_map);
 1959|      0|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (1959:7): [True: 0, False: 0]
  ------------------
 1960|      0|    return status;
 1961|      0|  } else if (id.empty()) {  // We have no Id but have options.  Not good
  ------------------
  |  Branch (1961:14): [True: 0, False: 0]
  ------------------
 1962|      0|    return Status::NotSupported("Cannot reset object ", id);
 1963|      0|  } else {
 1964|      0|    static std::once_flag loaded;
 1965|      0|    std::call_once(loaded, [&]() {
 1966|      0|      RegisterBuiltinFilterPolicies(*(ObjectLibrary::Default().get()), "");
 1967|      0|    });
 1968|      0|    status = options.registry->NewSharedObject(id, policy);
 1969|      0|  }
 1970|      0|  if (options.ignore_unsupported_options && status.IsNotSupported()) {
  ------------------
  |  Branch (1970:7): [True: 0, False: 0]
  |  Branch (1970:45): [True: 0, False: 0]
  ------------------
 1971|      0|    return Status::OK();
 1972|      0|  } else if (status.ok()) {
  ------------------
  |  Branch (1972:14): [True: 0, False: 0]
  ------------------
 1973|      0|    status = Customizable::ConfigureNewObject(
 1974|      0|        options, const_cast<FilterPolicy*>(policy->get()), opt_map);
 1975|      0|  }
 1976|      0|  return status;
 1977|      0|}

_ZNK7rocksdb29FlushBlockBySizePolicyFactory19NewFlushBlockPolicyERKNS_22BlockBasedTableOptionsERKNS_12BlockBuilderE:
   80|  4.48k|    const BlockBuilder& data_block_builder) const {
   81|  4.48k|  return new FlushBlockBySizePolicy(
   82|  4.48k|      table_options.block_size, table_options.block_size_deviation,
   83|  4.48k|      table_options.block_align, data_block_builder);
   84|  4.48k|}
_ZN7rocksdb29FlushBlockBySizePolicyFactoryC2Ev:
  114|   112k|    : FlushBlockPolicyFactory() {}
_ZN7rocksdb23FlushBlockPolicyFactory16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIS0_EE:
  118|  18.0k|    std::shared_ptr<FlushBlockPolicyFactory>* factory) {
  119|  18.0k|  static std::once_flag once;
  120|  18.0k|  std::call_once(once, [&]() {
  121|  18.0k|    RegisterFlushBlockPolicyFactories(*(ObjectLibrary::Default().get()), "");
  122|  18.0k|  });
  123|       |
  124|  18.0k|  if (value.empty()) {
  ------------------
  |  Branch (124:7): [True: 0, False: 18.0k]
  ------------------
  125|      0|    factory->reset(new FlushBlockBySizePolicyFactory());
  126|      0|    return Status::OK();
  127|  18.0k|  } else {
  128|  18.0k|    return LoadSharedObject<FlushBlockPolicyFactory>(config_options, value,
  129|  18.0k|                                                     factory);
  130|  18.0k|  }
  131|  18.0k|}
_ZN7rocksdb22FlushBlockBySizePolicyC2EmmbRKNS_12BlockBuilderE:
   35|  4.48k|        data_block_builder_(data_block_builder) {}
_ZN7rocksdb22FlushBlockBySizePolicy6UpdateERKNS_5SliceES3_:
   37|  34.6k|  bool Update(const Slice& key, const Slice& value) override {
   38|       |    // it makes no sense to flush when the data block is empty
   39|  34.6k|    if (data_block_builder_.empty()) {
  ------------------
  |  Branch (39:9): [True: 3.81k, False: 30.8k]
  ------------------
   40|  3.81k|      return false;
   41|  3.81k|    }
   42|       |
   43|  30.8k|    auto curr_size = data_block_builder_.CurrentSizeEstimate();
   44|       |
   45|       |    // Do flush if one of the below two conditions is true:
   46|       |    // 1) if the current estimated size already exceeds the block size,
   47|       |    // 2) block_size_deviation is set and the estimated size after appending
   48|       |    // the kv will exceed the block size and the current size is under the
   49|       |    // the deviation.
   50|  30.8k|    return curr_size >= block_size_ || BlockAlmostFull(key, value);
  ------------------
  |  Branch (50:12): [True: 4.27k, False: 26.5k]
  |  Branch (50:40): [True: 763, False: 25.8k]
  ------------------
   51|  34.6k|  }
_ZNK7rocksdb22FlushBlockBySizePolicy15BlockAlmostFullERKNS_5SliceES3_:
   54|  26.5k|  bool BlockAlmostFull(const Slice& key, const Slice& value) const {
   55|  26.5k|    if (block_size_deviation_limit_ == 0) {
  ------------------
  |  Branch (55:9): [True: 0, False: 26.5k]
  ------------------
   56|      0|      return false;
   57|      0|    }
   58|       |
   59|  26.5k|    const auto curr_size = data_block_builder_.CurrentSizeEstimate();
   60|  26.5k|    auto estimated_size_after =
   61|  26.5k|        data_block_builder_.EstimateSizeAfterKV(key, value);
   62|       |
   63|  26.5k|    if (align_) {
  ------------------
  |  Branch (63:9): [True: 0, False: 26.5k]
  ------------------
   64|      0|      estimated_size_after += BlockBasedTable::kBlockTrailerSize;
   65|      0|      return estimated_size_after > block_size_;
   66|      0|    }
   67|       |
   68|  26.5k|    return estimated_size_after > block_size_ &&
  ------------------
  |  Branch (68:12): [True: 4.55k, False: 22.0k]
  ------------------
   69|  26.5k|           curr_size > block_size_deviation_limit_;
  ------------------
  |  Branch (69:12): [True: 763, False: 3.79k]
  ------------------
   70|  26.5k|  }
flush_block_policy.cc:_ZZN7rocksdb23FlushBlockPolicyFactory16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIS0_EEENK3$_0clEv:
  120|      1|  std::call_once(once, [&]() {
  121|      1|    RegisterFlushBlockPolicyFactories(*(ObjectLibrary::Default().get()), "");
  122|      1|  });
flush_block_policy.cc:_ZN7rocksdbL33RegisterFlushBlockPolicyFactoriesERNS_13ObjectLibraryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   93|      1|                                             const std::string& /*arg*/) {
   94|      1|  library.AddFactory<FlushBlockPolicyFactory>(
   95|      1|      FlushBlockBySizePolicyFactory::kClassName(),
   96|      1|      [](const std::string& /*uri*/,
   97|      1|         std::unique_ptr<FlushBlockPolicyFactory>* guard,
   98|      1|         std::string* /* errmsg */) {
   99|      1|        guard->reset(new FlushBlockBySizePolicyFactory());
  100|      1|        return guard->get();
  101|      1|      });
  102|      1|  library.AddFactory<FlushBlockPolicyFactory>(
  103|      1|      FlushBlockEveryKeyPolicyFactory::kClassName(),
  104|      1|      [](const std::string& /*uri*/,
  105|      1|         std::unique_ptr<FlushBlockPolicyFactory>* guard,
  106|      1|         std::string* /* errmsg */) {
  107|      1|        guard->reset(new FlushBlockEveryKeyPolicyFactory());
  108|      1|        return guard->get();
  109|      1|      });
  110|      1|  return 2;
  111|      1|}
flush_block_policy.cc:_ZZN7rocksdbL33RegisterFlushBlockPolicyFactoriesERNS_13ObjectLibraryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEENK3$_0clESA_PNS2_10unique_ptrINS_23FlushBlockPolicyFactoryENS2_14default_deleteISD_EEEEPS8_:
   98|  18.0k|         std::string* /* errmsg */) {
   99|  18.0k|        guard->reset(new FlushBlockBySizePolicyFactory());
  100|  18.0k|        return guard->get();
  101|  18.0k|      });

_ZN7rocksdb31FlushBlockEveryKeyPolicyFactory10kClassNameEv:
   30|      1|  static const char* kClassName() { return "FlushBlockEveryKeyPolicyFactory"; }

_ZN7rocksdb12IndexBuilder18CreateIndexBuilderENS_22BlockBasedTableOptions9IndexTypeEPKNS_21InternalKeyComparatorEPKNS_25InternalKeySliceTransformEbRKS1_mb:
   32|  4.48k|    const bool persist_user_defined_timestamps) {
   33|  4.48k|  IndexBuilder* result = nullptr;
   34|  4.48k|  switch (index_type) {
   35|  4.48k|    case BlockBasedTableOptions::kBinarySearch: {
  ------------------
  |  Branch (35:5): [True: 4.48k, False: 0]
  ------------------
   36|  4.48k|      result = new ShortenedIndexBuilder(
   37|  4.48k|          comparator, table_opt.index_block_restart_interval,
   38|  4.48k|          table_opt.format_version, use_value_delta_encoding,
   39|  4.48k|          table_opt.index_shortening, /* include_first_key */ false, ts_sz,
   40|  4.48k|          persist_user_defined_timestamps);
   41|  4.48k|      break;
   42|      0|    }
   43|      0|    case BlockBasedTableOptions::kHashSearch: {
  ------------------
  |  Branch (43:5): [True: 0, False: 4.48k]
  ------------------
   44|       |      // Currently kHashSearch is incompatible with index_block_restart_interval
   45|       |      // > 1
   46|      0|      assert(table_opt.index_block_restart_interval == 1);
   47|      0|      result = new HashIndexBuilder(
   48|      0|          comparator, int_key_slice_transform,
   49|      0|          table_opt.index_block_restart_interval, table_opt.format_version,
   50|      0|          use_value_delta_encoding, table_opt.index_shortening, ts_sz,
   51|      0|          persist_user_defined_timestamps);
   52|      0|      break;
   53|      0|    }
   54|      0|    case BlockBasedTableOptions::kTwoLevelIndexSearch: {
  ------------------
  |  Branch (54:5): [True: 0, False: 4.48k]
  ------------------
   55|      0|      result = PartitionedIndexBuilder::CreateIndexBuilder(
   56|      0|          comparator, use_value_delta_encoding, table_opt, ts_sz,
   57|      0|          persist_user_defined_timestamps);
   58|      0|      break;
   59|      0|    }
   60|      0|    case BlockBasedTableOptions::kBinarySearchWithFirstKey: {
  ------------------
  |  Branch (60:5): [True: 0, False: 4.48k]
  ------------------
   61|      0|      result = new ShortenedIndexBuilder(
   62|      0|          comparator, table_opt.index_block_restart_interval,
   63|      0|          table_opt.format_version, use_value_delta_encoding,
   64|      0|          table_opt.index_shortening, /* include_first_key */ true, ts_sz,
   65|      0|          persist_user_defined_timestamps);
   66|      0|      break;
   67|      0|    }
   68|      0|    default: {
  ------------------
  |  Branch (68:5): [True: 0, False: 4.48k]
  ------------------
   69|      0|      assert(!"Do not recognize the index type ");
   70|      0|      break;
   71|      0|    }
   72|  4.48k|  }
   73|  4.48k|  return result;
   74|  4.48k|}
_ZN7rocksdb21ShortenedIndexBuilder32FindShortestInternalKeySeparatorERKNS_10ComparatorERKNS_5SliceES6_PNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEE:
   78|  5.04k|    std::string* scratch) {
   79|       |  // Attempt to shorten the user portion of the key
   80|  5.04k|  Slice user_start = ExtractUserKey(start);
   81|  5.04k|  Slice user_limit = ExtractUserKey(limit);
   82|  5.04k|  scratch->assign(user_start.data(), user_start.size());
   83|  5.04k|  comparator.FindShortestSeparator(scratch, user_limit);
   84|  5.04k|  assert(comparator.Compare(user_start, *scratch) <= 0);
   85|  5.04k|  assert(comparator.Compare(user_start, user_limit) >= 0 ||
   86|  5.04k|         comparator.Compare(*scratch, user_limit) < 0);
   87|  5.04k|  if (scratch->size() <= user_start.size() &&
  ------------------
  |  Branch (87:7): [True: 5.04k, False: 0]
  |  Branch (87:7): [True: 4.82k, False: 220]
  ------------------
   88|  5.04k|      comparator.Compare(user_start, *scratch) < 0) {
  ------------------
  |  Branch (88:7): [True: 4.82k, False: 220]
  ------------------
   89|       |    // User key has become shorter physically, but larger logically.
   90|       |    // Tack on the earliest possible number to the shortened user key.
   91|  4.82k|    PutFixed64(scratch,
   92|  4.82k|               PackSequenceAndType(kMaxSequenceNumber, kValueTypeForSeek));
   93|  4.82k|    assert(InternalKeyComparator(&comparator).Compare(start, *scratch) < 0);
   94|  4.82k|    assert(InternalKeyComparator(&comparator).Compare(*scratch, limit) < 0);
   95|  4.82k|    return *scratch;
   96|  4.82k|  } else {
   97|    220|    return start;
   98|    220|  }
   99|  5.04k|}

_ZN7rocksdb12IndexBuilderC2EPKNS_21InternalKeyComparatorEmb:
   55|  4.48k|        persist_user_defined_timestamps_(persist_user_defined_timestamps) {}
_ZN7rocksdb12IndexBuilder6FinishEPNS0_11IndexBlocksE:
   87|  4.48k|  inline Status Finish(IndexBlocks* index_blocks) {
   88|       |    // Throw away the changes to last_partition_block_handle. It has no effect
   89|       |    // on the first call to Finish anyway.
   90|  4.48k|    BlockHandle last_partition_block_handle;
   91|  4.48k|    return Finish(index_blocks, last_partition_block_handle);
   92|  4.48k|  }
_ZN7rocksdb12IndexBuilder30ShouldUseKeyPlusSeqAsSeparatorERKNS_5SliceES3_:
  119|  5.04k|      const Slice& first_key_in_next_block) {
  120|  5.04k|    Slice l_user_key = ExtractUserKey(last_key_in_current_block);
  121|  5.04k|    Slice r_user_key = ExtractUserKey(first_key_in_next_block);
  122|       |    // If user defined timestamps are not persisted. All the user keys will
  123|       |    // act like they have minimal timestamp. Only having user key is not
  124|       |    // sufficient, even if they are different user keys for now, they have to be
  125|       |    // different user keys without the timestamp part.
  126|  5.04k|    return persist_user_defined_timestamps_
  ------------------
  |  Branch (126:12): [True: 5.04k, False: 0]
  ------------------
  127|  5.04k|               ? comparator_->user_comparator()->Compare(l_user_key,
  128|  5.04k|                                                         r_user_key) == 0
  129|  5.04k|               : comparator_->user_comparator()->CompareWithoutTimestamp(
  130|      0|                     l_user_key, r_user_key) == 0;
  131|  5.04k|  }
_ZN7rocksdb21ShortenedIndexBuilderC2EPKNS_21InternalKeyComparatorEijbNS_22BlockBasedTableOptions19IndexShorteningModeEbmb:
  178|  4.48k|        shortening_mode_(shortening_mode) {
  179|       |    // Making the default true will disable the feature for old versions
  180|  4.48k|    seperator_is_key_plus_seq_ = (format_version <= 2);
  181|  4.48k|  }
_ZN7rocksdb21ShortenedIndexBuilder10OnKeyAddedERKNS_5SliceE:
  183|  34.6k|  void OnKeyAdded(const Slice& key) override {
  184|  34.6k|    if (include_first_key_ && current_block_first_internal_key_.empty()) {
  ------------------
  |  Branch (184:9): [True: 0, False: 34.6k]
  |  Branch (184:31): [True: 0, False: 0]
  ------------------
  185|      0|      current_block_first_internal_key_.assign(key.data(), key.size());
  186|      0|    }
  187|  34.6k|  }
_ZN7rocksdb21ShortenedIndexBuilder13AddIndexEntryERKNS_5SliceEPS2_RKNS_11BlockHandleEPNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEE:
  192|  8.85k|                      std::string* separator_scratch) override {
  193|  8.85k|    Slice separator;
  194|  8.85k|    if (first_key_in_next_block != nullptr) {
  ------------------
  |  Branch (194:9): [True: 5.04k, False: 3.81k]
  ------------------
  195|  5.04k|      if (shortening_mode_ !=
  ------------------
  |  Branch (195:11): [True: 5.04k, False: 0]
  ------------------
  196|  5.04k|          BlockBasedTableOptions::IndexShorteningMode::kNoShortening) {
  197|  5.04k|        separator = FindShortestInternalKeySeparator(
  198|  5.04k|            *comparator_->user_comparator(), last_key_in_current_block,
  199|  5.04k|            *first_key_in_next_block, separator_scratch);
  200|  5.04k|      } else {
  201|      0|        separator = last_key_in_current_block;
  202|      0|      }
  203|  5.04k|      if (!seperator_is_key_plus_seq_ &&
  ------------------
  |  Branch (203:11): [True: 5.04k, False: 0]
  ------------------
  204|  5.04k|          ShouldUseKeyPlusSeqAsSeparator(last_key_in_current_block,
  ------------------
  |  Branch (204:11): [True: 0, False: 5.04k]
  ------------------
  205|  5.04k|                                         *first_key_in_next_block)) {
  206|      0|        seperator_is_key_plus_seq_ = true;
  207|      0|      }
  208|  5.04k|    } else {
  209|  3.81k|      if (shortening_mode_ == BlockBasedTableOptions::IndexShorteningMode::
  ------------------
  |  Branch (209:11): [True: 0, False: 3.81k]
  ------------------
  210|  3.81k|                                  kShortenSeparatorsAndSuccessor) {
  211|      0|        separator = FindShortInternalKeySuccessor(
  212|      0|            *comparator_->user_comparator(), last_key_in_current_block,
  213|      0|            separator_scratch);
  214|  3.81k|      } else {
  215|  3.81k|        separator = last_key_in_current_block;
  216|  3.81k|      }
  217|  3.81k|    }
  218|       |
  219|  8.85k|    assert(!include_first_key_ || !current_block_first_internal_key_.empty());
  220|       |    // When UDT should not be persisted, the index block builders take care of
  221|       |    // stripping UDT from the key, for the first internal key contained in the
  222|       |    // IndexValue, we need to explicitly do the stripping here before passing
  223|       |    // it to the block builders.
  224|  8.85k|    std::string first_internal_key_buf;
  225|  8.85k|    Slice first_internal_key = current_block_first_internal_key_;
  226|  8.85k|    if (!current_block_first_internal_key_.empty() && ts_sz_ > 0 &&
  ------------------
  |  Branch (226:9): [True: 0, False: 8.85k]
  |  Branch (226:55): [True: 0, False: 0]
  ------------------
  227|  8.85k|        !persist_user_defined_timestamps_) {
  ------------------
  |  Branch (227:9): [True: 0, False: 0]
  ------------------
  228|      0|      StripTimestampFromInternalKey(&first_internal_key_buf,
  229|      0|                                    current_block_first_internal_key_, ts_sz_);
  230|      0|      first_internal_key = first_internal_key_buf;
  231|      0|    }
  232|  8.85k|    IndexValue entry(block_handle, first_internal_key);
  233|  8.85k|    std::string encoded_entry;
  234|  8.85k|    std::string delta_encoded_entry;
  235|  8.85k|    entry.EncodeTo(&encoded_entry, include_first_key_, nullptr);
  236|  8.85k|    if (use_value_delta_encoding_ && !last_encoded_handle_.IsNull()) {
  ------------------
  |  Branch (236:9): [True: 8.85k, False: 0]
  |  Branch (236:38): [True: 5.04k, False: 3.81k]
  ------------------
  237|  5.04k|      entry.EncodeTo(&delta_encoded_entry, include_first_key_,
  238|  5.04k|                     &last_encoded_handle_);
  239|  5.04k|    } else {
  240|       |      // If it's the first block, or delta encoding is disabled,
  241|       |      // BlockBuilder::Add() below won't use delta-encoded slice.
  242|  3.81k|    }
  243|  8.85k|    last_encoded_handle_ = block_handle;
  244|  8.85k|    const Slice delta_encoded_entry_slice(delta_encoded_entry);
  245|       |
  246|       |    // TODO(yuzhangyu): fix this when "FindShortInternalKeySuccessor"
  247|       |    //  optimization is available.
  248|       |    // Timestamp aware comparator currently doesn't provide override for
  249|       |    // "FindShortInternalKeySuccessor" optimization. So the actual
  250|       |    // last key in current block is used as the key for indexing the current
  251|       |    // block. As a result, when UDTs should not be persisted, it's safe to strip
  252|       |    // away the UDT from key in index block as data block does the same thing.
  253|       |    // What are the implications if a "FindShortInternalKeySuccessor"
  254|       |    // optimization is provided.
  255|  8.85k|    index_block_builder_.Add(separator, encoded_entry,
  256|  8.85k|                             &delta_encoded_entry_slice);
  257|  8.85k|    if (!seperator_is_key_plus_seq_) {
  ------------------
  |  Branch (257:9): [True: 8.85k, False: 0]
  ------------------
  258|  8.85k|      index_block_builder_without_seq_.Add(
  259|  8.85k|          ExtractUserKey(separator), encoded_entry, &delta_encoded_entry_slice);
  260|  8.85k|    }
  261|       |
  262|  8.85k|    current_block_first_internal_key_.clear();
  263|  8.85k|    return separator;
  264|  8.85k|  }
_ZN7rocksdb21ShortenedIndexBuilder6FinishEPNS_12IndexBuilder11IndexBlocksERKNS_11BlockHandleE:
  268|  4.48k|                const BlockHandle& /*last_partition_block_handle*/) override {
  269|  4.48k|    if (seperator_is_key_plus_seq_) {
  ------------------
  |  Branch (269:9): [True: 0, False: 4.48k]
  ------------------
  270|      0|      index_blocks->index_block_contents = index_block_builder_.Finish();
  271|  4.48k|    } else {
  272|  4.48k|      index_blocks->index_block_contents =
  273|  4.48k|          index_block_builder_without_seq_.Finish();
  274|  4.48k|    }
  275|  4.48k|    index_size_ = index_blocks->index_block_contents.size();
  276|  4.48k|    return Status::OK();
  277|  4.48k|  }
_ZNK7rocksdb21ShortenedIndexBuilder9IndexSizeEv:
  279|  4.48k|  size_t IndexSize() const override { return index_size_; }
_ZN7rocksdb21ShortenedIndexBuilder25seperator_is_key_plus_seqEv:
  281|  4.48k|  bool seperator_is_key_plus_seq() override {
  282|  4.48k|    return seperator_is_key_plus_seq_;
  283|  4.48k|  }
_ZN7rocksdb12IndexBuilderD2Ev:
   57|  4.48k|  virtual ~IndexBuilder() = default;

_ZN7rocksdb15BlockBasedTable17IndexReaderCommon14ReadIndexBlockEPKS0_PNS_18FilePrefetchBufferERKNS_11ReadOptionsEbPNS_10GetContextEPNS_23BlockCacheLookupContextEPNS_13CachableEntryINS_5BlockEEE:
   18|  4.48k|    CachableEntry<Block>* index_block) {
   19|  4.48k|  PERF_TIMER_GUARD(read_index_block_nanos);
  ------------------
  |  |   46|  4.48k|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  4.48k|  perf_step_timer_##metric.Start();
  ------------------
   20|       |
   21|  4.48k|  assert(table != nullptr);
   22|  4.48k|  assert(index_block != nullptr);
   23|  4.48k|  assert(index_block->IsEmpty());
   24|       |
   25|  4.48k|  const Rep* const rep = table->get_rep();
   26|  4.48k|  assert(rep != nullptr);
   27|       |
   28|  4.48k|  const Status s = table->RetrieveBlock(
   29|  4.48k|      prefetch_buffer, read_options, rep->index_handle,
   30|  4.48k|      UncompressionDict::GetEmptyDict(), &index_block->As<Block_kIndex>(),
   31|  4.48k|      get_context, lookup_context, /* for_compaction */ false, use_cache,
   32|  4.48k|      /* async_read */ false, /* use_block_cache_for_lookup */ true);
   33|       |
   34|  4.48k|  return s;
   35|  4.48k|}
_ZNK7rocksdb15BlockBasedTable17IndexReaderCommon19GetOrReadIndexBlockEPNS_10GetContextEPNS_23BlockCacheLookupContextEPNS_13CachableEntryINS_5BlockEEERKNS_11ReadOptionsE:
   39|  8.96k|    CachableEntry<Block>* index_block, const ReadOptions& ro) const {
   40|  8.96k|  assert(index_block != nullptr);
   41|       |
   42|  8.96k|  if (!index_block_.IsEmpty()) {
  ------------------
  |  Branch (42:7): [True: 8.96k, False: 0]
  ------------------
   43|  8.96k|    index_block->SetUnownedValue(index_block_.GetValue());
   44|  8.96k|    return Status::OK();
   45|  8.96k|  }
   46|       |
   47|      0|  return ReadIndexBlock(table_, /*prefetch_buffer=*/nullptr, ro,
   48|      0|                        cache_index_blocks(), get_context, lookup_context,
   49|      0|                        index_block);
   50|  8.96k|}

_ZN7rocksdb15BlockBasedTable17IndexReaderCommonC2EPKS0_ONS_13CachableEntryINS_5BlockEEE:
   23|  4.48k|      : table_(t), index_block_(std::move(index_block)) {
   24|  4.48k|    assert(table_ != nullptr);
   25|  4.48k|  }
_ZNK7rocksdb15BlockBasedTable17IndexReaderCommon5tableEv:
   38|  8.96k|  const BlockBasedTable* table() const { return table_; }
_ZNK7rocksdb15BlockBasedTable17IndexReaderCommon19internal_comparatorEv:
   40|  8.96k|  const InternalKeyComparator* internal_comparator() const {
   41|  8.96k|    assert(table_ != nullptr);
   42|  8.96k|    assert(table_->get_rep() != nullptr);
   43|       |
   44|  8.96k|    return &table_->get_rep()->internal_comparator;
   45|  8.96k|  }
_ZNK7rocksdb15BlockBasedTable17IndexReaderCommon19index_has_first_keyEv:
   47|  8.96k|  bool index_has_first_key() const {
   48|  8.96k|    assert(table_ != nullptr);
   49|  8.96k|    assert(table_->get_rep() != nullptr);
   50|  8.96k|    return table_->get_rep()->index_has_first_key;
   51|  8.96k|  }
_ZNK7rocksdb15BlockBasedTable17IndexReaderCommon22index_key_includes_seqEv:
   53|  8.96k|  bool index_key_includes_seq() const {
   54|  8.96k|    assert(table_ != nullptr);
   55|  8.96k|    assert(table_->get_rep() != nullptr);
   56|  8.96k|    return table_->get_rep()->index_key_includes_seq;
   57|  8.96k|  }
_ZNK7rocksdb15BlockBasedTable17IndexReaderCommon19index_value_is_fullEv:
   59|  8.96k|  bool index_value_is_full() const {
   60|  8.96k|    assert(table_ != nullptr);
   61|  8.96k|    assert(table_->get_rep() != nullptr);
   62|  8.96k|    return table_->get_rep()->index_value_is_full;
   63|  8.96k|  }
_ZNK7rocksdb15BlockBasedTable17IndexReaderCommon33user_defined_timestamps_persistedEv:
   71|  8.96k|  bool user_defined_timestamps_persisted() const {
   72|  8.96k|    assert(table_ != nullptr);
   73|  8.96k|    assert(table_->get_rep() != nullptr);
   74|  8.96k|    return table_->get_rep()->user_defined_timestamps_persisted;
   75|  8.96k|  }

_ZN7rocksdb19VerifyBlockChecksumERKNS_6FooterEPKcmRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEm:
   28|  25.2k|                           uint64_t offset) {
   29|  25.2k|  PERF_TIMER_GUARD(block_checksum_time);
  ------------------
  |  |   46|  25.2k|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  25.2k|  perf_step_timer_##metric.Start();
  ------------------
   30|       |
   31|  25.2k|  assert(footer.GetBlockTrailerSize() == 5);
   32|  25.2k|  ChecksumType type = footer.checksum_type();
   33|       |
   34|       |  // After block_size bytes is compression type (1 byte), which is part of
   35|       |  // the checksummed section.
   36|  25.2k|  size_t len = block_size + 1;
   37|       |  // And then the stored checksum value (4 bytes).
   38|  25.2k|  uint32_t stored = DecodeFixed32(data + len);
   39|       |
   40|  25.2k|  uint32_t computed = ComputeBuiltinChecksum(type, data, len);
   41|       |
   42|       |  // Unapply context to 'stored' rather than apply to 'computed, for people
   43|       |  // who might look for reference crc value in error message
   44|  25.2k|  uint32_t modifier =
   45|  25.2k|      ChecksumModifierForContext(footer.base_context_checksum(), offset);
   46|  25.2k|  stored -= modifier;
   47|       |
   48|  25.2k|  if (stored == computed) {
  ------------------
  |  Branch (48:7): [True: 25.2k, False: 0]
  ------------------
   49|  25.2k|    return Status::OK();
   50|  25.2k|  } else {
   51|       |    // Unmask for people who might look for reference crc value
   52|      0|    if (type == kCRC32c) {
  ------------------
  |  Branch (52:9): [True: 0, False: 0]
  ------------------
   53|      0|      stored = crc32c::Unmask(stored);
   54|      0|      computed = crc32c::Unmask(computed);
   55|      0|    }
   56|      0|    return Status::Corruption(
   57|      0|        "block checksum mismatch: stored" +
   58|      0|        std::string(modifier ? "(context removed)" : "") + " = " +
  ------------------
  |  Branch (58:21): [True: 0, False: 0]
  ------------------
   59|      0|        std::to_string(stored) + ", computed = " + std::to_string(computed) +
   60|      0|        ", type = " + std::to_string(type) + "  in " + file_name + " offset " +
   61|      0|        std::to_string(offset) + " size " + std::to_string(block_size));
   62|      0|  }
   63|  25.2k|}

_ZN7rocksdb18GetMemoryAllocatorERKNS_22BlockBasedTableOptionsE:
   21|  32.4k|    const BlockBasedTableOptions& table_options) {
   22|  32.4k|  return table_options.block_cache.get()
  ------------------
  |  Branch (22:10): [True: 32.4k, False: 0]
  ------------------
   23|  32.4k|             ? table_options.block_cache->memory_allocator()
   24|  32.4k|             : nullptr;
   25|  32.4k|}

_ZN7rocksdb12BlockFetcher9ReadBlockEb:
  244|  25.2k|void BlockFetcher::ReadBlock(bool retry) {
  245|  25.2k|  FSReadRequest read_req;
  246|  25.2k|  IOOptions opts;
  247|  25.2k|  io_status_ = file_->PrepareIOOptions(read_options_, opts);
  248|  25.2k|  opts.verify_and_reconstruct_read = retry;
  249|  25.2k|  read_req.status.PermitUncheckedError();
  250|       |  // Actual file read
  251|  25.2k|  if (io_status_.ok()) {
  ------------------
  |  Branch (251:7): [True: 25.2k, False: 0]
  ------------------
  252|  25.2k|    if (file_->use_direct_io()) {
  ------------------
  |  Branch (252:9): [True: 0, False: 25.2k]
  ------------------
  253|      0|      PERF_TIMER_GUARD(block_read_time);
  ------------------
  |  |   46|      0|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|      0|  perf_step_timer_##metric.Start();
  ------------------
  254|      0|      PERF_CPU_TIMER_GUARD(
  ------------------
  |  |   56|      0|  PerfStepTimer perf_step_timer_##metric(              \
  |  |   57|      0|      &(perf_context.metric), clock, true,             \
  |  |  ------------------
  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  ------------------
  |  |   58|      0|      PerfLevel::kEnableTimeAndCPUTimeExceptForMutex); \
  |  |   59|      0|  perf_step_timer_##metric.Start();
  ------------------
  255|      0|          block_read_cpu_time,
  256|      0|          ioptions_.env ? ioptions_.env->GetSystemClock().get() : nullptr);
  257|      0|      io_status_ = file_->Read(opts, handle_.offset(), block_size_with_trailer_,
  258|      0|                               &slice_, /*scratch=*/nullptr, &direct_io_buf_);
  259|      0|      PERF_COUNTER_ADD(block_read_count, 1);
  ------------------
  |  |   81|      0|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    perf_context.metric += value;              \
  |  |   83|      0|  }                                            \
  |  |   84|      0|  static_assert(true, "semicolon required")
  ------------------
  260|      0|      used_buf_ = const_cast<char*>(slice_.data());
  261|  25.2k|    } else if (use_fs_scratch_) {
  ------------------
  |  Branch (261:16): [True: 0, False: 25.2k]
  ------------------
  262|      0|      PERF_TIMER_GUARD(block_read_time);
  ------------------
  |  |   46|      0|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|      0|  perf_step_timer_##metric.Start();
  ------------------
  263|      0|      PERF_CPU_TIMER_GUARD(
  ------------------
  |  |   56|      0|  PerfStepTimer perf_step_timer_##metric(              \
  |  |   57|      0|      &(perf_context.metric), clock, true,             \
  |  |  ------------------
  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  ------------------
  |  |   58|      0|      PerfLevel::kEnableTimeAndCPUTimeExceptForMutex); \
  |  |   59|      0|  perf_step_timer_##metric.Start();
  ------------------
  264|      0|          block_read_cpu_time,
  265|      0|          ioptions_.env ? ioptions_.env->GetSystemClock().get() : nullptr);
  266|      0|      read_req.offset = handle_.offset();
  267|      0|      read_req.len = block_size_with_trailer_;
  268|      0|      read_req.scratch = nullptr;
  269|      0|      io_status_ = file_->MultiRead(opts, &read_req, /*num_reqs=*/1,
  270|      0|                                    /*AlignedBuf* =*/nullptr);
  271|      0|      PERF_COUNTER_ADD(block_read_count, 1);
  ------------------
  |  |   81|      0|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    perf_context.metric += value;              \
  |  |   83|      0|  }                                            \
  |  |   84|      0|  static_assert(true, "semicolon required")
  ------------------
  272|       |
  273|      0|      slice_ = Slice(read_req.result.data(), read_req.result.size());
  274|      0|      used_buf_ = const_cast<char*>(slice_.data());
  275|  25.2k|    } else {
  276|       |      // It allocates/assign used_buf_
  277|  25.2k|      PrepareBufferForBlockFromFile();
  278|       |
  279|  25.2k|      PERF_TIMER_GUARD(block_read_time);
  ------------------
  |  |   46|  25.2k|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|  25.2k|  perf_step_timer_##metric.Start();
  ------------------
  280|  25.2k|      PERF_CPU_TIMER_GUARD(
  ------------------
  |  |   56|  25.2k|  PerfStepTimer perf_step_timer_##metric(              \
  |  |   57|  50.4k|      &(perf_context.metric), clock, true,             \
  |  |  ------------------
  |  |  |  Branch (57:31): [True: 25.2k, False: 0]
  |  |  ------------------
  |  |   58|  25.2k|      PerfLevel::kEnableTimeAndCPUTimeExceptForMutex); \
  |  |   59|  25.2k|  perf_step_timer_##metric.Start();
  ------------------
  281|  25.2k|          block_read_cpu_time,
  282|  25.2k|          ioptions_.env ? ioptions_.env->GetSystemClock().get() : nullptr);
  283|       |
  284|  25.2k|      io_status_ = file_->Read(
  285|  25.2k|          opts, handle_.offset(), /*size*/ block_size_with_trailer_,
  286|  25.2k|          /*result*/ &slice_, /*scratch*/ used_buf_, /*aligned_buf=*/nullptr);
  287|  25.2k|      PERF_COUNTER_ADD(block_read_count, 1);
  ------------------
  |  |   81|  25.2k|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 25.2k, False: 0]
  |  |  ------------------
  |  |   82|  25.2k|    perf_context.metric += value;              \
  |  |   83|  25.2k|  }                                            \
  |  |   84|  25.2k|  static_assert(true, "semicolon required")
  ------------------
  288|       |#ifndef NDEBUG
  289|       |      if (slice_.data() == &stack_buf_[0]) {
  290|       |        num_stack_buf_memcpy_++;
  291|       |      } else if (slice_.data() == heap_buf_.get()) {
  292|       |        num_heap_buf_memcpy_++;
  293|       |      } else if (slice_.data() == compressed_buf_.get()) {
  294|       |        num_compressed_buf_memcpy_++;
  295|       |      }
  296|       |#endif
  297|  25.2k|    }
  298|  25.2k|  }
  299|       |
  300|       |  // TODO: introduce dedicated perf counter for range tombstones
  301|  25.2k|  switch (block_type_) {
  302|      0|    case BlockType::kFilter:
  ------------------
  |  Branch (302:5): [True: 0, False: 25.2k]
  ------------------
  303|      0|    case BlockType::kFilterPartitionIndex:
  ------------------
  |  Branch (303:5): [True: 0, False: 25.2k]
  ------------------
  304|      0|      PERF_COUNTER_ADD(filter_block_read_count, 1);
  ------------------
  |  |   81|      0|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    perf_context.metric += value;              \
  |  |   83|      0|  }                                            \
  |  |   84|      0|  static_assert(true, "semicolon required")
  ------------------
  305|      0|      break;
  306|       |
  307|      0|    case BlockType::kCompressionDictionary:
  ------------------
  |  Branch (307:5): [True: 0, False: 25.2k]
  ------------------
  308|      0|      PERF_COUNTER_ADD(compression_dict_block_read_count, 1);
  ------------------
  |  |   81|      0|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    perf_context.metric += value;              \
  |  |   83|      0|  }                                            \
  |  |   84|      0|  static_assert(true, "semicolon required")
  ------------------
  309|      0|      break;
  310|       |
  311|  4.48k|    case BlockType::kIndex:
  ------------------
  |  Branch (311:5): [True: 4.48k, False: 20.7k]
  ------------------
  312|  4.48k|      PERF_COUNTER_ADD(index_block_read_count, 1);
  ------------------
  |  |   81|  4.48k|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 4.48k, False: 0]
  |  |  ------------------
  |  |   82|  4.48k|    perf_context.metric += value;              \
  |  |   83|  4.48k|  }                                            \
  |  |   84|  4.48k|  static_assert(true, "semicolon required")
  ------------------
  313|  4.48k|      break;
  314|       |
  315|       |    // Nothing to do here as we don't have counters for the other types.
  316|  20.7k|    default:
  ------------------
  |  Branch (316:5): [True: 20.7k, False: 4.48k]
  ------------------
  317|  20.7k|      break;
  318|  25.2k|  }
  319|       |
  320|  25.2k|  PERF_COUNTER_ADD(block_read_byte, block_size_with_trailer_);
  ------------------
  |  |   81|  25.2k|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 25.2k, False: 0]
  |  |  ------------------
  |  |   82|  25.2k|    perf_context.metric += value;              \
  |  |   83|  25.2k|  }                                            \
  |  |   84|  25.2k|  static_assert(true, "semicolon required")
  ------------------
  321|  25.2k|  if (io_status_.ok()) {
  ------------------
  |  Branch (321:7): [True: 25.2k, False: 0]
  ------------------
  322|  25.2k|    if (use_fs_scratch_ && !read_req.status.ok()) {
  ------------------
  |  Branch (322:9): [True: 0, False: 25.2k]
  |  Branch (322:28): [True: 0, False: 0]
  ------------------
  323|      0|      io_status_ = read_req.status;
  324|  25.2k|    } else if (slice_.size() != block_size_with_trailer_) {
  ------------------
  |  Branch (324:16): [True: 0, False: 25.2k]
  ------------------
  325|      0|      io_status_ = IOStatus::Corruption(
  326|      0|          "truncated block read from " + file_->file_name() + " offset " +
  327|      0|          std::to_string(handle_.offset()) + ", expected " +
  328|      0|          std::to_string(block_size_with_trailer_) + " bytes, got " +
  329|      0|          std::to_string(slice_.size()));
  330|      0|    }
  331|  25.2k|  }
  332|       |
  333|  25.2k|  if (io_status_.ok()) {
  ------------------
  |  Branch (333:7): [True: 25.2k, False: 0]
  ------------------
  334|  25.2k|    ProcessTrailerIfPresent();
  335|  25.2k|  }
  336|       |
  337|  25.2k|  if (io_status_.ok()) {
  ------------------
  |  Branch (337:7): [True: 25.2k, False: 0]
  ------------------
  338|  25.2k|    InsertCompressedBlockToPersistentCacheIfNeeded();
  339|  25.2k|    fs_buf_ = std::move(read_req.fs_scratch);
  340|  25.2k|  } else {
  341|      0|    ReleaseFileSystemProvidedBuffer(&read_req);
  342|      0|    direct_io_buf_.reset();
  343|      0|    compressed_buf_.reset();
  344|      0|    heap_buf_.reset();
  345|      0|    used_buf_ = nullptr;
  346|      0|  }
  347|  25.2k|}
_ZN7rocksdb12BlockFetcher17ReadBlockContentsEv:
  349|  25.2k|IOStatus BlockFetcher::ReadBlockContents() {
  350|  25.2k|  if (TryGetUncompressBlockFromPersistentCache()) {
  ------------------
  |  Branch (350:7): [True: 0, False: 25.2k]
  ------------------
  351|      0|    compression_type_ = kNoCompression;
  352|       |#ifndef NDEBUG
  353|       |    contents_->has_trailer = footer_.GetBlockTrailerSize() > 0;
  354|       |#endif  // NDEBUG
  355|      0|    return IOStatus::OK();
  356|      0|  }
  357|  25.2k|  if (TryGetFromPrefetchBuffer()) {
  ------------------
  |  Branch (357:7): [True: 0, False: 25.2k]
  ------------------
  358|      0|    if (!io_status_.ok()) {
  ------------------
  |  Branch (358:9): [True: 0, False: 0]
  ------------------
  359|      0|      return io_status_;
  360|      0|    }
  361|  25.2k|  } else if (!TryGetSerializedBlockFromPersistentCache()) {
  ------------------
  |  Branch (361:14): [True: 25.2k, False: 0]
  ------------------
  362|  25.2k|    ReadBlock(/*retry =*/false);
  363|       |    // If the file system supports retry after corruption, then try to
  364|       |    // re-read the block and see if it succeeds.
  365|  25.2k|    if (io_status_.IsCorruption() && retry_corrupt_read_) {
  ------------------
  |  Branch (365:9): [True: 0, False: 25.2k]
  |  Branch (365:38): [True: 0, False: 0]
  ------------------
  366|      0|      assert(!fs_buf_);
  367|      0|      ReadBlock(/*retry=*/true);
  368|      0|    }
  369|  25.2k|    if (!io_status_.ok()) {
  ------------------
  |  Branch (369:9): [True: 0, False: 25.2k]
  ------------------
  370|      0|      assert(!fs_buf_);
  371|      0|      return io_status_;
  372|      0|    }
  373|  25.2k|  }
  374|       |
  375|  25.2k|  if (do_uncompress_ && compression_type_ != kNoCompression) {
  ------------------
  |  Branch (375:7): [True: 4.48k, False: 20.7k]
  |  Branch (375:25): [True: 0, False: 4.48k]
  ------------------
  376|      0|    PERF_TIMER_GUARD(block_decompress_time);
  ------------------
  |  |   46|      0|  PerfStepTimer perf_step_timer_##metric(&(perf_context.metric)); \
  |  |   47|      0|  perf_step_timer_##metric.Start();
  ------------------
  377|       |    // compressed page, uncompress, update cache
  378|      0|    UncompressionContext context(compression_type_);
  379|      0|    UncompressionInfo info(context, uncompression_dict_, compression_type_);
  380|      0|    io_status_ = status_to_io_status(UncompressSerializedBlock(
  381|      0|        info, slice_.data(), block_size_, contents_, footer_.format_version(),
  382|      0|        ioptions_, memory_allocator_));
  383|       |#ifndef NDEBUG
  384|       |    num_heap_buf_memcpy_++;
  385|       |#endif
  386|       |    // Save the compressed block without trailer
  387|      0|    slice_ = Slice(slice_.data(), block_size_);
  388|  25.2k|  } else {
  389|  25.2k|    GetBlockContents();
  390|  25.2k|    slice_ = Slice();
  391|  25.2k|  }
  392|       |
  393|  25.2k|  InsertUncompressedBlockToPersistentCacheIfNeeded();
  394|       |
  395|  25.2k|  return io_status_;
  396|  25.2k|}
_ZN7rocksdb12BlockFetcher29PrepareBufferForBlockFromFileEv:
  122|  25.2k|inline void BlockFetcher::PrepareBufferForBlockFromFile() {
  123|       |  // cache miss read from device
  124|  25.2k|  if ((do_uncompress_ || ioptions_.allow_mmap_reads) &&
  ------------------
  |  Branch (124:8): [True: 4.48k, False: 20.7k]
  |  Branch (124:26): [True: 0, False: 20.7k]
  ------------------
  125|  25.2k|      block_size_with_trailer_ < kDefaultStackBufferSize) {
  ------------------
  |  Branch (125:7): [True: 4.48k, False: 0]
  ------------------
  126|       |    // If we've got a small enough chunk of data, read it in to the
  127|       |    // trivially allocated stack buffer instead of needing a full malloc()
  128|       |    //
  129|       |    // `GetBlockContents()` cannot return this data as its lifetime is tied to
  130|       |    // this `BlockFetcher`'s lifetime. That is fine because this is only used
  131|       |    // in cases where we do not expect the `GetBlockContents()` result to be the
  132|       |    // same buffer we are assigning here. If we guess incorrectly, there will be
  133|       |    // a heap allocation and memcpy in `GetBlockContents()` to obtain the final
  134|       |    // result. Considering we are eliding a heap allocation here by using the
  135|       |    // stack buffer, the cost of guessing incorrectly here is one extra memcpy.
  136|       |    //
  137|       |    // When `do_uncompress_` is true, we expect the uncompression step will
  138|       |    // allocate heap memory for the final result. However this expectation will
  139|       |    // be wrong if the block turns out to already be uncompressed, which we
  140|       |    // won't know for sure until after reading it.
  141|       |    //
  142|       |    // When `ioptions_.allow_mmap_reads` is true, we do not expect the file
  143|       |    // reader to use the scratch buffer at all, but instead return a pointer
  144|       |    // into the mapped memory. This expectation will be wrong when using a
  145|       |    // file reader that does not implement mmap reads properly.
  146|  4.48k|    used_buf_ = &stack_buf_[0];
  147|  20.7k|  } else if (maybe_compressed_ && !do_uncompress_) {
  ------------------
  |  Branch (147:14): [True: 0, False: 20.7k]
  |  Branch (147:35): [True: 0, False: 0]
  ------------------
  148|      0|    compressed_buf_ =
  149|      0|        AllocateBlock(block_size_with_trailer_, memory_allocator_compressed_);
  150|      0|    used_buf_ = compressed_buf_.get();
  151|  20.7k|  } else {
  152|  20.7k|    heap_buf_ = AllocateBlock(block_size_with_trailer_, memory_allocator_);
  153|  20.7k|    used_buf_ = heap_buf_.get();
  154|  20.7k|  }
  155|  25.2k|}
_ZN7rocksdb12BlockFetcher23ProcessTrailerIfPresentEv:
   32|  25.2k|inline void BlockFetcher::ProcessTrailerIfPresent() {
   33|  25.2k|  if (footer_.GetBlockTrailerSize() > 0) {
  ------------------
  |  Branch (33:7): [True: 25.2k, False: 0]
  ------------------
   34|  25.2k|    assert(footer_.GetBlockTrailerSize() == BlockBasedTable::kBlockTrailerSize);
   35|  25.2k|    if (read_options_.verify_checksums) {
  ------------------
  |  Branch (35:9): [True: 20.7k, False: 4.48k]
  ------------------
   36|  20.7k|      io_status_ = status_to_io_status(
   37|  20.7k|          VerifyBlockChecksum(footer_, slice_.data(), block_size_,
   38|  20.7k|                              file_->file_name(), handle_.offset()));
   39|  20.7k|      RecordTick(ioptions_.stats, BLOCK_CHECKSUM_COMPUTE_COUNT);
   40|  20.7k|      if (!io_status_.ok()) {
  ------------------
  |  Branch (40:11): [True: 0, False: 20.7k]
  ------------------
   41|      0|        assert(io_status_.IsCorruption());
   42|      0|        RecordTick(ioptions_.stats, BLOCK_CHECKSUM_MISMATCH_COUNT);
   43|      0|      }
   44|  20.7k|    }
   45|  25.2k|    compression_type_ =
   46|  25.2k|        BlockBasedTable::GetBlockCompressionType(slice_.data(), block_size_);
   47|  25.2k|  } else {
   48|       |    // E.g. plain table or cuckoo table
   49|      0|    compression_type_ = kNoCompression;
   50|      0|  }
   51|  25.2k|}
_ZN7rocksdb12BlockFetcher46InsertCompressedBlockToPersistentCacheIfNeededEv:
  157|  25.2k|inline void BlockFetcher::InsertCompressedBlockToPersistentCacheIfNeeded() {
  158|  25.2k|  if (io_status_.ok() && read_options_.fill_cache &&
  ------------------
  |  Branch (158:7): [True: 25.2k, False: 0]
  |  Branch (158:26): [True: 25.2k, False: 0]
  ------------------
  159|  25.2k|      cache_options_.persistent_cache &&
  ------------------
  |  Branch (159:7): [True: 0, False: 25.2k]
  ------------------
  160|  25.2k|      cache_options_.persistent_cache->IsCompressed()) {
  ------------------
  |  Branch (160:7): [True: 0, False: 0]
  ------------------
  161|      0|    PersistentCacheHelper::InsertSerialized(cache_options_, handle_, used_buf_,
  162|      0|                                            block_size_with_trailer_);
  163|      0|  }
  164|  25.2k|}
_ZN7rocksdb12BlockFetcher40TryGetUncompressBlockFromPersistentCacheEv:
   53|  25.2k|inline bool BlockFetcher::TryGetUncompressBlockFromPersistentCache() {
   54|  25.2k|  if (cache_options_.persistent_cache &&
  ------------------
  |  Branch (54:7): [True: 0, False: 25.2k]
  ------------------
   55|  25.2k|      !cache_options_.persistent_cache->IsCompressed()) {
  ------------------
  |  Branch (55:7): [True: 0, False: 0]
  ------------------
   56|      0|    Status status = PersistentCacheHelper::LookupUncompressed(
   57|      0|        cache_options_, handle_, contents_);
   58|      0|    if (status.ok()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 0]
  ------------------
   59|       |      // uncompressed page is found for the block handle
   60|      0|      return true;
   61|      0|    } else {
   62|       |      // uncompressed page is not found
   63|      0|      if (ioptions_.logger && !status.IsNotFound()) {
  ------------------
  |  Branch (63:11): [True: 0, False: 0]
  |  Branch (63:31): [True: 0, False: 0]
  ------------------
   64|      0|        assert(!status.ok());
   65|      0|        ROCKS_LOG_INFO(ioptions_.logger,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
   66|      0|                       "Error reading from persistent cache. %s",
   67|      0|                       status.ToString().c_str());
   68|      0|      }
   69|      0|    }
   70|      0|  }
   71|  25.2k|  return false;
   72|  25.2k|}
_ZN7rocksdb12BlockFetcher24TryGetFromPrefetchBufferEv:
   74|  25.2k|inline bool BlockFetcher::TryGetFromPrefetchBuffer() {
   75|  25.2k|  if (prefetch_buffer_ != nullptr) {
  ------------------
  |  Branch (75:7): [True: 16.3k, False: 8.85k]
  ------------------
   76|  16.3k|    IOOptions opts;
   77|  16.3k|    IOStatus io_s = file_->PrepareIOOptions(read_options_, opts);
   78|  16.3k|    if (io_s.ok()) {
  ------------------
  |  Branch (78:9): [True: 16.3k, False: 0]
  ------------------
   79|  16.3k|      bool read_from_prefetch_buffer = prefetch_buffer_->TryReadFromCache(
   80|  16.3k|          opts, file_, handle_.offset(), block_size_with_trailer_, &slice_,
   81|  16.3k|          &io_s, for_compaction_);
   82|  16.3k|      if (read_from_prefetch_buffer) {
  ------------------
  |  Branch (82:11): [True: 0, False: 16.3k]
  ------------------
   83|      0|        ProcessTrailerIfPresent();
   84|      0|        if (io_status_.ok()) {
  ------------------
  |  Branch (84:13): [True: 0, False: 0]
  ------------------
   85|      0|          got_from_prefetch_buffer_ = true;
   86|      0|          used_buf_ = const_cast<char*>(slice_.data());
   87|      0|        } else if (!(io_status_.IsCorruption() && retry_corrupt_read_)) {
  ------------------
  |  Branch (87:22): [True: 0, False: 0]
  |  Branch (87:51): [True: 0, False: 0]
  ------------------
   88|      0|          return true;
   89|      0|        }
   90|      0|      }
   91|  16.3k|    }
   92|  16.3k|    if (!io_s.ok()) {
  ------------------
  |  Branch (92:9): [True: 0, False: 16.3k]
  ------------------
   93|      0|      io_status_ = io_s;
   94|      0|      return true;
   95|      0|    }
   96|  16.3k|  }
   97|  25.2k|  return got_from_prefetch_buffer_;
   98|  25.2k|}
_ZN7rocksdb12BlockFetcher40TryGetSerializedBlockFromPersistentCacheEv:
  100|  25.2k|inline bool BlockFetcher::TryGetSerializedBlockFromPersistentCache() {
  101|  25.2k|  if (cache_options_.persistent_cache &&
  ------------------
  |  Branch (101:7): [True: 0, False: 25.2k]
  ------------------
  102|  25.2k|      cache_options_.persistent_cache->IsCompressed()) {
  ------------------
  |  Branch (102:7): [True: 0, False: 0]
  ------------------
  103|      0|    std::unique_ptr<char[]> buf;
  104|      0|    io_status_ = status_to_io_status(PersistentCacheHelper::LookupSerialized(
  105|      0|        cache_options_, handle_, &buf, block_size_with_trailer_));
  106|      0|    if (io_status_.ok()) {
  ------------------
  |  Branch (106:9): [True: 0, False: 0]
  ------------------
  107|      0|      heap_buf_ = CacheAllocationPtr(buf.release());
  108|      0|      used_buf_ = heap_buf_.get();
  109|      0|      slice_ = Slice(heap_buf_.get(), block_size_);
  110|      0|      ProcessTrailerIfPresent();
  111|      0|      return true;
  112|      0|    } else if (!io_status_.IsNotFound() && ioptions_.logger) {
  ------------------
  |  Branch (112:16): [True: 0, False: 0]
  |  Branch (112:44): [True: 0, False: 0]
  ------------------
  113|      0|      assert(!io_status_.ok());
  114|      0|      ROCKS_LOG_INFO(ioptions_.logger,
  ------------------
  |  |   39|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::INFO_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  115|      0|                     "Error reading from persistent cache. %s",
  116|      0|                     io_status_.ToString().c_str());
  117|      0|    }
  118|      0|  }
  119|  25.2k|  return false;
  120|  25.2k|}
_ZN7rocksdb12BlockFetcher16GetBlockContentsEv:
  210|  25.2k|inline void BlockFetcher::GetBlockContents() {
  211|  25.2k|  if (slice_.data() != used_buf_) {
  ------------------
  |  Branch (211:7): [True: 0, False: 25.2k]
  ------------------
  212|       |    // the slice content is not the buffer provided
  213|      0|    *contents_ = BlockContents(Slice(slice_.data(), block_size_));
  214|  25.2k|  } else {
  215|       |    // page can be either uncompressed or compressed, the buffer either stack
  216|       |    // or heap provided. Refer to https://github.com/facebook/rocksdb/pull/4096
  217|  25.2k|    if (got_from_prefetch_buffer_ || used_buf_ == &stack_buf_[0]) {
  ------------------
  |  Branch (217:9): [True: 0, False: 25.2k]
  |  Branch (217:38): [True: 4.48k, False: 20.7k]
  ------------------
  218|  4.48k|      CopyBufferToHeapBuf();
  219|  20.7k|    } else if (used_buf_ == compressed_buf_.get()) {
  ------------------
  |  Branch (219:16): [True: 0, False: 20.7k]
  ------------------
  220|      0|      if (compression_type_ == kNoCompression &&
  ------------------
  |  Branch (220:11): [True: 0, False: 0]
  ------------------
  221|      0|          memory_allocator_ != memory_allocator_compressed_) {
  ------------------
  |  Branch (221:11): [True: 0, False: 0]
  ------------------
  222|      0|        CopyBufferToHeapBuf();
  223|      0|      } else {
  224|      0|        heap_buf_ = std::move(compressed_buf_);
  225|      0|      }
  226|  20.7k|    } else if (direct_io_buf_.get() != nullptr || use_fs_scratch_) {
  ------------------
  |  Branch (226:16): [True: 0, False: 20.7k]
  |  Branch (226:51): [True: 0, False: 20.7k]
  ------------------
  227|      0|      if (compression_type_ == kNoCompression) {
  ------------------
  |  Branch (227:11): [True: 0, False: 0]
  ------------------
  228|      0|        CopyBufferToHeapBuf();
  229|      0|      } else {
  230|      0|        CopyBufferToCompressedBuf();
  231|      0|        heap_buf_ = std::move(compressed_buf_);
  232|      0|      }
  233|      0|    }
  234|  25.2k|    *contents_ = BlockContents(std::move(heap_buf_), block_size_);
  235|  25.2k|  }
  236|       |#ifndef NDEBUG
  237|       |  contents_->has_trailer = footer_.GetBlockTrailerSize() > 0;
  238|       |#endif
  239|  25.2k|}
_ZN7rocksdb12BlockFetcher19CopyBufferToHeapBufEv:
  176|  4.48k|inline void BlockFetcher::CopyBufferToHeapBuf() {
  177|  4.48k|  assert(used_buf_ != heap_buf_.get());
  178|  4.48k|  heap_buf_ = AllocateBlock(block_size_with_trailer_, memory_allocator_);
  179|  4.48k|  memcpy(heap_buf_.get(), used_buf_, block_size_with_trailer_);
  180|       |#ifndef NDEBUG
  181|       |  num_heap_buf_memcpy_++;
  182|       |#endif
  183|  4.48k|}
_ZN7rocksdb12BlockFetcher48InsertUncompressedBlockToPersistentCacheIfNeededEv:
  166|  25.2k|inline void BlockFetcher::InsertUncompressedBlockToPersistentCacheIfNeeded() {
  167|  25.2k|  if (io_status_.ok() && !got_from_prefetch_buffer_ &&
  ------------------
  |  Branch (167:7): [True: 25.2k, False: 0]
  |  Branch (167:26): [True: 25.2k, False: 0]
  ------------------
  168|  25.2k|      read_options_.fill_cache && cache_options_.persistent_cache &&
  ------------------
  |  Branch (168:7): [True: 25.2k, False: 0]
  |  Branch (168:35): [True: 0, False: 25.2k]
  ------------------
  169|  25.2k|      !cache_options_.persistent_cache->IsCompressed()) {
  ------------------
  |  Branch (169:7): [True: 0, False: 0]
  ------------------
  170|       |    // insert to uncompressed cache
  171|      0|    PersistentCacheHelper::InsertUncompressed(cache_options_, handle_,
  172|      0|                                              *contents_);
  173|      0|  }
  174|  25.2k|}

_ZN7rocksdb12BlockFetcherC2EPNS_22RandomAccessFileReaderEPNS_18FilePrefetchBufferERKNS_6FooterERKNS_11ReadOptionsERKNS_11BlockHandleEPNS_13BlockContentsERKNS_16ImmutableOptionsEbbNS_9BlockTypeERKNS_17UncompressionDictERKNS_22PersistentCacheOptionsEPNS_15MemoryAllocatorESR_b:
   70|  25.2k|        for_compaction_(for_compaction) {
   71|  25.2k|    io_status_.PermitUncheckedError();  // TODO(AR) can we improve on this?
   72|  25.2k|    if (CheckFSFeatureSupport(ioptions_.fs.get(), FSSupportedOps::kFSBuffer)) {
  ------------------
  |  Branch (72:9): [True: 0, False: 25.2k]
  ------------------
   73|      0|      use_fs_scratch_ = true;
   74|      0|    }
   75|  25.2k|    if (CheckFSFeatureSupport(ioptions_.fs.get(),
  ------------------
  |  Branch (75:9): [True: 0, False: 25.2k]
  ------------------
   76|  25.2k|                              FSSupportedOps::kVerifyAndReconstructRead)) {
   77|      0|      retry_corrupt_read_ = true;
   78|      0|    }
   79|  25.2k|  }
_ZNK7rocksdb12BlockFetcher20get_compression_typeEv:
   84|  11.7k|  inline CompressionType get_compression_type() const {
   85|  11.7k|    return compression_type_;
   86|  11.7k|  }

_ZN7rocksdb24ShouldReportDetailedTimeEPNS_3EnvEPNS_10StatisticsE:
   43|  17.8k|bool ShouldReportDetailedTime(Env* env, Statistics* stats) {
   44|  17.8k|  return env != nullptr && stats != nullptr &&
  ------------------
  |  Branch (44:10): [True: 17.8k, False: 0]
  |  Branch (44:28): [True: 0, False: 17.8k]
  ------------------
   45|  17.8k|         stats->get_stats_level() > kExceptDetailedTimers;
  ------------------
  |  Branch (45:10): [True: 0, False: 0]
  ------------------
   46|  17.8k|}
_ZNK7rocksdb11BlockHandle8EncodeToEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   48|  20.7k|void BlockHandle::EncodeTo(std::string* dst) const {
   49|       |  // Sanity check that all fields have been set
   50|  20.7k|  assert(offset_ != ~uint64_t{0});
   51|  20.7k|  assert(size_ != ~uint64_t{0});
   52|  20.7k|  PutVarint64Varint64(dst, offset_, size_);
   53|  20.7k|}
_ZN7rocksdb11BlockHandle10DecodeFromEPNS_5SliceE:
   64|  20.7k|Status BlockHandle::DecodeFrom(Slice* input) {
   65|  20.7k|  if (GetVarint64(input, &offset_) && GetVarint64(input, &size_)) {
  ------------------
  |  Branch (65:7): [True: 20.7k, False: 0]
  |  Branch (65:39): [True: 20.7k, False: 0]
  ------------------
   66|  20.7k|    return Status::OK();
   67|  20.7k|  } else {
   68|       |    // reset in case failure after partially decoding
   69|      0|    offset_ = 0;
   70|      0|    size_ = 0;
   71|      0|    return Status::Corruption("bad block handle");
   72|      0|  }
   73|  20.7k|}
_ZNK7rocksdb10IndexValue8EncodeToEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbPKNS_11BlockHandleE:
  101|  13.8k|                          const BlockHandle* previous_handle) const {
  102|  13.8k|  if (previous_handle) {
  ------------------
  |  Branch (102:7): [True: 5.04k, False: 8.85k]
  ------------------
  103|       |    // WART: this is specific to Block-based table
  104|  5.04k|    assert(handle.offset() == previous_handle->offset() +
  105|  5.04k|                                  previous_handle->size() +
  106|  5.04k|                                  BlockBasedTable::kBlockTrailerSize);
  107|  5.04k|    PutVarsignedint64(dst, handle.size() - previous_handle->size());
  108|  8.85k|  } else {
  109|  8.85k|    handle.EncodeTo(dst);
  110|  8.85k|  }
  111|  13.8k|  assert(dst->size() != 0);
  112|       |
  113|  13.8k|  if (have_first_key) {
  ------------------
  |  Branch (113:7): [True: 0, False: 13.8k]
  ------------------
  114|      0|    PutLengthPrefixedSlice(dst, first_internal_key);
  115|      0|  }
  116|  13.8k|}
_ZN7rocksdb10IndexValue10DecodeFromEPNS_5SliceEbPKNS_11BlockHandleE:
  119|  8.85k|                              const BlockHandle* previous_handle) {
  120|  8.85k|  if (previous_handle) {
  ------------------
  |  Branch (120:7): [True: 0, False: 8.85k]
  ------------------
  121|      0|    int64_t delta;
  122|      0|    if (!GetVarsignedint64(input, &delta)) {
  ------------------
  |  Branch (122:9): [True: 0, False: 0]
  ------------------
  123|      0|      return Status::Corruption("bad delta-encoded index value");
  124|      0|    }
  125|       |    // WART: this is specific to Block-based table
  126|      0|    handle = BlockHandle(previous_handle->offset() + previous_handle->size() +
  127|      0|                             BlockBasedTable::kBlockTrailerSize,
  128|      0|                         previous_handle->size() + delta);
  129|  8.85k|  } else {
  130|  8.85k|    Status s = handle.DecodeFrom(input);
  131|  8.85k|    if (!s.ok()) {
  ------------------
  |  Branch (131:9): [True: 0, False: 8.85k]
  ------------------
  132|      0|      return s;
  133|      0|    }
  134|  8.85k|  }
  135|       |
  136|  8.85k|  if (!have_first_key) {
  ------------------
  |  Branch (136:7): [True: 8.85k, False: 0]
  ------------------
  137|  8.85k|    first_internal_key = Slice();
  138|  8.85k|  } else if (!GetLengthPrefixedSlice(input, &first_internal_key)) {
  ------------------
  |  Branch (138:14): [True: 0, False: 0]
  ------------------
  139|      0|    return Status::Corruption("bad first key in block info");
  140|      0|  }
  141|       |
  142|  8.85k|  return Status::OK();
  143|  8.85k|}
_ZN7rocksdb13FooterBuilder5BuildEmjmNS_12ChecksumTypeERKNS_11BlockHandleES4_j:
  230|  4.48k|                            uint32_t base_context_checksum) {
  231|  4.48k|  assert(magic_number != Footer::kNullTableMagicNumber);
  232|  4.48k|  assert(IsSupportedFormatVersion(format_version));
  233|       |
  234|  4.48k|  char* part2;
  235|  4.48k|  char* part3;
  236|  4.48k|  if (format_version > 0) {
  ------------------
  |  Branch (236:7): [True: 4.48k, False: 0]
  ------------------
  237|  4.48k|    slice_ = Slice(data_.data(), Footer::kNewVersionsEncodedLength);
  238|       |    // Generate parts 1 and 3
  239|  4.48k|    char* cur = data_.data();
  240|       |    // Part 1
  241|  4.48k|    *(cur++) = checksum_type;
  242|       |    // Part 2
  243|  4.48k|    part2 = cur;
  244|       |    // Skip over part 2 for now
  245|  4.48k|    cur += kFooterPart2Size;
  246|       |    // Part 3
  247|  4.48k|    part3 = cur;
  248|  4.48k|    EncodeFixed32(cur, format_version);
  249|  4.48k|    cur += 4;
  250|  4.48k|    EncodeFixed64(cur, magic_number);
  251|  4.48k|    assert(cur + 8 == slice_.data() + slice_.size());
  252|  4.48k|  } else {
  253|      0|    slice_ = Slice(data_.data(), Footer::kVersion0EncodedLength);
  254|       |    // Legacy SST files use kCRC32c checksum but it's not stored in footer.
  255|      0|    assert(checksum_type == kNoChecksum || checksum_type == kCRC32c);
  256|       |    // Generate part 3 (part 1 empty, skip part 2 for now)
  257|      0|    part2 = data_.data();
  258|      0|    part3 = part2 + kFooterPart2Size;
  259|      0|    char* cur = part3;
  260|       |    // Use legacy magic numbers to indicate format_version=0, for
  261|       |    // compatibility. No other cases should use format_version=0.
  262|      0|    EncodeFixed64(cur, DownconvertToLegacyFooterFormat(magic_number));
  263|      0|    assert(cur + 8 == slice_.data() + slice_.size());
  264|      0|  }
  265|       |
  266|  4.48k|  if (format_version >= 6) {
  ------------------
  |  Branch (266:7): [True: 4.48k, False: 0]
  ------------------
  267|  4.48k|    if (BlockTrailerSizeForMagicNumber(magic_number) != 0) {
  ------------------
  |  Branch (267:9): [True: 4.48k, False: 0]
  ------------------
  268|       |      // base context checksum required for table formats with block checksums
  269|  4.48k|      assert(base_context_checksum != 0);
  270|  4.48k|      assert(ChecksumModifierForContext(base_context_checksum, 0) != 0);
  271|  4.48k|    } else {
  272|       |      // base context checksum not used
  273|      0|      assert(base_context_checksum == 0);
  274|      0|      assert(ChecksumModifierForContext(base_context_checksum, 0) == 0);
  275|      0|    }
  276|       |
  277|       |    // Start populating Part 2
  278|  4.48k|    char* cur = data_.data() + /* part 1 size */ 1;
  279|       |    // Set extended magic of part2
  280|  4.48k|    std::copy(kExtendedMagic.begin(), kExtendedMagic.end(), cur);
  281|  4.48k|    cur += kExtendedMagic.size();
  282|       |    // Fill checksum data with zeros (for later computing checksum)
  283|  4.48k|    char* checksum_data = cur;
  284|  4.48k|    EncodeFixed32(cur, 0);
  285|  4.48k|    cur += 4;
  286|       |    // Save base context checksum
  287|  4.48k|    EncodeFixed32(cur, base_context_checksum);
  288|  4.48k|    cur += 4;
  289|       |    // Compute and save metaindex size
  290|  4.48k|    uint32_t metaindex_size = static_cast<uint32_t>(metaindex_handle.size());
  291|  4.48k|    if (metaindex_size != metaindex_handle.size()) {
  ------------------
  |  Branch (291:9): [True: 0, False: 4.48k]
  ------------------
  292|      0|      return Status::NotSupported("Metaindex block size > 4GB");
  293|      0|    }
  294|       |    // Metaindex must be adjacent to footer
  295|  4.48k|    assert(metaindex_size == 0 ||
  296|  4.48k|           metaindex_handle.offset() + metaindex_handle.size() ==
  297|  4.48k|               footer_offset - BlockTrailerSizeForMagicNumber(magic_number));
  298|  4.48k|    EncodeFixed32(cur, metaindex_size);
  299|  4.48k|    cur += 4;
  300|       |
  301|       |    // Zero pad remainder (for future use)
  302|  4.48k|    std::fill_n(cur, 24U, char{0});
  303|  4.48k|    assert(cur + 24 == part3);
  304|       |
  305|       |    // Compute checksum, add context
  306|  4.48k|    uint32_t checksum = ComputeBuiltinChecksum(
  307|  4.48k|        checksum_type, data_.data(), Footer::kNewVersionsEncodedLength);
  308|  4.48k|    checksum +=
  309|  4.48k|        ChecksumModifierForContext(base_context_checksum, footer_offset);
  310|       |    // Store it
  311|  4.48k|    EncodeFixed32(checksum_data, checksum);
  312|  4.48k|  } else {
  313|       |    // Base context checksum not used
  314|      0|    assert(!FormatVersionUsesContextChecksum(format_version));
  315|       |    // Should be left empty
  316|      0|    assert(base_context_checksum == 0);
  317|      0|    assert(ChecksumModifierForContext(base_context_checksum, 0) == 0);
  318|       |
  319|       |    // Populate all of part 2
  320|      0|    char* cur = part2;
  321|      0|    cur = metaindex_handle.EncodeTo(cur);
  322|      0|    cur = index_handle.EncodeTo(cur);
  323|       |    // Zero pad remainder
  324|      0|    std::fill(cur, part3, char{0});
  325|      0|  }
  326|  4.48k|  return Status::OK();
  327|  4.48k|}
_ZN7rocksdb6Footer10DecodeFromENS_5SliceEmm:
  330|  4.48k|                          uint64_t enforce_table_magic_number) {
  331|       |  // Only decode to unused Footer
  332|  4.48k|  assert(table_magic_number_ == kNullTableMagicNumber);
  333|  4.48k|  assert(input != nullptr);
  334|  4.48k|  assert(input.size() >= kMinEncodedLength);
  335|       |
  336|  4.48k|  const char* magic_ptr = input.data() + input.size() - kMagicNumberLengthByte;
  337|  4.48k|  uint64_t magic = DecodeFixed64(magic_ptr);
  338|       |
  339|       |  // We check for legacy formats here and silently upconvert them
  340|  4.48k|  bool legacy = IsLegacyFooterFormat(magic);
  341|  4.48k|  if (legacy) {
  ------------------
  |  Branch (341:7): [True: 0, False: 4.48k]
  ------------------
  342|      0|    magic = UpconvertLegacyFooterFormat(magic);
  343|      0|  }
  344|  4.48k|  if (enforce_table_magic_number != 0 && enforce_table_magic_number != magic) {
  ------------------
  |  Branch (344:7): [True: 4.48k, False: 0]
  |  Branch (344:42): [True: 0, False: 4.48k]
  ------------------
  345|      0|    return Status::Corruption("Bad table magic number: expected " +
  346|      0|                              std::to_string(enforce_table_magic_number) +
  347|      0|                              ", found " + std::to_string(magic));
  348|      0|  }
  349|  4.48k|  table_magic_number_ = magic;
  350|  4.48k|  block_trailer_size_ = BlockTrailerSizeForMagicNumber(magic);
  351|       |
  352|       |  // Parse Part3
  353|  4.48k|  const char* part3_ptr = magic_ptr;
  354|  4.48k|  uint32_t computed_checksum = 0;
  355|  4.48k|  uint64_t footer_offset = 0;
  356|  4.48k|  if (legacy) {
  ------------------
  |  Branch (356:7): [True: 0, False: 4.48k]
  ------------------
  357|       |    // The size is already asserted to be at least kMinEncodedLength
  358|       |    // at the beginning of the function
  359|      0|    input.remove_prefix(input.size() - kVersion0EncodedLength);
  360|      0|    format_version_ = 0 /* legacy */;
  361|      0|    checksum_type_ = kCRC32c;
  362|  4.48k|  } else {
  363|  4.48k|    part3_ptr = magic_ptr - 4;
  364|  4.48k|    format_version_ = DecodeFixed32(part3_ptr);
  365|  4.48k|    if (UNLIKELY(!IsSupportedFormatVersion(format_version_))) {
  ------------------
  |  |   14|  4.48k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 4.48k]
  |  |  ------------------
  ------------------
  366|      0|      return Status::Corruption("Corrupt or unsupported format_version: " +
  367|      0|                                std::to_string(format_version_));
  368|      0|    }
  369|       |    // All known format versions >= 1 occupy exactly this many bytes.
  370|  4.48k|    if (UNLIKELY(input.size() < kNewVersionsEncodedLength)) {
  ------------------
  |  |   14|  4.48k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 4.48k]
  |  |  ------------------
  ------------------
  371|      0|      return Status::Corruption("Input is too short to be an SST file");
  372|      0|    }
  373|  4.48k|    uint64_t adjustment = input.size() - kNewVersionsEncodedLength;
  374|  4.48k|    input.remove_prefix(adjustment);
  375|  4.48k|    footer_offset = input_offset + adjustment;
  376|       |
  377|       |    // Parse Part1
  378|  4.48k|    char chksum = input.data()[0];
  379|  4.48k|    checksum_type_ = lossless_cast<ChecksumType>(chksum);
  380|  4.48k|    if (UNLIKELY(!IsSupportedChecksumType(checksum_type()))) {
  ------------------
  |  |   14|  4.48k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 4.48k]
  |  |  ------------------
  ------------------
  381|      0|      return Status::Corruption("Corrupt or unsupported checksum type: " +
  382|      0|                                std::to_string(lossless_cast<uint8_t>(chksum)));
  383|      0|    }
  384|       |    // This is the most convenient place to compute the checksum
  385|  4.48k|    if (checksum_type_ != kNoChecksum && format_version_ >= 6) {
  ------------------
  |  Branch (385:9): [True: 4.48k, False: 0]
  |  Branch (385:42): [True: 4.48k, False: 0]
  ------------------
  386|  4.48k|      std::array<char, kNewVersionsEncodedLength> copy_without_checksum;
  387|  4.48k|      std::copy_n(input.data(), kNewVersionsEncodedLength,
  388|  4.48k|                  copy_without_checksum.data());
  389|  4.48k|      EncodeFixed32(&copy_without_checksum[5], 0);  // Clear embedded checksum
  390|  4.48k|      computed_checksum =
  391|  4.48k|          ComputeBuiltinChecksum(checksum_type(), copy_without_checksum.data(),
  392|  4.48k|                                 kNewVersionsEncodedLength);
  393|  4.48k|    }
  394|       |    // Consume checksum type field
  395|  4.48k|    input.remove_prefix(1);
  396|  4.48k|  }
  397|       |
  398|       |  // Parse Part2
  399|  4.48k|  if (format_version_ >= 6) {
  ------------------
  |  Branch (399:7): [True: 4.48k, False: 0]
  ------------------
  400|  4.48k|    Slice ext_magic(input.data(), 4);
  401|  4.48k|    if (UNLIKELY(ext_magic.compare(Slice(kExtendedMagic.data(),
  ------------------
  |  |   14|  4.48k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 4.48k]
  |  |  ------------------
  ------------------
  402|  4.48k|                                         kExtendedMagic.size())) != 0)) {
  403|      0|      return Status::Corruption("Bad extended magic number: 0x" +
  404|      0|                                ext_magic.ToString(/*hex*/ true));
  405|      0|    }
  406|  4.48k|    input.remove_prefix(4);
  407|  4.48k|    uint32_t stored_checksum = 0, metaindex_size = 0;
  408|  4.48k|    bool success;
  409|  4.48k|    success = GetFixed32(&input, &stored_checksum);
  410|  4.48k|    assert(success);
  411|  4.48k|    success = GetFixed32(&input, &base_context_checksum_);
  412|  4.48k|    assert(success);
  413|  4.48k|    if (UNLIKELY(ChecksumModifierForContext(base_context_checksum_, 0) == 0)) {
  ------------------
  |  |   14|  4.48k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 4.48k]
  |  |  ------------------
  ------------------
  414|      0|      return Status::Corruption("Invalid base context checksum");
  415|      0|    }
  416|  4.48k|    computed_checksum +=
  417|  4.48k|        ChecksumModifierForContext(base_context_checksum_, footer_offset);
  418|  4.48k|    if (UNLIKELY(computed_checksum != stored_checksum)) {
  ------------------
  |  |   14|  4.48k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 4.48k]
  |  |  ------------------
  ------------------
  419|      0|      return Status::Corruption("Footer at " + std::to_string(footer_offset) +
  420|      0|                                " checksum mismatch");
  421|      0|    }
  422|  4.48k|    success = GetFixed32(&input, &metaindex_size);
  423|  4.48k|    assert(success);
  424|  4.48k|    (void)success;
  425|  4.48k|    uint64_t metaindex_end = footer_offset - GetBlockTrailerSize();
  426|  4.48k|    metaindex_handle_ =
  427|  4.48k|        BlockHandle(metaindex_end - metaindex_size, metaindex_size);
  428|       |
  429|       |    // Mark unpopulated
  430|  4.48k|    index_handle_ = BlockHandle::NullBlockHandle();
  431|       |
  432|       |    // 16 bytes of unchecked reserved padding
  433|  4.48k|    input.remove_prefix(16U);
  434|       |
  435|       |    // 8 bytes of checked reserved padding (expected to be zero unless using a
  436|       |    // future feature).
  437|  4.48k|    uint64_t reserved = 0;
  438|  4.48k|    success = GetFixed64(&input, &reserved);
  439|  4.48k|    assert(success);
  440|  4.48k|    if (UNLIKELY(reserved != 0)) {
  ------------------
  |  |   14|  4.48k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 4.48k]
  |  |  ------------------
  ------------------
  441|      0|      return Status::NotSupported(
  442|      0|          "File uses a future feature not supported in this version");
  443|      0|    }
  444|       |    // End of part 2
  445|  4.48k|    assert(input.data() == part3_ptr);
  446|  4.48k|  } else {
  447|       |    // format_version_ < 6
  448|      0|    Status result = metaindex_handle_.DecodeFrom(&input);
  449|      0|    if (result.ok()) {
  ------------------
  |  Branch (449:9): [True: 0, False: 0]
  ------------------
  450|      0|      result = index_handle_.DecodeFrom(&input);
  451|      0|    }
  452|      0|    if (!result.ok()) {
  ------------------
  |  Branch (452:9): [True: 0, False: 0]
  ------------------
  453|      0|      return result;
  454|      0|    }
  455|       |    // Padding in part2 is ignored
  456|      0|  }
  457|  4.48k|  return Status::OK();
  458|  4.48k|}
_ZN7rocksdb18ReadFooterFromFileERKNS_9IOOptionsEPNS_22RandomAccessFileReaderERNS_10FileSystemEPNS_18FilePrefetchBufferEmPNS_6FooterEm:
  481|  4.48k|                          uint64_t enforce_table_magic_number) {
  482|  4.48k|  if (file_size < Footer::kMinEncodedLength) {
  ------------------
  |  Branch (482:7): [True: 0, False: 4.48k]
  ------------------
  483|      0|    return Status::Corruption("file is too short (" +
  484|      0|                              std::to_string(file_size) +
  485|      0|                              " bytes) to be an "
  486|      0|                              "sstable: " +
  487|      0|                              file->file_name());
  488|      0|  }
  489|       |
  490|  4.48k|  std::array<char, Footer::kMaxEncodedLength + 1> footer_buf;
  491|  4.48k|  AlignedBuf internal_buf;
  492|  4.48k|  Slice footer_input;
  493|  4.48k|  uint64_t read_offset = (file_size > Footer::kMaxEncodedLength)
  ------------------
  |  Branch (493:26): [True: 4.48k, False: 0]
  ------------------
  494|  4.48k|                             ? file_size - Footer::kMaxEncodedLength
  495|  4.48k|                             : 0;
  496|  4.48k|  Status s;
  497|       |  // TODO: Need to pass appropriate deadline to TryReadFromCache(). Right now,
  498|       |  // there is no readahead for point lookups, so TryReadFromCache will fail if
  499|       |  // the required data is not in the prefetch buffer. Once deadline is enabled
  500|       |  // for iterator, TryReadFromCache might do a readahead. Revisit to see if we
  501|       |  // need to pass a timeout at that point
  502|       |  // TODO: rate limit footer reads.
  503|  4.48k|  if (prefetch_buffer == nullptr ||
  ------------------
  |  Branch (503:7): [True: 0, False: 4.48k]
  ------------------
  504|  4.48k|      !prefetch_buffer->TryReadFromCache(opts, file, read_offset,
  ------------------
  |  Branch (504:7): [True: 4.48k, False: 0]
  ------------------
  505|  4.48k|                                         Footer::kMaxEncodedLength,
  506|  4.48k|                                         &footer_input, nullptr)) {
  507|  4.48k|    if (file->use_direct_io()) {
  ------------------
  |  Branch (507:9): [True: 0, False: 4.48k]
  ------------------
  508|      0|      s = file->Read(opts, read_offset, Footer::kMaxEncodedLength,
  509|      0|                     &footer_input, nullptr, &internal_buf);
  510|  4.48k|    } else {
  511|  4.48k|      s = file->Read(opts, read_offset, Footer::kMaxEncodedLength,
  512|  4.48k|                     &footer_input, footer_buf.data(), nullptr);
  513|  4.48k|    }
  514|  4.48k|    if (!s.ok()) {
  ------------------
  |  Branch (514:9): [True: 0, False: 4.48k]
  ------------------
  515|      0|      return s;
  516|      0|    }
  517|  4.48k|  }
  518|       |
  519|       |  // Check that we actually read the whole footer from the file. It may be
  520|       |  // that size isn't correct.
  521|  4.48k|  if (footer_input.size() < Footer::kMinEncodedLength) {
  ------------------
  |  Branch (521:7): [True: 0, False: 4.48k]
  ------------------
  522|      0|    uint64_t size_on_disk = 0;
  523|      0|    if (fs.GetFileSize(file->file_name(), IOOptions(), &size_on_disk, nullptr)
  ------------------
  |  Branch (523:9): [True: 0, False: 0]
  ------------------
  524|      0|            .ok()) {
  525|       |      // Similar to CheckConsistency message, but not completely sure the
  526|       |      // expected size always came from manifest.
  527|      0|      return Status::Corruption("Sst file size mismatch: " + file->file_name() +
  528|      0|                                ". Expected " + std::to_string(file_size) +
  529|      0|                                ", actual size " +
  530|      0|                                std::to_string(size_on_disk) + "\n");
  531|      0|    } else {
  532|      0|      return Status::Corruption(
  533|      0|          "Missing SST footer data in file " + file->file_name() +
  534|      0|          " File too short? Expected size: " + std::to_string(file_size));
  535|      0|    }
  536|      0|  }
  537|       |
  538|  4.48k|  s = footer->DecodeFrom(footer_input, read_offset, enforce_table_magic_number);
  539|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (539:7): [True: 0, False: 4.48k]
  ------------------
  540|      0|    s = Status::CopyAppendMessage(s, " in ", file->file_name());
  541|      0|    return s;
  542|      0|  }
  543|  4.48k|  return Status::OK();
  544|  4.48k|}
_ZN7rocksdb22ComputeBuiltinChecksumENS_12ChecksumTypeEPKcm:
  560|  34.1k|                                size_t data_size) {
  561|  34.1k|  switch (type) {
  562|      0|    case kCRC32c:
  ------------------
  |  Branch (562:5): [True: 0, False: 34.1k]
  ------------------
  563|      0|      return crc32c::Mask(crc32c::Value(data, data_size));
  564|      0|    case kxxHash:
  ------------------
  |  Branch (564:5): [True: 0, False: 34.1k]
  ------------------
  565|      0|      return XXH32(data, data_size, /*seed*/ 0);
  ------------------
  |  |  390|      0|#  define XXH32 XXH_NAME2(XXH_NAMESPACE, XXH32)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  566|      0|    case kxxHash64:
  ------------------
  |  Branch (566:5): [True: 0, False: 34.1k]
  ------------------
  567|      0|      return Lower32of64(XXH64(data, data_size, /*seed*/ 0));
  ------------------
  |  |  400|      0|#  define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  568|  34.1k|    case kXXH3: {
  ------------------
  |  Branch (568:5): [True: 34.1k, False: 0]
  ------------------
  569|  34.1k|      if (data_size == 0) {
  ------------------
  |  Branch (569:11): [True: 0, False: 34.1k]
  ------------------
  570|       |        // Special case because of special handling for last byte, not
  571|       |        // present in this case. Can be any value different from other
  572|       |        // small input size checksums.
  573|      0|        return 0;
  574|  34.1k|      } else {
  575|       |        // See corresponding code in ComputeBuiltinChecksumWithLastByte
  576|  34.1k|        uint32_t v = Lower32of64(XXH3_64bits(data, data_size - 1));
  ------------------
  |  |  410|  34.1k|#  define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits)
  |  |  ------------------
  |  |  |  |  387|  34.1k|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  34.1k|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  577|  34.1k|        return ModifyChecksumForLastByte(v, data[data_size - 1]);
  578|  34.1k|      }
  579|  34.1k|    }
  580|      0|    default:  // including kNoChecksum
  ------------------
  |  Branch (580:5): [True: 0, False: 34.1k]
  ------------------
  581|      0|      return 0;
  582|  34.1k|  }
  583|  34.1k|}
_ZN7rocksdb34ComputeBuiltinChecksumWithLastByteENS_12ChecksumTypeEPKcmc:
  586|  25.2k|                                            size_t data_size, char last_byte) {
  587|  25.2k|  switch (type) {
  588|      0|    case kCRC32c: {
  ------------------
  |  Branch (588:5): [True: 0, False: 25.2k]
  ------------------
  589|      0|      uint32_t crc = crc32c::Value(data, data_size);
  590|       |      // Extend to cover last byte (compression type)
  591|      0|      crc = crc32c::Extend(crc, &last_byte, 1);
  592|      0|      return crc32c::Mask(crc);
  593|      0|    }
  594|      0|    case kxxHash: {
  ------------------
  |  Branch (594:5): [True: 0, False: 25.2k]
  ------------------
  595|      0|      XXH32_state_t* const state = XXH32_createState();
  ------------------
  |  |  391|      0|#  define XXH32_createState XXH_NAME2(XXH_NAMESPACE, XXH32_createState)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  596|      0|      XXH32_reset(state, 0);
  ------------------
  |  |  393|      0|#  define XXH32_reset XXH_NAME2(XXH_NAMESPACE, XXH32_reset)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  597|      0|      XXH32_update(state, data, data_size);
  ------------------
  |  |  394|      0|#  define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  598|       |      // Extend to cover last byte (compression type)
  599|      0|      XXH32_update(state, &last_byte, 1);
  ------------------
  |  |  394|      0|#  define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  600|      0|      uint32_t v = XXH32_digest(state);
  ------------------
  |  |  395|      0|#  define XXH32_digest XXH_NAME2(XXH_NAMESPACE, XXH32_digest)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  601|      0|      XXH32_freeState(state);
  ------------------
  |  |  392|      0|#  define XXH32_freeState XXH_NAME2(XXH_NAMESPACE, XXH32_freeState)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  602|      0|      return v;
  603|      0|    }
  604|      0|    case kxxHash64: {
  ------------------
  |  Branch (604:5): [True: 0, False: 25.2k]
  ------------------
  605|      0|      XXH64_state_t* const state = XXH64_createState();
  ------------------
  |  |  401|      0|#  define XXH64_createState XXH_NAME2(XXH_NAMESPACE, XXH64_createState)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|      0|      XXH64_reset(state, 0);
  ------------------
  |  |  403|      0|#  define XXH64_reset XXH_NAME2(XXH_NAMESPACE, XXH64_reset)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  607|      0|      XXH64_update(state, data, data_size);
  ------------------
  |  |  404|      0|#  define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  608|       |      // Extend to cover last byte (compression type)
  609|      0|      XXH64_update(state, &last_byte, 1);
  ------------------
  |  |  404|      0|#  define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  610|      0|      uint32_t v = Lower32of64(XXH64_digest(state));
  ------------------
  |  |  405|      0|#  define XXH64_digest XXH_NAME2(XXH_NAMESPACE, XXH64_digest)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  611|      0|      XXH64_freeState(state);
  ------------------
  |  |  402|      0|#  define XXH64_freeState XXH_NAME2(XXH_NAMESPACE, XXH64_freeState)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  612|      0|      return v;
  613|      0|    }
  614|  25.2k|    case kXXH3: {
  ------------------
  |  Branch (614:5): [True: 25.2k, False: 0]
  ------------------
  615|       |      // XXH3 is a complicated hash function that is extremely fast on
  616|       |      // contiguous input, but that makes its streaming support rather
  617|       |      // complex. It is worth custom handling of the last byte (`type`)
  618|       |      // in order to avoid allocating a large state object and bringing
  619|       |      // that code complexity into CPU working set.
  620|  25.2k|      uint32_t v = Lower32of64(XXH3_64bits(data, data_size));
  ------------------
  |  |  410|  25.2k|#  define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits)
  |  |  ------------------
  |  |  |  |  387|  25.2k|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  25.2k|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  621|  25.2k|      return ModifyChecksumForLastByte(v, last_byte);
  622|      0|    }
  623|      0|    default:  // including kNoChecksum
  ------------------
  |  Branch (623:5): [True: 0, False: 25.2k]
  ------------------
  624|      0|      return 0;
  625|  25.2k|  }
  626|  25.2k|}
_ZN7rocksdb21ReifyDbHostIdPropertyEPNS_3EnvEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  696|  4.48k|Status ReifyDbHostIdProperty(Env* env, std::string* db_host_id) {
  697|  4.48k|  assert(db_host_id);
  698|  4.48k|  if (*db_host_id == kHostnameForDbHostId) {
  ------------------
  |  Branch (698:7): [True: 4.48k, False: 0]
  ------------------
  699|  4.48k|    Status s = env->GetHostNameString(db_host_id);
  700|  4.48k|    if (!s.ok()) {
  ------------------
  |  Branch (700:9): [True: 0, False: 4.48k]
  ------------------
  701|      0|      db_host_id->clear();
  702|      0|    }
  703|  4.48k|    return s;
  704|  4.48k|  }
  705|       |
  706|      0|  return Status::OK();
  707|  4.48k|}
format.cc:_ZN7rocksdb12_GLOBAL__N_130BlockTrailerSizeForMagicNumberEm:
  180|  8.96k|inline uint8_t BlockTrailerSizeForMagicNumber(uint64_t magic_number) {
  181|  8.96k|  if (magic_number == kBlockBasedTableMagicNumber ||
  ------------------
  |  Branch (181:7): [True: 8.96k, False: 0]
  ------------------
  182|  8.96k|      magic_number == kLegacyBlockBasedTableMagicNumber) {
  ------------------
  |  Branch (182:7): [True: 0, False: 0]
  ------------------
  183|  8.96k|    return static_cast<uint8_t>(BlockBasedTable::kBlockTrailerSize);
  184|  8.96k|  } else {
  185|      0|    return 0;
  186|      0|  }
  187|  8.96k|}
format.cc:_ZN7rocksdb12_GLOBAL__N_120IsLegacyFooterFormatEm:
  156|  4.48k|inline bool IsLegacyFooterFormat(uint64_t magic_number) {
  157|  4.48k|  return magic_number == kLegacyBlockBasedTableMagicNumber ||
  ------------------
  |  Branch (157:10): [True: 0, False: 4.48k]
  ------------------
  158|  4.48k|         magic_number == kLegacyPlainTableMagicNumber;
  ------------------
  |  Branch (158:10): [True: 0, False: 4.48k]
  ------------------
  159|  4.48k|}
format.cc:_ZN7rocksdb12_GLOBAL__N_125ModifyChecksumForLastByteEjc:
  550|  59.3k|inline uint32_t ModifyChecksumForLastByte(uint32_t checksum, char last_byte) {
  551|       |  // This strategy bears some resemblance to extending a CRC checksum by one
  552|       |  // more byte, except we don't need to re-mix the input checksum as long as
  553|       |  // we do this step only once (per checksum).
  554|  59.3k|  const uint32_t kRandomPrime = 0x6b9083d9;
  555|  59.3k|  return checksum ^ lossless_cast<uint8_t>(last_byte) * kRandomPrime;
  556|  59.3k|}

_ZNK7rocksdb11BlockHandle6offsetEv:
   55|  88.4k|  uint64_t offset() const { return offset_; }
_ZN7rocksdb11BlockHandle10set_offsetEm:
   56|  25.2k|  void set_offset(uint64_t _offset) { offset_ = _offset; }
_ZNK7rocksdb11BlockHandle4sizeEv:
   59|  54.1k|  uint64_t size() const { return size_; }
_ZN7rocksdb11BlockHandle8set_sizeEm:
   60|  25.2k|  void set_size(uint64_t _size) { size_ = _size; }
_ZNK7rocksdb11BlockHandle6IsNullEv:
   72|  26.7k|  bool IsNull() const { return offset_ == 0 && size_ == 0; }
  ------------------
  |  Branch (72:32): [True: 11.2k, False: 15.5k]
  |  Branch (72:48): [True: 9.87k, False: 1.39k]
  ------------------
_ZN7rocksdb11BlockHandle15NullBlockHandleEv:
   74|  19.5k|  static const BlockHandle& NullBlockHandle() { return kNullBlockHandle; }
_ZN7rocksdb10IndexValueC2ENS_11BlockHandleENS_5SliceE:
  107|  8.85k|      : handle(_handle), first_internal_key(_first_internal_key) {}
_ZN7rocksdb6FooterC2Ev:
  187|  8.96k|  Footer() {}
_ZNK7rocksdb6Footer14format_versionEv:
  204|  8.96k|  uint32_t format_version() const { return format_version_; }
_ZNK7rocksdb6Footer21base_context_checksumEv:
  207|  25.2k|  uint32_t base_context_checksum() const { return base_context_checksum_; }
_ZNK7rocksdb6Footer16metaindex_handleEv:
  210|  4.48k|  const BlockHandle& metaindex_handle() const { return metaindex_handle_; }
_ZNK7rocksdb6Footer13checksum_typeEv:
  217|  34.1k|  ChecksumType checksum_type() const {
  218|  34.1k|    return static_cast<ChecksumType>(checksum_type_);
  219|  34.1k|  }
_ZNK7rocksdb6Footer19GetBlockTrailerSizeEv:
  224|  59.3k|  inline size_t GetBlockTrailerSize() const { return block_trailer_size_; }
_ZNK7rocksdb13FooterBuilder8GetSliceEv:
  291|  8.96k|  const Slice& GetSlice() const {
  292|  8.96k|    assert(slice_.size());
  293|  8.96k|    return slice_;
  294|  8.96k|  }
_ZN7rocksdb13BlockContentsC2Ev:
  354|  48.7k|  BlockContents() {}
_ZN7rocksdb13BlockContentsC2EONSt3__110unique_ptrIA_cNS_13CustomDeleterEEEm:
  361|  25.2k|      : data(_data.get(), _size), allocation(std::move(_data)) {}
_ZNK7rocksdb13BlockContents9own_bytesEv:
  370|  11.7k|  bool own_bytes() const { return allocation.get() != nullptr; }
_ZNK7rocksdb13BlockContents11usable_sizeEv:
  373|  11.7k|  size_t usable_size() const {
  374|  11.7k|    if (allocation.get() != nullptr) {
  ------------------
  |  Branch (374:9): [True: 11.7k, False: 0]
  ------------------
  375|  11.7k|      auto allocator = allocation.get_deleter().allocator;
  376|  11.7k|      if (allocator) {
  ------------------
  |  Branch (376:11): [True: 0, False: 11.7k]
  ------------------
  377|      0|        return allocator->UsableSize(allocation.get(), data.size());
  378|      0|      }
  379|  11.7k|#ifdef ROCKSDB_MALLOC_USABLE_SIZE
  380|  11.7k|      return malloc_usable_size(allocation.get());
  381|       |#else
  382|       |      return data.size();
  383|       |#endif  // ROCKSDB_MALLOC_USABLE_SIZE
  384|  11.7k|    } else {
  385|      0|      return 0;  // no extra memory is occupied by the data
  386|      0|    }
  387|  11.7k|  }
_ZN7rocksdb13BlockContentsC2EOS0_:
  393|  25.2k|  BlockContents(BlockContents&& other) noexcept { *this = std::move(other); }
_ZN7rocksdb13BlockContentsaSEOS0_:
  395|  62.1k|  BlockContents& operator=(BlockContents&& other) {
  396|  62.1k|    data = std::move(other.data);
  397|  62.1k|    allocation = std::move(other.allocation);
  398|       |#ifndef NDEBUG
  399|       |    has_trailer = other.has_trailer;
  400|       |#endif  // NDEBUG
  401|  62.1k|    return *this;
  402|  62.1k|  }
_ZN7rocksdb26ChecksumModifierForContextEjm:
  128|  63.8k|                                           uint64_t offset) {
  129|       |  // To disable on base_context_checksum == 0, we could write
  130|       |  // `if (base_context_checksum == 0) return 0;` but benchmarking shows
  131|       |  // measurable performance penalty vs. this: compute the modifier
  132|       |  // unconditionally and use an "all or nothing" bit mask to enable
  133|       |  // or disable.
  134|  63.8k|  uint32_t all_or_nothing = uint32_t{0} - (base_context_checksum != 0);
  135|       |
  136|       |  // Desired properties:
  137|       |  // (call this function f(b, o) where b = base and o = offset)
  138|       |  // 1. Fast
  139|       |  // 2. f(b1, o) == f(b2, o) iff b1 == b2
  140|       |  //    (Perfectly preserve base entropy)
  141|       |  // 3. f(b, o1) == f(b, o2) only if o1 == o2 or |o1-o2| >= 4 billion
  142|       |  //    (Guaranteed uniqueness for nearby offsets)
  143|       |  // 3. f(b, o + j * 2**32) == f(b, o + k * 2**32) only if j == k
  144|       |  //    (Upper bits matter, and *aligned* misplacement fails check)
  145|       |  // 4. f(b1, o) == f(b2, o + x) then preferably not
  146|       |  //    f(b1, o + y) == f(b2, o + x + y)
  147|       |  //    (Avoid linearly correlated matches)
  148|       |  // 5. f(b, o) == 0 depends on both b and o
  149|       |  //    (No predictable overlap with non-context checksums)
  150|  63.8k|  uint32_t modifier =
  151|  63.8k|      base_context_checksum ^ (Lower32of64(offset) + Upper32of64(offset));
  152|       |
  153|  63.8k|  return modifier & all_or_nothing;
  154|  63.8k|}
_ZN7rocksdb24IsSupportedFormatVersionEj:
  165|  17.9k|inline bool IsSupportedFormatVersion(uint32_t version) {
  166|  17.9k|  return version <= kLatestFormatVersion;
  167|  17.9k|}
_ZN7rocksdb32FormatVersionUsesContextChecksumEj:
  170|  4.48k|inline bool FormatVersionUsesContextChecksum(uint32_t version) {
  171|  4.48k|  return version >= 6;
  172|  4.48k|}
_ZN7rocksdb36FormatVersionUsesIndexHandleInFooterEj:
  174|  8.96k|inline bool FormatVersionUsesIndexHandleInFooter(uint32_t version) {
  175|  8.96k|  return version < 6;
  176|  8.96k|}
_ZN7rocksdb10IndexValueC2Ev:
  105|  8.96k|  IndexValue() = default;
_ZN7rocksdb11BlockHandleC2Ev:
  434|  83.5k|inline BlockHandle::BlockHandle() : BlockHandle(~uint64_t{0}, ~uint64_t{0}) {}
_ZN7rocksdb11BlockHandleC2Emm:
  437|  87.9k|    : offset_(_offset), size_(_size) {}

_ZNK7rocksdb20InternalIteratorBaseINS_5SliceEE24IsDeleteRangeSentinelKeyEv:
  213|  1.72M|  virtual bool IsDeleteRangeSentinelKey() const { return false; }
_ZN7rocksdb20InternalIteratorBaseINS_5SliceEE17SetPinnedItersMgrEPNS_22PinnedIteratorsManagerE:
  173|  13.4k|  virtual void SetPinnedItersMgr(PinnedIteratorsManager* /*pinned_iters_mgr*/) {
  174|  13.4k|  }
_ZNK7rocksdb20InternalIteratorBaseINS_5SliceEE11IsKeyPinnedEv:
  184|  74.7M|  virtual bool IsKeyPinned() const { return false; }
_ZNK7rocksdb20InternalIteratorBaseINS_5SliceEE13IsValuePinnedEv:
  190|  37.3M|  virtual bool IsValuePinned() const { return false; }
_ZN7rocksdb20InternalIteratorBaseINS_5SliceEED2Ev:
   44|  68.4k|  virtual ~InternalIteratorBase() {}
_ZN7rocksdb20InternalIteratorBaseINS_5SliceEEC2Ev:
   38|  68.4k|  InternalIteratorBase() {}
_ZN7rocksdb20InternalIteratorBaseINS_10IndexValueEEC2Ev:
   38|  8.96k|  InternalIteratorBase() {}
_ZN7rocksdb20InternalIteratorBaseINS_10IndexValueEED2Ev:
   44|  8.96k|  virtual ~InternalIteratorBase() {}

_ZN7rocksdb19IteratorWrapperBaseINS_5SliceEE10DeleteIterEb:
   53|  13.4k|  void DeleteIter(bool is_arena_mode) {
   54|  13.4k|    if (iter_) {
  ------------------
  |  Branch (54:9): [True: 13.4k, False: 0]
  ------------------
   55|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
   56|       |      if (!status_checked_after_invalid_) {
   57|       |        // If this assertion fails, it is likely that you did not check
   58|       |        // iterator status after Valid() returns false.
   59|       |        fprintf(stderr,
   60|       |                "Failed to check status after Valid() returned false from this "
   61|       |                "iterator.\n");
   62|       |        port::PrintStack();
   63|       |        std::abort();
   64|       |      }
   65|       |#endif
   66|  13.4k|      if (!is_arena_mode) {
  ------------------
  |  Branch (66:11): [True: 0, False: 13.4k]
  ------------------
   67|      0|        delete iter_;
   68|  13.4k|      } else {
   69|  13.4k|        iter_->~InternalIteratorBase<TValue>();
   70|  13.4k|      }
   71|  13.4k|    }
   72|  13.4k|  }
_ZN7rocksdb19IteratorWrapperBaseINS_5SliceEE3SetEPNS_20InternalIteratorBaseIS1_EE:
   41|  17.9k|  InternalIteratorBase<TValue>* Set(InternalIteratorBase<TValue>* _iter) {
   42|  17.9k|    InternalIteratorBase<TValue>* old_iter = iter_;
   43|       |
   44|  17.9k|    iter_ = _iter;
   45|  17.9k|    if (iter_ == nullptr) {
  ------------------
  |  Branch (45:9): [True: 4.51k, False: 13.4k]
  ------------------
   46|  4.51k|      valid_ = false;
   47|  13.4k|    } else {
   48|  13.4k|      Update();
   49|  13.4k|    }
   50|  17.9k|    return old_iter;
   51|  17.9k|  }
_ZN7rocksdb19IteratorWrapperBaseINS_5SliceEE6UpdateEv:
  199|  26.9k|  void Update() {
  200|  26.9k|    valid_ = iter_->Valid();
  201|  26.9k|    if (valid_) {
  ------------------
  |  Branch (201:9): [True: 7.62k, False: 19.3k]
  ------------------
  202|  7.62k|      assert(iter_->status().ok());
  203|  7.62k|      result_.key = iter_->key();
  204|  7.62k|      result_.bound_check_result = IterBoundCheck::kUnknown;
  205|  7.62k|      result_.value_prepared = false;
  206|  7.62k|    }
  207|  26.9k|  }
_ZNK7rocksdb19IteratorWrapperBaseINS_5SliceEE4iterEv:
   32|  12.8k|  InternalIteratorBase<TValue>* iter() const { return iter_; }
_ZNK7rocksdb19IteratorWrapperBaseINS_5SliceEE6statusEv:
   96|  9.57k|  Status status() const {
   97|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
   98|       |    status_checked_after_invalid_ = true;
   99|       |#endif
  100|  9.57k|    assert(iter_);
  101|  9.57k|    return iter_->status();
  102|  9.57k|  }
_ZN7rocksdb19IteratorWrapperBaseINS_5SliceEE12PrepareValueEv:
  103|  32.5k|  bool PrepareValue() {
  104|  32.5k|    assert(Valid());
  105|  32.5k|    if (result_.value_prepared) {
  ------------------
  |  Branch (105:9): [True: 26.6k, False: 5.99k]
  ------------------
  106|  26.6k|      return true;
  107|  26.6k|    }
  108|  5.99k|    if (iter_->PrepareValue()) {
  ------------------
  |  Branch (108:9): [True: 5.99k, False: 0]
  ------------------
  109|  5.99k|      result_.value_prepared = true;
  110|  5.99k|      result_.key = iter_->key();
  111|  5.99k|      return true;
  112|  5.99k|    }
  113|       |
  114|      0|    assert(!iter_->Valid());
  115|      0|    valid_ = false;
  116|      0|    return false;
  117|  5.99k|  }
_ZN7rocksdb19IteratorWrapperBaseINS_5SliceEED2Ev:
   31|  23.7k|  ~IteratorWrapperBase() {}
_ZN7rocksdb19IteratorWrapperBaseINS_5SliceEEC2EPNS_20InternalIteratorBaseIS1_EE:
   28|  4.51k|      : iter_(nullptr) {
   29|  4.51k|    Set(_iter);
   30|  4.51k|  }
_ZNK7rocksdb19IteratorWrapperBaseINS_5SliceEE5ValidEv:
   75|  82.8k|  bool Valid() const {
   76|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
   77|       |    status_checked_after_invalid_ = valid_;
   78|       |#endif
   79|  82.8k|    return valid_;
   80|  82.8k|  }
_ZNK7rocksdb19IteratorWrapperBaseINS_5SliceEE5valueEv:
   91|  59.1k|  TValue value() const {
   92|  59.1k|    assert(Valid());
   93|  59.1k|    return iter_->value();
   94|  59.1k|  }
_ZNK7rocksdb19IteratorWrapperBaseINS_5SliceEE3keyEv:
   81|   299k|  Slice key() const {
   82|   299k|    assert(Valid());
   83|   299k|    return result_.key;
   84|   299k|  }
_ZN7rocksdb19IteratorWrapperBaseINS_5SliceEE4NextEv:
  118|  69.3k|  void Next() {
  119|  69.3k|    assert(iter_);
  120|  69.3k|    valid_ = iter_->NextAndGetResult(&result_);
  121|  69.3k|    assert(!valid_ || iter_->status().ok());
  122|  69.3k|  }
_ZN7rocksdb19IteratorWrapperBaseINS_5SliceEE21UpperBoundCheckResultEv:
  161|  30.8k|  IterBoundCheck UpperBoundCheckResult() {
  162|  30.8k|    assert(Valid());
  163|  30.8k|    return result_.bound_check_result;
  164|  30.8k|  }
_ZNK7rocksdb19IteratorWrapperBaseINS_5SliceEE15write_unix_timeEv:
   86|  59.1k|  uint64_t write_unix_time() const {
   87|  59.1k|    assert(Valid());
   88|  59.1k|    return iter_->write_unix_time();
   89|  59.1k|  }
_ZN7rocksdb19IteratorWrapperBaseINS_5SliceEE11SeekToFirstEv:
  145|  13.4k|  void SeekToFirst() {
  146|  13.4k|    assert(iter_);
  147|  13.4k|    iter_->SeekToFirst();
  148|  13.4k|    Update();
  149|  13.4k|  }
_ZN7rocksdb19IteratorWrapperBaseINS_5SliceEEC2Ev:
   26|  14.7k|  IteratorWrapperBase() : iter_(nullptr), valid_(false) {}
_ZN7rocksdb19IteratorWrapperBaseINS_5SliceEE17SetPinnedItersMgrEPNS_22PinnedIteratorsManagerE:
  166|  8.96k|  void SetPinnedItersMgr(PinnedIteratorsManager* pinned_iters_mgr) {
  167|  8.96k|    assert(iter_);
  168|  8.96k|    iter_->SetPinnedItersMgr(pinned_iters_mgr);
  169|  8.96k|  }
_ZNK7rocksdb19IteratorWrapperBaseINS_5SliceEE15IsValuePreparedEv:
  179|  30.8k|  bool IsValuePrepared() const { return result_.value_prepared; }
_ZNK7rocksdb19IteratorWrapperBaseINS_5SliceEE24IsDeleteRangeSentinelKeyEv:
  194|  34.6k|  bool IsDeleteRangeSentinelKey() const {
  195|  34.6k|    return iter_->IsDeleteRangeSentinelKey();
  196|  34.6k|  }

_ZN7rocksdb15MergingIterator15SkipNextDeletedEv:
  935|   147k|bool MergingIterator::SkipNextDeleted() {
  936|       |  // 3 types of keys:
  937|       |  // - point key
  938|       |  // - file boundary sentinel keys
  939|       |  // - range deletion end key
  940|   147k|  auto current = minHeap_.top();
  941|   147k|  if (current->type == HeapItem::Type::DELETE_RANGE_END) {
  ------------------
  |  Branch (941:7): [True: 131k, False: 16.1k]
  ------------------
  942|       |    // Invariant(active_): range_tombstone_iters_[current->level] is about to
  943|       |    // become !Valid() or that its start key is going to be added to minHeap_.
  944|   131k|    active_.erase(current->level);
  945|   131k|    assert(range_tombstone_iters_[current->level] &&
  946|   131k|           range_tombstone_iters_[current->level]->Valid());
  947|   131k|    range_tombstone_iters_[current->level]->Next();
  948|       |    // Maintain Invariants (rti) and (phi)
  949|   131k|    if (range_tombstone_iters_[current->level]->Valid()) {
  ------------------
  |  Branch (949:9): [True: 128k, False: 2.90k]
  ------------------
  950|   128k|      InsertRangeTombstoneToMinHeap(current->level, true /* start_key */,
  951|   128k|                                    true /* replace_top */);
  952|   128k|    } else {
  953|       |      // TruncatedRangeDelIterator does not have status
  954|  2.90k|      minHeap_.pop();
  955|  2.90k|    }
  956|   131k|    return true /* current key deleted */;
  957|   131k|  }
  958|  16.1k|  if (current->iter.IsDeleteRangeSentinelKey()) {
  ------------------
  |  Branch (958:7): [True: 0, False: 16.1k]
  ------------------
  959|       |    // If the file boundary is defined by a range deletion, the range
  960|       |    // tombstone's end key must come before this sentinel key (see op_type in
  961|       |    // SetTombstoneKey()).
  962|      0|    assert(ExtractValueType(current->iter.key()) != kTypeRangeDeletion ||
  963|      0|           active_.count(current->level) == 0);
  964|       |    // When entering a new file, range tombstone iter from the old file is
  965|       |    // freed, but the last key from that range tombstone iter may still be in
  966|       |    // the heap. We need to ensure the data underlying its corresponding key
  967|       |    // Slice is still alive. We do so by popping the range tombstone key from
  968|       |    // heap before calling iter->Next(). Technically, this change is not needed:
  969|       |    // if there is a range tombstone end key that is after file boundary
  970|       |    // sentinel key in minHeap_, the range tombstone end key must have been
  971|       |    // truncated at file boundary. The underlying data of the range tombstone
  972|       |    // end key Slice is the SST file's largest internal key stored as file
  973|       |    // metadata in Version. However, since there are too many implicit
  974|       |    // assumptions made, it is safer to just ensure range tombstone iter is
  975|       |    // still alive.
  976|      0|    minHeap_.pop();
  977|       |    // Remove last SST file's range tombstone end key if there is one.
  978|       |    // This means file boundary is before range tombstone end key,
  979|       |    // which could happen when a range tombstone and a user key
  980|       |    // straddle two SST files. Note that in TruncatedRangeDelIterator
  981|       |    // constructor, parsed_largest.sequence is decremented 1 in this case.
  982|       |    // Maintains Invariant(rti) that at most one
  983|       |    // pinned_heap_item_[current->level] is in minHeap_.
  984|      0|    if (range_tombstone_iters_[current->level] &&
  ------------------
  |  Branch (984:9): [True: 0, False: 0]
  ------------------
  985|      0|        range_tombstone_iters_[current->level]->Valid()) {
  ------------------
  |  Branch (985:9): [True: 0, False: 0]
  ------------------
  986|      0|      if (!minHeap_.empty() && minHeap_.top()->level == current->level) {
  ------------------
  |  Branch (986:11): [True: 0, False: 0]
  |  Branch (986:32): [True: 0, False: 0]
  ------------------
  987|      0|        assert(minHeap_.top()->type == HeapItem::Type::DELETE_RANGE_END);
  988|      0|        minHeap_.pop();
  989|       |        // Invariant(active_): we are about to enter a new SST file with new
  990|       |        // range_tombstone_iters[current->level]. Either it is !Valid() or its
  991|       |        // start key is going to be added to minHeap_.
  992|      0|        active_.erase(current->level);
  993|      0|      } else {
  994|       |        // range tombstone is still valid, but it is not on heap.
  995|       |        // This should only happen if the range tombstone is over iterator
  996|       |        // upper bound.
  997|      0|        assert(iterate_upper_bound_ &&
  998|      0|               comparator_->user_comparator()->CompareWithoutTimestamp(
  999|      0|                   range_tombstone_iters_[current->level]->start_key().user_key,
 1000|      0|                   true /* a_has_ts */, *iterate_upper_bound_,
 1001|      0|                   false /* b_has_ts */) >= 0);
 1002|      0|      }
 1003|      0|    }
 1004|       |    // LevelIterator enters a new SST file
 1005|      0|    current->iter.Next();
 1006|       |    // Invariant(children_): current is popped from heap and added back only if
 1007|       |    // it is valid
 1008|      0|    if (current->iter.Valid()) {
  ------------------
  |  Branch (1008:9): [True: 0, False: 0]
  ------------------
 1009|      0|      assert(current->iter.status().ok());
 1010|      0|      minHeap_.push(current);
 1011|      0|    } else {
 1012|       |      // TODO(cbi): check status and early return if non-ok.
 1013|      0|      considerStatus(current->iter.status());
 1014|      0|    }
 1015|       |    // Invariants (rti) and (phi)
 1016|      0|    if (range_tombstone_iters_[current->level] &&
  ------------------
  |  Branch (1016:9): [True: 0, False: 0]
  ------------------
 1017|      0|        range_tombstone_iters_[current->level]->Valid()) {
  ------------------
  |  Branch (1017:9): [True: 0, False: 0]
  ------------------
 1018|      0|      InsertRangeTombstoneToMinHeap(current->level);
 1019|      0|    }
 1020|      0|    return true /* current key deleted */;
 1021|      0|  }
 1022|  16.1k|  assert(current->type == HeapItem::Type::ITERATOR);
 1023|       |  // Point key case: check active_ for range tombstone coverage.
 1024|  16.1k|  ParsedInternalKey pik;
 1025|  16.1k|  ParseInternalKey(current->iter.key(), &pik, false).PermitUncheckedError();
 1026|  16.1k|  if (!active_.empty()) {
  ------------------
  |  Branch (1026:7): [True: 16.1k, False: 0]
  ------------------
 1027|  16.1k|    auto i = *active_.begin();
 1028|  16.1k|    if (i < current->level) {
  ------------------
  |  Branch (1028:9): [True: 0, False: 16.1k]
  ------------------
 1029|       |      // range tombstone is from a newer level, definitely covers
 1030|      0|      assert(comparator_->Compare(range_tombstone_iters_[i]->start_key(),
 1031|      0|                                  pik) <= 0);
 1032|      0|      assert(comparator_->Compare(pik, range_tombstone_iters_[i]->end_key()) <
 1033|      0|             0);
 1034|      0|      std::string target;
 1035|      0|      AppendInternalKey(&target, range_tombstone_iters_[i]->end_key());
 1036|      0|      SeekImpl(target, current->level, true);
 1037|      0|      return true /* current key deleted */;
 1038|  16.1k|    } else if (i == current->level) {
  ------------------
  |  Branch (1038:16): [True: 16.1k, False: 0]
  ------------------
 1039|       |      // range tombstone is from the same level as current, check sequence
 1040|       |      // number. By `active_` we know current key is between start key and end
 1041|       |      // key.
 1042|  16.1k|      assert(comparator_->Compare(range_tombstone_iters_[i]->start_key(),
 1043|  16.1k|                                  pik) <= 0);
 1044|  16.1k|      assert(comparator_->Compare(pik, range_tombstone_iters_[i]->end_key()) <
 1045|  16.1k|             0);
 1046|  16.1k|      if (pik.sequence < range_tombstone_iters_[current->level]->seq()) {
  ------------------
  |  Branch (1046:11): [True: 0, False: 16.1k]
  ------------------
 1047|       |        // covered by range tombstone
 1048|      0|        current->iter.Next();
 1049|       |        // Invariant (children_)
 1050|      0|        if (current->iter.Valid()) {
  ------------------
  |  Branch (1050:13): [True: 0, False: 0]
  ------------------
 1051|      0|          minHeap_.replace_top(current);
 1052|      0|        } else {
 1053|      0|          considerStatus(current->iter.status());
 1054|      0|          minHeap_.pop();
 1055|      0|        }
 1056|      0|        return true /* current key deleted */;
 1057|  16.1k|      } else {
 1058|  16.1k|        return false /* current key not deleted */;
 1059|  16.1k|      }
 1060|  16.1k|    } else {
 1061|      0|      return false /* current key not deleted */;
 1062|       |      // range tombstone from an older sorted run with current key < end key.
 1063|       |      // current key is not deleted and the older sorted run will have its range
 1064|       |      // tombstone updated when the range tombstone's end key are popped from
 1065|       |      // minHeap_.
 1066|      0|    }
 1067|  16.1k|  }
 1068|       |  // we can reach here only if active_ is empty
 1069|      0|  assert(active_.empty());
 1070|      0|  assert(minHeap_.top()->type == HeapItem::Type::ITERATOR);
 1071|      0|  return false /* current key not deleted */;
 1072|  16.1k|}
_ZN7rocksdb15MergingIterator25AddToMinHeapOrCheckStatusEPNS0_8HeapItemE:
 1287|  8.96k|void MergingIterator::AddToMinHeapOrCheckStatus(HeapItem* child) {
 1288|       |  // Invariant(children_)
 1289|  8.96k|  if (child->iter.Valid()) {
  ------------------
  |  Branch (1289:7): [True: 3.81k, False: 5.15k]
  ------------------
 1290|  3.81k|    assert(child->iter.status().ok());
 1291|  3.81k|    minHeap_.push(child);
 1292|  5.15k|  } else {
 1293|  5.15k|    considerStatus(child->iter.status());
 1294|  5.15k|  }
 1295|  8.96k|}
_ZN7rocksdb15MergingIterator10ClearHeapsEb:
 1436|  4.48k|void MergingIterator::ClearHeaps(bool clear_active) {
 1437|  4.48k|  minHeap_.clear();
 1438|  4.48k|  if (maxHeap_) {
  ------------------
  |  Branch (1438:7): [True: 0, False: 4.48k]
  ------------------
 1439|      0|    maxHeap_->clear();
 1440|      0|  }
 1441|  4.48k|  if (clear_active) {
  ------------------
  |  Branch (1441:7): [True: 4.48k, False: 0]
  ------------------
 1442|  4.48k|    active_.clear();
 1443|  4.48k|  }
 1444|  4.48k|}
_ZN7rocksdb20MergeIteratorBuilderC2EPKNS_21InternalKeyComparatorEPNS_5ArenaEbPKNS_5SliceE:
 1668|  4.51k|    : first_iter(nullptr), use_merging_iter(false), arena(a) {
 1669|  4.51k|  auto mem = arena->AllocateAligned(sizeof(MergingIterator));
 1670|  4.51k|  merge_iter = new (mem) MergingIterator(comparator, nullptr, 0, true,
 1671|  4.51k|                                         prefix_seek_mode, iterate_upper_bound);
 1672|  4.51k|}
_ZN7rocksdb20MergeIteratorBuilderD2Ev:
 1674|  4.51k|MergeIteratorBuilder::~MergeIteratorBuilder() {
 1675|  4.51k|  if (first_iter != nullptr) {
  ------------------
  |  Branch (1675:7): [True: 0, False: 4.51k]
  ------------------
 1676|      0|    first_iter->~InternalIterator();
 1677|      0|  }
 1678|  4.51k|  if (merge_iter != nullptr) {
  ------------------
  |  Branch (1678:7): [True: 30, False: 4.48k]
  ------------------
 1679|     30|    merge_iter->~MergingIterator();
 1680|     30|  }
 1681|  4.51k|}
_ZN7rocksdb20MergeIteratorBuilder28AddPointAndTombstoneIteratorEPNS_20InternalIteratorBaseINS_5SliceEEEONSt3__110unique_ptrINS_25TruncatedRangeDelIteratorENS5_14default_deleteIS7_EEEEPPSA_:
 1699|  8.99k|    std::unique_ptr<TruncatedRangeDelIterator>** tombstone_iter_ptr) {
 1700|       |  // tombstone_iter_ptr != nullptr means point_iter is a LevelIterator.
 1701|  8.99k|  bool add_range_tombstone = tombstone_iter ||
  ------------------
  |  Branch (1701:30): [True: 2.90k, False: 6.09k]
  ------------------
 1702|  8.99k|                             !merge_iter->range_tombstone_iters_.empty() ||
  ------------------
  |  Branch (1702:30): [True: 0, False: 6.09k]
  ------------------
 1703|  8.99k|                             tombstone_iter_ptr;
  ------------------
  |  Branch (1703:30): [True: 0, False: 6.09k]
  ------------------
 1704|  8.99k|  if (!use_merging_iter && (add_range_tombstone || first_iter)) {
  ------------------
  |  Branch (1704:7): [True: 8.99k, False: 0]
  |  Branch (1704:29): [True: 2.90k, False: 6.09k]
  |  Branch (1704:52): [True: 1.57k, False: 4.51k]
  ------------------
 1705|  4.48k|    use_merging_iter = true;
 1706|  4.48k|    if (first_iter) {
  ------------------
  |  Branch (1706:9): [True: 4.48k, False: 0]
  ------------------
 1707|  4.48k|      merge_iter->AddIterator(first_iter);
 1708|  4.48k|      first_iter = nullptr;
 1709|  4.48k|    }
 1710|  4.48k|  }
 1711|  8.99k|  if (use_merging_iter) {
  ------------------
  |  Branch (1711:7): [True: 4.48k, False: 4.51k]
  ------------------
 1712|  4.48k|    merge_iter->AddIterator(point_iter);
 1713|  4.48k|    if (add_range_tombstone) {
  ------------------
  |  Branch (1713:9): [True: 2.90k, False: 1.57k]
  ------------------
 1714|       |      // If there was a gap, fill in nullptr as empty range tombstone iterators.
 1715|  5.81k|      while (merge_iter->range_tombstone_iters_.size() <
  ------------------
  |  Branch (1715:14): [True: 2.90k, False: 2.90k]
  ------------------
 1716|  5.81k|             merge_iter->children_.size() - 1) {
 1717|  2.90k|        merge_iter->AddRangeTombstoneIterator(nullptr);
 1718|  2.90k|      }
 1719|  2.90k|      merge_iter->AddRangeTombstoneIterator(std::move(tombstone_iter));
 1720|  2.90k|    }
 1721|       |
 1722|  4.48k|    if (tombstone_iter_ptr) {
  ------------------
  |  Branch (1722:9): [True: 0, False: 4.48k]
  ------------------
 1723|       |      // This is needed instead of setting to &range_tombstone_iters_[i]
 1724|       |      // directly here since the memory address of range_tombstone_iters_[i]
 1725|       |      // might change during vector resizing.
 1726|      0|      range_del_iter_ptrs_.emplace_back(
 1727|      0|          merge_iter->range_tombstone_iters_.size() - 1, tombstone_iter_ptr);
 1728|      0|    }
 1729|  4.51k|  } else {
 1730|  4.51k|    first_iter = point_iter;
 1731|  4.51k|  }
 1732|  8.99k|}
_ZN7rocksdb20MergeIteratorBuilder6FinishEPNS_18ArenaWrappedDBIterE:
 1734|  4.51k|InternalIterator* MergeIteratorBuilder::Finish(ArenaWrappedDBIter* db_iter) {
 1735|  4.51k|  InternalIterator* ret = nullptr;
 1736|  4.51k|  if (!use_merging_iter) {
  ------------------
  |  Branch (1736:7): [True: 30, False: 4.48k]
  ------------------
 1737|     30|    ret = first_iter;
 1738|     30|    first_iter = nullptr;
 1739|  4.48k|  } else {
 1740|  4.48k|    for (auto& p : range_del_iter_ptrs_) {
  ------------------
  |  Branch (1740:18): [True: 0, False: 4.48k]
  ------------------
 1741|      0|      *(p.second) = &(merge_iter->range_tombstone_iters_[p.first]);
 1742|      0|    }
 1743|  4.48k|    if (db_iter && !merge_iter->range_tombstone_iters_.empty()) {
  ------------------
  |  Branch (1743:9): [True: 4.48k, False: 0]
  |  Branch (1743:20): [True: 2.90k, False: 1.57k]
  ------------------
 1744|       |      // memtable is always the first level
 1745|  2.90k|      db_iter->SetMemtableRangetombstoneIter(
 1746|  2.90k|          &merge_iter->range_tombstone_iters_.front());
 1747|  2.90k|    }
 1748|  4.48k|    merge_iter->Finish();
 1749|  4.48k|    ret = merge_iter;
 1750|  4.48k|    merge_iter = nullptr;
 1751|  4.48k|  }
 1752|  4.51k|  return ret;
 1753|  4.51k|}
_ZN7rocksdb15MergingIterator29InsertRangeTombstoneToMinHeapEmbb:
  161|   262k|                                     bool replace_top = false) {
  162|   262k|    assert(!range_tombstone_iters_.empty() &&
  163|   262k|           range_tombstone_iters_[level]->Valid());
  164|       |    // Maintains Invariant(phi)
  165|   262k|    if (start_key) {
  ------------------
  |  Branch (165:9): [True: 131k, False: 131k]
  ------------------
  166|   131k|      pinned_heap_item_[level].type = HeapItem::Type::DELETE_RANGE_START;
  167|   131k|      ParsedInternalKey pik = range_tombstone_iters_[level]->start_key();
  168|       |      // iterate_upper_bound does not have timestamp
  169|   131k|      if (iterate_upper_bound_ &&
  ------------------
  |  Branch (169:11): [True: 0, False: 131k]
  ------------------
  170|   131k|          comparator_->user_comparator()->CompareWithoutTimestamp(
  ------------------
  |  Branch (170:11): [True: 0, False: 0]
  ------------------
  171|      0|              pik.user_key, true /* a_has_ts */, *iterate_upper_bound_,
  172|      0|              false /* b_has_ts */) >= 0) {
  173|      0|        if (replace_top) {
  ------------------
  |  Branch (173:13): [True: 0, False: 0]
  ------------------
  174|       |          // replace_top implies this range tombstone iterator is still in
  175|       |          // minHeap_ and at the top.
  176|      0|          minHeap_.pop();
  177|      0|        }
  178|      0|        return;
  179|      0|      }
  180|   131k|      pinned_heap_item_[level].SetTombstoneKey(std::move(pik));
  181|       |      // Checks Invariant(active_)
  182|   131k|      assert(active_.count(level) == 0);
  183|   131k|    } else {
  184|       |      // allow end key to go over upper bound (if present) since start key is
  185|       |      // before upper bound and the range tombstone could still cover a
  186|       |      // range before upper bound.
  187|       |      // Maintains Invariant(active_)
  188|   131k|      pinned_heap_item_[level].SetTombstoneKey(
  189|   131k|          range_tombstone_iters_[level]->end_key());
  190|   131k|      pinned_heap_item_[level].type = HeapItem::Type::DELETE_RANGE_END;
  191|   131k|      active_.insert(level);
  192|   131k|    }
  193|   262k|    if (replace_top) {
  ------------------
  |  Branch (193:9): [True: 259k, False: 2.90k]
  ------------------
  194|   259k|      minHeap_.replace_top(&pinned_heap_item_[level]);
  195|   259k|    } else {
  196|  2.90k|      minHeap_.push(&pinned_heap_item_[level]);
  197|  2.90k|    }
  198|   262k|  }
_ZN7rocksdb15MergingIterator8HeapItem15SetTombstoneKeyEONS_17ParsedInternalKeyE:
  508|   262k|    void SetTombstoneKey(ParsedInternalKey&& pik) {
  509|       |      // op_type is already initialized in MergingIterator::Finish().
  510|   262k|      tombstone_pik.user_key = pik.user_key;
  511|   262k|      tombstone_pik.sequence = pik.sequence;
  512|   262k|    }
_ZNK7rocksdb15MergingIterator21MinHeapItemComparatorclEPNS0_8HeapItemES3_:
  520|   177k|    bool operator()(HeapItem* a, HeapItem* b) const {
  521|   177k|      if (LIKELY(a->type == HeapItem::Type::ITERATOR)) {
  ------------------
  |  |   13|   177k|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 26.8k, False: 150k]
  |  |  ------------------
  ------------------
  522|  26.8k|        if (LIKELY(b->type == HeapItem::Type::ITERATOR)) {
  ------------------
  |  |   13|  26.8k|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 0, False: 26.8k]
  |  |  ------------------
  ------------------
  523|      0|          return comparator_->Compare(a->iter.key(), b->iter.key()) > 0;
  524|  26.8k|        } else {
  525|  26.8k|          return comparator_->Compare(a->iter.key(), b->tombstone_pik) > 0;
  526|  26.8k|        }
  527|   150k|      } else {
  528|   150k|        if (LIKELY(b->type == HeapItem::Type::ITERATOR)) {
  ------------------
  |  |   13|   150k|#define LIKELY(x) (__builtin_expect((x), 1))
  |  |  ------------------
  |  |  |  Branch (13:19): [True: 150k, False: 0]
  |  |  ------------------
  ------------------
  529|   150k|          return comparator_->Compare(a->tombstone_pik, b->iter.key()) > 0;
  530|   150k|        } else {
  531|      0|          return comparator_->Compare(a->tombstone_pik, b->tombstone_pik) > 0;
  532|      0|        }
  533|   150k|      }
  534|   177k|    }
_ZN7rocksdb15MergingIterator14considerStatusENS_6StatusE:
   73|  8.96k|  void considerStatus(Status s) {
   74|  8.96k|    if (!s.ok() && status_.ok()) {
  ------------------
  |  Branch (74:9): [True: 0, False: 8.96k]
  |  Branch (74:20): [True: 0, False: 0]
  ------------------
   75|      0|      status_ = s;
   76|      0|    }
   77|  8.96k|  }
_ZN7rocksdb15MergingIteratorC2EPKNS_21InternalKeyComparatorEPPNS_20InternalIteratorBaseINS_5SliceEEEibbPKS5_:
   65|  4.51k|        iterate_upper_bound_(iterate_upper_bound) {
   66|  4.51k|    children_.resize(n);
   67|  4.51k|    for (int i = 0; i < n; i++) {
  ------------------
  |  Branch (67:21): [True: 0, False: 4.51k]
  ------------------
   68|      0|      children_[i].level = i;
   69|      0|      children_[i].iter.Set(children[i]);
   70|      0|    }
   71|  4.51k|  }
_ZN7rocksdb15MergingIterator21MinHeapItemComparatorC2EPKNS_21InternalKeyComparatorE:
  518|  4.51k|        : comparator_(comparator) {}
_ZN7rocksdb15MergingIterator8HeapItemC2Ev:
  490|  5.81k|    HeapItem() = default;
_ZN7rocksdb15MergingIteratorD2Ev:
  128|  4.51k|  ~MergingIterator() override {
  129|  4.51k|    range_tombstone_iters_.clear();
  130|       |
  131|  8.96k|    for (auto& child : children_) {
  ------------------
  |  Branch (131:22): [True: 8.96k, False: 4.51k]
  ------------------
  132|  8.96k|      child.iter.DeleteIter(is_arena_mode_);
  133|  8.96k|    }
  134|  4.51k|    status_.PermitUncheckedError();
  135|  4.51k|  }
_ZNK7rocksdb15MergingIterator5ValidEv:
  149|  43.6k|  bool Valid() const override { return current_ != nullptr && status_.ok(); }
  ------------------
  |  Branch (149:40): [True: 34.6k, False: 8.96k]
  |  Branch (149:63): [True: 34.6k, False: 0]
  ------------------
_ZN7rocksdb15MergingIterator11SeekToFirstEv:
  255|  4.48k|  void SeekToFirst() override {
  256|  4.48k|    ClearHeaps();
  257|  4.48k|    status_ = Status::OK();
  258|  8.96k|    for (auto& child : children_) {
  ------------------
  |  Branch (258:22): [True: 8.96k, False: 4.48k]
  ------------------
  259|  8.96k|      child.iter.SeekToFirst();
  260|  8.96k|      AddToMinHeapOrCheckStatus(&child);
  261|  8.96k|    }
  262|       |
  263|  10.3k|    for (size_t i = 0; i < range_tombstone_iters_.size(); ++i) {
  ------------------
  |  Branch (263:24): [True: 5.81k, False: 4.48k]
  ------------------
  264|  5.81k|      if (range_tombstone_iters_[i]) {
  ------------------
  |  Branch (264:11): [True: 2.90k, False: 2.90k]
  ------------------
  265|  2.90k|        range_tombstone_iters_[i]->SeekToFirst();
  266|  2.90k|        if (range_tombstone_iters_[i]->Valid()) {
  ------------------
  |  Branch (266:13): [True: 2.90k, False: 0]
  ------------------
  267|       |          // It is possible to be invalid due to snapshots.
  268|  2.90k|          InsertRangeTombstoneToMinHeap(i);
  269|  2.90k|        }
  270|  2.90k|      }
  271|  5.81k|    }
  272|  4.48k|    FindNextVisibleKey();
  273|  4.48k|    direction_ = kForward;
  274|  4.48k|    current_ = CurrentForward();
  275|  4.48k|  }
_ZN7rocksdb15MergingIterator18FindNextVisibleKeyEv:
 1619|  39.1k|inline void MergingIterator::FindNextVisibleKey() {
 1620|  39.1k|  PopDeleteRangeStart();
 1621|       |  // PopDeleteRangeStart() implies heap top is not DELETE_RANGE_START
 1622|       |  // active_ being empty implies no DELETE_RANGE_END in heap.
 1623|       |  // So minHeap_->top() must be of type ITERATOR.
 1624|  39.1k|  while (
 1625|   170k|      !minHeap_.empty() &&
  ------------------
  |  Branch (1625:7): [True: 165k, False: 4.48k]
  ------------------
 1626|   170k|      (!active_.empty() || minHeap_.top()->iter.IsDeleteRangeSentinelKey()) &&
  ------------------
  |  Branch (1626:8): [True: 147k, False: 18.5k]
  |  Branch (1626:28): [True: 0, False: 18.5k]
  ------------------
 1627|   170k|      SkipNextDeleted()) {
  ------------------
  |  Branch (1627:7): [True: 131k, False: 16.1k]
  ------------------
 1628|   131k|    PopDeleteRangeStart();
 1629|   131k|  }
 1630|       |  // Checks Invariant (1)
 1631|  39.1k|  assert(minHeap_.empty() || minHeap_.top()->type == HeapItem::Type::ITERATOR);
 1632|  39.1k|}
_ZN7rocksdb15MergingIterator19PopDeleteRangeStartEv:
  229|   170k|  void PopDeleteRangeStart() {
  230|   301k|    while (!minHeap_.empty() &&
  ------------------
  |  Branch (230:12): [True: 296k, False: 4.48k]
  ------------------
  231|   301k|           minHeap_.top()->type == HeapItem::Type::DELETE_RANGE_START) {
  ------------------
  |  Branch (231:12): [True: 131k, False: 165k]
  ------------------
  232|   131k|      TEST_SYNC_POINT_CALLBACK("MergeIterator::PopDeleteRangeStart", nullptr);
  233|       |      // Invariant(rti) holds since
  234|       |      // range_tombstone_iters_[minHeap_.top()->level] is still valid, and
  235|       |      // parameter `replace_top` is set to true here to ensure only one such
  236|       |      // HeapItem is in minHeap_.
  237|   131k|      InsertRangeTombstoneToMinHeap(
  238|   131k|          minHeap_.top()->level, false /* start_key */, true /* replace_top */);
  239|   131k|    }
  240|   170k|  }
_ZNK7rocksdb15MergingIterator14CurrentForwardEv:
  677|  39.1k|  IteratorWrapper* CurrentForward() const {
  678|  39.1k|    assert(direction_ == kForward);
  679|  39.1k|    assert(minHeap_.empty() ||
  680|  39.1k|           minHeap_.top()->type == HeapItem::Type::ITERATOR);
  681|  39.1k|    return !minHeap_.empty() ? &minHeap_.top()->iter : nullptr;
  ------------------
  |  Branch (681:12): [True: 34.6k, False: 4.48k]
  ------------------
  682|  39.1k|  }
_ZN7rocksdb15MergingIterator4NextEv:
  347|  34.6k|  void Next() override {
  348|  34.6k|    assert(Valid());
  349|       |    // Ensure that all children are positioned after key().
  350|       |    // If we are moving in the forward direction, it is already
  351|       |    // true for all the non-current children since current_ is
  352|       |    // the smallest child and key() == current_->key().
  353|  34.6k|    if (direction_ != kForward) {
  ------------------
  |  Branch (353:9): [True: 0, False: 34.6k]
  ------------------
  354|       |      // The loop advanced all non-current children to be > key() so current_
  355|       |      // should still be strictly the smallest key.
  356|      0|      SwitchToForward();
  357|      0|    }
  358|       |
  359|       |    // For the heap modifications below to be correct, current_ must be the
  360|       |    // current top of the heap.
  361|  34.6k|    assert(current_ == CurrentForward());
  362|       |    // as the current points to the current record. move the iterator forward.
  363|  34.6k|    current_->Next();
  364|  34.6k|    if (current_->Valid()) {
  ------------------
  |  Branch (364:9): [True: 30.8k, False: 3.81k]
  ------------------
  365|       |      // current is still valid after the Next() call above.  Call
  366|       |      // replace_top() to restore the heap property.  When the same child
  367|       |      // iterator yields a sequence of keys, this is cheap.
  368|  30.8k|      assert(current_->status().ok());
  369|  30.8k|      minHeap_.replace_top(minHeap_.top());
  370|  30.8k|    } else {
  371|       |      // current stopped being valid, remove it from the heap.
  372|  3.81k|      considerStatus(current_->status());
  373|  3.81k|      minHeap_.pop();
  374|  3.81k|    }
  375|       |    // Invariants (3) and (4) hold when after advancing current_.
  376|       |    // Let k be the smallest key among children_[i].iter.key().
  377|       |    // k <= children_[i].iter.key() <= LevelNextVisible(i, k) holds for all
  378|       |    // level i. After FindNextVisible(), Invariants (1)-(4) hold and
  379|       |    // minHeap_.top()->key() is the first key >= k from any children_ that is
  380|       |    // not covered by any range tombstone.
  381|  34.6k|    FindNextVisibleKey();
  382|  34.6k|    current_ = CurrentForward();
  383|  34.6k|  }
_ZN7rocksdb15MergingIterator16NextAndGetResultEPNS_13IterateResultE:
  385|  34.6k|  bool NextAndGetResult(IterateResult* result) override {
  386|  34.6k|    Next();
  387|  34.6k|    bool is_valid = Valid();
  388|  34.6k|    if (is_valid) {
  ------------------
  |  Branch (388:9): [True: 30.8k, False: 3.81k]
  ------------------
  389|  30.8k|      result->key = key();
  390|  30.8k|      result->bound_check_result = UpperBoundCheckResult();
  391|  30.8k|      result->value_prepared = current_->IsValuePrepared();
  392|  30.8k|    }
  393|  34.6k|    return is_valid;
  394|  34.6k|  }
_ZNK7rocksdb15MergingIterator3keyEv:
  427|  37.6k|  Slice key() const override {
  428|  37.6k|    assert(Valid());
  429|  37.6k|    return current_->key();
  430|  37.6k|  }
_ZNK7rocksdb15MergingIterator15write_unix_timeEv:
  432|  29.5k|  uint64_t write_unix_time() const override {
  433|  29.5k|    assert(Valid());
  434|  29.5k|    return current_->write_unix_time();
  435|  29.5k|  }
_ZNK7rocksdb15MergingIterator5valueEv:
  437|  29.5k|  Slice value() const override {
  438|  29.5k|    assert(Valid());
  439|  29.5k|    return current_->value();
  440|  29.5k|  }
_ZNK7rocksdb15MergingIterator6statusEv:
  151|    608|  Status status() const override { return status_; }
_ZN7rocksdb15MergingIterator12PrepareValueEv:
  442|  2.99k|  bool PrepareValue() override {
  443|  2.99k|    assert(Valid());
  444|  2.99k|    if (current_->PrepareValue()) {
  ------------------
  |  Branch (444:9): [True: 2.99k, False: 0]
  ------------------
  445|  2.99k|      return true;
  446|  2.99k|    }
  447|       |
  448|      0|    considerStatus(current_->status());
  449|      0|    assert(!status_.ok());
  450|      0|    return false;
  451|  2.99k|  }
_ZN7rocksdb15MergingIterator21UpperBoundCheckResultEv:
  461|  30.8k|  IterBoundCheck UpperBoundCheckResult() override {
  462|  30.8k|    assert(Valid());
  463|  30.8k|    return current_->UpperBoundCheckResult();
  464|  30.8k|  }
_ZN7rocksdb15MergingIterator17SetPinnedItersMgrEPNS_22PinnedIteratorsManagerE:
  466|  4.48k|  void SetPinnedItersMgr(PinnedIteratorsManager* pinned_iters_mgr) override {
  467|  4.48k|    pinned_iters_mgr_ = pinned_iters_mgr;
  468|  8.96k|    for (auto& child : children_) {
  ------------------
  |  Branch (468:22): [True: 8.96k, False: 4.48k]
  ------------------
  469|  8.96k|      child.iter.SetPinnedItersMgr(pinned_iters_mgr);
  470|  8.96k|    }
  471|  4.48k|  }
_ZNK7rocksdb15MergingIterator11IsKeyPinnedEv:
  473|  3.81k|  bool IsKeyPinned() const override {
  474|  3.81k|    assert(Valid());
  475|  3.81k|    return pinned_iters_mgr_ && pinned_iters_mgr_->PinningEnabled() &&
  ------------------
  |  Branch (475:12): [True: 3.81k, False: 0]
  |  Branch (475:33): [True: 0, False: 3.81k]
  ------------------
  476|  3.81k|           current_->IsKeyPinned();
  ------------------
  |  Branch (476:12): [True: 0, False: 0]
  ------------------
  477|  3.81k|  }
_ZN7rocksdb15MergingIterator11AddIteratorEPNS_20InternalIteratorBaseINS_5SliceEEE:
   79|  8.96k|  virtual void AddIterator(InternalIterator* iter) {
   80|  8.96k|    children_.emplace_back(children_.size(), iter);
   81|  8.96k|    if (pinned_iters_mgr_) {
  ------------------
  |  Branch (81:9): [True: 0, False: 8.96k]
  ------------------
   82|      0|      iter->SetPinnedItersMgr(pinned_iters_mgr_);
   83|      0|    }
   84|       |    // Invalidate to ensure `Seek*()` is called to construct the heaps before
   85|       |    // use.
   86|  8.96k|    current_ = nullptr;
   87|  8.96k|  }
_ZN7rocksdb15MergingIterator8HeapItemC2EmPNS_20InternalIteratorBaseINS_5SliceEEE:
  504|  8.96k|        : level(_level), type(Type::ITERATOR) {
  505|  8.96k|      iter.Set(_iter);
  506|  8.96k|    }
_ZN7rocksdb15MergingIterator25AddRangeTombstoneIteratorEONSt3__110unique_ptrINS_25TruncatedRangeDelIteratorENS1_14default_deleteIS3_EEEE:
  100|  5.81k|      std::unique_ptr<TruncatedRangeDelIterator>&& iter) {
  101|  5.81k|    range_tombstone_iters_.emplace_back(std::move(iter));
  102|  5.81k|  }
_ZN7rocksdb15MergingIterator6FinishEv:
  107|  4.48k|  void Finish() {
  108|  4.48k|    if (!range_tombstone_iters_.empty()) {
  ------------------
  |  Branch (108:9): [True: 2.90k, False: 1.57k]
  ------------------
  109|  2.90k|      assert(range_tombstone_iters_.size() == children_.size());
  110|  2.90k|      pinned_heap_item_.resize(range_tombstone_iters_.size());
  111|  8.72k|      for (size_t i = 0; i < range_tombstone_iters_.size(); ++i) {
  ------------------
  |  Branch (111:26): [True: 5.81k, False: 2.90k]
  ------------------
  112|  5.81k|        pinned_heap_item_[i].level = i;
  113|       |        // Range tombstone end key is exclusive. If a point internal key has the
  114|       |        // same user key and sequence number as the start or end key of a range
  115|       |        // tombstone, the order will be start < end key < internal key with the
  116|       |        // following op_type change. This is helpful to ensure keys popped from
  117|       |        // heap are in expected order since range tombstone start/end keys will
  118|       |        // be distinct from point internal keys. Strictly speaking, this is only
  119|       |        // needed for tombstone end points that are truncated in
  120|       |        // TruncatedRangeDelIterator since untruncated tombstone end points
  121|       |        // always have kMaxSequenceNumber and kTypeRangeDeletion (see
  122|       |        // TruncatedRangeDelIterator::start_key()/end_key()).
  123|  5.81k|        pinned_heap_item_[i].tombstone_pik.type = kTypeMaxValid;
  124|  5.81k|      }
  125|  2.90k|    }
  126|  4.48k|  }

_ZN7rocksdb20MergeIteratorBuilder8GetArenaEv:
   80|  4.48k|  Arena* GetArena() { return arena; }

_ZN7rocksdb16MetaIndexBuilderC2Ev:
   38|  4.48k|    : meta_index_block_(new BlockBuilder(1 /* restart interval */)) {}
_ZN7rocksdb16MetaIndexBuilder3AddERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_11BlockHandleE:
   40|  11.8k|void MetaIndexBuilder::Add(const std::string& key, const BlockHandle& handle) {
   41|  11.8k|  std::string handle_encoding;
   42|  11.8k|  handle.EncodeTo(&handle_encoding);
   43|  11.8k|  meta_block_handles_.insert({key, handle_encoding});
   44|  11.8k|}
_ZN7rocksdb16MetaIndexBuilder6FinishEv:
   46|  4.48k|Slice MetaIndexBuilder::Finish() {
   47|  11.8k|  for (const auto& metablock : meta_block_handles_) {
  ------------------
  |  Branch (47:30): [True: 11.8k, False: 4.48k]
  ------------------
   48|  11.8k|    meta_index_block_->Add(metablock.first, metablock.second);
   49|  11.8k|  }
   50|  4.48k|  return meta_index_block_->Finish();
   51|  4.48k|}
_ZN7rocksdb20PropertyBlockBuilderC2Ev:
   58|  4.48k|          std::numeric_limits<int32_t>::max() /* restart interval */)) {}
_ZN7rocksdb20PropertyBlockBuilder3AddERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
   61|   147k|                               const std::string& val) {
   62|   147k|  props_.insert({name, val});
   63|   147k|}
_ZN7rocksdb20PropertyBlockBuilder3AddERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEm:
   65|  89.6k|void PropertyBlockBuilder::Add(const std::string& name, uint64_t val) {
   66|  89.6k|  assert(props_.find(name) == props_.end());
   67|       |
   68|  89.6k|  std::string dst;
   69|  89.6k|  PutVarint64(&dst, val);
   70|       |
   71|  89.6k|  Add(name, dst);
   72|  89.6k|}
_ZN7rocksdb20PropertyBlockBuilder3AddERKNSt3__13mapINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES8_NS1_4lessIS8_EENS6_INS1_4pairIKS8_S8_EEEEEE:
   75|  4.48k|    const UserCollectedProperties& user_collected_properties) {
   76|  13.4k|  for (const auto& prop : user_collected_properties) {
  ------------------
  |  Branch (76:25): [True: 13.4k, False: 4.48k]
  ------------------
   77|  13.4k|    Add(prop.first, prop.second);
   78|  13.4k|  }
   79|  4.48k|}
_ZN7rocksdb20PropertyBlockBuilder16AddTablePropertyERKNS_15TablePropertiesE:
   81|  4.48k|void PropertyBlockBuilder::AddTableProperty(const TableProperties& props) {
   82|  4.48k|  TEST_SYNC_POINT_CALLBACK("PropertyBlockBuilder::AddTableProperty:Start",
   83|  4.48k|                           const_cast<TableProperties*>(&props));
   84|       |
   85|  4.48k|  Add(TablePropertiesNames::kOriginalFileNumber, props.orig_file_number);
   86|  4.48k|  Add(TablePropertiesNames::kRawKeySize, props.raw_key_size);
   87|  4.48k|  Add(TablePropertiesNames::kRawValueSize, props.raw_value_size);
   88|  4.48k|  Add(TablePropertiesNames::kDataSize, props.data_size);
   89|  4.48k|  Add(TablePropertiesNames::kIndexSize, props.index_size);
   90|  4.48k|  if (props.index_partitions != 0) {
  ------------------
  |  Branch (90:7): [True: 0, False: 4.48k]
  ------------------
   91|      0|    Add(TablePropertiesNames::kIndexPartitions, props.index_partitions);
   92|      0|    Add(TablePropertiesNames::kTopLevelIndexSize, props.top_level_index_size);
   93|      0|  }
   94|  4.48k|  Add(TablePropertiesNames::kIndexKeyIsUserKey, props.index_key_is_user_key);
   95|  4.48k|  Add(TablePropertiesNames::kIndexValueIsDeltaEncoded,
   96|  4.48k|      props.index_value_is_delta_encoded);
   97|  4.48k|  Add(TablePropertiesNames::kNumEntries, props.num_entries);
   98|  4.48k|  Add(TablePropertiesNames::kNumFilterEntries, props.num_filter_entries);
   99|  4.48k|  Add(TablePropertiesNames::kDeletedKeys, props.num_deletions);
  100|  4.48k|  Add(TablePropertiesNames::kMergeOperands, props.num_merge_operands);
  101|  4.48k|  Add(TablePropertiesNames::kNumRangeDeletions, props.num_range_deletions);
  102|  4.48k|  Add(TablePropertiesNames::kNumDataBlocks, props.num_data_blocks);
  103|  4.48k|  Add(TablePropertiesNames::kFilterSize, props.filter_size);
  104|  4.48k|  Add(TablePropertiesNames::kFormatVersion, props.format_version);
  105|  4.48k|  Add(TablePropertiesNames::kFixedKeyLen, props.fixed_key_len);
  106|  4.48k|  Add(TablePropertiesNames::kColumnFamilyId, props.column_family_id);
  107|  4.48k|  Add(TablePropertiesNames::kCreationTime, props.creation_time);
  108|  4.48k|  Add(TablePropertiesNames::kOldestKeyTime, props.oldest_key_time);
  109|  4.48k|  if (props.file_creation_time > 0) {
  ------------------
  |  Branch (109:7): [True: 0, False: 4.48k]
  ------------------
  110|      0|    Add(TablePropertiesNames::kFileCreationTime, props.file_creation_time);
  111|      0|  }
  112|  4.48k|  if (props.slow_compression_estimated_data_size > 0) {
  ------------------
  |  Branch (112:7): [True: 0, False: 4.48k]
  ------------------
  113|      0|    Add(TablePropertiesNames::kSlowCompressionEstimatedDataSize,
  114|      0|        props.slow_compression_estimated_data_size);
  115|      0|  }
  116|  4.48k|  if (props.fast_compression_estimated_data_size > 0) {
  ------------------
  |  Branch (116:7): [True: 0, False: 4.48k]
  ------------------
  117|      0|    Add(TablePropertiesNames::kFastCompressionEstimatedDataSize,
  118|      0|        props.fast_compression_estimated_data_size);
  119|      0|  }
  120|  4.48k|  Add(TablePropertiesNames::kTailStartOffset, props.tail_start_offset);
  121|  4.48k|  if (props.user_defined_timestamps_persisted == 0) {
  ------------------
  |  Branch (121:7): [True: 0, False: 4.48k]
  ------------------
  122|      0|    Add(TablePropertiesNames::kUserDefinedTimestampsPersisted,
  123|      0|        props.user_defined_timestamps_persisted);
  124|      0|  }
  125|  4.48k|  if (!props.db_id.empty()) {
  ------------------
  |  Branch (125:7): [True: 4.48k, False: 0]
  ------------------
  126|  4.48k|    Add(TablePropertiesNames::kDbId, props.db_id);
  127|  4.48k|  }
  128|  4.48k|  if (!props.db_session_id.empty()) {
  ------------------
  |  Branch (128:7): [True: 4.48k, False: 0]
  ------------------
  129|  4.48k|    Add(TablePropertiesNames::kDbSessionId, props.db_session_id);
  130|  4.48k|  }
  131|  4.48k|  if (!props.db_host_id.empty()) {
  ------------------
  |  Branch (131:7): [True: 4.48k, False: 0]
  ------------------
  132|  4.48k|    Add(TablePropertiesNames::kDbHostId, props.db_host_id);
  133|  4.48k|  }
  134|       |
  135|  4.48k|  if (!props.filter_policy_name.empty()) {
  ------------------
  |  Branch (135:7): [True: 0, False: 4.48k]
  ------------------
  136|      0|    Add(TablePropertiesNames::kFilterPolicy, props.filter_policy_name);
  137|      0|  }
  138|  4.48k|  if (!props.comparator_name.empty()) {
  ------------------
  |  Branch (138:7): [True: 4.48k, False: 0]
  ------------------
  139|  4.48k|    Add(TablePropertiesNames::kComparator, props.comparator_name);
  140|  4.48k|  }
  141|       |
  142|  4.48k|  if (!props.merge_operator_name.empty()) {
  ------------------
  |  Branch (142:7): [True: 4.48k, False: 0]
  ------------------
  143|  4.48k|    Add(TablePropertiesNames::kMergeOperator, props.merge_operator_name);
  144|  4.48k|  }
  145|  4.48k|  if (!props.prefix_extractor_name.empty()) {
  ------------------
  |  Branch (145:7): [True: 4.48k, False: 0]
  ------------------
  146|  4.48k|    Add(TablePropertiesNames::kPrefixExtractorName,
  147|  4.48k|        props.prefix_extractor_name);
  148|  4.48k|  }
  149|  4.48k|  if (!props.property_collectors_names.empty()) {
  ------------------
  |  Branch (149:7): [True: 4.48k, False: 0]
  ------------------
  150|  4.48k|    Add(TablePropertiesNames::kPropertyCollectors,
  151|  4.48k|        props.property_collectors_names);
  152|  4.48k|  }
  153|  4.48k|  if (!props.column_family_name.empty()) {
  ------------------
  |  Branch (153:7): [True: 4.48k, False: 0]
  ------------------
  154|  4.48k|    Add(TablePropertiesNames::kColumnFamilyName, props.column_family_name);
  155|  4.48k|  }
  156|       |
  157|  4.48k|  if (!props.compression_name.empty()) {
  ------------------
  |  Branch (157:7): [True: 4.48k, False: 0]
  ------------------
  158|  4.48k|    Add(TablePropertiesNames::kCompression, props.compression_name);
  159|  4.48k|  }
  160|  4.48k|  if (!props.compression_options.empty()) {
  ------------------
  |  Branch (160:7): [True: 4.48k, False: 0]
  ------------------
  161|  4.48k|    Add(TablePropertiesNames::kCompressionOptions, props.compression_options);
  162|  4.48k|  }
  163|  4.48k|  if (!props.seqno_to_time_mapping.empty()) {
  ------------------
  |  Branch (163:7): [True: 0, False: 4.48k]
  ------------------
  164|      0|    Add(TablePropertiesNames::kSequenceNumberTimeMapping,
  165|      0|        props.seqno_to_time_mapping);
  166|      0|  }
  167|  4.48k|}
_ZN7rocksdb20PropertyBlockBuilder6FinishEv:
  169|  4.48k|Slice PropertyBlockBuilder::Finish() {
  170|   147k|  for (const auto& prop : props_) {
  ------------------
  |  Branch (170:25): [True: 147k, False: 4.48k]
  ------------------
  171|   147k|    properties_block_->Add(prop.first, prop.second);
  172|   147k|  }
  173|       |
  174|  4.48k|  return properties_block_->Finish();
  175|  4.48k|}
_ZN7rocksdb33NotifyCollectTableCollectorsOnAddERKNS_5SliceES2_mRKNSt3__16vectorINS3_10unique_ptrINS_19InternalTblPropCollENS3_14default_deleteIS6_EEEENS3_9allocatorIS9_EEEEPNS_6LoggerE:
  190|   165k|    Logger* info_log) {
  191|   165k|  bool all_succeeded = true;
  192|   165k|  for (auto& collector : collectors) {
  ------------------
  |  Branch (192:24): [True: 165k, False: 165k]
  ------------------
  193|   165k|    Status s = collector->InternalAdd(key, value, file_size);
  194|   165k|    all_succeeded = all_succeeded && s.ok();
  ------------------
  |  Branch (194:21): [True: 165k, False: 0]
  |  Branch (194:38): [True: 165k, False: 0]
  ------------------
  195|   165k|    if (!s.ok()) {
  ------------------
  |  Branch (195:9): [True: 0, False: 165k]
  ------------------
  196|      0|      LogPropertiesCollectionError(info_log, "Add" /* method */,
  197|      0|                                   collector->Name());
  198|      0|    }
  199|   165k|  }
  200|   165k|  return all_succeeded;
  201|   165k|}
_ZN7rocksdb38NotifyCollectTableCollectorsOnBlockAddERKNSt3__16vectorINS0_10unique_ptrINS_19InternalTblPropCollENS0_14default_deleteIS3_EEEENS0_9allocatorIS6_EEEEmmm:
  207|  13.3k|    const uint64_t block_compressed_bytes_slow) {
  208|  13.3k|  for (auto& collector : collectors) {
  ------------------
  |  Branch (208:24): [True: 13.3k, False: 13.3k]
  ------------------
  209|  13.3k|    collector->BlockAdd(block_uncomp_bytes, block_compressed_bytes_fast,
  210|  13.3k|                        block_compressed_bytes_slow);
  211|  13.3k|  }
  212|  13.3k|}
_ZN7rocksdb36NotifyCollectTableCollectorsOnFinishERKNSt3__16vectorINS0_10unique_ptrINS_19InternalTblPropCollENS0_14default_deleteIS3_EEEENS0_9allocatorIS6_EEEEPNS_6LoggerEPNS_20PropertyBlockBuilderERNS0_3mapINS0_12basic_stringIcNS0_11char_traitsIcEENS7_IcEEEESL_NS0_4lessISL_EENS7_INS0_4pairIKSL_SL_EEEEEEST_:
  218|  4.48k|    UserCollectedProperties& readable_properties) {
  219|  4.48k|  bool all_succeeded = true;
  220|  4.48k|  for (auto& collector : collectors) {
  ------------------
  |  Branch (220:24): [True: 4.48k, False: 4.48k]
  ------------------
  221|  4.48k|    Status s = collector->Finish(&user_collected_properties);
  222|  4.48k|    if (s.ok()) {
  ------------------
  |  Branch (222:9): [True: 4.48k, False: 0]
  ------------------
  223|  4.48k|      for (const auto& prop : collector->GetReadableProperties()) {
  ------------------
  |  Branch (223:29): [True: 0, False: 4.48k]
  ------------------
  224|      0|        readable_properties.insert(prop);
  225|      0|      }
  226|  4.48k|      builder->Add(user_collected_properties);
  227|  4.48k|    } else {
  228|      0|      LogPropertiesCollectionError(info_log, "Finish" /* method */,
  229|      0|                                   collector->Name());
  230|      0|      if (all_succeeded) {
  ------------------
  |  Branch (230:11): [True: 0, False: 0]
  ------------------
  231|      0|        all_succeeded = false;
  232|      0|      }
  233|      0|    }
  234|  4.48k|  }
  235|  4.48k|  return all_succeeded;
  236|  4.48k|}
_ZN7rocksdb25ReadTablePropertiesHelperERKNS_11ReadOptionsERKNS_11BlockHandleEPNS_22RandomAccessFileReaderEPNS_18FilePrefetchBufferERKNS_6FooterERKNS_16ImmutableOptionsEPNSt3__110unique_ptrINS_15TablePropertiesENSG_14default_deleteISI_EEEEPNS_15MemoryAllocatorE:
  245|  4.48k|    MemoryAllocator* memory_allocator) {
  246|  4.48k|  assert(table_properties);
  247|       |
  248|       |  // If this is an external SST file ingested with write_global_seqno set to
  249|       |  // true, then we expect the checksum mismatch because checksum was written
  250|       |  // by SstFileWriter, but its global seqno in the properties block may have
  251|       |  // been changed during ingestion. For this reason, we initially read
  252|       |  // and process without checksum verification, then later try checksum
  253|       |  // verification so that if it fails, we can copy to a temporary buffer with
  254|       |  // global seqno set to its original value, i.e. 0, and attempt checksum
  255|       |  // verification again.
  256|  4.48k|  ReadOptions modified_ro = ro;
  257|  4.48k|  modified_ro.verify_checksums = false;
  258|  4.48k|  BlockContents block_contents;
  259|  4.48k|  BlockFetcher block_fetcher(file, prefetch_buffer, footer, modified_ro, handle,
  260|  4.48k|                             &block_contents, ioptions, false /* decompress */,
  261|  4.48k|                             false /*maybe_compressed*/, BlockType::kProperties,
  262|  4.48k|                             UncompressionDict::GetEmptyDict(),
  263|  4.48k|                             PersistentCacheOptions::kEmpty, memory_allocator);
  264|  4.48k|  Status s = block_fetcher.ReadBlockContents();
  265|  4.48k|  if (!s.ok()) {
  ------------------
  |  Branch (265:7): [True: 0, False: 4.48k]
  ------------------
  266|      0|    return s;
  267|      0|  }
  268|       |
  269|       |  // Unfortunately, Block::size() might not equal block_contents.data.size(),
  270|       |  // and Block hides block_contents
  271|  4.48k|  uint64_t block_size = block_contents.data.size();
  272|  4.48k|  Block properties_block(std::move(block_contents));
  273|  4.48k|  std::unique_ptr<MetaBlockIter> iter(properties_block.NewMetaIterator());
  274|       |
  275|  4.48k|  std::unique_ptr<TableProperties> new_table_properties{new TableProperties};
  276|       |  // All pre-defined properties of type uint64_t
  277|  4.48k|  std::unordered_map<std::string, uint64_t*> predefined_uint64_properties = {
  278|  4.48k|      {TablePropertiesNames::kOriginalFileNumber,
  279|  4.48k|       &new_table_properties->orig_file_number},
  280|  4.48k|      {TablePropertiesNames::kDataSize, &new_table_properties->data_size},
  281|  4.48k|      {TablePropertiesNames::kIndexSize, &new_table_properties->index_size},
  282|  4.48k|      {TablePropertiesNames::kIndexPartitions,
  283|  4.48k|       &new_table_properties->index_partitions},
  284|  4.48k|      {TablePropertiesNames::kTopLevelIndexSize,
  285|  4.48k|       &new_table_properties->top_level_index_size},
  286|  4.48k|      {TablePropertiesNames::kIndexKeyIsUserKey,
  287|  4.48k|       &new_table_properties->index_key_is_user_key},
  288|  4.48k|      {TablePropertiesNames::kIndexValueIsDeltaEncoded,
  289|  4.48k|       &new_table_properties->index_value_is_delta_encoded},
  290|  4.48k|      {TablePropertiesNames::kFilterSize, &new_table_properties->filter_size},
  291|  4.48k|      {TablePropertiesNames::kRawKeySize, &new_table_properties->raw_key_size},
  292|  4.48k|      {TablePropertiesNames::kRawValueSize,
  293|  4.48k|       &new_table_properties->raw_value_size},
  294|  4.48k|      {TablePropertiesNames::kNumDataBlocks,
  295|  4.48k|       &new_table_properties->num_data_blocks},
  296|  4.48k|      {TablePropertiesNames::kNumEntries, &new_table_properties->num_entries},
  297|  4.48k|      {TablePropertiesNames::kNumFilterEntries,
  298|  4.48k|       &new_table_properties->num_filter_entries},
  299|  4.48k|      {TablePropertiesNames::kDeletedKeys,
  300|  4.48k|       &new_table_properties->num_deletions},
  301|  4.48k|      {TablePropertiesNames::kMergeOperands,
  302|  4.48k|       &new_table_properties->num_merge_operands},
  303|  4.48k|      {TablePropertiesNames::kNumRangeDeletions,
  304|  4.48k|       &new_table_properties->num_range_deletions},
  305|  4.48k|      {TablePropertiesNames::kFormatVersion,
  306|  4.48k|       &new_table_properties->format_version},
  307|  4.48k|      {TablePropertiesNames::kFixedKeyLen,
  308|  4.48k|       &new_table_properties->fixed_key_len},
  309|  4.48k|      {TablePropertiesNames::kColumnFamilyId,
  310|  4.48k|       &new_table_properties->column_family_id},
  311|  4.48k|      {TablePropertiesNames::kCreationTime,
  312|  4.48k|       &new_table_properties->creation_time},
  313|  4.48k|      {TablePropertiesNames::kOldestKeyTime,
  314|  4.48k|       &new_table_properties->oldest_key_time},
  315|  4.48k|      {TablePropertiesNames::kFileCreationTime,
  316|  4.48k|       &new_table_properties->file_creation_time},
  317|  4.48k|      {TablePropertiesNames::kSlowCompressionEstimatedDataSize,
  318|  4.48k|       &new_table_properties->slow_compression_estimated_data_size},
  319|  4.48k|      {TablePropertiesNames::kFastCompressionEstimatedDataSize,
  320|  4.48k|       &new_table_properties->fast_compression_estimated_data_size},
  321|  4.48k|      {TablePropertiesNames::kTailStartOffset,
  322|  4.48k|       &new_table_properties->tail_start_offset},
  323|  4.48k|      {TablePropertiesNames::kUserDefinedTimestampsPersisted,
  324|  4.48k|       &new_table_properties->user_defined_timestamps_persisted},
  325|  4.48k|  };
  326|       |
  327|  4.48k|  std::string last_key;
  328|   152k|  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
  ------------------
  |  Branch (328:29): [True: 147k, False: 4.48k]
  ------------------
  329|   147k|    s = iter->status();
  330|   147k|    if (!s.ok()) {
  ------------------
  |  Branch (330:9): [True: 0, False: 147k]
  ------------------
  331|      0|      break;
  332|      0|    }
  333|       |
  334|   147k|    auto key = iter->key().ToString();
  335|       |    // properties block should be strictly sorted with no duplicate key.
  336|   147k|    if (!last_key.empty() &&
  ------------------
  |  Branch (336:9): [True: 143k, False: 4.48k]
  |  Branch (336:9): [True: 0, False: 147k]
  ------------------
  337|   147k|        BytewiseComparator()->Compare(key, last_key) <= 0) {
  ------------------
  |  Branch (337:9): [True: 0, False: 143k]
  ------------------
  338|      0|      s = Status::Corruption("properties unsorted");
  339|      0|      break;
  340|      0|    }
  341|   147k|    last_key = key;
  342|       |
  343|   147k|    auto raw_val = iter->value();
  344|   147k|    auto pos = predefined_uint64_properties.find(key);
  345|       |
  346|   147k|    if (key == ExternalSstFilePropertyNames::kGlobalSeqno) {
  ------------------
  |  Branch (346:9): [True: 0, False: 147k]
  ------------------
  347|      0|      new_table_properties->external_sst_file_global_seqno_offset =
  348|      0|          handle.offset() + iter->ValueOffset();
  349|      0|    }
  350|       |
  351|   147k|    if (pos != predefined_uint64_properties.end()) {
  ------------------
  |  Branch (351:9): [True: 89.6k, False: 58.2k]
  ------------------
  352|  89.6k|      if (key == TablePropertiesNames::kDeletedKeys ||
  ------------------
  |  Branch (352:11): [True: 4.48k, False: 85.1k]
  ------------------
  353|  89.6k|          key == TablePropertiesNames::kMergeOperands) {
  ------------------
  |  Branch (353:11): [True: 4.48k, False: 80.7k]
  ------------------
  354|       |        // Insert in user-collected properties for API backwards compatibility
  355|  8.96k|        new_table_properties->user_collected_properties.insert(
  356|  8.96k|            {key, raw_val.ToString()});
  357|  8.96k|      }
  358|       |      // handle predefined rocksdb properties
  359|  89.6k|      uint64_t val;
  360|  89.6k|      if (!GetVarint64(&raw_val, &val)) {
  ------------------
  |  Branch (360:11): [True: 0, False: 89.6k]
  ------------------
  361|       |        // skip malformed value
  362|      0|        auto error_msg =
  363|      0|            "Detect malformed value in properties meta-block:"
  364|      0|            "\tkey: " +
  365|      0|            key + "\tval: " + raw_val.ToString();
  366|      0|        ROCKS_LOG_ERROR(ioptions.logger, "%s", error_msg.c_str());
  ------------------
  |  |   45|      0|  ROCKS_LOG_AT_LEVEL((LGR), InfoLogLevel::ERROR_LEVEL, FMT, ##__VA_ARGS__)
  |  |  ------------------
  |  |  |  |   32|      0|  ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   15|      0|#define ROCKSDB_NAMESPACE rocksdb
  |  |  |  |  ------------------
  |  |  |  |                 ROCKSDB_NAMESPACE::Log((LVL), (LGR), ROCKS_LOG_PREPEND_FILE_LINE(FMT), \
  |  |  |  |  ------------------
  |  |  |  |  |  |   19|      0|  ("[%s:" ROCKS_LOG_TOSTRING(__LINE__) "] " FMT)
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                         RocksLogShorterFileName(__FILE__), ##__VA_ARGS__)
  |  |  ------------------
  ------------------
  367|      0|        continue;
  368|      0|      }
  369|  89.6k|      *(pos->second) = val;
  370|  89.6k|    } else if (key == TablePropertiesNames::kDbId) {
  ------------------
  |  Branch (370:16): [True: 4.48k, False: 53.8k]
  ------------------
  371|  4.48k|      new_table_properties->db_id = raw_val.ToString();
  372|  53.8k|    } else if (key == TablePropertiesNames::kDbSessionId) {
  ------------------
  |  Branch (372:16): [True: 4.48k, False: 49.3k]
  ------------------
  373|  4.48k|      new_table_properties->db_session_id = raw_val.ToString();
  374|  49.3k|    } else if (key == TablePropertiesNames::kDbHostId) {
  ------------------
  |  Branch (374:16): [True: 4.48k, False: 44.8k]
  ------------------
  375|  4.48k|      new_table_properties->db_host_id = raw_val.ToString();
  376|  44.8k|    } else if (key == TablePropertiesNames::kFilterPolicy) {
  ------------------
  |  Branch (376:16): [True: 0, False: 44.8k]
  ------------------
  377|      0|      new_table_properties->filter_policy_name = raw_val.ToString();
  378|  44.8k|    } else if (key == TablePropertiesNames::kColumnFamilyName) {
  ------------------
  |  Branch (378:16): [True: 4.48k, False: 40.3k]
  ------------------
  379|  4.48k|      new_table_properties->column_family_name = raw_val.ToString();
  380|  40.3k|    } else if (key == TablePropertiesNames::kComparator) {
  ------------------
  |  Branch (380:16): [True: 4.48k, False: 35.8k]
  ------------------
  381|  4.48k|      new_table_properties->comparator_name = raw_val.ToString();
  382|  35.8k|    } else if (key == TablePropertiesNames::kMergeOperator) {
  ------------------
  |  Branch (382:16): [True: 4.48k, False: 31.3k]
  ------------------
  383|  4.48k|      new_table_properties->merge_operator_name = raw_val.ToString();
  384|  31.3k|    } else if (key == TablePropertiesNames::kPrefixExtractorName) {
  ------------------
  |  Branch (384:16): [True: 4.48k, False: 26.9k]
  ------------------
  385|  4.48k|      new_table_properties->prefix_extractor_name = raw_val.ToString();
  386|  26.9k|    } else if (key == TablePropertiesNames::kPropertyCollectors) {
  ------------------
  |  Branch (386:16): [True: 4.48k, False: 22.4k]
  ------------------
  387|  4.48k|      new_table_properties->property_collectors_names = raw_val.ToString();
  388|  22.4k|    } else if (key == TablePropertiesNames::kCompression) {
  ------------------
  |  Branch (388:16): [True: 4.48k, False: 17.9k]
  ------------------
  389|  4.48k|      new_table_properties->compression_name = raw_val.ToString();
  390|  17.9k|    } else if (key == TablePropertiesNames::kCompressionOptions) {
  ------------------
  |  Branch (390:16): [True: 4.48k, False: 13.4k]
  ------------------
  391|  4.48k|      new_table_properties->compression_options = raw_val.ToString();
  392|  13.4k|    } else if (key == TablePropertiesNames::kSequenceNumberTimeMapping) {
  ------------------
  |  Branch (392:16): [True: 0, False: 13.4k]
  ------------------
  393|      0|      new_table_properties->seqno_to_time_mapping = raw_val.ToString();
  394|  13.4k|    } else {
  395|       |      // handle user-collected properties
  396|  13.4k|      new_table_properties->user_collected_properties.insert(
  397|  13.4k|          {key, raw_val.ToString()});
  398|  13.4k|    }
  399|   147k|  }
  400|       |
  401|       |  // Modified version of BlockFetcher checksum verification
  402|       |  // (See write_global_seqno comment above)
  403|  4.48k|  if (s.ok() && footer.GetBlockTrailerSize() > 0) {
  ------------------
  |  Branch (403:7): [True: 4.48k, False: 0]
  |  Branch (403:17): [True: 4.48k, False: 0]
  ------------------
  404|  4.48k|    s = VerifyBlockChecksum(footer, properties_block.data(), block_size,
  405|  4.48k|                            file->file_name(), handle.offset());
  406|  4.48k|    if (s.IsCorruption()) {
  ------------------
  |  Branch (406:9): [True: 0, False: 4.48k]
  ------------------
  407|      0|      if (new_table_properties->external_sst_file_global_seqno_offset != 0) {
  ------------------
  |  Branch (407:11): [True: 0, False: 0]
  ------------------
  408|      0|        std::string tmp_buf(properties_block.data(),
  409|      0|                            block_fetcher.GetBlockSizeWithTrailer());
  410|      0|        uint64_t global_seqno_offset =
  411|      0|            new_table_properties->external_sst_file_global_seqno_offset -
  412|      0|            handle.offset();
  413|      0|        EncodeFixed64(&tmp_buf[static_cast<size_t>(global_seqno_offset)], 0);
  414|      0|        s = VerifyBlockChecksum(footer, tmp_buf.data(), block_size,
  415|      0|                                file->file_name(), handle.offset());
  416|      0|      }
  417|      0|    }
  418|  4.48k|  }
  419|       |
  420|  4.48k|  if (s.ok()) {
  ------------------
  |  Branch (420:7): [True: 4.48k, False: 0]
  ------------------
  421|  4.48k|    *table_properties = std::move(new_table_properties);
  422|  4.48k|  }
  423|       |
  424|  4.48k|  return s;
  425|  4.48k|}
_ZN7rocksdb21FindOptionalMetaBlockEPNS_20InternalIteratorBaseINS_5SliceEEERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS_11BlockHandleE:
  456|  17.9k|                             BlockHandle* block_handle) {
  457|  17.9k|  assert(block_handle != nullptr);
  458|  17.9k|  meta_index_iter->Seek(meta_block_name);
  459|  17.9k|  if (meta_index_iter->status().ok()) {
  ------------------
  |  Branch (459:7): [True: 17.9k, False: 0]
  ------------------
  460|  17.9k|    if (meta_index_iter->Valid() && meta_index_iter->key() == meta_block_name) {
  ------------------
  |  Branch (460:9): [True: 16.3k, False: 1.57k]
  |  Branch (460:9): [True: 11.8k, False: 6.06k]
  |  Branch (460:37): [True: 11.8k, False: 4.48k]
  ------------------
  461|  11.8k|      Slice v = meta_index_iter->value();
  462|  11.8k|      return block_handle->DecodeFrom(&v);
  463|  11.8k|    } else if (meta_block_name == kPropertiesBlockName) {
  ------------------
  |  Branch (463:16): [True: 0, False: 6.06k]
  ------------------
  464|       |      // Have to try old name for compatibility
  465|      0|      meta_index_iter->Seek(kPropertiesBlockOldName);
  466|      0|      if (meta_index_iter->status().ok() && meta_index_iter->Valid() &&
  ------------------
  |  Branch (466:11): [True: 0, False: 0]
  |  Branch (466:11): [True: 0, False: 0]
  |  Branch (466:45): [True: 0, False: 0]
  ------------------
  467|      0|          meta_index_iter->key() == kPropertiesBlockOldName) {
  ------------------
  |  Branch (467:11): [True: 0, False: 0]
  ------------------
  468|      0|        Slice v = meta_index_iter->value();
  469|      0|        return block_handle->DecodeFrom(&v);
  470|      0|      }
  471|      0|    }
  472|  17.9k|  }
  473|       |  // else
  474|  6.06k|  *block_handle = BlockHandle::NullBlockHandle();
  475|  6.06k|  return meta_index_iter->status();
  476|  17.9k|}
_ZN7rocksdb13FindMetaBlockEPNS_20InternalIteratorBaseINS_5SliceEEERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS_11BlockHandleE:
  480|  4.48k|                     BlockHandle* block_handle) {
  481|  4.48k|  Status s =
  482|  4.48k|      FindOptionalMetaBlock(meta_index_iter, meta_block_name, block_handle);
  483|  4.48k|  if (s.ok() && block_handle->IsNull()) {
  ------------------
  |  Branch (483:7): [True: 4.48k, False: 0]
  |  Branch (483:17): [True: 0, False: 4.48k]
  ------------------
  484|      0|    return Status::Corruption("Cannot find the meta block", meta_block_name);
  485|  4.48k|  } else {
  486|  4.48k|    return s;
  487|  4.48k|  }
  488|  4.48k|}

_ZN7rocksdb22PersistentCacheOptionsC2Ev:
   20|  8.97k|  PersistentCacheOptions() {}
_ZN7rocksdb22PersistentCacheOptionsC2ERKNSt3__110shared_ptrINS_15PersistentCacheEEERKNS_18OffsetableCacheKeyEPNS_10StatisticsE:
   26|  4.48k|        statistics(_statistics) {}

_ZN7rocksdb18MemTableRepFactory16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10unique_ptrIS0_NS4_14default_deleteIS0_EEEE:
  231|  9.02k|    std::unique_ptr<MemTableRepFactory>* result) {
  232|  9.02k|  static std::once_flag once;
  233|  9.02k|  std::call_once(once, [&]() {
  234|  9.02k|    RegisterBuiltinMemTableRepFactory(*(ObjectLibrary::Default().get()), "");
  235|  9.02k|  });
  236|  9.02k|  std::string id;
  237|  9.02k|  std::unordered_map<std::string, std::string> opt_map;
  238|  9.02k|  Status status = Customizable::GetOptionsMap(config_options, result->get(),
  239|  9.02k|                                              value, &id, &opt_map);
  240|  9.02k|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (240:7): [True: 0, False: 9.02k]
  ------------------
  241|      0|    return status;
  242|  9.02k|  } else if (value.empty()) {
  ------------------
  |  Branch (242:14): [True: 0, False: 9.02k]
  ------------------
  243|       |    // No Id and no options.  Clear the object
  244|      0|    result->reset();
  245|      0|    return Status::OK();
  246|  9.02k|  } else if (id.empty()) {  // We have no Id but have options.  Not good
  ------------------
  |  Branch (246:14): [True: 0, False: 9.02k]
  ------------------
  247|      0|    return Status::NotSupported("Cannot reset object ", id);
  248|  9.02k|  } else {
  249|  9.02k|    status = NewUniqueObject<MemTableRepFactory>(config_options, id, opt_map,
  250|  9.02k|                                                 result);
  251|  9.02k|  }
  252|  9.02k|  return status;
  253|  9.02k|}
_ZN7rocksdb18MemTableRepFactory16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIS0_EE:
  257|  9.02k|    std::shared_ptr<MemTableRepFactory>* result) {
  258|  9.02k|  std::unique_ptr<MemTableRepFactory> factory;
  259|  9.02k|  Status s = CreateFromString(config_options, value, &factory);
  260|  9.02k|  if (factory && s.ok()) {
  ------------------
  |  Branch (260:7): [True: 9.02k, False: 0]
  |  Branch (260:18): [True: 9.02k, False: 0]
  ------------------
  261|  9.02k|    result->reset(factory.release());
  262|  9.02k|  }
  263|  9.02k|  return s;
  264|  9.02k|}
plain_table_factory.cc:_ZZN7rocksdb18MemTableRepFactory16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10unique_ptrIS0_NS4_14default_deleteIS0_EEEEENK3$_0clEv:
  233|      1|  std::call_once(once, [&]() {
  234|      1|    RegisterBuiltinMemTableRepFactory(*(ObjectLibrary::Default().get()), "");
  235|      1|  });
plain_table_factory.cc:_ZN7rocksdbL33RegisterBuiltinMemTableRepFactoryERNS_13ObjectLibraryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  145|      1|                                             const std::string& /*arg*/) {
  146|       |  // The MemTableRepFactory built-in classes will be either a class
  147|       |  // (VectorRepFactory) or a nickname (vector), followed optionally by ":#",
  148|       |  // where # is the "size" of the factory.
  149|      1|  auto AsPattern = [](const std::string& name, const std::string& alt) {
  150|      1|    auto pattern = ObjectLibrary::PatternEntry(name, true);
  151|      1|    pattern.AnotherName(alt);
  152|      1|    pattern.AddNumber(":");
  153|      1|    return pattern;
  154|      1|  };
  155|      1|  library.AddFactory<MemTableRepFactory>(
  156|      1|      AsPattern(VectorRepFactory::kClassName(), VectorRepFactory::kNickName()),
  157|      1|      [](const std::string& uri, std::unique_ptr<MemTableRepFactory>* guard,
  158|      1|         std::string* /*errmsg*/) {
  159|      1|        auto colon = uri.find(':');
  160|      1|        if (colon != std::string::npos) {
  161|      1|          size_t count = ParseSizeT(uri.substr(colon + 1));
  162|      1|          guard->reset(new VectorRepFactory(count));
  163|      1|        } else {
  164|      1|          guard->reset(new VectorRepFactory());
  165|      1|        }
  166|      1|        return guard->get();
  167|      1|      });
  168|      1|  library.AddFactory<MemTableRepFactory>(
  169|      1|      AsPattern(SkipListFactory::kClassName(), SkipListFactory::kNickName()),
  170|      1|      [](const std::string& uri, std::unique_ptr<MemTableRepFactory>* guard,
  171|      1|         std::string* /*errmsg*/) {
  172|      1|        auto colon = uri.find(':');
  173|      1|        if (colon != std::string::npos) {
  174|      1|          size_t lookahead = ParseSizeT(uri.substr(colon + 1));
  175|      1|          guard->reset(new SkipListFactory(lookahead));
  176|      1|        } else {
  177|      1|          guard->reset(new SkipListFactory());
  178|      1|        }
  179|      1|        return guard->get();
  180|      1|      });
  181|      1|  library.AddFactory<MemTableRepFactory>(
  182|      1|      AsPattern("HashLinkListRepFactory", "hash_linkedlist"),
  183|      1|      [](const std::string& uri, std::unique_ptr<MemTableRepFactory>* guard,
  184|      1|         std::string* /*errmsg*/) {
  185|       |        // Expecting format: hash_linkedlist:<hash_bucket_count>
  186|      1|        auto colon = uri.find(':');
  187|      1|        if (colon != std::string::npos) {
  188|      1|          size_t hash_bucket_count = ParseSizeT(uri.substr(colon + 1));
  189|      1|          guard->reset(NewHashLinkListRepFactory(hash_bucket_count));
  190|      1|        } else {
  191|      1|          guard->reset(NewHashLinkListRepFactory());
  192|      1|        }
  193|      1|        return guard->get();
  194|      1|      });
  195|      1|  library.AddFactory<MemTableRepFactory>(
  196|      1|      AsPattern("HashSkipListRepFactory", "prefix_hash"),
  197|      1|      [](const std::string& uri, std::unique_ptr<MemTableRepFactory>* guard,
  198|      1|         std::string* /*errmsg*/) {
  199|       |        // Expecting format: prefix_hash:<hash_bucket_count>
  200|      1|        auto colon = uri.find(':');
  201|      1|        if (colon != std::string::npos) {
  202|      1|          size_t hash_bucket_count = ParseSizeT(uri.substr(colon + 1));
  203|      1|          guard->reset(NewHashSkipListRepFactory(hash_bucket_count));
  204|      1|        } else {
  205|      1|          guard->reset(NewHashSkipListRepFactory());
  206|      1|        }
  207|      1|        return guard->get();
  208|      1|      });
  209|      1|  library.AddFactory<MemTableRepFactory>(
  210|      1|      "cuckoo",
  211|      1|      [](const std::string& /*uri*/,
  212|      1|         std::unique_ptr<MemTableRepFactory>* /*guard*/, std::string* errmsg) {
  213|      1|        *errmsg = "cuckoo hash memtable is not supported anymore.";
  214|      1|        return nullptr;
  215|      1|      });
  216|       |
  217|      1|  size_t num_types;
  218|      1|  return static_cast<int>(library.GetFactoryCount(&num_types));
  219|      1|}
plain_table_factory.cc:_ZZN7rocksdbL33RegisterBuiltinMemTableRepFactoryERNS_13ObjectLibraryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEENK3$_5clESA_SA_:
  149|      4|  auto AsPattern = [](const std::string& name, const std::string& alt) {
  150|      4|    auto pattern = ObjectLibrary::PatternEntry(name, true);
  151|      4|    pattern.AnotherName(alt);
  152|      4|    pattern.AddNumber(":");
  153|      4|    return pattern;
  154|      4|  };
plain_table_factory.cc:_ZZN7rocksdbL33RegisterBuiltinMemTableRepFactoryERNS_13ObjectLibraryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEENK3$_1clESA_PNS2_10unique_ptrINS_18MemTableRepFactoryENS2_14default_deleteISD_EEEEPS8_:
  171|  9.02k|         std::string* /*errmsg*/) {
  172|  9.02k|        auto colon = uri.find(':');
  173|  9.02k|        if (colon != std::string::npos) {
  ------------------
  |  Branch (173:13): [True: 0, False: 9.02k]
  ------------------
  174|      0|          size_t lookahead = ParseSizeT(uri.substr(colon + 1));
  175|      0|          guard->reset(new SkipListFactory(lookahead));
  176|  9.02k|        } else {
  177|  9.02k|          guard->reset(new SkipListFactory());
  178|  9.02k|        }
  179|  9.02k|        return guard->get();
  180|  9.02k|      });

_ZN7rocksdb18TableReaderOptionsC2ERKNS_16ImmutableOptionsERKNSt3__110shared_ptrIKNS_14SliceTransformEEERKNS_10EnvOptionsERKNS_21InternalKeyComparatorEhbbbiPNS_16BlockCacheTracerEmRKNS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEmNS4_5arrayImLm2EEEmmb:
   63|  4.48k|        user_defined_timestamps_persisted(_user_defined_timestamps_persisted) {}
_ZN7rocksdb19TableBuilderOptionsC2ERKNS_16ImmutableOptionsERKNS_16MutableCFOptionsERKNS_11ReadOptionsERKNS_12WriteOptionsERKNS_21InternalKeyComparatorEPKNSt3__16vectorINSG_10unique_ptrINS_26InternalTblPropCollFactoryENSG_14default_deleteISJ_EEEENSG_9allocatorISM_EEEENS_15CompressionTypeERKNS_18CompressionOptionsEjRKNSG_12basic_stringIcNSG_11char_traitsIcEENSN_IcEEEEibNS_23TableFileCreationReasonElmS12_S12_mmm:
  138|  4.48k|        cur_file_num(_cur_file_num) {}
_ZN7rocksdb12TableBuilderD2Ev:
  176|  4.48k|  virtual ~TableBuilder() {}

_ZN7rocksdb12TableFactory16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIS0_EE:
   48|  18.0k|                                      std::shared_ptr<TableFactory>* factory) {
   49|  18.0k|  RegisterTableFactories("");
   50|  18.0k|  return LoadSharedObject<TableFactory>(config_options, value, factory);
   51|  18.0k|}
table_factory.cc:_ZN7rocksdbL22RegisterTableFactoriesERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
   18|  18.0k|static void RegisterTableFactories(const std::string& /*arg*/) {
   19|  18.0k|  static std::once_flag loaded;
   20|  18.0k|  std::call_once(loaded, []() {
   21|  18.0k|    auto library = ObjectLibrary::Default();
   22|  18.0k|    library->AddFactory<TableFactory>(
   23|  18.0k|        TableFactory::kBlockBasedTableName(),
   24|  18.0k|        [](const std::string& /*uri*/, std::unique_ptr<TableFactory>* guard,
   25|  18.0k|           std::string* /* errmsg */) {
   26|  18.0k|          guard->reset(new BlockBasedTableFactory());
   27|  18.0k|          return guard->get();
   28|  18.0k|        });
   29|  18.0k|    library->AddFactory<TableFactory>(
   30|  18.0k|        TableFactory::kPlainTableName(),
   31|  18.0k|        [](const std::string& /*uri*/, std::unique_ptr<TableFactory>* guard,
   32|  18.0k|           std::string* /* errmsg */) {
   33|  18.0k|          guard->reset(new PlainTableFactory());
   34|  18.0k|          return guard->get();
   35|  18.0k|        });
   36|  18.0k|    library->AddFactory<TableFactory>(
   37|  18.0k|        TableFactory::kCuckooTableName(),
   38|  18.0k|        [](const std::string& /*uri*/, std::unique_ptr<TableFactory>* guard,
   39|  18.0k|           std::string* /* errmsg */) {
   40|  18.0k|          guard->reset(new CuckooTableFactory());
   41|  18.0k|          return guard->get();
   42|  18.0k|        });
   43|  18.0k|  });
   44|  18.0k|}
table_factory.cc:_ZZN7rocksdbL22RegisterTableFactoriesERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEENK3$_0clEv:
   20|      1|  std::call_once(loaded, []() {
   21|      1|    auto library = ObjectLibrary::Default();
   22|      1|    library->AddFactory<TableFactory>(
   23|      1|        TableFactory::kBlockBasedTableName(),
   24|      1|        [](const std::string& /*uri*/, std::unique_ptr<TableFactory>* guard,
   25|      1|           std::string* /* errmsg */) {
   26|      1|          guard->reset(new BlockBasedTableFactory());
   27|      1|          return guard->get();
   28|      1|        });
   29|      1|    library->AddFactory<TableFactory>(
   30|      1|        TableFactory::kPlainTableName(),
   31|      1|        [](const std::string& /*uri*/, std::unique_ptr<TableFactory>* guard,
   32|      1|           std::string* /* errmsg */) {
   33|      1|          guard->reset(new PlainTableFactory());
   34|      1|          return guard->get();
   35|      1|        });
   36|      1|    library->AddFactory<TableFactory>(
   37|      1|        TableFactory::kCuckooTableName(),
   38|      1|        [](const std::string& /*uri*/, std::unique_ptr<TableFactory>* guard,
   39|      1|           std::string* /* errmsg */) {
   40|      1|          guard->reset(new CuckooTableFactory());
   41|      1|          return guard->get();
   42|      1|        });
   43|      1|  });
table_factory.cc:_ZZZN7rocksdbL22RegisterTableFactoriesERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEENK3$_0clEvENKUlS8_PNS0_10unique_ptrINS_12TableFactoryENS0_14default_deleteISB_EEEEPS6_E_clES8_SF_SG_:
   25|  18.0k|           std::string* /* errmsg */) {
   26|  18.0k|          guard->reset(new BlockBasedTableFactory());
   27|  18.0k|          return guard->get();
   28|  18.0k|        });

_ZN7rocksdb11TableReaderD2Ev:
   42|  4.48k|  virtual ~TableReader() {}

_ZN7rocksdb15EncodeSessionIdEmm:
   15|  9.02k|std::string EncodeSessionId(uint64_t upper, uint64_t lower) {
   16|  9.02k|  std::string db_session_id(20U, '\0');
   17|  9.02k|  char *buf = db_session_id.data();
   18|       |  // Preserving `lower` is slightly tricky. 36^12 is slightly more than
   19|       |  // 62 bits, so we use 12 chars plus the bottom two bits of one more.
   20|       |  // (A tiny fraction of 20 digit strings go unused.)
   21|  9.02k|  uint64_t a = (upper << 2) | (lower >> 62);
   22|  9.02k|  uint64_t b = lower & (UINT64_MAX >> 2);
   23|  9.02k|  PutBaseChars<36>(&buf, 8, a, /*uppercase*/ true);
   24|  9.02k|  PutBaseChars<36>(&buf, 12, b, /*uppercase*/ true);
   25|  9.02k|  assert(buf == &db_session_id.back() + 1);
   26|  9.02k|  return db_session_id;
   27|  9.02k|}
_ZN7rocksdb15DecodeSessionIdERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPmS9_:
   30|  17.9k|                       uint64_t *lower) {
   31|  17.9k|  const size_t len = db_session_id.size();
   32|  17.9k|  if (len == 0) {
  ------------------
  |  Branch (32:7): [True: 0, False: 17.9k]
  ------------------
   33|      0|    return Status::NotSupported("Missing db_session_id");
   34|      0|  }
   35|       |  // Anything from 13 to 24 chars is reasonable. We don't have to limit to
   36|       |  // exactly 20.
   37|  17.9k|  if (len < 13) {
  ------------------
  |  Branch (37:7): [True: 0, False: 17.9k]
  ------------------
   38|      0|    return Status::NotSupported("Too short db_session_id");
   39|      0|  }
   40|  17.9k|  if (len > 24) {
  ------------------
  |  Branch (40:7): [True: 0, False: 17.9k]
  ------------------
   41|      0|    return Status::NotSupported("Too long db_session_id");
   42|      0|  }
   43|  17.9k|  uint64_t a = 0, b = 0;
   44|  17.9k|  const char *buf = &db_session_id.front();
   45|  17.9k|  bool success = ParseBaseChars<36>(&buf, len - 12U, &a);
   46|  17.9k|  if (!success) {
  ------------------
  |  Branch (46:7): [True: 0, False: 17.9k]
  ------------------
   47|      0|    return Status::NotSupported("Bad digit in db_session_id");
   48|      0|  }
   49|  17.9k|  success = ParseBaseChars<36>(&buf, 12U, &b);
   50|  17.9k|  if (!success) {
  ------------------
  |  Branch (50:7): [True: 0, False: 17.9k]
  ------------------
   51|      0|    return Status::NotSupported("Bad digit in db_session_id");
   52|      0|  }
   53|  17.9k|  assert(buf == &db_session_id.back() + 1);
   54|  17.9k|  *upper = a >> 2;
   55|  17.9k|  *lower = (b & (UINT64_MAX >> 2)) | (a << 62);
   56|  17.9k|  return Status::OK();
   57|  17.9k|}
_ZN7rocksdb22GetSstInternalUniqueIdERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_mNS_11UniqueIdPtrEb:
   62|  17.9k|                              bool force) {
   63|  17.9k|  if (!force) {
  ------------------
  |  Branch (63:7): [True: 4.48k, False: 13.4k]
  ------------------
   64|  4.48k|    if (db_id.empty()) {
  ------------------
  |  Branch (64:9): [True: 0, False: 4.48k]
  ------------------
   65|      0|      return Status::NotSupported("Missing db_id");
   66|      0|    }
   67|  4.48k|    if (file_number == 0) {
  ------------------
  |  Branch (67:9): [True: 0, False: 4.48k]
  ------------------
   68|      0|      return Status::NotSupported("Missing or bad file number");
   69|      0|    }
   70|  4.48k|    if (db_session_id.empty()) {
  ------------------
  |  Branch (70:9): [True: 0, False: 4.48k]
  ------------------
   71|      0|      return Status::NotSupported("Missing db_session_id");
   72|      0|    }
   73|  4.48k|  }
   74|  17.9k|  uint64_t session_upper = 0;  // Assignment to appease clang-analyze
   75|  17.9k|  uint64_t session_lower = 0;  // Assignment to appease clang-analyze
   76|  17.9k|  {
   77|  17.9k|    Status s = DecodeSessionId(db_session_id, &session_upper, &session_lower);
   78|  17.9k|    if (!s.ok()) {
  ------------------
  |  Branch (78:9): [True: 0, False: 17.9k]
  ------------------
   79|      0|      if (!force) {
  ------------------
  |  Branch (79:11): [True: 0, False: 0]
  ------------------
   80|      0|        return s;
   81|      0|      } else {
   82|       |        // A reasonable fallback in case malformed
   83|      0|        Hash2x64(db_session_id.data(), db_session_id.size(), &session_upper,
   84|      0|                 &session_lower);
   85|      0|        if (session_lower == 0) {
  ------------------
  |  Branch (85:13): [True: 0, False: 0]
  ------------------
   86|      0|          session_lower = session_upper | 1;
   87|      0|        }
   88|      0|      }
   89|      0|    }
   90|  17.9k|  }
   91|       |
   92|       |  // Exactly preserve session lower to ensure that session ids generated
   93|       |  // during the same process lifetime are guaranteed unique.
   94|       |  // DBImpl also guarantees (in recent versions) that this is not zero,
   95|       |  // so that we can guarantee unique ID is never all zeros. (Can't assert
   96|       |  // that here because of testing and old versions.)
   97|       |  // We put this first in anticipation of matching a small-ish set of cache
   98|       |  // key prefixes to cover entries relevant to any DB.
   99|  17.9k|  out.ptr[0] = session_lower;
  100|       |
  101|       |  // Hash the session upper (~39 bits entropy) and DB id (120+ bits entropy)
  102|       |  // for very high global uniqueness entropy.
  103|       |  // (It is possible that many DBs descended from one common DB id are copied
  104|       |  // around and proliferate, in which case session id is critical, but it is
  105|       |  // more common for different DBs to have different DB ids.)
  106|  17.9k|  uint64_t db_a, db_b;
  107|  17.9k|  Hash2x64(db_id.data(), db_id.size(), session_upper, &db_a, &db_b);
  108|       |
  109|       |  // Xor in file number for guaranteed uniqueness by file number for a given
  110|       |  // session and DB id. (Xor slightly better than + here. See
  111|       |  // https://github.com/pdillinger/unique_id )
  112|  17.9k|  out.ptr[1] = db_a ^ file_number;
  113|       |
  114|       |  // Extra (optional) global uniqueness
  115|  17.9k|  if (out.extended) {
  ------------------
  |  Branch (115:7): [True: 0, False: 17.9k]
  ------------------
  116|      0|    out.ptr[2] = db_b;
  117|      0|  }
  118|       |
  119|  17.9k|  return Status::OK();
  120|  17.9k|}
_ZN7rocksdb19EncodeUniqueIdBytesENS_11UniqueIdPtrE:
  153|  4.48k|std::string EncodeUniqueIdBytes(UniqueIdPtr in) {
  154|  4.48k|  std::string ret(in.extended ? 24U : 16U, '\0');
  ------------------
  |  Branch (154:19): [True: 0, False: 4.48k]
  ------------------
  155|  4.48k|  EncodeFixed64(ret.data(), in.ptr[0]);
  156|  4.48k|  EncodeFixed64(&ret[8], in.ptr[1]);
  157|  4.48k|  if (in.extended) {
  ------------------
  |  Branch (157:7): [True: 0, False: 4.48k]
  ------------------
  158|      0|    EncodeFixed64(&ret[16], in.ptr[2]);
  159|      0|  }
  160|  4.48k|  return ret;
  161|  4.48k|}

_ZN7rocksdb11UniqueIdPtrC2EPNSt3__15arrayImLm2EEE:
   32|  31.3k|  /*implicit*/ UniqueIdPtr(UniqueId64x2 *id) {
   33|  31.3k|    ptr = (*id).data();
   34|  31.3k|    extended = false;
   35|  31.3k|  }

_ZN7rocksdb16BlockCacheTracerC2Ev:
  449|  9.02k|BlockCacheTracer::BlockCacheTracer() { writer_.store(nullptr); }
_ZN7rocksdb16BlockCacheTracerD2Ev:
  451|  9.02k|BlockCacheTracer::~BlockCacheTracer() { EndTrace(); }
_ZN7rocksdb16BlockCacheTracer8EndTraceEv:
  466|  9.02k|void BlockCacheTracer::EndTrace() {
  467|  9.02k|  InstrumentedMutexLock lock_guard(&trace_writer_mutex_);
  468|  9.02k|  if (!writer_.load()) {
  ------------------
  |  Branch (468:7): [True: 9.02k, False: 0]
  ------------------
  469|  9.02k|    return;
  470|  9.02k|  }
  471|      0|  delete writer_.load();
  472|      0|  writer_.store(nullptr);
  473|      0|}

_ZN7rocksdb23BlockCacheLookupContextC2ERKNS_17TableReaderCallerE:
   70|  22.4k|  BlockCacheLookupContext(const TableReaderCaller& _caller) : caller(_caller) {}
_ZNK7rocksdb16BlockCacheTracer18is_tracing_enabledEv:
  220|  11.7k|  bool is_tracing_enabled() const {
  221|  11.7k|    return writer_.load(std::memory_order_relaxed);
  222|  11.7k|  }

_ZN7rocksdb8IOTracerC2Ev:
  265|  9.02k|IOTracer::IOTracer() : tracing_enabled(false) { writer_.store(nullptr); }
_ZN7rocksdb8IOTracerD2Ev:
  267|  9.02k|IOTracer::~IOTracer() { EndIOTrace(); }
_ZN7rocksdb8IOTracer10EndIOTraceEv:
  283|  9.02k|void IOTracer::EndIOTrace() {
  284|  9.02k|  InstrumentedMutexLock lock_guard(&trace_writer_mutex_);
  285|  9.02k|  if (!writer_.load()) {
  ------------------
  |  Branch (285:7): [True: 9.02k, False: 0]
  ------------------
  286|  9.02k|    return;
  287|  9.02k|  }
  288|      0|  delete writer_.load();
  289|      0|  writer_.store(nullptr);
  290|      0|  tracing_enabled = false;
  291|      0|}

_ZNK7rocksdb8IOTracer18is_tracing_enabledEv:
  170|  25.2M|  TSAN_SUPPRESSION bool is_tracing_enabled() const { return tracing_enabled; }

_ZN7rocksdb13AlignedBufferC2Ev:
   66|  63.1k|      : alignment_(), capacity_(0), cursize_(0), bufstart_(nullptr) {}
_ZNK7rocksdb13AlignedBuffer8CapacityEv:
   93|  14.8M|  size_t Capacity() const { return capacity_; }
_ZNK7rocksdb13AlignedBuffer11CurrentSizeEv:
   95|  12.9M|  size_t CurrentSize() const { return cursize_; }
_ZN7rocksdb13AlignedBuffer11BufferStartEv:
   99|  1.51M|  char* BufferStart() { return bufstart_; }
_ZN7rocksdb13AlignedBuffer9AlignmentEm:
  110|  58.6k|  void Alignment(size_t alignment) {
  111|  58.6k|    assert(alignment > 0);
  112|  58.6k|    assert((alignment & (alignment - 1)) == 0);
  113|  58.6k|    alignment_ = alignment;
  114|  58.6k|  }
_ZN7rocksdb13AlignedBuffer17AllocateNewBufferEmbmm:
  132|  61.0k|                         uint64_t copy_offset = 0, size_t copy_len = 0) {
  133|  61.0k|    assert(alignment_ > 0);
  134|  61.0k|    assert((alignment_ & (alignment_ - 1)) == 0);
  135|       |
  136|  61.0k|    copy_len = copy_len > 0 ? copy_len : cursize_;
  ------------------
  |  Branch (136:16): [True: 0, False: 61.0k]
  ------------------
  137|  61.0k|    if (copy_data && requested_capacity < copy_len) {
  ------------------
  |  Branch (137:9): [True: 2.41k, False: 58.6k]
  |  Branch (137:22): [True: 0, False: 2.41k]
  ------------------
  138|       |      // If we are downsizing to a capacity that is smaller than the current
  139|       |      // data in the buffer -- Ignore the request.
  140|      0|      return;
  141|      0|    }
  142|       |
  143|  61.0k|    size_t new_capacity = Roundup(requested_capacity, alignment_);
  144|  61.0k|    char* new_buf = new char[new_capacity + alignment_];
  145|  61.0k|    char* new_bufstart = reinterpret_cast<char*>(
  146|  61.0k|        (reinterpret_cast<uintptr_t>(new_buf) + (alignment_ - 1)) &
  147|  61.0k|        ~static_cast<uintptr_t>(alignment_ - 1));
  148|       |
  149|  61.0k|    if (copy_data) {
  ------------------
  |  Branch (149:9): [True: 2.41k, False: 58.6k]
  ------------------
  150|  2.41k|      assert(bufstart_ + copy_offset + copy_len <= bufstart_ + cursize_);
  151|  2.41k|      memcpy(new_bufstart, bufstart_ + copy_offset, copy_len);
  152|  2.41k|      cursize_ = copy_len;
  153|  58.6k|    } else {
  154|  58.6k|      cursize_ = 0;
  155|  58.6k|    }
  156|       |
  157|  61.0k|    bufstart_ = new_bufstart;
  158|  61.0k|    capacity_ = new_capacity;
  159|  61.0k|    buf_.reset(new_buf);
  160|  61.0k|  }
_ZN7rocksdb13AlignedBuffer6AppendEPKcm:
  170|  4.92M|  size_t Append(const char* src, size_t append_size) {
  171|  4.92M|    size_t buffer_remaining = capacity_ - cursize_;
  172|  4.92M|    size_t to_copy = std::min(append_size, buffer_remaining);
  173|       |
  174|  4.92M|    if (to_copy > 0) {
  ------------------
  |  Branch (174:9): [True: 4.92M, False: 0]
  ------------------
  175|  4.92M|      memcpy(bufstart_ + cursize_, src, to_copy);
  176|  4.92M|      cursize_ += to_copy;
  177|  4.92M|    }
  178|  4.92M|    return to_copy;
  179|  4.92M|  }
_ZN7rocksdb13AlignedBuffer4SizeEm:
  233|  1.50M|  void Size(size_t cursize) { cursize_ = cursize; }
_ZN7rocksdb7RoundupEmm:
   35|  70.0k|inline size_t Roundup(size_t x, size_t y) { return ((x + y - 1) / y) * y; }

_ZN7rocksdb13RelaxedAtomicImEC2Em:
   35|  9.02k|  explicit RelaxedAtomic(T initial = {}) : v_(initial) {}
_ZN7rocksdb13RelaxedAtomicIjEC2Ej:
   35|  4.48k|  explicit RelaxedAtomic(T initial = {}) : v_(initial) {}
_ZNK7rocksdb13RelaxedAtomicIjE11LoadRelaxedEv:
   37|  4.48k|  T LoadRelaxed() const { return v_.load(std::memory_order_relaxed); }
_ZN7rocksdb13RelaxedAtomicIjE12StoreRelaxedEj:
   36|  4.48k|  void StoreRelaxed(T desired) { v_.store(desired, std::memory_order_relaxed); }

_ZN7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EEC2Ev:
  170|  7.24M|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EED2Ev:
  179|  7.24M|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE5clearEv:
  317|  7.24M|  void clear() {
  318|  7.24M|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 2, False: 7.24M]
  ------------------
  319|      2|      values_[--num_stack_items_].~value_type();
  320|      2|    }
  321|  7.24M|    vect_.clear();
  322|  7.24M|  }
_ZN7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE9push_backERKS3_:
  278|      2|  void push_back(const T& item) {
  279|      2|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (279:9): [True: 2, False: 0]
  ------------------
  280|      2|      new ((void*)(&values_[num_stack_items_])) value_type();
  281|      2|      values_[num_stack_items_++] = item;
  282|      2|    } else {
  283|      0|      vect_.push_back(item);
  284|      0|    }
  285|      2|  }
_ZN7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE5beginEv:
  335|   577k|  iterator begin() { return iterator(this, 0); }
_ZN7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE13iterator_implIS4_S3_EC2EPS4_m:
   64|  1.15M|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE13iterator_implIS4_S3_ED2Ev:
   66|  1.15M|    ~iterator_impl() {}
_ZN7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE3endEv:
  339|   577k|  iterator end() { return iterator(this, this->size()); }
_ZNK7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE4sizeEv:
  188|  7.24M|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZNK7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE13iterator_implIS4_S3_EneERKS6_:
  138|   577k|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE13iterator_implIS4_S3_EeqERKS6_:
  133|   577k|    bool operator==(const self_type& other) const {
  134|   577k|      assert(vect_ == other.vect_);
  135|   577k|      return index_ == other.index_;
  136|   577k|    }
_ZNK7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE5beginEv:
  337|  6.66M|  const_iterator begin() const { return const_iterator(this, 0); }
_ZN7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE13iterator_implIKS4_KS3_EC2EPS6_m:
   64|  13.3M|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE13iterator_implIKS4_KS3_ED2Ev:
   66|  13.3M|    ~iterator_impl() {}
_ZNK7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE3endEv:
  341|  6.66M|  const_iterator end() const { return const_iterator(this, this->size()); }
_ZNK7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE13iterator_implIKS4_KS3_EneERKS8_:
  138|  6.66M|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE13iterator_implIKS4_KS3_EeqERKS8_:
  133|  6.66M|    bool operator==(const self_type& other) const {
  134|  6.66M|      assert(vect_ == other.vect_);
  135|  6.66M|      return index_ == other.index_;
  136|  6.66M|    }
_ZN7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE13iterator_implIKS4_KS3_EppEv:
   71|      2|    self_type& operator++() {
   72|      2|      ++index_;
   73|      2|      return *this;
   74|      2|    }
_ZNK7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EE13iterator_implIKS4_KS3_EdeEv:
  120|      2|    reference operator*() const {
  121|      2|      assert(vect_->size() >= index_);
  122|      2|      return (*vect_)[index_];
  123|      2|    }
_ZNK7rocksdb10autovectorIPNS_9lru_cache9LRUHandleELm8EEixEm:
  222|      2|  const_reference operator[](size_type n) const {
  223|      2|    assert(n < size());
  224|      2|    if (n < kSize) {
  ------------------
  |  Branch (224:9): [True: 2, False: 0]
  ------------------
  225|      2|      return values_[n];
  226|      2|    }
  227|      0|    return vect_[n - kSize];
  228|      2|  }
_ZN7rocksdb10autovectorImLm8EEC2Ev:
  170|   587k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorImLm8EED2Ev:
  179|   614k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorImLm8EE5clearEv:
  317|   614k|  void clear() {
  318|  2.73M|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 2.12M, False: 614k]
  ------------------
  319|  2.12M|      values_[--num_stack_items_].~value_type();
  320|  2.12M|    }
  321|   614k|    vect_.clear();
  322|   614k|  }
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE12emplace_backIJRS2_EEES5_DpOT_:
  289|  9.02k|  reference emplace_back(Args&&... args) {
  290|  9.02k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (290:9): [True: 9.02k, False: 0]
  ------------------
  291|  9.02k|      return *(new ((void*)(&values_[num_stack_items_++]))
  292|  9.02k|                   value_type(std::forward<Args>(args)...));
  293|  9.02k|    } else {
  294|      0|      return vect_.emplace_back(std::forward<Args>(args)...);
  295|      0|    }
  296|  9.02k|  }
_ZN7rocksdb10autovectorIPKNS_16MutableCFOptionsELm8EE12emplace_backIJS3_EEERS3_DpOT_:
  289|  9.02k|  reference emplace_back(Args&&... args) {
  290|  9.02k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (290:9): [True: 9.02k, False: 0]
  ------------------
  291|  9.02k|      return *(new ((void*)(&values_[num_stack_items_++]))
  292|  9.02k|                   value_type(std::forward<Args>(args)...));
  293|  9.02k|    } else {
  294|      0|      return vect_.emplace_back(std::forward<Args>(args)...);
  295|      0|    }
  296|  9.02k|  }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EEC2EOS3_:
  331|  9.02k|  autovector(autovector&& other) noexcept { *this = std::move(other); }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EEaSEOS3_:
  384|  9.02k|    autovector<T, kSize>&& other) {
  385|  9.02k|  values_ = reinterpret_cast<pointer>(buf_);
  386|  9.02k|  vect_ = std::move(other.vect_);
  387|  9.02k|  size_t n = other.num_stack_items_;
  388|  9.02k|  num_stack_items_ = n;
  389|  9.02k|  other.num_stack_items_ = 0;
  390|  9.02k|  for (size_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (390:22): [True: 0, False: 9.02k]
  ------------------
  391|      0|    new ((void*)(&values_[i])) value_type();
  392|      0|    values_[i] = std::move(other.values_[i]);
  393|      0|  }
  394|  9.02k|  return *this;
  395|  9.02k|}
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EEC2Ev:
  170|  1.42M|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EEC2EOS3_:
  331|  36.1k|  autovector(autovector&& other) noexcept { *this = std::move(other); }
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EEaSEOS3_:
  384|  36.1k|    autovector<T, kSize>&& other) {
  385|  36.1k|  values_ = reinterpret_cast<pointer>(buf_);
  386|  36.1k|  vect_ = std::move(other.vect_);
  387|  36.1k|  size_t n = other.num_stack_items_;
  388|  36.1k|  num_stack_items_ = n;
  389|  36.1k|  other.num_stack_items_ = 0;
  390|  36.1k|  for (size_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (390:22): [True: 0, False: 36.1k]
  ------------------
  391|      0|    new ((void*)(&values_[i])) value_type();
  392|      0|    values_[i] = std::move(other.values_[i]);
  393|      0|  }
  394|  36.1k|  return *this;
  395|  36.1k|}
_ZN7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EEC2EOS3_:
  331|  36.1k|  autovector(autovector&& other) noexcept { *this = std::move(other); }
_ZN7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EEaSEOS3_:
  384|  36.1k|    autovector<T, kSize>&& other) {
  385|  36.1k|  values_ = reinterpret_cast<pointer>(buf_);
  386|  36.1k|  vect_ = std::move(other.vect_);
  387|  36.1k|  size_t n = other.num_stack_items_;
  388|  36.1k|  num_stack_items_ = n;
  389|  36.1k|  other.num_stack_items_ = 0;
  390|  36.1k|  for (size_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (390:22): [True: 0, False: 36.1k]
  ------------------
  391|      0|    new ((void*)(&values_[i])) value_type();
  392|      0|    values_[i] = std::move(other.values_[i]);
  393|      0|  }
  394|  36.1k|  return *this;
  395|  36.1k|}
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EED2Ev:
  179|  1.42M|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE5clearEv:
  317|  1.46M|  void clear() {
  318|  1.46M|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 0, False: 1.46M]
  ------------------
  319|      0|      values_[--num_stack_items_].~value_type();
  320|      0|    }
  321|  1.46M|    vect_.clear();
  322|  1.46M|  }
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE5beginEv:
  335|  1.42M|  iterator begin() { return iterator(this, 0); }
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIS3_S2_EC2EPS3_m:
   64|  2.85M|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE3endEv:
  339|  1.42M|  iterator end() { return iterator(this, this->size()); }
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EE4sizeEv:
  188|  1.42M|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIS3_S2_EneERKS5_:
  138|  1.42M|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIS3_S2_EeqERKS5_:
  133|  1.42M|    bool operator==(const self_type& other) const {
  134|  1.42M|      assert(vect_ == other.vect_);
  135|  1.42M|      return index_ == other.index_;
  136|  1.42M|    }
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIS3_S2_ED2Ev:
   66|  2.85M|    ~iterator_impl() {}
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EEC2Ev:
  170|  1.40M|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EEC2Ev:
  170|  1.40M|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EED2Ev:
  179|  1.44M|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EE5clearEv:
  317|  2.85M|  void clear() {
  318|  2.85M|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 0, False: 2.85M]
  ------------------
  319|      0|      values_[--num_stack_items_].~value_type();
  320|      0|    }
  321|  2.85M|    vect_.clear();
  322|  2.85M|  }
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EED2Ev:
  179|  1.44M|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE5clearEv:
  317|  2.85M|  void clear() {
  318|  2.85M|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 0, False: 2.85M]
  ------------------
  319|      0|      values_[--num_stack_items_].~value_type();
  320|      0|    }
  321|  2.85M|    vect_.clear();
  322|  2.85M|  }
_ZN7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EE5beginEv:
  335|  1.40M|  iterator begin() { return iterator(this, 0); }
_ZN7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EE13iterator_implIS3_S2_EC2EPS3_m:
   64|  2.81M|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EE3endEv:
  339|  1.40M|  iterator end() { return iterator(this, this->size()); }
_ZNK7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EE4sizeEv:
  188|  1.40M|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZNK7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EE13iterator_implIS3_S2_EneERKS5_:
  138|  1.40M|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EE13iterator_implIS3_S2_EeqERKS5_:
  133|  1.40M|    bool operator==(const self_type& other) const {
  134|  1.40M|      assert(vect_ == other.vect_);
  135|  1.40M|      return index_ == other.index_;
  136|  1.40M|    }
_ZN7rocksdb10autovectorINS_19SuperVersionContext22WriteStallNotificationELm8EE13iterator_implIS3_S2_ED2Ev:
   66|  2.81M|    ~iterator_impl() {}
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE5beginEv:
  335|  1.40M|  iterator begin() { return iterator(this, 0); }
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE13iterator_implIS3_S2_EC2EPS3_m:
   64|  2.81M|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE3endEv:
  339|  1.40M|  iterator end() { return iterator(this, this->size()); }
_ZNK7rocksdb10autovectorIPNS_12SuperVersionELm8EE4sizeEv:
  188|  1.40M|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZNK7rocksdb10autovectorIPNS_12SuperVersionELm8EE13iterator_implIS3_S2_EneERKS5_:
  138|  1.40M|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorIPNS_12SuperVersionELm8EE13iterator_implIS3_S2_EeqERKS5_:
  133|  1.40M|    bool operator==(const self_type& other) const {
  134|  1.40M|      assert(vect_ == other.vect_);
  135|  1.40M|      return index_ == other.index_;
  136|  1.40M|    }
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE13iterator_implIS3_S2_ED2Ev:
   66|  2.81M|    ~iterator_impl() {}
_ZNK7rocksdb10autovectorINS_15LevelFilesBriefELm8EEixEm:
  222|  17.9k|  const_reference operator[](size_type n) const {
  223|  17.9k|    assert(n < size());
  224|  17.9k|    if (n < kSize) {
  ------------------
  |  Branch (224:9): [True: 17.9k, False: 0]
  ------------------
  225|  17.9k|      return values_[n];
  226|  17.9k|    }
  227|      0|    return vect_[n - kSize];
  228|  17.9k|  }
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EEC2Ev:
  170|  18.0k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EED2Ev:
  179|  18.0k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE5clearEv:
  317|  18.0k|  void clear() {
  318|  27.0k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 9.02k, False: 18.0k]
  ------------------
  319|  9.02k|      values_[--num_stack_items_].~value_type();
  320|  9.02k|    }
  321|  18.0k|    vect_.clear();
  322|  18.0k|  }
_ZN7rocksdb10autovectorIPKNS_16MutableCFOptionsELm8EEC2Ev:
  170|  18.0k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorIPKNS_16MutableCFOptionsELm8EED2Ev:
  179|  18.0k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorIPKNS_16MutableCFOptionsELm8EE5clearEv:
  317|  18.0k|  void clear() {
  318|  36.1k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 18.0k, False: 18.0k]
  ------------------
  319|  18.0k|      values_[--num_stack_items_].~value_type();
  320|  18.0k|    }
  321|  18.0k|    vect_.clear();
  322|  18.0k|  }
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EEC2Ev:
  170|  9.02k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EED2Ev:
  179|  9.02k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE5clearEv:
  317|  9.02k|  void clear() {
  318|  18.0k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 9.02k, False: 9.02k]
  ------------------
  319|  9.02k|      values_[--num_stack_items_].~value_type();
  320|  9.02k|    }
  321|  9.02k|    vect_.clear();
  322|  9.02k|  }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EEC2Ev:
  170|  18.0k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EED2Ev:
  179|  27.0k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE5clearEv:
  317|  27.0k|  void clear() {
  318|  63.1k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 36.1k, False: 27.0k]
  ------------------
  319|  36.1k|      values_[--num_stack_items_].~value_type();
  320|  36.1k|    }
  321|  27.0k|    vect_.clear();
  322|  27.0k|  }
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EEC2Ev:
  170|  45.1k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EED2Ev:
  179|  45.1k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE5beginEv:
  335|  63.1k|  iterator begin() { return iterator(this, 0); }
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE13iterator_implIS4_S3_EC2EPS4_m:
   64|   126k|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE13iterator_implIS4_S3_ED2Ev:
   66|   126k|    ~iterator_impl() {}
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE3endEv:
  339|  63.1k|  iterator end() { return iterator(this, this->size()); }
_ZNK7rocksdb10autovectorIPNS_3log6WriterELm8EE4sizeEv:
  188|  63.1k|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZNK7rocksdb10autovectorIPNS_3log6WriterELm8EE13iterator_implIS4_S3_EneERKS6_:
  138|  63.1k|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorIPNS_3log6WriterELm8EE13iterator_implIS4_S3_EeqERKS6_:
  133|  63.1k|    bool operator==(const self_type& other) const {
  134|  63.1k|      assert(vect_ == other.vect_);
  135|  63.1k|      return index_ == other.index_;
  136|  63.1k|    }
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE5clearEv:
  317|  99.3k|  void clear() {
  318|  99.3k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 0, False: 99.3k]
  ------------------
  319|      0|      values_[--num_stack_items_].~value_type();
  320|      0|    }
  321|  99.3k|    vect_.clear();
  322|  99.3k|  }
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE5beginEv:
  335|  9.02k|  iterator begin() { return iterator(this, 0); }
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIS4_S3_EC2EPS4_m:
   64|  18.0k|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIS4_S3_ED2Ev:
   66|  18.0k|    ~iterator_impl() {}
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE3endEv:
  339|  9.02k|  iterator end() { return iterator(this, this->size()); }
_ZNK7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE4sizeEv:
  188|  18.0k|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZNK7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIS4_S3_EneERKS6_:
  138|  18.0k|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIS4_S3_EeqERKS6_:
  133|  18.0k|    bool operator==(const self_type& other) const {
  134|  18.0k|      assert(vect_ == other.vect_);
  135|  18.0k|      return index_ == other.index_;
  136|  18.0k|    }
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIS4_S3_EppEv:
   71|  9.02k|    self_type& operator++() {
   72|  9.02k|      ++index_;
   73|  9.02k|      return *this;
   74|  9.02k|    }
_ZNK7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIS4_S3_EdeEv:
  120|  9.02k|    reference operator*() const {
  121|  9.02k|      assert(vect_->size() >= index_);
  122|  9.02k|      return (*vect_)[index_];
  123|  9.02k|    }
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EEixEm:
  230|  27.0k|  reference operator[](size_type n) {
  231|  27.0k|    assert(n < size());
  232|  27.0k|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 27.0k, False: 0]
  ------------------
  233|  27.0k|      return values_[n];
  234|  27.0k|    }
  235|      0|    return vect_[n - kSize];
  236|  27.0k|  }
_ZN7rocksdb10autovectorINSt3__110shared_ptrIKNS_12SnapshotImplEEELm8EEC2Ev:
  170|  9.02k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorINSt3__110shared_ptrIKNS_12SnapshotImplEEELm8EED2Ev:
  179|  9.02k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorINSt3__110shared_ptrIKNS_12SnapshotImplEEELm8EE5clearEv:
  317|  18.0k|  void clear() {
  318|  18.0k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 0, False: 18.0k]
  ------------------
  319|      0|      values_[--num_stack_items_].~value_type();
  320|      0|    }
  321|  18.0k|    vect_.clear();
  322|  18.0k|  }
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE5emptyEv:
  210|  45.1k|  bool empty() const { return size() == 0; }
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE4sizeEv:
  188|  90.2k|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZN7rocksdb10autovectorImLm8EEC2ERKS1_:
  327|  22.5k|  autovector(const autovector& other) { assign(other); }
_ZN7rocksdb10autovectorImLm8EE6assignERKS1_:
  367|  40.6k|    const autovector<T, kSize>& other) {
  368|  40.6k|  values_ = reinterpret_cast<pointer>(buf_);
  369|       |  // copy the internal vector
  370|  40.6k|  vect_.assign(other.vect_.begin(), other.vect_.end());
  371|       |
  372|       |  // copy array
  373|  40.6k|  num_stack_items_ = other.num_stack_items_;
  374|  45.1k|  for (size_t i = 0; i < num_stack_items_; ++i) {
  ------------------
  |  Branch (374:22): [True: 4.48k, False: 40.6k]
  ------------------
  375|  4.48k|    new ((void*)(&values_[i])) value_type();
  376|  4.48k|  }
  377|  40.6k|  std::copy(other.values_, other.values_ + num_stack_items_, values_);
  378|       |
  379|  40.6k|  return *this;
  380|  40.6k|}
_ZN7rocksdb10autovectorIPKNS_16MutableCFOptionsELm8EE9push_backEOS3_:
  269|  9.02k|  void push_back(T&& item) {
  270|  9.02k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (270:9): [True: 9.02k, False: 0]
  ------------------
  271|  9.02k|      new ((void*)(&values_[num_stack_items_])) value_type();
  272|  9.02k|      values_[num_stack_items_++] = std::move(item);
  273|  9.02k|    } else {
  274|      0|      vect_.push_back(item);
  275|      0|    }
  276|  9.02k|  }
_ZNK7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE4sizeEv:
  188|  31.5k|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EEixEm:
  230|  81.2k|  reference operator[](size_type n) {
  231|  81.2k|    assert(n < size());
  232|  81.2k|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 81.2k, False: 0]
  ------------------
  233|  81.2k|      return values_[n];
  234|  81.2k|    }
  235|      0|    return vect_[n - kSize];
  236|  81.2k|  }
_ZN7rocksdb10autovectorImLm8EE9push_backERKm:
  278|  74.9M|  void push_back(const T& item) {
  279|  74.9M|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (279:9): [True: 2.11M, False: 72.7M]
  ------------------
  280|  2.11M|      new ((void*)(&values_[num_stack_items_])) value_type();
  281|  2.11M|      values_[num_stack_items_++] = item;
  282|  72.7M|    } else {
  283|  72.7M|      vect_.push_back(item);
  284|  72.7M|    }
  285|  74.9M|  }
_ZN7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EE9push_backERKS9_:
  278|  50.9k|  void push_back(const T& item) {
  279|  50.9k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (279:9): [True: 50.9k, False: 0]
  ------------------
  280|  50.9k|      new ((void*)(&values_[num_stack_items_])) value_type();
  281|  50.9k|      values_[num_stack_items_++] = item;
  282|  50.9k|    } else {
  283|      0|      vect_.push_back(item);
  284|      0|    }
  285|  50.9k|  }
_ZN7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EEixEm:
  230|   101k|  reference operator[](size_type n) {
  231|   101k|    assert(n < size());
  232|   101k|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 101k, False: 0]
  ------------------
  233|   101k|      return values_[n];
  234|   101k|    }
  235|      0|    return vect_[n - kSize];
  236|   101k|  }
_ZNK7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EE4sizeEv:
  188|   318k|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZNK7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EE5frontEv:
  253|   200k|  const_reference front() const {
  254|   200k|    assert(!empty());
  255|   200k|    return *begin();
  256|   200k|  }
_ZNK7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EE5beginEv:
  337|   200k|  const_iterator begin() const { return const_iterator(this, 0); }
_ZNK7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EE13iterator_implIKSA_KS9_EdeEv:
  120|   200k|    reference operator*() const {
  121|   200k|      assert(vect_->size() >= index_);
  122|   200k|      return (*vect_)[index_];
  123|   200k|    }
_ZNK7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EEixEm:
  222|   200k|  const_reference operator[](size_type n) const {
  223|   200k|    assert(n < size());
  224|   200k|    if (n < kSize) {
  ------------------
  |  Branch (224:9): [True: 200k, False: 0]
  ------------------
  225|   200k|      return values_[n];
  226|   200k|    }
  227|      0|    return vect_[n - kSize];
  228|   200k|  }
_ZN7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EE8pop_backEv:
  308|  49.5k|  void pop_back() {
  309|  49.5k|    assert(!empty());
  310|  49.5k|    if (!vect_.empty()) {
  ------------------
  |  Branch (310:9): [True: 0, False: 49.5k]
  ------------------
  311|      0|      vect_.pop_back();
  312|  49.5k|    } else {
  313|  49.5k|      values_[--num_stack_items_].~value_type();
  314|  49.5k|    }
  315|  49.5k|  }
_ZNK7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EE5emptyEv:
  210|   217k|  bool empty() const { return size() == 0; }
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE9push_backERKS2_:
  278|  9.52k|  void push_back(const T& item) {
  279|  9.52k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (279:9): [True: 9.52k, False: 0]
  ------------------
  280|  9.52k|      new ((void*)(&values_[num_stack_items_])) value_type();
  281|  9.52k|      values_[num_stack_items_++] = item;
  282|  9.52k|    } else {
  283|      0|      vect_.push_back(item);
  284|      0|    }
  285|  9.52k|  }
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EEixEm:
  230|   224M|  reference operator[](size_type n) {
  231|   224M|    assert(n < size());
  232|   224M|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 224M, False: 0]
  ------------------
  233|   224M|      return values_[n];
  234|   224M|    }
  235|      0|    return vect_[n - kSize];
  236|   224M|  }
_ZNK7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE4sizeEv:
  188|   149M|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZNK7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE5frontEv:
  253|   373M|  const_reference front() const {
  254|   373M|    assert(!empty());
  255|   373M|    return *begin();
  256|   373M|  }
_ZNK7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE5beginEv:
  337|   373M|  const_iterator begin() const { return const_iterator(this, 0); }
_ZNK7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE13iterator_implIKS3_KS2_EdeEv:
  120|   373M|    reference operator*() const {
  121|   373M|      assert(vect_->size() >= index_);
  122|   373M|      return (*vect_)[index_];
  123|   373M|    }
_ZNK7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EEixEm:
  222|   373M|  const_reference operator[](size_type n) const {
  223|   373M|    assert(n < size());
  224|   373M|    if (n < kSize) {
  ------------------
  |  Branch (224:9): [True: 373M, False: 0]
  ------------------
  225|   373M|      return values_[n];
  226|   373M|    }
  227|      0|    return vect_[n - kSize];
  228|   373M|  }
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE5frontEv:
  248|  74.7M|  reference front() {
  249|  74.7M|    assert(!empty());
  250|  74.7M|    return *begin();
  251|  74.7M|  }
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE5beginEv:
  335|  74.7M|  iterator begin() { return iterator(this, 0); }
_ZNK7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE13iterator_implIS3_S2_EdeEv:
  120|  74.7M|    reference operator*() const {
  121|  74.7M|      assert(vect_->size() >= index_);
  122|  74.7M|      return (*vect_)[index_];
  123|  74.7M|    }
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE8pop_backEv:
  308|  9.30k|  void pop_back() {
  309|  9.30k|    assert(!empty());
  310|  9.30k|    if (!vect_.empty()) {
  ------------------
  |  Branch (310:9): [True: 0, False: 9.30k]
  ------------------
  311|      0|      vect_.pop_back();
  312|  9.30k|    } else {
  313|  9.30k|      values_[--num_stack_items_].~value_type();
  314|  9.30k|    }
  315|  9.30k|  }
_ZNK7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE5emptyEv:
  210|  74.9M|  bool empty() const { return size() == 0; }
_ZN7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EE5clearEv:
  317|   136k|  void clear() {
  318|   137k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 1.33k, False: 136k]
  ------------------
  319|  1.33k|      values_[--num_stack_items_].~value_type();
  320|  1.33k|    }
  321|   136k|    vect_.clear();
  322|   136k|  }
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE5clearEv:
  317|   149k|  void clear() {
  318|   149k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 218, False: 149k]
  ------------------
  319|    218|      values_[--num_stack_items_].~value_type();
  320|    218|    }
  321|   149k|    vect_.clear();
  322|   149k|  }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE5beginEv:
  335|  27.0k|  iterator begin() { return iterator(this, 0); }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE3endEv:
  339|  36.1k|  iterator end() { return iterator(this, this->size()); }
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EE4sizeEv:
  188|  90.2k|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIS3_S2_EneERKS5_:
  138|  81.2k|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIS3_S2_EeqERKS5_:
  133|  81.2k|    bool operator==(const self_type& other) const {
  134|  81.2k|      assert(vect_ == other.vect_);
  135|  81.2k|      return index_ == other.index_;
  136|  81.2k|    }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIS3_S2_EppEv:
   71|  54.1k|    self_type& operator++() {
   72|  54.1k|      ++index_;
   73|  54.1k|      return *this;
   74|  54.1k|    }
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIS3_S2_EdeEv:
  120|  63.1k|    reference operator*() const {
  121|  63.1k|      assert(vect_->size() >= index_);
  122|  63.1k|      return (*vect_)[index_];
  123|  63.1k|    }
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE12emplace_backIJS3_EEERS3_DpOT_:
  289|  9.02k|  reference emplace_back(Args&&... args) {
  290|  9.02k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (290:9): [True: 9.02k, False: 0]
  ------------------
  291|  9.02k|      return *(new ((void*)(&values_[num_stack_items_++]))
  292|  9.02k|                   value_type(std::forward<Args>(args)...));
  293|  9.02k|    } else {
  294|      0|      return vect_.emplace_back(std::forward<Args>(args)...);
  295|      0|    }
  296|  9.02k|  }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE12emplace_backIJS2_EEERS2_DpOT_:
  289|  18.0k|  reference emplace_back(Args&&... args) {
  290|  18.0k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (290:9): [True: 18.0k, False: 0]
  ------------------
  291|  18.0k|      return *(new ((void*)(&values_[num_stack_items_++]))
  292|  18.0k|                   value_type(std::forward<Args>(args)...));
  293|  18.0k|    } else {
  294|      0|      return vect_.emplace_back(std::forward<Args>(args)...);
  295|      0|    }
  296|  18.0k|  }
_ZNK7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE5beginEv:
  337|  9.02k|  const_iterator begin() const { return const_iterator(this, 0); }
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIKS3_KS2_EC2EPS5_m:
   64|  18.0k|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIKS3_KS2_ED2Ev:
   66|  18.0k|    ~iterator_impl() {}
_ZNK7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE3endEv:
  341|  9.02k|  const_iterator end() const { return const_iterator(this, this->size()); }
_ZNK7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIKS3_KS2_EneERKS7_:
  138|  18.0k|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIKS3_KS2_EeqERKS7_:
  133|  18.0k|    bool operator==(const self_type& other) const {
  134|  18.0k|      assert(vect_ == other.vect_);
  135|  18.0k|      return index_ == other.index_;
  136|  18.0k|    }
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIKS3_KS2_EppEv:
   71|  9.02k|    self_type& operator++() {
   72|  9.02k|      ++index_;
   73|  9.02k|      return *this;
   74|  9.02k|    }
_ZNK7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIKS3_KS2_EdeEv:
  120|  9.02k|    reference operator*() const {
  121|  9.02k|      assert(vect_->size() >= index_);
  122|  9.02k|      return (*vect_)[index_];
  123|  9.02k|    }
_ZN7rocksdb10autovectorImLm8EEixEm:
  230|   998M|  reference operator[](size_type n) {
  231|   998M|    assert(n < size());
  232|   998M|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 25.5M, False: 973M]
  ------------------
  233|  25.5M|      return values_[n];
  234|  25.5M|    }
  235|   973M|    return vect_[n - kSize];
  236|   998M|  }
_ZNK7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE5emptyEv:
  210|  13.5k|  bool empty() const { return size() == 0; }
_ZN7rocksdb10autovectorImLm8EE5beginEv:
  335|   822k|  iterator begin() { return iterator(this, 0); }
_ZN7rocksdb10autovectorImLm8EE13iterator_implIS1_mEC2EPS1_m:
   64|  54.2M|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorImLm8EE13iterator_implIS1_mED2Ev:
   66|   220M|    ~iterator_impl() {}
_ZN7rocksdb10autovectorImLm8EE3endEv:
  339|   822k|  iterator end() { return iterator(this, this->size()); }
_ZNK7rocksdb10autovectorImLm8EE4sizeEv:
  188|  1.21M|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZNK7rocksdb10autovectorImLm8EE13iterator_implIS1_mEneERKS3_:
  138|   115M|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorImLm8EE13iterator_implIS1_mEeqERKS3_:
  133|   120M|    bool operator==(const self_type& other) const {
  134|   120M|      assert(vect_ == other.vect_);
  135|   120M|      return index_ == other.index_;
  136|   120M|    }
_ZN7rocksdb10autovectorImLm8EE13iterator_implIS1_mEppEv:
   71|   233M|    self_type& operator++() {
   72|   233M|      ++index_;
   73|   233M|      return *this;
   74|   233M|    }
_ZNK7rocksdb10autovectorImLm8EE13iterator_implIS1_mEdeEv:
  120|   998M|    reference operator*() const {
  121|   998M|      assert(vect_->size() >= index_);
  122|   998M|      return (*vect_)[index_];
  123|   998M|    }
_ZNK7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EEixEm:
  222|  27.0k|  const_reference operator[](size_type n) const {
  223|  27.0k|    assert(n < size());
  224|  27.0k|    if (n < kSize) {
  ------------------
  |  Branch (224:9): [True: 27.0k, False: 0]
  ------------------
  225|  27.0k|      return values_[n];
  226|  27.0k|    }
  227|      0|    return vect_[n - kSize];
  228|  27.0k|  }
_ZN7rocksdb10autovectorImLm8EEaSERKS1_:
  329|  18.0k|  autovector& operator=(const autovector& other) { return assign(other); }
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EEaSERKS4_:
  329|  18.0k|  autovector& operator=(const autovector& other) { return assign(other); }
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE6assignERKS4_:
  367|  18.0k|    const autovector<T, kSize>& other) {
  368|  18.0k|  values_ = reinterpret_cast<pointer>(buf_);
  369|       |  // copy the internal vector
  370|  18.0k|  vect_.assign(other.vect_.begin(), other.vect_.end());
  371|       |
  372|       |  // copy array
  373|  18.0k|  num_stack_items_ = other.num_stack_items_;
  374|  18.0k|  for (size_t i = 0; i < num_stack_items_; ++i) {
  ------------------
  |  Branch (374:22): [True: 0, False: 18.0k]
  ------------------
  375|      0|    new ((void*)(&values_[i])) value_type();
  376|      0|  }
  377|  18.0k|  std::copy(other.values_, other.values_ + num_stack_items_, values_);
  378|       |
  379|  18.0k|  return *this;
  380|  18.0k|}
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EE5beginEv:
  337|  90.2k|  const_iterator begin() const { return const_iterator(this, 0); }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIKS3_KS2_EC2EPS5_m:
   64|   108k|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIKS3_KS2_ED2Ev:
   66|   108k|    ~iterator_impl() {}
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EE3endEv:
  341|  18.0k|  const_iterator end() const { return const_iterator(this, this->size()); }
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIKS3_KS2_EneERKS7_:
  138|  36.1k|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIKS3_KS2_EeqERKS7_:
  133|  36.1k|    bool operator==(const self_type& other) const {
  134|  36.1k|      assert(vect_ == other.vect_);
  135|  36.1k|      return index_ == other.index_;
  136|  36.1k|    }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIKS3_KS2_EppEv:
   71|  18.0k|    self_type& operator++() {
   72|  18.0k|      ++index_;
   73|  18.0k|      return *this;
   74|  18.0k|    }
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIKS3_KS2_EdeEv:
  120|  99.3k|    reference operator*() const {
  121|  99.3k|      assert(vect_->size() >= index_);
  122|  99.3k|      return (*vect_)[index_];
  123|  99.3k|    }
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EEixEm:
  222|  99.3k|  const_reference operator[](size_type n) const {
  223|  99.3k|    assert(n < size());
  224|  99.3k|    if (n < kSize) {
  ------------------
  |  Branch (224:9): [True: 99.3k, False: 0]
  ------------------
  225|  99.3k|      return values_[n];
  226|  99.3k|    }
  227|      0|    return vect_[n - kSize];
  228|  99.3k|  }
_ZNK7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE5beginEv:
  337|  9.02k|  const_iterator begin() const { return const_iterator(this, 0); }
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIKS4_KS3_EC2EPS6_m:
   64|  18.0k|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIKS4_KS3_ED2Ev:
   66|  18.0k|    ~iterator_impl() {}
_ZNK7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE3endEv:
  341|  9.02k|  const_iterator end() const { return const_iterator(this, this->size()); }
_ZNK7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIKS4_KS3_EneERKS8_:
  138|  18.0k|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIKS4_KS3_EeqERKS8_:
  133|  18.0k|    bool operator==(const self_type& other) const {
  134|  18.0k|      assert(vect_ == other.vect_);
  135|  18.0k|      return index_ == other.index_;
  136|  18.0k|    }
_ZN7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIKS4_KS3_EppEv:
   71|  9.02k|    self_type& operator++() {
   72|  9.02k|      ++index_;
   73|  9.02k|      return *this;
   74|  9.02k|    }
_ZNK7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EE13iterator_implIKS4_KS3_EdeEv:
  120|  9.02k|    reference operator*() const {
  121|  9.02k|      assert(vect_->size() >= index_);
  122|  9.02k|      return (*vect_)[index_];
  123|  9.02k|    }
_ZNK7rocksdb10autovectorINS0_IPNS_11VersionEditELm8EEELm8EEixEm:
  222|  18.0k|  const_reference operator[](size_type n) const {
  223|  18.0k|    assert(n < size());
  224|  18.0k|    if (n < kSize) {
  ------------------
  |  Branch (224:9): [True: 18.0k, False: 0]
  ------------------
  225|  18.0k|      return values_[n];
  226|  18.0k|    }
  227|      0|    return vect_[n - kSize];
  228|  18.0k|  }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIS3_S2_EC2EPS3_m:
   64|  72.2k|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIS3_S2_ED2Ev:
   66|  72.2k|    ~iterator_impl() {}
_ZN7rocksdb10autovectorImLm8EEC2EOS1_:
  331|  4.51k|  autovector(autovector&& other) noexcept { *this = std::move(other); }
_ZN7rocksdb10autovectorImLm8EEaSEOS1_:
  384|  4.51k|    autovector<T, kSize>&& other) {
  385|  4.51k|  values_ = reinterpret_cast<pointer>(buf_);
  386|  4.51k|  vect_ = std::move(other.vect_);
  387|  4.51k|  size_t n = other.num_stack_items_;
  388|  4.51k|  num_stack_items_ = n;
  389|  4.51k|  other.num_stack_items_ = 0;
  390|  4.51k|  for (size_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (390:22): [True: 0, False: 4.51k]
  ------------------
  391|      0|    new ((void*)(&values_[i])) value_type();
  392|      0|    values_[i] = std::move(other.values_[i]);
  393|      0|  }
  394|  4.51k|  return *this;
  395|  4.51k|}
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EED2Ev:
  179|  16.1k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EED2Ev:
  179|  11.6k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE13iterator_implIS3_S2_EC2EPS3_m:
   64|  74.7M|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE13iterator_implIS3_S2_ED2Ev:
   66|  74.7M|    ~iterator_impl() {}
_ZN7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EE13iterator_implIKSA_KS9_EC2EPSC_m:
   64|   200k|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EE13iterator_implIKSA_KS9_ED2Ev:
   66|   200k|    ~iterator_impl() {}
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE13iterator_implIKS3_KS2_EC2EPS5_m:
   64|   373M|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EE13iterator_implIKS3_KS2_ED2Ev:
   66|   373M|    ~iterator_impl() {}
_ZN7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EEC2Ev:
  170|  5.81k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EEC2Ev:
  170|  10.3k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EEC2EOSA_:
  331|  5.81k|  autovector(autovector&& other) noexcept { *this = std::move(other); }
_ZN7rocksdb10autovectorINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEELm8EEaSEOSA_:
  384|  5.81k|    autovector<T, kSize>&& other) {
  385|  5.81k|  values_ = reinterpret_cast<pointer>(buf_);
  386|  5.81k|  vect_ = std::move(other.vect_);
  387|  5.81k|  size_t n = other.num_stack_items_;
  388|  5.81k|  num_stack_items_ = n;
  389|  5.81k|  other.num_stack_items_ = 0;
  390|  5.81k|  for (size_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (390:22): [True: 0, False: 5.81k]
  ------------------
  391|      0|    new ((void*)(&values_[i])) value_type();
  392|      0|    values_[i] = std::move(other.values_[i]);
  393|      0|  }
  394|  5.81k|  return *this;
  395|  5.81k|}
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EEC2EOS3_:
  331|  5.81k|  autovector(autovector&& other) noexcept { *this = std::move(other); }
_ZN7rocksdb10autovectorIPNS_25TruncatedRangeDelIteratorELm8EEaSEOS3_:
  384|  5.81k|    autovector<T, kSize>&& other) {
  385|  5.81k|  values_ = reinterpret_cast<pointer>(buf_);
  386|  5.81k|  vect_ = std::move(other.vect_);
  387|  5.81k|  size_t n = other.num_stack_items_;
  388|  5.81k|  num_stack_items_ = n;
  389|  5.81k|  other.num_stack_items_ = 0;
  390|  5.81k|  for (size_t i = 0; i < n; ++i) {
  ------------------
  |  Branch (390:22): [True: 0, False: 5.81k]
  ------------------
  391|      0|    new ((void*)(&values_[i])) value_type();
  392|      0|    values_[i] = std::move(other.values_[i]);
  393|      0|  }
  394|  5.81k|  return *this;
  395|  5.81k|}
_ZN7rocksdb10autovectorINS_5SliceELm8EEC2Ev:
  170|   393k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZNK7rocksdb10autovectorImLm8EE13iterator_implIS1_mEmiERKS3_:
  100|  6.21M|    difference_type operator-(const self_type& other) const {
  101|  6.21M|      assert(vect_ == other.vect_);
  102|  6.21M|      return index_ - other.index_;
  103|  6.21M|    }
_ZN7rocksdb10autovectorImLm8EE13iterator_implIS1_mEmmEv:
   84|   257M|    self_type& operator--() {
   85|   257M|      --index_;
   86|   257M|      return *this;
   87|   257M|    }
_ZNK7rocksdb10autovectorImLm8EE13iterator_implIS1_mEplEl:
  105|  9.56M|    self_type operator+(difference_type len) const {
  106|  9.56M|      return self_type(vect_, index_ + len);
  107|  9.56M|    }
_ZN7rocksdb10autovectorImLm8EE13iterator_implIS1_mEpLEl:
  109|   496k|    self_type& operator+=(difference_type len) {
  110|   496k|      index_ += len;
  111|   496k|      return *this;
  112|   496k|    }
_ZNK7rocksdb10autovectorImLm8EE13iterator_implIS1_mEmiEl:
   96|  42.9M|    self_type operator-(difference_type len) const {
   97|  42.9M|      return self_type(vect_, index_ - len);
   98|  42.9M|    }
_ZNK7rocksdb10autovectorImLm8EE13iterator_implIS1_mEltERKS3_:
  145|  49.5M|    bool operator<(const self_type& other) const {
  146|  49.5M|      assert(vect_ == other.vect_);
  147|  49.5M|      return index_ < other.index_;
  148|  49.5M|    }
_ZNK7rocksdb10autovectorImLm8EE13iterator_implIS1_mEgeERKS3_:
  150|  2.57M|    bool operator>=(const self_type& other) const {
  151|  2.57M|      assert(vect_ == other.vect_);
  152|  2.57M|      return index_ >= other.index_;
  153|  2.57M|    }
_ZN7rocksdb10autovectorINS_5SliceELm8EED2Ev:
  179|   393k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorINS_5SliceELm8EE5clearEv:
  317|   393k|  void clear() {
  318|   393k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 0, False: 393k]
  ------------------
  319|      0|      values_[--num_stack_items_].~value_type();
  320|      0|    }
  321|   393k|    vect_.clear();
  322|   393k|  }
_ZN7rocksdb10autovectorINS_11FileIndexer10IndexLevelELm8EED2Ev:
  179|  36.1k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorINS_11FileIndexer10IndexLevelELm8EE5clearEv:
  317|  36.1k|  void clear() {
  318|  40.5k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 4.48k, False: 36.1k]
  ------------------
  319|  4.48k|      values_[--num_stack_items_].~value_type();
  320|  4.48k|    }
  321|  36.1k|    vect_.clear();
  322|  36.1k|  }
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EEixEm:
  230|  31.3k|  reference operator[](size_type n) {
  231|  31.3k|    assert(n < size());
  232|  31.3k|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 31.3k, False: 0]
  ------------------
  233|  31.3k|      return values_[n];
  234|  31.3k|    }
  235|      0|    return vect_[n - kSize];
  236|  31.3k|  }
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EED2Ev:
  179|  36.1k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EE5clearEv:
  317|  36.1k|  void clear() {
  318|  40.5k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 4.48k, False: 36.1k]
  ------------------
  319|  4.48k|      values_[--num_stack_items_].~value_type();
  320|  4.48k|    }
  321|  36.1k|    vect_.clear();
  322|  36.1k|  }
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EED2Ev:
  179|   216k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EEC2Ev:
  170|  36.1k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EEC2Ev:
  170|   216k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EE6resizeEm:
  192|  27.0k|  void resize(size_type n) {
  193|  27.0k|    if (n > kSize) {
  ------------------
  |  Branch (193:9): [True: 0, False: 27.0k]
  ------------------
  194|      0|      vect_.resize(n - kSize);
  195|      0|      while (num_stack_items_ < kSize) {
  ------------------
  |  Branch (195:14): [True: 0, False: 0]
  ------------------
  196|      0|        new ((void*)(&values_[num_stack_items_++])) value_type();
  197|      0|      }
  198|      0|      num_stack_items_ = kSize;
  199|  27.0k|    } else {
  200|  27.0k|      vect_.clear();
  201|  31.5k|      while (num_stack_items_ < n) {
  ------------------
  |  Branch (201:14): [True: 4.48k, False: 27.0k]
  ------------------
  202|  4.48k|        new ((void*)(&values_[num_stack_items_++])) value_type();
  203|  4.48k|      }
  204|  27.0k|      while (num_stack_items_ > n) {
  ------------------
  |  Branch (204:14): [True: 0, False: 27.0k]
  ------------------
  205|      0|        values_[--num_stack_items_].~value_type();
  206|      0|      }
  207|  27.0k|    }
  208|  27.0k|  }
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE5clearEv:
  317|   352k|  void clear() {
  318|   356k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 4.48k, False: 352k]
  ------------------
  319|  4.48k|      values_[--num_stack_items_].~value_type();
  320|  4.48k|    }
  321|   352k|    vect_.clear();
  322|   352k|  }
_ZNK7rocksdb10autovectorINS_15LevelFilesBriefELm8EE4sizeEv:
  188|  58.6k|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE12emplace_backIJiRKS4_EEERS5_DpOT_:
  289|  4.48k|  reference emplace_back(Args&&... args) {
  290|  4.48k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (290:9): [True: 4.48k, False: 0]
  ------------------
  291|  4.48k|      return *(new ((void*)(&values_[num_stack_items_++]))
  292|  4.48k|                   value_type(std::forward<Args>(args)...));
  293|  4.48k|    } else {
  294|      0|      return vect_.emplace_back(std::forward<Args>(args)...);
  295|      0|    }
  296|  4.48k|  }
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE5beginEv:
  335|  27.0k|  iterator begin() { return iterator(this, 0); }
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIS6_S5_EC2EPS6_m:
   64|  54.1k|        : vect_(vect), index_(index){}
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIS6_S5_ED2Ev:
   66|  54.1k|    ~iterator_impl() {}
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE3endEv:
  339|  27.0k|  iterator end() { return iterator(this, this->size()); }
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIS6_S5_EneERKS8_:
  138|  31.5k|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIS6_S5_EeqERKS8_:
  133|  31.5k|    bool operator==(const self_type& other) const {
  134|  31.5k|      assert(vect_ == other.vect_);
  135|  31.5k|      return index_ == other.index_;
  136|  31.5k|    }
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIS6_S5_EppEv:
   71|  4.48k|    self_type& operator++() {
   72|  4.48k|      ++index_;
   73|  4.48k|      return *this;
   74|  4.48k|    }
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIS6_S5_EdeEv:
  120|  4.48k|    reference operator*() const {
  121|  4.48k|      assert(vect_->size() >= index_);
  122|  4.48k|      return (*vect_)[index_];
  123|  4.48k|    }
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EEixEm:
  230|  4.48k|  reference operator[](size_type n) {
  231|  4.48k|    assert(n < size());
  232|  4.48k|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 4.48k, False: 0]
  ------------------
  233|  4.48k|      return values_[n];
  234|  4.48k|    }
  235|      0|    return vect_[n - kSize];
  236|  4.48k|  }
_ZN7rocksdb10autovectorINSt3__18optionalImEELm8EEC2Ev:
  170|  9.02k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorINSt3__18optionalImEELm8EED2Ev:
  179|  9.02k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorINSt3__18optionalImEELm8EE5clearEv:
  317|  9.02k|  void clear() {
  318|  27.0k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 18.0k, False: 9.02k]
  ------------------
  319|  18.0k|      values_[--num_stack_items_].~value_type();
  320|  18.0k|    }
  321|  9.02k|    vect_.clear();
  322|  9.02k|  }
_ZN7rocksdb10autovectorIPNS_7VersionELm8EEC2Ev:
  170|  9.02k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorIPNS_7VersionELm8EED2Ev:
  179|  9.02k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorIPNS_7VersionELm8EE5clearEv:
  317|  9.02k|  void clear() {
  318|  18.0k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 9.02k, False: 9.02k]
  ------------------
  319|  9.02k|      values_[--num_stack_items_].~value_type();
  320|  9.02k|    }
  321|  9.02k|    vect_.clear();
  322|  9.02k|  }
_ZN7rocksdb10autovectorIPKNS0_ImLm8EEELm8EEC2Ev:
  170|  9.02k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorIPKNS0_ImLm8EEELm8EED2Ev:
  179|  9.02k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorIPKNS0_ImLm8EEELm8EE5clearEv:
  317|  9.02k|  void clear() {
  318|  27.0k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 18.0k, False: 9.02k]
  ------------------
  319|  18.0k|      values_[--num_stack_items_].~value_type();
  320|  18.0k|    }
  321|  9.02k|    vect_.clear();
  322|  9.02k|  }
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EE5frontEv:
  253|  72.2k|  const_reference front() const {
  254|  72.2k|    assert(!empty());
  255|  72.2k|    return *begin();
  256|  72.2k|  }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE9push_backERKS2_:
  278|  18.0k|  void push_back(const T& item) {
  279|  18.0k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (279:9): [True: 18.0k, False: 0]
  ------------------
  280|  18.0k|      new ((void*)(&values_[num_stack_items_])) value_type();
  281|  18.0k|      values_[num_stack_items_++] = item;
  282|  18.0k|    } else {
  283|      0|      vect_.push_back(item);
  284|      0|    }
  285|  18.0k|  }
_ZN7rocksdb10autovectorIPNS_11VersionEditELm8EE4backEv:
  258|  9.02k|  reference back() {
  259|  9.02k|    assert(!empty());
  260|  9.02k|    return *(end() - 1);
  261|  9.02k|  }
_ZNK7rocksdb10autovectorIPNS_11VersionEditELm8EE13iterator_implIS3_S2_EmiEl:
   96|  9.02k|    self_type operator-(difference_type len) const {
   97|  9.02k|      return self_type(vect_, index_ - len);
   98|  9.02k|    }
_ZNK7rocksdb10autovectorIPNS_7VersionELm8EE4sizeEv:
  188|  81.2k|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZN7rocksdb10autovectorIPNS_7VersionELm8EEixEm:
  230|  45.1k|  reference operator[](size_type n) {
  231|  45.1k|    assert(n < size());
  232|  45.1k|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 45.1k, False: 0]
  ------------------
  233|  45.1k|      return values_[n];
  234|  45.1k|    }
  235|      0|    return vect_[n - kSize];
  236|  45.1k|  }
_ZN7rocksdb10autovectorIPNS_7VersionELm8EE9push_backERKS2_:
  278|  9.02k|  void push_back(const T& item) {
  279|  9.02k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (279:9): [True: 9.02k, False: 0]
  ------------------
  280|  9.02k|      new ((void*)(&values_[num_stack_items_])) value_type();
  281|  9.02k|      values_[num_stack_items_++] = item;
  282|  9.02k|    } else {
  283|      0|      vect_.push_back(item);
  284|      0|    }
  285|  9.02k|  }
_ZN7rocksdb10autovectorINSt3__18optionalImEELm8EE9push_backERKS3_:
  278|  18.0k|  void push_back(const T& item) {
  279|  18.0k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (279:9): [True: 18.0k, False: 0]
  ------------------
  280|  18.0k|      new ((void*)(&values_[num_stack_items_])) value_type();
  281|  18.0k|      values_[num_stack_items_++] = item;
  282|  18.0k|    } else {
  283|      0|      vect_.push_back(item);
  284|      0|    }
  285|  18.0k|  }
_ZN7rocksdb10autovectorIPKNS_16MutableCFOptionsELm8EEixEm:
  230|  36.1k|  reference operator[](size_type n) {
  231|  36.1k|    assert(n < size());
  232|  36.1k|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 36.1k, False: 0]
  ------------------
  233|  36.1k|      return values_[n];
  234|  36.1k|    }
  235|      0|    return vect_[n - kSize];
  236|  36.1k|  }
_ZN7rocksdb10autovectorIPKNS0_ImLm8EEELm8EE9push_backEOS3_:
  269|  18.0k|  void push_back(T&& item) {
  270|  18.0k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (270:9): [True: 18.0k, False: 0]
  ------------------
  271|  18.0k|      new ((void*)(&values_[num_stack_items_])) value_type();
  272|  18.0k|      values_[num_stack_items_++] = std::move(item);
  273|  18.0k|    } else {
  274|      0|      vect_.push_back(item);
  275|      0|    }
  276|  18.0k|  }
_ZN7rocksdb10autovectorINSt3__18optionalImEELm8EEixEm:
  230|  18.0k|  reference operator[](size_type n) {
  231|  18.0k|    assert(n < size());
  232|  18.0k|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 18.0k, False: 0]
  ------------------
  233|  18.0k|      return values_[n];
  234|  18.0k|    }
  235|      0|    return vect_[n - kSize];
  236|  18.0k|  }
_ZNK7rocksdb10autovectorIPKNS_16MutableCFOptionsELm8EEixEm:
  222|  9.02k|  const_reference operator[](size_type n) const {
  223|  9.02k|    assert(n < size());
  224|  9.02k|    if (n < kSize) {
  ------------------
  |  Branch (224:9): [True: 9.02k, False: 0]
  ------------------
  225|  9.02k|      return values_[n];
  226|  9.02k|    }
  227|      0|    return vect_[n - kSize];
  228|  9.02k|  }
_ZN7rocksdb10autovectorINS_18ProtectionInfoKVOCImEELm8EEC2Ev:
  170|  1.36M|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZNK7rocksdb10autovectorINS_18ProtectionInfoKVOCImEELm8EEixEm:
  222|  1.36M|  const_reference operator[](size_type n) const {
  223|  1.36M|    assert(n < size());
  224|  1.36M|    if (n < kSize) {
  ------------------
  |  Branch (224:9): [True: 1.36M, False: 0]
  ------------------
  225|  1.36M|      return values_[n];
  226|  1.36M|    }
  227|      0|    return vect_[n - kSize];
  228|  1.36M|  }
_ZN7rocksdb10autovectorINS_18ProtectionInfoKVOCImEELm8EED2Ev:
  179|  1.36M|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorINS_18ProtectionInfoKVOCImEELm8EE5clearEv:
  317|  1.36M|  void clear() {
  318|  2.72M|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 1.36M, False: 1.36M]
  ------------------
  319|  1.36M|      values_[--num_stack_items_].~value_type();
  320|  1.36M|    }
  321|  1.36M|    vect_.clear();
  322|  1.36M|  }
_ZN7rocksdb10autovectorINS_18ProtectionInfoKVOCImEELm8EE12emplace_backIJS2_EEERS2_DpOT_:
  289|  1.36M|  reference emplace_back(Args&&... args) {
  290|  1.36M|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (290:9): [True: 1.36M, False: 0]
  ------------------
  291|  1.36M|      return *(new ((void*)(&values_[num_stack_items_++]))
  292|  1.36M|                   value_type(std::forward<Args>(args)...));
  293|  1.36M|    } else {
  294|      0|      return vect_.emplace_back(std::forward<Args>(args)...);
  295|      0|    }
  296|  1.36M|  }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE5frontEv:
  248|   292k|  reference front() {
  249|   292k|    assert(!empty());
  250|   292k|    return *begin();
  251|   292k|  }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE5beginEv:
  335|   292k|  iterator begin() { return iterator(this, 0); }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE13iterator_implIS4_S3_EC2EPS4_m:
   64|   296k|        : vect_(vect), index_(index){}
_ZNK7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE13iterator_implIS4_S3_EdeEv:
  120|   294k|    reference operator*() const {
  121|   294k|      assert(vect_->size() >= index_);
  122|   294k|      return (*vect_)[index_];
  123|   294k|    }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EEixEm:
  230|  1.10M|  reference operator[](size_type n) {
  231|  1.10M|    assert(n < size());
  232|  1.10M|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 1.10M, False: 0]
  ------------------
  233|  1.10M|      return values_[n];
  234|  1.10M|    }
  235|      0|    return vect_[n - kSize];
  236|  1.10M|  }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE13iterator_implIS4_S3_ED2Ev:
   66|   296k|    ~iterator_impl() {}
_ZNK7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE4sizeEv:
  188|  1.03M|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EEC2Ev:
  170|  4.51k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EED2Ev:
  179|  4.51k|  ~autovector() { clear(); }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE5clearEv:
  317|  8.99k|  void clear() {
  318|  8.99k|    while (num_stack_items_ > 0) {
  ------------------
  |  Branch (318:12): [True: 0, False: 8.99k]
  ------------------
  319|      0|      values_[--num_stack_items_].~value_type();
  320|      0|    }
  321|  8.99k|    vect_.clear();
  322|  8.99k|  }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE4backEv:
  258|  2.23k|  reference back() {
  259|  2.23k|    assert(!empty());
  260|  2.23k|    return *(end() - 1);
  261|  2.23k|  }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE3endEv:
  339|  2.23k|  iterator end() { return iterator(this, this->size()); }
_ZNK7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE13iterator_implIS4_S3_EmiEl:
   96|  2.23k|    self_type operator-(difference_type len) const {
   97|  2.23k|      return self_type(vect_, index_ - len);
   98|  2.23k|    }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE8pop_backEv:
  308|  6.72k|  void pop_back() {
  309|  6.72k|    assert(!empty());
  310|  6.72k|    if (!vect_.empty()) {
  ------------------
  |  Branch (310:9): [True: 0, False: 6.72k]
  ------------------
  311|      0|      vect_.pop_back();
  312|  6.72k|    } else {
  313|  6.72k|      values_[--num_stack_items_].~value_type();
  314|  6.72k|    }
  315|  6.72k|  }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE9push_backEOS3_:
  269|  2.90k|  void push_back(T&& item) {
  270|  2.90k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (270:9): [True: 2.90k, False: 0]
  ------------------
  271|  2.90k|      new ((void*)(&values_[num_stack_items_])) value_type();
  272|  2.90k|      values_[num_stack_items_++] = std::move(item);
  273|  2.90k|    } else {
  274|      0|      vect_.push_back(item);
  275|      0|    }
  276|  2.90k|  }
_ZNK7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE5emptyEv:
  210|   517k|  bool empty() const { return size() == 0; }
_ZNK7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE5frontEv:
  253|   659k|  const_reference front() const {
  254|   659k|    assert(!empty());
  255|   659k|    return *begin();
  256|   659k|  }
_ZNK7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE5beginEv:
  337|   659k|  const_iterator begin() const { return const_iterator(this, 0); }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE13iterator_implIKS4_KS3_EC2EPS6_m:
   64|   659k|        : vect_(vect), index_(index){}
_ZNK7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE13iterator_implIKS4_KS3_EdeEv:
  120|   659k|    reference operator*() const {
  121|   659k|      assert(vect_->size() >= index_);
  122|   659k|      return (*vect_)[index_];
  123|   659k|    }
_ZNK7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EEixEm:
  222|   659k|  const_reference operator[](size_type n) const {
  223|   659k|    assert(n < size());
  224|   659k|    if (n < kSize) {
  ------------------
  |  Branch (224:9): [True: 659k, False: 0]
  ------------------
  225|   659k|      return values_[n];
  226|   659k|    }
  227|      0|    return vect_[n - kSize];
  228|   659k|  }
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE13iterator_implIKS4_KS3_ED2Ev:
   66|   659k|    ~iterator_impl() {}
_ZN7rocksdb10autovectorIPNS_15MergingIterator8HeapItemELm8EE9push_backERKS3_:
  278|  3.81k|  void push_back(const T& item) {
  279|  3.81k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (279:9): [True: 3.81k, False: 0]
  ------------------
  280|  3.81k|      new ((void*)(&values_[num_stack_items_])) value_type();
  281|  3.81k|      values_[num_stack_items_++] = item;
  282|  3.81k|    } else {
  283|      0|      vect_.push_back(item);
  284|      0|    }
  285|  3.81k|  }
_ZN7rocksdb10autovectorIjLm8EEC2Ev:
  170|      1|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZNK7rocksdb10autovectorIjLm8EE5emptyEv:
  210|  18.0k|  bool empty() const { return size() == 0; }
_ZNK7rocksdb10autovectorIjLm8EE4sizeEv:
  188|  36.1k|  size_type size() const { return num_stack_items_ + vect_.size(); }
_ZN7rocksdb10autovectorIjLm8EE4backEv:
  258|  18.0k|  reference back() {
  259|  18.0k|    assert(!empty());
  260|  18.0k|    return *(end() - 1);
  261|  18.0k|  }
_ZN7rocksdb10autovectorIjLm8EE3endEv:
  339|  18.0k|  iterator end() { return iterator(this, this->size()); }
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIS1_jEC2EPS1_m:
   64|  36.1k|        : vect_(vect), index_(index){}
_ZNK7rocksdb10autovectorIjLm8EE13iterator_implIS1_jEmiEl:
   96|  18.0k|    self_type operator-(difference_type len) const {
   97|  18.0k|      return self_type(vect_, index_ - len);
   98|  18.0k|    }
_ZNK7rocksdb10autovectorIjLm8EE13iterator_implIS1_jEdeEv:
  120|  18.0k|    reference operator*() const {
  121|  18.0k|      assert(vect_->size() >= index_);
  122|  18.0k|      return (*vect_)[index_];
  123|  18.0k|    }
_ZN7rocksdb10autovectorIjLm8EEixEm:
  230|  18.0k|  reference operator[](size_type n) {
  231|  18.0k|    assert(n < size());
  232|  18.0k|    if (n < kSize) {
  ------------------
  |  Branch (232:9): [True: 18.0k, False: 0]
  ------------------
  233|  18.0k|      return values_[n];
  234|  18.0k|    }
  235|      0|    return vect_[n - kSize];
  236|  18.0k|  }
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIS1_jED2Ev:
   66|  36.1k|    ~iterator_impl() {}
_ZN7rocksdb10autovectorIjLm8EE8pop_backEv:
  308|  18.0k|  void pop_back() {
  309|  18.0k|    assert(!empty());
  310|  18.0k|    if (!vect_.empty()) {
  ------------------
  |  Branch (310:9): [True: 0, False: 18.0k]
  ------------------
  311|      0|      vect_.pop_back();
  312|  18.0k|    } else {
  313|  18.0k|      values_[--num_stack_items_].~value_type();
  314|  18.0k|    }
  315|  18.0k|  }
_ZN7rocksdb10autovectorIjLm8EE9push_backERKj:
  278|  18.0k|  void push_back(const T& item) {
  279|  18.0k|    if (num_stack_items_ < kSize) {
  ------------------
  |  Branch (279:9): [True: 18.0k, False: 0]
  ------------------
  280|  18.0k|      new ((void*)(&values_[num_stack_items_])) value_type();
  281|  18.0k|      values_[num_stack_items_++] = item;
  282|  18.0k|    } else {
  283|      0|      vect_.push_back(item);
  284|      0|    }
  285|  18.0k|  }
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE5beginEv:
  337|  9.02k|  const_iterator begin() const { return const_iterator(this, 0); }
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_EC2EPS8_m:
   64|  18.0k|        : vect_(vect), index_(index){}
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE3endEv:
  341|  9.02k|  const_iterator end() const { return const_iterator(this, this->size()); }
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_EneERKSA_:
  138|  13.5k|    bool operator!=(const self_type& other) const { return !(*this == other); }
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_EeqERKSA_:
  133|  13.5k|    bool operator==(const self_type& other) const {
  134|  13.5k|      assert(vect_ == other.vect_);
  135|  13.5k|      return index_ == other.index_;
  136|  13.5k|    }
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_EdeEv:
  120|  4.48k|    reference operator*() const {
  121|  4.48k|      assert(vect_->size() >= index_);
  122|  4.48k|      return (*vect_)[index_];
  123|  4.48k|    }
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EEixEm:
  222|  4.48k|  const_reference operator[](size_type n) const {
  223|  4.48k|    assert(n < size());
  224|  4.48k|    if (n < kSize) {
  ------------------
  |  Branch (224:9): [True: 4.48k, False: 0]
  ------------------
  225|  4.48k|      return values_[n];
  226|  4.48k|    }
  227|      0|    return vect_[n - kSize];
  228|  4.48k|  }
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_EppEv:
   71|  4.48k|    self_type& operator++() {
   72|  4.48k|      ++index_;
   73|  4.48k|      return *this;
   74|  4.48k|    }
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_ED2Ev:
   66|  18.0k|    ~iterator_impl() {}
_ZN7rocksdb10autovectorINS_11FileIndexer10IndexLevelELm8EEC2Ev:
  170|  36.1k|  autovector() : values_(reinterpret_cast<pointer>(buf_)) {}
_ZN7rocksdb10autovectorINS_11FileIndexer10IndexLevelELm8EE6resizeEm:
  192|  4.48k|  void resize(size_type n) {
  193|  4.48k|    if (n > kSize) {
  ------------------
  |  Branch (193:9): [True: 0, False: 4.48k]
  ------------------
  194|      0|      vect_.resize(n - kSize);
  195|      0|      while (num_stack_items_ < kSize) {
  ------------------
  |  Branch (195:14): [True: 0, False: 0]
  ------------------
  196|      0|        new ((void*)(&values_[num_stack_items_++])) value_type();
  197|      0|      }
  198|      0|      num_stack_items_ = kSize;
  199|  4.48k|    } else {
  200|  4.48k|      vect_.clear();
  201|  8.96k|      while (num_stack_items_ < n) {
  ------------------
  |  Branch (201:14): [True: 4.48k, False: 4.48k]
  ------------------
  202|  4.48k|        new ((void*)(&values_[num_stack_items_++])) value_type();
  203|  4.48k|      }
  204|  4.48k|      while (num_stack_items_ > n) {
  ------------------
  |  Branch (204:14): [True: 0, False: 4.48k]
  ------------------
  205|      0|        values_[--num_stack_items_].~value_type();
  206|      0|      }
  207|  4.48k|    }
  208|  4.48k|  }

_ZN7rocksdb23GetRocksBuildPropertiesEv:
   53|  9.02k|const std::unordered_map<std::string, std::string>& GetRocksBuildProperties() {
   54|  9.02k|  static std::unique_ptr<std::unordered_map<std::string, std::string>> props(LoadPropertiesSet());
   55|  9.02k|  return *props;
   56|  9.02k|}
_ZN7rocksdb23GetRocksVersionAsStringEb:
   58|  9.02k|std::string GetRocksVersionAsString(bool with_patch) {
   59|  9.02k|  std::string version = std::to_string(ROCKSDB_MAJOR) + "." + std::to_string(ROCKSDB_MINOR);
  ------------------
  |  |   14|  9.02k|#define ROCKSDB_MAJOR 9
  ------------------
                std::string version = std::to_string(ROCKSDB_MAJOR) + "." + std::to_string(ROCKSDB_MINOR);
  ------------------
  |  |   15|  9.02k|#define ROCKSDB_MINOR 6
  ------------------
   60|  9.02k|  if (with_patch) {
  ------------------
  |  Branch (60:7): [True: 9.02k, False: 0]
  ------------------
   61|  9.02k|    return version + "." + std::to_string(ROCKSDB_PATCH);
  ------------------
  |  |   16|  9.02k|#define ROCKSDB_PATCH 0
  ------------------
   62|  9.02k|  } else {
   63|      0|    return version;
   64|      0| }
   65|  9.02k|}
build_version.cc:_ZN7rocksdbL17LoadPropertiesSetEv:
   45|      1|static std::unordered_map<std::string, std::string>* LoadPropertiesSet() {
   46|      1|  auto * properties = new std::unordered_map<std::string, std::string>();
   47|      1|  AddProperty(properties, rocksdb_build_git_sha);
   48|      1|  AddProperty(properties, rocksdb_build_git_tag);
   49|      1|  AddProperty(properties, rocksdb_build_date);
   50|      1|  return properties;
   51|      1|}
build_version.cc:_ZN7rocksdbL11AddPropertyEPNSt3__113unordered_mapINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES7_NS0_4hashIS7_EENS0_8equal_toIS7_EENS5_INS0_4pairIKS7_S7_EEEEEERSD_:
   33|      3|static void AddProperty(std::unordered_map<std::string, std::string> *props, const std::string& name) {
   34|      3|  size_t colon = name.find(":");
   35|      3|  if (colon != std::string::npos && colon > 0 && colon < name.length() - 1) {
  ------------------
  |  Branch (35:7): [True: 3, False: 0]
  |  Branch (35:37): [True: 3, False: 0]
  |  Branch (35:50): [True: 3, False: 0]
  ------------------
   36|       |    // If we found a "@:", then this property was a build-time substitution that failed.  Skip it
   37|      3|    size_t at = name.find("@", colon);
   38|      3|    if (at != colon + 1) {
  ------------------
  |  Branch (38:9): [True: 3, False: 0]
  ------------------
   39|       |      // Everything before the colon is the name, after is the value
   40|      3|      (*props)[name.substr(0, colon)] = name.substr(colon + 1);
   41|      3|    }
   42|      3|  }
   43|      3|}

_ZN7rocksdb10UnownedPtrIKNS_18SeqnoToTimeMappingEEC2EPS2_:
   73|  9.02k|  UnownedPtr(T* ptr) : ptr_(ptr) {}
_ZN7rocksdb22static_cast_with_checkINS_22ColumnFamilyHandleImplENS_18ColumnFamilyHandleEEEPT_PT0_:
   20|  2.39M|inline DestClass* static_cast_with_check(SrcClass* x) {
   21|  2.39M|  DestClass* ret = static_cast<DestClass*>(x);
   22|       |#ifdef ROCKSDB_USE_RTTI
   23|       |  assert(ret == dynamic_cast<DestClass*>(x));
   24|       |#endif
   25|  2.39M|  return ret;
   26|  2.39M|}
_ZN7rocksdb10UnownedPtrIKNS_18SeqnoToTimeMappingEEC2EDn:
   72|  11.8k|  UnownedPtr(std::nullptr_t) {}
_ZN7rocksdb22static_cast_with_checkINS_6DBImplENS_2DBEEEPT_PT0_:
   20|  2.72M|inline DestClass* static_cast_with_check(SrcClass* x) {
   21|  2.72M|  DestClass* ret = static_cast<DestClass*>(x);
   22|       |#ifdef ROCKSDB_USE_RTTI
   23|       |  assert(ret == dynamic_cast<DestClass*>(x));
   24|       |#endif
   25|  2.72M|  return ret;
   26|  2.72M|}
_ZNK7rocksdb10UnownedPtrIKNS_18SeqnoToTimeMappingEEcvbEv:
   82|  4.48k|  operator bool() const { return ptr_ != nullptr; }
_ZN7rocksdb13lossless_castINS_12ChecksumTypeEcEET_T0_:
   46|  4.48k|inline To lossless_cast(From x) {
   47|  4.48k|  using FromValue = typename std::remove_reference<From>::type;
   48|  4.48k|  static_assert(
   49|  4.48k|      std::is_integral<FromValue>::value || std::is_enum<FromValue>::value,
   50|  4.48k|      "Only works on integral types");
   51|  4.48k|  static_assert(std::is_integral<To>::value || std::is_enum<To>::value,
   52|  4.48k|                "Only works on integral types");
   53|  4.48k|  static_assert(sizeof(To) >= sizeof(FromValue), "Must be lossless");
   54|  4.48k|  return static_cast<To>(x);
   55|  4.48k|}
_ZN7rocksdb13lossless_castIhcEET_T0_:
   46|  59.3k|inline To lossless_cast(From x) {
   47|  59.3k|  using FromValue = typename std::remove_reference<From>::type;
   48|  59.3k|  static_assert(
   49|  59.3k|      std::is_integral<FromValue>::value || std::is_enum<FromValue>::value,
   50|  59.3k|      "Only works on integral types");
   51|  59.3k|  static_assert(std::is_integral<To>::value || std::is_enum<To>::value,
   52|  59.3k|                "Only works on integral types");
   53|  59.3k|  static_assert(sizeof(To) >= sizeof(FromValue), "Must be lossless");
   54|  59.3k|  return static_cast<To>(x);
   55|  59.3k|}

_ZN7rocksdb9CleanableC2Ev:
   18|   114k|Cleanable::Cleanable() {
   19|   114k|  cleanup_.function = nullptr;
   20|   114k|  cleanup_.next = nullptr;
   21|   114k|}
_ZN7rocksdb9CleanableD2Ev:
   23|   114k|Cleanable::~Cleanable() { DoCleanup(); }
_ZN7rocksdb9Cleanable15RegisterCleanupEPFvPvS1_ES1_S1_:
   81|  20.7k|void Cleanable::RegisterCleanup(CleanupFunction func, void* arg1, void* arg2) {
   82|  20.7k|  assert(func != nullptr);
   83|  20.7k|  Cleanup* c;
   84|  20.7k|  if (cleanup_.function == nullptr) {
  ------------------
  |  Branch (84:7): [True: 20.7k, False: 0]
  ------------------
   85|  20.7k|    c = &cleanup_;
   86|  20.7k|  } else {
   87|      0|    c = new Cleanup;
   88|      0|    c->next = cleanup_.next;
   89|      0|    cleanup_.next = c;
   90|      0|  }
   91|  20.7k|  c->function = func;
   92|  20.7k|  c->arg1 = arg1;
   93|  20.7k|  c->arg2 = arg2;
   94|  20.7k|}

_ZN7rocksdb14EncodeVarint32EPcj:
   24|  8.83M|char* EncodeVarint32(char* dst, uint32_t v) {
   25|       |  // Operate on characters as unsigneds
   26|  8.83M|  unsigned char* ptr = reinterpret_cast<unsigned char*>(dst);
   27|  8.83M|  static const int B = 128;
   28|  8.83M|  if (v < (1 << 7)) {
  ------------------
  |  Branch (28:7): [True: 8.14M, False: 687k]
  ------------------
   29|  8.14M|    *(ptr++) = v;
   30|  8.14M|  } else if (v < (1 << 14)) {
  ------------------
  |  Branch (30:14): [True: 675k, False: 12.0k]
  ------------------
   31|   675k|    *(ptr++) = v | B;
   32|   675k|    *(ptr++) = v >> 7;
   33|   675k|  } else if (v < (1 << 21)) {
  ------------------
  |  Branch (33:14): [True: 12.0k, False: 0]
  ------------------
   34|  12.0k|    *(ptr++) = v | B;
   35|  12.0k|    *(ptr++) = (v >> 7) | B;
   36|  12.0k|    *(ptr++) = v >> 14;
   37|  12.0k|  } else if (v < (1 << 28)) {
  ------------------
  |  Branch (37:14): [True: 0, False: 0]
  ------------------
   38|      0|    *(ptr++) = v | B;
   39|      0|    *(ptr++) = (v >> 7) | B;
   40|      0|    *(ptr++) = (v >> 14) | B;
   41|      0|    *(ptr++) = v >> 21;
   42|      0|  } else {
   43|      0|    *(ptr++) = v | B;
   44|      0|    *(ptr++) = (v >> 7) | B;
   45|      0|    *(ptr++) = (v >> 14) | B;
   46|      0|    *(ptr++) = (v >> 21) | B;
   47|      0|    *(ptr++) = v >> 28;
   48|      0|  }
   49|  8.83M|  return reinterpret_cast<char*>(ptr);
   50|  8.83M|}
_ZN7rocksdb22GetVarint32PtrFallbackEPKcS1_Pj:
   56|  4.30M|                                   uint32_t* value) {
   57|  4.30M|  uint32_t result = 0;
   58|  8.64M|  for (uint32_t shift = 0; shift <= 28 && p < limit; shift += 7) {
  ------------------
  |  Branch (58:28): [True: 8.64M, False: 0]
  |  Branch (58:43): [True: 8.62M, False: 22.5k]
  ------------------
   59|  8.62M|    uint32_t byte = *(reinterpret_cast<const unsigned char*>(p));
   60|  8.62M|    p++;
   61|  8.62M|    if (byte & 128) {
  ------------------
  |  Branch (61:9): [True: 4.33M, False: 4.28M]
  ------------------
   62|       |      // More bytes are present
   63|  4.33M|      result |= ((byte & 127) << shift);
   64|  4.33M|    } else {
   65|  4.28M|      result |= (byte << shift);
   66|  4.28M|      *value = result;
   67|  4.28M|      return reinterpret_cast<const char*>(p);
   68|  4.28M|    }
   69|  8.62M|  }
   70|  22.5k|  return nullptr;
   71|  4.30M|}
_ZN7rocksdb14GetVarint64PtrEPKcS1_Pm:
   73|   167k|const char* GetVarint64Ptr(const char* p, const char* limit, uint64_t* value) {
   74|   167k|  uint64_t result = 0;
   75|   236k|  for (uint32_t shift = 0; shift <= 63 && p < limit; shift += 7) {
  ------------------
  |  Branch (75:28): [True: 236k, False: 0]
  |  Branch (75:43): [True: 236k, False: 0]
  ------------------
   76|   236k|    uint64_t byte = *(reinterpret_cast<const unsigned char*>(p));
   77|   236k|    p++;
   78|   236k|    if (byte & 128) {
  ------------------
  |  Branch (78:9): [True: 69.1k, False: 167k]
  ------------------
   79|       |      // More bytes are present
   80|  69.1k|      result |= ((byte & 127) << shift);
   81|   167k|    } else {
   82|   167k|      result |= (byte << shift);
   83|   167k|      *value = result;
   84|   167k|      return reinterpret_cast<const char*>(p);
   85|   167k|    }
   86|   236k|  }
   87|      0|  return nullptr;
   88|   167k|}

_ZN7rocksdb11i64ToZigzagEl:
   72|  5.04k|constexpr inline uint64_t i64ToZigzag(const int64_t l) {
   73|  5.04k|  return (static_cast<uint64_t>(l) << 1) ^ static_cast<uint64_t>(l >> 63);
   74|  5.04k|}
_ZN7rocksdb14GetVarint32PtrEPKcS1_Pj:
  106|  49.0M|                                  uint32_t* value) {
  107|  49.0M|  if (p < limit) {
  ------------------
  |  Branch (107:7): [True: 49.0M, False: 22.5k]
  ------------------
  108|  49.0M|    uint32_t result = *(reinterpret_cast<const unsigned char*>(p));
  109|  49.0M|    if ((result & 128) == 0) {
  ------------------
  |  Branch (109:9): [True: 44.7M, False: 4.28M]
  ------------------
  110|  44.7M|      *value = result;
  111|  44.7M|      return p + 1;
  112|  44.7M|    }
  113|  49.0M|  }
  114|  4.30M|  return GetVarint32PtrFallback(p, limit, value);
  115|  49.0M|}
_ZN7rocksdb10PutFixed32EPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEj:
  129|   195k|inline void PutFixed32(std::string* dst, uint32_t value) {
  130|   195k|  if (port::kLittleEndian) {
  ------------------
  |  Branch (130:7): [Folded - Ignored]
  ------------------
  131|   195k|    dst->append(const_cast<const char*>(reinterpret_cast<char*>(&value)),
  132|   195k|                sizeof(value));
  133|   195k|  } else {
  134|      0|    char buf[sizeof(value)];
  135|      0|    EncodeFixed32(buf, value);
  136|      0|    dst->append(buf, sizeof(buf));
  137|      0|  }
  138|   195k|}
_ZN7rocksdb10PutFixed64EPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEm:
  140|   149M|inline void PutFixed64(std::string* dst, uint64_t value) {
  141|   149M|  if (port::kLittleEndian) {
  ------------------
  |  Branch (141:7): [Folded - Ignored]
  ------------------
  142|   149M|    dst->append(const_cast<const char*>(reinterpret_cast<char*>(&value)),
  143|   149M|                sizeof(value));
  144|   149M|  } else {
  145|      0|    char buf[sizeof(value)];
  146|      0|    EncodeFixed64(buf, value);
  147|      0|    dst->append(buf, sizeof(buf));
  148|      0|  }
  149|   149M|}
_ZN7rocksdb11PutVarint32EPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEj:
  151|  2.65M|inline void PutVarint32(std::string* dst, uint32_t v) {
  152|  2.65M|  char buf[5];
  153|  2.65M|  char* ptr = EncodeVarint32(buf, v);
  154|  2.65M|  dst->append(buf, static_cast<size_t>(ptr - buf));
  155|  2.65M|}
_ZN7rocksdb19PutVarint32Varint32EPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEjj:
  157|  17.7k|inline void PutVarint32Varint32(std::string* dst, uint32_t v1, uint32_t v2) {
  158|  17.7k|  char buf[10];
  159|  17.7k|  char* ptr = EncodeVarint32(buf, v1);
  160|  17.7k|  ptr = EncodeVarint32(ptr, v2);
  161|  17.7k|  dst->append(buf, static_cast<size_t>(ptr - buf));
  162|  17.7k|}
_ZN7rocksdb27PutVarint32Varint32Varint32EPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEjjj:
  165|   325k|                                        uint32_t v2, uint32_t v3) {
  166|   325k|  char buf[15];
  167|   325k|  char* ptr = EncodeVarint32(buf, v1);
  168|   325k|  ptr = EncodeVarint32(ptr, v2);
  169|   325k|  ptr = EncodeVarint32(ptr, v3);
  170|   325k|  dst->append(buf, static_cast<size_t>(ptr - buf));
  171|   325k|}
_ZN7rocksdb14EncodeVarint64EPcm:
  173|   266k|inline char* EncodeVarint64(char* dst, uint64_t v) {
  174|   266k|  static const unsigned int B = 128;
  175|   266k|  unsigned char* ptr = reinterpret_cast<unsigned char*>(dst);
  176|   374k|  while (v >= B) {
  ------------------
  |  Branch (176:10): [True: 107k, False: 266k]
  ------------------
  177|   107k|    *(ptr++) = (v & (B - 1)) | B;
  178|   107k|    v >>= 7;
  179|   107k|  }
  180|   266k|  *(ptr++) = static_cast<unsigned char>(v);
  181|   266k|  return reinterpret_cast<char*>(ptr);
  182|   266k|}
_ZN7rocksdb11PutVarint64EPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEm:
  184|   112k|inline void PutVarint64(std::string* dst, uint64_t v) {
  185|   112k|  char buf[kMaxVarint64Length];
  186|   112k|  char* ptr = EncodeVarint64(buf, v);
  187|   112k|  dst->append(buf, static_cast<size_t>(ptr - buf));
  188|   112k|}
_ZN7rocksdb17PutVarsignedint64EPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEl:
  190|  5.04k|inline void PutVarsignedint64(std::string* dst, int64_t v) {
  191|  5.04k|  char buf[kMaxVarint64Length];
  192|       |  // Using Zigzag format to convert signed to unsigned
  193|  5.04k|  char* ptr = EncodeVarint64(buf, i64ToZigzag(v));
  194|  5.04k|  dst->append(buf, static_cast<size_t>(ptr - buf));
  195|  5.04k|}
_ZN7rocksdb19PutVarint64Varint64EPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEmm:
  197|  25.2k|inline void PutVarint64Varint64(std::string* dst, uint64_t v1, uint64_t v2) {
  198|  25.2k|  char buf[20];
  199|  25.2k|  char* ptr = EncodeVarint64(buf, v1);
  200|  25.2k|  ptr = EncodeVarint64(ptr, v2);
  201|  25.2k|  dst->append(buf, static_cast<size_t>(ptr - buf));
  202|  25.2k|}
_ZN7rocksdb19PutVarint32Varint64EPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEjm:
  204|  99.2k|inline void PutVarint32Varint64(std::string* dst, uint32_t v1, uint64_t v2) {
  205|  99.2k|  char buf[15];
  206|  99.2k|  char* ptr = EncodeVarint32(buf, v1);
  207|  99.2k|  ptr = EncodeVarint64(ptr, v2);
  208|  99.2k|  dst->append(buf, static_cast<size_t>(ptr - buf));
  209|  99.2k|}
_ZN7rocksdb22PutLengthPrefixedSliceEPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_5SliceE:
  220|  2.59M|inline void PutLengthPrefixedSlice(std::string* dst, const Slice& value) {
  221|  2.59M|  PutVarint32(dst, static_cast<uint32_t>(value.size()));
  222|  2.59M|  dst->append(value.data(), value.size());
  223|  2.59M|}
_ZN7rocksdb12VarintLengthEm:
  247|  5.12M|inline int VarintLength(uint64_t v) {
  248|  5.12M|  int len = 1;
  249|  5.53M|  while (v >= 128) {
  ------------------
  |  Branch (249:10): [True: 415k, False: 5.12M]
  ------------------
  250|   415k|    v >>= 7;
  251|   415k|    len++;
  252|   415k|  }
  253|  5.12M|  return len;
  254|  5.12M|}
_ZN7rocksdb10GetFixed64EPNS_5SliceEPm:
  256|  4.48k|inline bool GetFixed64(Slice* input, uint64_t* value) {
  257|  4.48k|  if (input->size() < sizeof(uint64_t)) {
  ------------------
  |  Branch (257:7): [True: 0, False: 4.48k]
  ------------------
  258|      0|    return false;
  259|      0|  }
  260|  4.48k|  *value = DecodeFixed64(input->data());
  261|  4.48k|  input->remove_prefix(sizeof(uint64_t));
  262|  4.48k|  return true;
  263|  4.48k|}
_ZN7rocksdb10GetFixed32EPNS_5SliceEPj:
  265|  13.4k|inline bool GetFixed32(Slice* input, uint32_t* value) {
  266|  13.4k|  if (input->size() < sizeof(uint32_t)) {
  ------------------
  |  Branch (266:7): [True: 0, False: 13.4k]
  ------------------
  267|      0|    return false;
  268|      0|  }
  269|  13.4k|  *value = DecodeFixed32(input->data());
  270|  13.4k|  input->remove_prefix(sizeof(uint32_t));
  271|  13.4k|  return true;
  272|  13.4k|}
_ZN7rocksdb11GetVarint32EPNS_5SliceEPj:
  283|  10.2M|inline bool GetVarint32(Slice* input, uint32_t* value) {
  284|  10.2M|  const char* p = input->data();
  285|  10.2M|  const char* limit = p + input->size();
  286|  10.2M|  const char* q = GetVarint32Ptr(p, limit, value);
  287|  10.2M|  if (q == nullptr) {
  ------------------
  |  Branch (287:7): [True: 22.5k, False: 10.2M]
  ------------------
  288|  22.5k|    return false;
  289|  10.2M|  } else {
  290|  10.2M|    *input = Slice(q, static_cast<size_t>(limit - q));
  291|  10.2M|    return true;
  292|  10.2M|  }
  293|  10.2M|}
_ZN7rocksdb11GetVarint64EPNS_5SliceEPm:
  295|   167k|inline bool GetVarint64(Slice* input, uint64_t* value) {
  296|   167k|  const char* p = input->data();
  297|   167k|  const char* limit = p + input->size();
  298|   167k|  const char* q = GetVarint64Ptr(p, limit, value);
  299|   167k|  if (q == nullptr) {
  ------------------
  |  Branch (299:7): [True: 0, False: 167k]
  ------------------
  300|      0|    return false;
  301|   167k|  } else {
  302|   167k|    *input = Slice(q, static_cast<size_t>(limit - q));
  303|   167k|    return true;
  304|   167k|  }
  305|   167k|}
_ZN7rocksdb22GetLengthPrefixedSliceEPNS_5SliceES1_:
  319|  7.62M|inline bool GetLengthPrefixedSlice(Slice* input, Slice* result) {
  320|  7.62M|  uint32_t len = 0;
  321|  7.62M|  if (GetVarint32(input, &len) && input->size() >= len) {
  ------------------
  |  Branch (321:7): [True: 7.62M, False: 0]
  |  Branch (321:35): [True: 7.62M, False: 0]
  ------------------
  322|  7.62M|    *result = Slice(input->data(), len);
  323|  7.62M|    input->remove_prefix(len);
  324|  7.62M|    return true;
  325|  7.62M|  } else {
  326|      0|    return false;
  327|      0|  }
  328|  7.62M|}
_ZN7rocksdb22GetLengthPrefixedSliceEPKc:
  330|  38.5M|inline Slice GetLengthPrefixedSlice(const char* data) {
  331|  38.5M|  uint32_t len = 0;
  332|       |  // +5: we assume "data" is not corrupted
  333|       |  // unsigned char is 7 bits, uint32_t is 32 bits, need 5 unsigned char
  334|  38.5M|  auto p = GetVarint32Ptr(data, data + 5 /* limit */, &len);
  335|  38.5M|  return Slice(p, len);
  336|  38.5M|}
_ZN7rocksdb12PutUnalignedIlEEvPT_RKS1_:
  358|  9.02k|PutUnaligned(T* memory, const T& value) {
  359|       |#if defined(PLATFORM_UNALIGNED_ACCESS_NOT_ALLOWED)
  360|       |  char* nonAlignedMemory = reinterpret_cast<char*>(memory);
  361|       |  memcpy(nonAlignedMemory, reinterpret_cast<const char*>(&value), sizeof(T));
  362|       |#else
  363|  9.02k|  *memory = value;
  364|  9.02k|#endif
  365|  9.02k|}
_ZN7rocksdb12PutUnalignedImEEvPT_RKS1_:
  358|   532k|PutUnaligned(T* memory, const T& value) {
  359|       |#if defined(PLATFORM_UNALIGNED_ACCESS_NOT_ALLOWED)
  360|       |  char* nonAlignedMemory = reinterpret_cast<char*>(memory);
  361|       |  memcpy(nonAlignedMemory, reinterpret_cast<const char*>(&value), sizeof(T));
  362|       |#else
  363|   532k|  *memory = value;
  364|   532k|#endif
  365|   532k|}
_ZN7rocksdb12GetUnalignedIlEEvPKT_PS1_:
  376|  36.1k|GetUnaligned(const T* memory, T* value) {
  377|       |#if defined(PLATFORM_UNALIGNED_ACCESS_NOT_ALLOWED)
  378|       |  char* nonAlignedMemory = reinterpret_cast<char*>(value);
  379|       |  memcpy(nonAlignedMemory, reinterpret_cast<const char*>(memory), sizeof(T));
  380|       |#else
  381|  36.1k|  *value = *memory;
  382|  36.1k|#endif
  383|  36.1k|}
_ZN7rocksdb12GetUnalignedImEEvPKT_PS1_:
  376|  2.06M|GetUnaligned(const T* memory, T* value) {
  377|       |#if defined(PLATFORM_UNALIGNED_ACCESS_NOT_ALLOWED)
  378|       |  char* nonAlignedMemory = reinterpret_cast<char*>(value);
  379|       |  memcpy(nonAlignedMemory, reinterpret_cast<const char*>(memory), sizeof(T));
  380|       |#else
  381|  2.06M|  *value = *memory;
  382|  2.06M|#endif
  383|  2.06M|}

_ZN7rocksdb13EncodeFixed32EPcj:
   33|  2.83M|inline void EncodeFixed32(char* buf, uint32_t value) {
   34|  2.83M|  if (port::kLittleEndian) {
  ------------------
  |  Branch (34:7): [Folded - Ignored]
  ------------------
   35|  2.83M|    memcpy(buf, &value, sizeof(value));
   36|  2.83M|  } else {
   37|      0|    buf[0] = value & 0xff;
   38|      0|    buf[1] = (value >> 8) & 0xff;
   39|      0|    buf[2] = (value >> 16) & 0xff;
   40|      0|    buf[3] = (value >> 24) & 0xff;
   41|      0|  }
   42|  2.83M|}
_ZN7rocksdb13EncodeFixed64EPcm:
   44|  5.99M|inline void EncodeFixed64(char* buf, uint64_t value) {
   45|  5.99M|  if (port::kLittleEndian) {
  ------------------
  |  Branch (45:7): [Folded - Ignored]
  ------------------
   46|  5.99M|    memcpy(buf, &value, sizeof(value));
   47|  5.99M|  } else {
   48|      0|    buf[0] = value & 0xff;
   49|      0|    buf[1] = (value >> 8) & 0xff;
   50|      0|    buf[2] = (value >> 16) & 0xff;
   51|      0|    buf[3] = (value >> 24) & 0xff;
   52|      0|    buf[4] = (value >> 32) & 0xff;
   53|      0|    buf[5] = (value >> 40) & 0xff;
   54|      0|    buf[6] = (value >> 48) & 0xff;
   55|      0|    buf[7] = (value >> 56) & 0xff;
   56|      0|  }
   57|  5.99M|}
_ZN7rocksdb13DecodeFixed32EPKc:
   74|  11.9M|inline uint32_t DecodeFixed32(const char* ptr) {
   75|  11.9M|  if (port::kLittleEndian) {
  ------------------
  |  Branch (75:7): [Folded - Ignored]
  ------------------
   76|       |    // Load the raw bytes
   77|  11.9M|    uint32_t result;
   78|  11.9M|    memcpy(&result, ptr, sizeof(result));  // gcc optimizes this to a plain load
   79|  11.9M|    return result;
   80|  11.9M|  } else {
   81|      0|    return ((static_cast<uint32_t>(static_cast<unsigned char>(ptr[0]))) |
   82|      0|            (static_cast<uint32_t>(static_cast<unsigned char>(ptr[1])) << 8) |
   83|      0|            (static_cast<uint32_t>(static_cast<unsigned char>(ptr[2])) << 16) |
   84|      0|            (static_cast<uint32_t>(static_cast<unsigned char>(ptr[3])) << 24));
   85|      0|  }
   86|  11.9M|}
_ZN7rocksdb13DecodeFixed64EPKc:
   88|   139M|inline uint64_t DecodeFixed64(const char* ptr) {
   89|   139M|  if (port::kLittleEndian) {
  ------------------
  |  Branch (89:7): [Folded - Ignored]
  ------------------
   90|       |    // Load the raw bytes
   91|   139M|    uint64_t result;
   92|   139M|    memcpy(&result, ptr, sizeof(result));  // gcc optimizes this to a plain load
   93|   139M|    return result;
   94|   139M|  } else {
   95|      0|    uint64_t lo = DecodeFixed32(ptr);
   96|      0|    uint64_t hi = DecodeFixed32(ptr + 4);
   97|      0|    return (hi << 32) | lo;
   98|      0|  }
   99|   139M|}

_ZN7rocksdb18BytewiseComparatorEv:
  322|   251k|const Comparator* BytewiseComparator() {
  323|   251k|  STATIC_AVOID_DESTRUCTION(BytewiseComparatorImpl, bytewise);
  ------------------
  |  |   53|   251k|#define STATIC_AVOID_DESTRUCTION(Type, name) static Type& name = *new Type
  ------------------
  324|   251k|  return &bytewise;
  325|   251k|}
_ZN7rocksdb10Comparator16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPPKS0_:
  398|  9.02k|                                    const Comparator** result) {
  399|  9.02k|  static std::once_flag once;
  400|  9.02k|  std::call_once(once, [&]() {
  401|  9.02k|    RegisterBuiltinComparators(*(ObjectLibrary::Default().get()), "");
  402|  9.02k|  });
  403|  9.02k|  std::string id;
  404|  9.02k|  std::unordered_map<std::string, std::string> opt_map;
  405|  9.02k|  Status status = Customizable::GetOptionsMap(config_options, *result, value,
  406|  9.02k|                                              &id, &opt_map);
  407|  9.02k|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (407:7): [True: 0, False: 9.02k]
  ------------------
  408|      0|    return status;
  409|      0|  }
  410|  9.02k|  if (id == BytewiseComparatorImpl::kClassName()) {
  ------------------
  |  Branch (410:7): [True: 9.02k, False: 0]
  ------------------
  411|  9.02k|    *result = BytewiseComparator();
  412|  9.02k|  } else if (id == ReverseBytewiseComparatorImpl::kClassName()) {
  ------------------
  |  Branch (412:14): [True: 0, False: 0]
  ------------------
  413|      0|    *result = ReverseBytewiseComparator();
  414|      0|  } else if (id ==
  ------------------
  |  Branch (414:14): [True: 0, False: 0]
  ------------------
  415|      0|             ComparatorWithU64TsImpl<BytewiseComparatorImpl>::kClassName()) {
  416|      0|    *result = BytewiseComparatorWithU64Ts();
  417|      0|  } else if (id == ComparatorWithU64TsImpl<
  ------------------
  |  Branch (417:14): [True: 0, False: 0]
  ------------------
  418|      0|                       ReverseBytewiseComparatorImpl>::kClassName()) {
  419|      0|    *result = ReverseBytewiseComparatorWithU64Ts();
  420|      0|  } else if (value.empty()) {
  ------------------
  |  Branch (420:14): [True: 0, False: 0]
  ------------------
  421|       |    // No Id and no options.  Clear the object
  422|      0|    *result = nullptr;
  423|      0|    return Status::OK();
  424|      0|  } else if (id.empty()) {  // We have no Id but have options.  Not good
  ------------------
  |  Branch (424:14): [True: 0, False: 0]
  ------------------
  425|      0|    return Status::NotSupported("Cannot reset object ", id);
  426|      0|  } else {
  427|      0|    status = config_options.registry->NewStaticObject(id, result);
  428|      0|    if (!status.ok()) {
  ------------------
  |  Branch (428:9): [True: 0, False: 0]
  ------------------
  429|      0|      if (config_options.ignore_unsupported_options &&
  ------------------
  |  Branch (429:11): [True: 0, False: 0]
  ------------------
  430|      0|          status.IsNotSupported()) {
  ------------------
  |  Branch (430:11): [True: 0, False: 0]
  ------------------
  431|      0|        return Status::OK();
  432|      0|      } else {
  433|      0|        return status;
  434|      0|      }
  435|      0|    } else {
  436|      0|      Comparator* comparator = const_cast<Comparator*>(*result);
  437|      0|      status =
  438|      0|          Customizable::ConfigureNewObject(config_options, comparator, opt_map);
  439|      0|    }
  440|      0|  }
  441|  9.02k|  return status;
  442|  9.02k|}
comparator.cc:_ZN7rocksdb12_GLOBAL__N_122BytewiseComparatorImplC2Ev:
   32|      1|  BytewiseComparatorImpl() = default;
comparator.cc:_ZNK7rocksdb12_GLOBAL__N_122BytewiseComparatorImpl4NameEv:
   34|  63.1k|  const char* Name() const override { return kClassName(); }
comparator.cc:_ZNK7rocksdb12_GLOBAL__N_122BytewiseComparatorImpl21FindShortestSeparatorEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKNS_5SliceE:
   43|  5.04k|                             const Slice& limit) const override {
   44|       |    // Find length of common prefix
   45|  5.04k|    size_t min_length = std::min(start->size(), limit.size());
   46|  5.04k|    size_t diff_index = 0;
   47|  3.05M|    while ((diff_index < min_length) &&
  ------------------
  |  Branch (47:12): [True: 3.05M, False: 210]
  ------------------
   48|  3.05M|           ((*start)[diff_index] == limit[diff_index])) {
  ------------------
  |  Branch (48:12): [True: 3.04M, False: 4.83k]
  ------------------
   49|  3.04M|      diff_index++;
   50|  3.04M|    }
   51|       |
   52|  5.04k|    if (diff_index >= min_length) {
  ------------------
  |  Branch (52:9): [True: 210, False: 4.83k]
  ------------------
   53|       |      // Do not shorten if one string is a prefix of the other
   54|  4.83k|    } else {
   55|  4.83k|      uint8_t start_byte = static_cast<uint8_t>((*start)[diff_index]);
   56|  4.83k|      uint8_t limit_byte = static_cast<uint8_t>(limit[diff_index]);
   57|  4.83k|      if (start_byte >= limit_byte) {
  ------------------
  |  Branch (57:11): [True: 0, False: 4.83k]
  ------------------
   58|       |        // Cannot shorten since limit is smaller than start or start is
   59|       |        // already the shortest possible.
   60|      0|        return;
   61|      0|      }
   62|  4.83k|      assert(start_byte < limit_byte);
   63|       |
   64|  4.83k|      if (diff_index < limit.size() - 1 || start_byte + 1 < limit_byte) {
  ------------------
  |  Branch (64:11): [True: 4.46k, False: 369]
  |  Branch (64:44): [True: 270, False: 99]
  ------------------
   65|  4.73k|        (*start)[diff_index]++;
   66|  4.73k|        start->resize(diff_index + 1);
   67|  4.73k|      } else {
   68|       |        //     v
   69|       |        // A A 1 A A A
   70|       |        // A A 2
   71|       |        //
   72|       |        // Incrementing the current byte will make start bigger than limit, we
   73|       |        // will skip this byte, and find the first non 0xFF byte in start and
   74|       |        // increment it.
   75|     99|        diff_index++;
   76|       |
   77|  1.37k|        while (diff_index < start->size()) {
  ------------------
  |  Branch (77:16): [True: 1.36k, False: 10]
  ------------------
   78|       |          // Keep moving until we find the first non 0xFF byte to
   79|       |          // increment it
   80|  1.36k|          if (static_cast<uint8_t>((*start)[diff_index]) <
  ------------------
  |  Branch (80:15): [True: 89, False: 1.27k]
  ------------------
   81|  1.36k|              static_cast<uint8_t>(0xff)) {
   82|     89|            (*start)[diff_index]++;
   83|     89|            start->resize(diff_index + 1);
   84|     89|            break;
   85|     89|          }
   86|  1.27k|          diff_index++;
   87|  1.27k|        }
   88|     99|      }
   89|  4.83k|      assert(Compare(*start, limit) < 0);
   90|  4.83k|    }
   91|  5.04k|  }
comparator.cc:_ZNK7rocksdb12_GLOBAL__N_122BytewiseComparatorImpl39CanKeysWithDifferentByteContentsBeEqualEv:
  135|  4.48k|  bool CanKeysWithDifferentByteContentsBeEqual() const override {
  136|  4.48k|    return false;
  137|  4.48k|  }
comparator.cc:_ZNK7rocksdb12_GLOBAL__N_122BytewiseComparatorImpl23CompareWithoutTimestampERKNS_5SliceEbS4_b:
  141|  77.7M|                              bool /*b_has_ts*/) const override {
  142|  77.7M|    return a.compare(b);
  143|  77.7M|  }
comparator.cc:_ZNK7rocksdb12_GLOBAL__N_122BytewiseComparatorImpl21EqualWithoutTimestampERKNS_5SliceES4_:
  145|   842k|  bool EqualWithoutTimestamp(const Slice& a, const Slice& b) const override {
  146|   842k|    return a == b;
  147|   842k|  }
comparator.cc:_ZNK7rocksdb12_GLOBAL__N_122BytewiseComparatorImpl7CompareERKNS_5SliceES4_:
   36|  1.28G|  int Compare(const Slice& a, const Slice& b) const override {
   37|  1.28G|    return a.compare(b);
   38|  1.28G|  }
comparator.cc:_ZN7rocksdb12_GLOBAL__N_122BytewiseComparatorImpl10kClassNameEv:
   33|  72.1k|  static const char* kClassName() { return "leveldb.BytewiseComparator"; }
comparator.cc:_ZN7rocksdb12_GLOBAL__N_129ReverseBytewiseComparatorImpl10kClassNameEv:
  154|      2|  static const char* kClassName() {
  155|      2|    return "rocksdb.ReverseBytewiseComparator";
  156|      2|  }
comparator.cc:_ZN7rocksdb12_GLOBAL__N_123ComparatorWithU64TsImplINS0_22BytewiseComparatorImplEE10kClassNameEv:
  247|      1|  static const char* kClassName() {
  248|      1|    static std::string class_name = kClassNameInternal();
  249|      1|    return class_name.c_str();
  250|      1|  }
comparator.cc:_ZN7rocksdb12_GLOBAL__N_123ComparatorWithU64TsImplINS0_22BytewiseComparatorImplEE18kClassNameInternalEv:
  311|      1|  static std::string kClassNameInternal() {
  312|      1|    std::stringstream ss;
  313|      1|    ss << TComparator::kClassName() << ".u64ts";
  314|      1|    return ss.str();
  315|      1|  }
comparator.cc:_ZN7rocksdb12_GLOBAL__N_123ComparatorWithU64TsImplINS0_29ReverseBytewiseComparatorImplEE10kClassNameEv:
  247|      1|  static const char* kClassName() {
  248|      1|    static std::string class_name = kClassNameInternal();
  249|      1|    return class_name.c_str();
  250|      1|  }
comparator.cc:_ZN7rocksdb12_GLOBAL__N_123ComparatorWithU64TsImplINS0_29ReverseBytewiseComparatorImplEE18kClassNameInternalEv:
  311|      1|  static std::string kClassNameInternal() {
  312|      1|    std::stringstream ss;
  313|      1|    ss << TComparator::kClassName() << ".u64ts";
  314|      1|    return ss.str();
  315|      1|  }
comparator.cc:_ZZN7rocksdb10Comparator16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPPKS0_ENK3$_0clEv:
  400|      1|  std::call_once(once, [&]() {
  401|      1|    RegisterBuiltinComparators(*(ObjectLibrary::Default().get()), "");
  402|      1|  });
comparator.cc:_ZN7rocksdbL26RegisterBuiltinComparatorsERNS_13ObjectLibraryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  370|      1|                                      const std::string& /*arg*/) {
  371|      1|  library.AddFactory<const Comparator>(
  372|      1|      BytewiseComparatorImpl::kClassName(),
  373|      1|      [](const std::string& /*uri*/,
  374|      1|         std::unique_ptr<const Comparator>* /*guard*/,
  375|      1|         std::string* /*errmsg*/) { return BytewiseComparator(); });
  376|      1|  library.AddFactory<const Comparator>(
  377|      1|      ReverseBytewiseComparatorImpl::kClassName(),
  378|      1|      [](const std::string& /*uri*/,
  379|      1|         std::unique_ptr<const Comparator>* /*guard*/,
  380|      1|         std::string* /*errmsg*/) { return ReverseBytewiseComparator(); });
  381|      1|  library.AddFactory<const Comparator>(
  382|      1|      ComparatorWithU64TsImpl<BytewiseComparatorImpl>::kClassName(),
  383|      1|      [](const std::string& /*uri*/,
  384|      1|         std::unique_ptr<const Comparator>* /*guard*/,
  385|      1|         std::string* /*errmsg*/) { return BytewiseComparatorWithU64Ts(); });
  386|      1|  library.AddFactory<const Comparator>(
  387|      1|      ComparatorWithU64TsImpl<ReverseBytewiseComparatorImpl>::kClassName(),
  388|      1|      [](const std::string& /*uri*/,
  389|      1|         std::unique_ptr<const Comparator>* /*guard*/,
  390|      1|         std::string* /*errmsg*/) {
  391|      1|        return ReverseBytewiseComparatorWithU64Ts();
  392|      1|      });
  393|      1|  return 4;
  394|      1|}

_ZN7rocksdb24ZSTDUncompressCachedDataC2Ev:
  142|     32|  ZSTDUncompressCachedData() {}
_ZN7rocksdb17UncompressionDict12GetEmptyDictEv:
  340|  25.2k|  static const UncompressionDict& GetEmptyDict() {
  341|  25.2k|    static UncompressionDict empty_dict{};
  342|  25.2k|    return empty_dict;
  343|  25.2k|  }
_ZN7rocksdb17UncompressionDictC2Ev:
  362|      1|  UncompressionDict() = default;
_ZN7rocksdb17UncompressionDictD2Ev:
  295|      1|  ~UncompressionDict() {
  296|       |#ifdef ROCKSDB_ZSTD_DDICT
  297|       |    size_t res = 0;
  298|       |    if (zstd_ddict_ != nullptr) {
  299|       |      res = ZSTD_freeDDict(zstd_ddict_);
  300|       |    }
  301|       |    assert(res == 0);  // Last I checked they can't fail
  302|       |    (void)res;         // prevent unused var warning
  303|       |#endif                 // ROCKSDB_ZSTD_DDICT
  304|      1|  }
_ZN7rocksdb18CompressionContextC2ENS_15CompressionTypeERKNS_18CompressionOptionsE:
  432|  4.48k|                              const CompressionOptions& options) {
  433|  4.48k|    CreateNativeContext(type, options.level, options.checksum);
  434|  4.48k|  }
_ZN7rocksdb18CompressionContext19CreateNativeContextENS_15CompressionTypeEib:
  427|  4.48k|                           bool /* checksum */) {}
_ZN7rocksdb15CompressionDict12GetEmptyDictEv:
  216|  13.3k|  static const CompressionDict& GetEmptyDict() {
  217|  13.3k|    static CompressionDict empty_dict{};
  218|  13.3k|    return empty_dict;
  219|  13.3k|  }
_ZN7rocksdb15CompressionDictC2Ev:
  221|      1|  CompressionDict() = default;
_ZN7rocksdb15CompressionDictD2Ev:
  199|      1|  ~CompressionDict() {
  200|       |#if ZSTD_VERSION_NUMBER >= 700
  201|       |    size_t res = 0;
  202|       |    if (zstd_cdict_ != nullptr) {
  203|       |      res = ZSTD_freeCDict(zstd_cdict_);
  204|       |    }
  205|       |    assert(res == 0);  // Last I checked they can't fail
  206|       |    (void)res;         // prevent unused var warning
  207|       |#endif                 // ZSTD_VERSION_NUMBER >= 700
  208|      1|  }
_ZN7rocksdb15CompressionInfoC2ERKNS_18CompressionOptionsERKNS_18CompressionContextERKNS_15CompressionDictENS_15CompressionTypeEm:
  456|  13.3k|        sample_for_compression_(_sample_for_compression) {}
_ZNK7rocksdb15CompressionInfo4typeEv:
  461|  13.3k|  CompressionType type() const { return type_; }
_ZNK7rocksdb15CompressionInfo7optionsEv:
  458|  13.3k|  const CompressionOptions& options() const { return opts_; }
_ZN7rocksdb18CompressionContextD2Ev:
  435|  4.48k|  ~CompressionContext() { DestroyNativeContext(); }
_ZN7rocksdb18CompressionContext20DestroyNativeContextEv:
  428|  4.48k|  void DestroyNativeContext() {}
_ZN7rocksdb23CompressionTypeToStringENS_15CompressionTypeE:
  647|  35.9k|inline std::string CompressionTypeToString(CompressionType compression_type) {
  648|  35.9k|  switch (compression_type) {
  649|  27.0k|    case kNoCompression:
  ------------------
  |  Branch (649:5): [True: 27.0k, False: 8.96k]
  ------------------
  650|  27.0k|      return "NoCompression";
  651|      0|    case kSnappyCompression:
  ------------------
  |  Branch (651:5): [True: 0, False: 35.9k]
  ------------------
  652|      0|      return "Snappy";
  653|      0|    case kZlibCompression:
  ------------------
  |  Branch (653:5): [True: 0, False: 35.9k]
  ------------------
  654|      0|      return "Zlib";
  655|      0|    case kBZip2Compression:
  ------------------
  |  Branch (655:5): [True: 0, False: 35.9k]
  ------------------
  656|      0|      return "BZip2";
  657|      0|    case kLZ4Compression:
  ------------------
  |  Branch (657:5): [True: 0, False: 35.9k]
  ------------------
  658|      0|      return "LZ4";
  659|      0|    case kLZ4HCCompression:
  ------------------
  |  Branch (659:5): [True: 0, False: 35.9k]
  ------------------
  660|      0|      return "LZ4HC";
  661|      0|    case kXpressCompression:
  ------------------
  |  Branch (661:5): [True: 0, False: 35.9k]
  ------------------
  662|      0|      return "Xpress";
  663|  4.48k|    case kZSTD:
  ------------------
  |  Branch (663:5): [True: 4.48k, False: 31.5k]
  ------------------
  664|  4.48k|      return "ZSTD";
  665|  4.48k|    case kZSTDNotFinalCompression:
  ------------------
  |  Branch (665:5): [True: 4.48k, False: 31.5k]
  ------------------
  666|  4.48k|      return "ZSTDNotFinal";
  667|      0|    case kDisableCompressionOption:
  ------------------
  |  Branch (667:5): [True: 0, False: 35.9k]
  ------------------
  668|      0|      return "DisableOption";
  669|      0|    default:
  ------------------
  |  Branch (669:5): [True: 0, False: 35.9k]
  ------------------
  670|      0|      assert(false);
  671|      0|      return "";
  672|  35.9k|  }
  673|  35.9k|}
_ZN7rocksdb26CompressionOptionsToStringERNS_18CompressionOptionsE:
  676|  4.48k|    CompressionOptions& compression_options) {
  677|  4.48k|  std::string result;
  678|  4.48k|  result.reserve(512);
  679|  4.48k|  result.append("window_bits=")
  680|  4.48k|      .append(std::to_string(compression_options.window_bits))
  681|  4.48k|      .append("; ");
  682|  4.48k|  result.append("level=")
  683|  4.48k|      .append(std::to_string(compression_options.level))
  684|  4.48k|      .append("; ");
  685|  4.48k|  result.append("strategy=")
  686|  4.48k|      .append(std::to_string(compression_options.strategy))
  687|  4.48k|      .append("; ");
  688|  4.48k|  result.append("max_dict_bytes=")
  689|  4.48k|      .append(std::to_string(compression_options.max_dict_bytes))
  690|  4.48k|      .append("; ");
  691|  4.48k|  result.append("zstd_max_train_bytes=")
  692|  4.48k|      .append(std::to_string(compression_options.zstd_max_train_bytes))
  693|  4.48k|      .append("; ");
  694|  4.48k|  result.append("enabled=")
  695|  4.48k|      .append(std::to_string(compression_options.enabled))
  696|  4.48k|      .append("; ");
  697|  4.48k|  result.append("max_dict_buffer_bytes=")
  698|  4.48k|      .append(std::to_string(compression_options.max_dict_buffer_bytes))
  699|  4.48k|      .append("; ");
  700|  4.48k|  result.append("use_zstd_dict_trainer=")
  701|  4.48k|      .append(std::to_string(compression_options.use_zstd_dict_trainer))
  702|  4.48k|      .append("; ");
  703|  4.48k|  return result;
  704|  4.48k|}
_ZNK7rocksdb15CompressionInfo20SampleForCompressionEv:
  462|  8.85k|  uint64_t SampleForCompression() const { return sample_for_compression_; }
_ZN7rocksdb16Snappy_SupportedEv:
  507|   148k|inline bool Snappy_Supported() {
  508|       |#ifdef SNAPPY
  509|       |  return true;
  510|       |#else
  511|   148k|  return false;
  512|   148k|#endif
  513|   148k|}
_ZN7rocksdb14Zlib_SupportedEv:
  515|  9.02k|inline bool Zlib_Supported() {
  516|  9.02k|#ifdef ZLIB
  517|  9.02k|  return true;
  518|       |#else
  519|       |  return false;
  520|       |#endif
  521|  9.02k|}
_ZN7rocksdb15BZip2_SupportedEv:
  523|  9.02k|inline bool BZip2_Supported() {
  524|  9.02k|#ifdef BZIP2
  525|  9.02k|  return true;
  526|       |#else
  527|       |  return false;
  528|       |#endif
  529|  9.02k|}
_ZN7rocksdb13LZ4_SupportedEv:
  531|  18.0k|inline bool LZ4_Supported() {
  532|       |#ifdef LZ4
  533|       |  return true;
  534|       |#else
  535|  18.0k|  return false;
  536|  18.0k|#endif
  537|  18.0k|}
_ZN7rocksdb16XPRESS_SupportedEv:
  539|  9.02k|inline bool XPRESS_Supported() {
  540|       |#ifdef XPRESS
  541|       |  return true;
  542|       |#else
  543|  9.02k|  return false;
  544|  9.02k|#endif
  545|  9.02k|}
_ZN7rocksdb14ZSTD_SupportedEv:
  547|  9.02k|inline bool ZSTD_Supported() {
  548|       |#ifdef ZSTD
  549|       |  // ZSTD format is finalized since version 0.8.0.
  550|       |  return (ZSTD_versionNumber() >= 800);
  551|       |#else
  552|  9.02k|  return false;
  553|  9.02k|#endif
  554|  9.02k|}
_ZN7rocksdb22ZSTDNotFinal_SupportedEv:
  556|  9.02k|inline bool ZSTDNotFinal_Supported() {
  557|       |#ifdef ZSTD
  558|       |  return true;
  559|       |#else
  560|  9.02k|  return false;
  561|  9.02k|#endif
  562|  9.02k|}
_ZN7rocksdb33StreamingCompressionTypeSupportedENS_15CompressionTypeE:
  573|  13.5k|    CompressionType compression_type) {
  574|  13.5k|  switch (compression_type) {
  575|  13.5k|    case kNoCompression:
  ------------------
  |  Branch (575:5): [True: 13.5k, False: 0]
  ------------------
  576|  13.5k|      return true;
  577|      0|    case kZSTD:
  ------------------
  |  Branch (577:5): [True: 0, False: 13.5k]
  ------------------
  578|      0|      return ZSTD_Streaming_Supported();
  579|      0|    default:
  ------------------
  |  Branch (579:5): [True: 0, False: 13.5k]
  ------------------
  580|      0|      return false;
  581|  13.5k|  }
  582|  13.5k|}
_ZN7rocksdb24CompressionTypeSupportedENS_15CompressionTypeE:
  584|  90.2k|inline bool CompressionTypeSupported(CompressionType compression_type) {
  585|  90.2k|  switch (compression_type) {
  586|  18.0k|    case kNoCompression:
  ------------------
  |  Branch (586:5): [True: 18.0k, False: 72.2k]
  ------------------
  587|  18.0k|      return true;
  588|  9.02k|    case kSnappyCompression:
  ------------------
  |  Branch (588:5): [True: 9.02k, False: 81.2k]
  ------------------
  589|  9.02k|      return Snappy_Supported();
  590|  9.02k|    case kZlibCompression:
  ------------------
  |  Branch (590:5): [True: 9.02k, False: 81.2k]
  ------------------
  591|  9.02k|      return Zlib_Supported();
  592|  9.02k|    case kBZip2Compression:
  ------------------
  |  Branch (592:5): [True: 9.02k, False: 81.2k]
  ------------------
  593|  9.02k|      return BZip2_Supported();
  594|  9.02k|    case kLZ4Compression:
  ------------------
  |  Branch (594:5): [True: 9.02k, False: 81.2k]
  ------------------
  595|  9.02k|      return LZ4_Supported();
  596|  9.02k|    case kLZ4HCCompression:
  ------------------
  |  Branch (596:5): [True: 9.02k, False: 81.2k]
  ------------------
  597|  9.02k|      return LZ4_Supported();
  598|  9.02k|    case kXpressCompression:
  ------------------
  |  Branch (598:5): [True: 9.02k, False: 81.2k]
  ------------------
  599|  9.02k|      return XPRESS_Supported();
  600|  9.02k|    case kZSTDNotFinalCompression:
  ------------------
  |  Branch (600:5): [True: 9.02k, False: 81.2k]
  ------------------
  601|  9.02k|      return ZSTDNotFinal_Supported();
  602|  9.02k|    case kZSTD:
  ------------------
  |  Branch (602:5): [True: 9.02k, False: 81.2k]
  ------------------
  603|  9.02k|      return ZSTD_Supported();
  604|      0|    default:
  ------------------
  |  Branch (604:5): [True: 0, False: 90.2k]
  ------------------
  605|      0|      assert(false);
  606|      0|      return false;
  607|  90.2k|  }
  608|  90.2k|}

_ZN7rocksdb23CompressionContextCacheC2Ev:
   86|      1|CompressionContextCache::CompressionContextCache() : rep_(new Rep()) {}
_ZN7rocksdb23CompressionContextCache8InstanceEv:
   88|   361k|CompressionContextCache* CompressionContextCache::Instance() {
   89|   361k|  static CompressionContextCache instance;
   90|   361k|  return &instance;
   91|   361k|}
_ZN7rocksdb23CompressionContextCache13InitSingletonEv:
   93|   361k|void CompressionContextCache::InitSingleton() { Instance(); }
_ZN7rocksdb23CompressionContextCacheD2Ev:
  104|      1|CompressionContextCache::~CompressionContextCache() { delete rep_; }
_ZN7rocksdb23CompressionContextCache3RepC2Ev:
   70|      1|  Rep() = default;
_ZN7rocksdb17compression_cache14ZSTDCachedDataC2Ev:
   37|     32|  ZSTDCachedData() : zstd_uncomp_sentinel_(&uncomp_cached_data_) {}

_ZNK7rocksdb14CoreLocalArrayINS_15ConcurrentArena5ShardEE12AccessAtCoreEm:
   80|  2.58M|T* CoreLocalArray<T>::AccessAtCore(size_t core_idx) const {
   81|  2.58M|  assert(core_idx < static_cast<size_t>(1) << size_shift_);
   82|  2.58M|  return &data_[core_idx];
   83|  2.58M|}
_ZN7rocksdb14CoreLocalArrayINSt3__110shared_ptrINS_33FragmentedRangeTombstoneListCacheEEEEC2Ev:
   46|  13.5k|CoreLocalArray<T>::CoreLocalArray() {
   47|  13.5k|  int num_cpus = static_cast<int>(std::thread::hardware_concurrency());
   48|       |  // find a power of two >= num_cpus and >= 8
   49|  13.5k|  size_shift_ = 3;
   50|  40.5k|  while (1 << size_shift_ < num_cpus) {
  ------------------
  |  Branch (50:10): [True: 27.0k, False: 13.5k]
  ------------------
   51|  27.0k|    ++size_shift_;
   52|  27.0k|  }
   53|  13.5k|  data_.reset(new T[static_cast<size_t>(1) << size_shift_]);
   54|  13.5k|}
_ZNK7rocksdb14CoreLocalArrayINSt3__110shared_ptrINS_33FragmentedRangeTombstoneListCacheEEEE4SizeEv:
   57|   855k|size_t CoreLocalArray<T>::Size() const {
   58|   855k|  return static_cast<size_t>(1) << size_shift_;
   59|   855k|}
_ZNK7rocksdb14CoreLocalArrayINSt3__110shared_ptrINS_33FragmentedRangeTombstoneListCacheEEEE12AccessAtCoreEm:
   80|  27.3M|T* CoreLocalArray<T>::AccessAtCore(size_t core_idx) const {
   81|  27.3M|  assert(core_idx < static_cast<size_t>(1) << size_shift_);
   82|  27.3M|  return &data_[core_idx];
   83|  27.3M|}
_ZNK7rocksdb14CoreLocalArrayINSt3__110shared_ptrINS_33FragmentedRangeTombstoneListCacheEEEE6AccessEv:
   62|  2.90k|T* CoreLocalArray<T>::Access() const {
   63|  2.90k|  return AccessElementAndIndex().first;
   64|  2.90k|}
_ZNK7rocksdb14CoreLocalArrayINSt3__110shared_ptrINS_33FragmentedRangeTombstoneListCacheEEEE21AccessElementAndIndexEv:
   67|  2.90k|std::pair<T*, size_t> CoreLocalArray<T>::AccessElementAndIndex() const {
   68|  2.90k|  int cpuid = port::PhysicalCoreID();
   69|  2.90k|  size_t core_idx;
   70|  2.90k|  if (UNLIKELY(cpuid < 0)) {
  ------------------
  |  |   14|  2.90k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 2.90k]
  |  |  ------------------
  ------------------
   71|       |    // cpu id unavailable, just pick randomly
   72|      0|    core_idx = Random::GetTLSInstance()->Uniform(1 << size_shift_);
   73|  2.90k|  } else {
   74|  2.90k|    core_idx = static_cast<size_t>(BottomNBits(cpuid, size_shift_));
   75|  2.90k|  }
   76|  2.90k|  return {AccessAtCore(core_idx), core_idx};
   77|  2.90k|}
_ZN7rocksdb14CoreLocalArrayINS_15ConcurrentArena5ShardEEC2Ev:
   46|  13.5k|CoreLocalArray<T>::CoreLocalArray() {
   47|  13.5k|  int num_cpus = static_cast<int>(std::thread::hardware_concurrency());
   48|       |  // find a power of two >= num_cpus and >= 8
   49|  13.5k|  size_shift_ = 3;
   50|  40.5k|  while (1 << size_shift_ < num_cpus) {
  ------------------
  |  Branch (50:10): [True: 27.0k, False: 13.5k]
  ------------------
   51|  27.0k|    ++size_shift_;
   52|  27.0k|  }
   53|  13.5k|  data_.reset(new T[static_cast<size_t>(1) << size_shift_]);
   54|  13.5k|}
_ZN7rocksdb14CoreLocalArrayINS_17compression_cache14ZSTDCachedDataEEC2Ev:
   46|      1|CoreLocalArray<T>::CoreLocalArray() {
   47|      1|  int num_cpus = static_cast<int>(std::thread::hardware_concurrency());
   48|       |  // find a power of two >= num_cpus and >= 8
   49|      1|  size_shift_ = 3;
   50|      3|  while (1 << size_shift_ < num_cpus) {
  ------------------
  |  Branch (50:10): [True: 2, False: 1]
  ------------------
   51|      2|    ++size_shift_;
   52|      2|  }
   53|      1|  data_.reset(new T[static_cast<size_t>(1) << size_shift_]);
   54|      1|}

_ZN7rocksdb6crc32c20IsFastCrc32SupportedEv:
  362|  9.02k|std::string IsFastCrc32Supported() {
  363|  9.02k|  bool has_fast_crc = false;
  364|  9.02k|  std::string fast_zero_msg;
  365|  9.02k|  std::string arch;
  366|       |#ifdef HAVE_POWER8
  367|       |#ifdef HAS_ALTIVEC
  368|       |  if (arch_ppc_probe()) {
  369|       |    has_fast_crc = true;
  370|       |    arch = "PPC";
  371|       |  }
  372|       |#else
  373|       |  has_fast_crc = false;
  374|       |  arch = "PPC";
  375|       |#endif
  376|       |#elif defined(HAVE_ARM64_CRC)
  377|       |  if (crc32c_runtime_check()) {
  378|       |    has_fast_crc = true;
  379|       |    arch = "Arm64";
  380|       |    pmull_runtime_flag = crc32c_pmull_runtime_check();
  381|       |  } else {
  382|       |    has_fast_crc = false;
  383|       |    arch = "Arm64";
  384|       |  }
  385|       |#else
  386|  9.02k|#ifdef __SSE4_2__
  387|  9.02k|  has_fast_crc = true;
  388|  9.02k|#endif  // __SSE4_2__
  389|  9.02k|  arch = "x86";
  390|  9.02k|#endif
  391|  9.02k|  if (has_fast_crc) {
  ------------------
  |  Branch (391:7): [True: 9.02k, False: 0]
  ------------------
  392|  9.02k|    fast_zero_msg.append("Supported on " + arch);
  393|  9.02k|  } else {
  394|      0|    fast_zero_msg.append("Not supported on " + arch);
  395|      0|  }
  396|  9.02k|  return fast_zero_msg;
  397|  9.02k|}
_ZN7rocksdb6crc32c11crc32c_3wayEjPKcm:
  571|  4.16M|uint32_t crc32c_3way(uint32_t crc, const char* buf, size_t len) {
  572|  4.16M|  const unsigned char* next = (const unsigned char*)buf;
  573|  4.16M|  uint64_t count;
  574|  4.16M|  uint64_t crc0, crc1, crc2;
  575|  4.16M|  crc0 = crc ^ 0xffffffffu;
  576|       |
  577|       |
  578|  4.16M|  if (len >= 8) {
  ------------------
  |  Branch (578:7): [True: 2.76M, False: 1.40M]
  ------------------
  579|       |    // if len > 216 then align and use triplets
  580|  2.76M|    if (len > 216) {
  ------------------
  |  Branch (580:9): [True: 258k, False: 2.50M]
  ------------------
  581|   258k|      {
  582|       |        // Work on the bytes (< 8) before the first 8-byte alignment addr starts
  583|   258k|        uint64_t align_bytes = (8 - (uintptr_t)next) & 7;
  584|   258k|        len -= align_bytes;
  585|   258k|        align_to_8(align_bytes, crc0, next);
  586|   258k|      }
  587|       |
  588|       |      // Now work on the remaining blocks
  589|   258k|      count = len / 24; // number of triplets
  590|   258k|      len %= 24; // bytes remaining
  591|   258k|      uint64_t n = count >> 7; // #blocks = first block + full blocks
  592|   258k|      uint64_t block_size = count & 127;
  593|   258k|      if (block_size == 0) {
  ------------------
  |  Branch (593:11): [True: 249, False: 258k]
  ------------------
  594|    249|        block_size = 128;
  595|   258k|      } else {
  596|   258k|        n++;
  597|   258k|      }
  598|       |      // points to the first byte of the next block
  599|   258k|      const uint64_t* next0 = (uint64_t*)next + block_size;
  600|   258k|      const uint64_t* next1 = next0 + block_size;
  601|   258k|      const uint64_t* next2 = next1 + block_size;
  602|       |
  603|   258k|      crc1 = crc2 = 0;
  604|       |      // Use Duff's device, a for() loop inside a switch()
  605|       |      // statement. This needs to execute at least once, round len
  606|       |      // down to nearest triplet multiple
  607|   258k|      switch (block_size) {
  ------------------
  |  Branch (607:15): [True: 0, False: 258k]
  ------------------
  608|    249|        case 128:
  ------------------
  |  Branch (608:9): [True: 249, False: 258k]
  ------------------
  609|   153k|          do {
  610|       |            // jumps here for a full block of len 128
  611|   153k|            CRCtriplet(crc, next, -128);
  ------------------
  |  |  432|   153k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   153k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   153k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  612|   153k|            FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   153k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  613|   153k|            case 127:
  ------------------
  |  Branch (613:13): [True: 262, False: 258k]
  ------------------
  614|       |              // jumps here or below for the first block smaller
  615|   153k|              CRCtriplet(crc, next, -127);
  ------------------
  |  |  432|   153k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   153k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   153k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  616|   153k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   153k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  617|   154k|            case 126:
  ------------------
  |  Branch (617:13): [True: 209, False: 258k]
  ------------------
  618|   154k|              CRCtriplet(crc, next, -126); // than 128
  ------------------
  |  |  432|   154k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   154k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   154k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  619|   154k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   154k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  620|   154k|            case 125:
  ------------------
  |  Branch (620:13): [True: 584, False: 258k]
  ------------------
  621|   154k|              CRCtriplet(crc, next, -125);
  ------------------
  |  |  432|   154k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   154k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   154k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  622|   154k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   154k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  623|   155k|            case 124:
  ------------------
  |  Branch (623:13): [True: 341, False: 258k]
  ------------------
  624|   155k|              CRCtriplet(crc, next, -124);
  ------------------
  |  |  432|   155k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   155k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   155k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  625|   155k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   155k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  626|   155k|            case 123:
  ------------------
  |  Branch (626:13): [True: 309, False: 258k]
  ------------------
  627|   155k|              CRCtriplet(crc, next, -123);
  ------------------
  |  |  432|   155k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   155k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   155k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  628|   155k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   155k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  629|   155k|            case 122:
  ------------------
  |  Branch (629:13): [True: 223, False: 258k]
  ------------------
  630|   155k|              CRCtriplet(crc, next, -122);
  ------------------
  |  |  432|   155k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   155k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   155k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  631|   155k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   155k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  632|   156k|            case 121:
  ------------------
  |  Branch (632:13): [True: 369, False: 258k]
  ------------------
  633|   156k|              CRCtriplet(crc, next, -121);
  ------------------
  |  |  432|   156k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   156k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   156k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  634|   156k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   156k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  635|   156k|            case 120:
  ------------------
  |  Branch (635:13): [True: 414, False: 258k]
  ------------------
  636|   156k|              CRCtriplet(crc, next, -120);
  ------------------
  |  |  432|   156k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   156k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   156k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  637|   156k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   156k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  638|   156k|            case 119:
  ------------------
  |  Branch (638:13): [True: 218, False: 258k]
  ------------------
  639|   156k|              CRCtriplet(crc, next, -119);
  ------------------
  |  |  432|   156k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   156k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   156k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  640|   156k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   156k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  641|   157k|            case 118:
  ------------------
  |  Branch (641:13): [True: 649, False: 257k]
  ------------------
  642|   157k|              CRCtriplet(crc, next, -118);
  ------------------
  |  |  432|   157k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   157k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   157k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  643|   157k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   157k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  644|   157k|            case 117:
  ------------------
  |  Branch (644:13): [True: 227, False: 258k]
  ------------------
  645|   157k|              CRCtriplet(crc, next, -117);
  ------------------
  |  |  432|   157k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   157k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   157k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  646|   157k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   157k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  647|   157k|            case 116:
  ------------------
  |  Branch (647:13): [True: 383, False: 258k]
  ------------------
  648|   157k|              CRCtriplet(crc, next, -116);
  ------------------
  |  |  432|   157k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   157k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   157k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  649|   157k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   157k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  650|   158k|            case 115:
  ------------------
  |  Branch (650:13): [True: 813, False: 257k]
  ------------------
  651|   158k|              CRCtriplet(crc, next, -115);
  ------------------
  |  |  432|   158k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   158k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   158k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  652|   158k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   158k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  653|   159k|            case 114:
  ------------------
  |  Branch (653:13): [True: 882, False: 257k]
  ------------------
  654|   159k|              CRCtriplet(crc, next, -114);
  ------------------
  |  |  432|   159k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   159k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   159k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  655|   159k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   159k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  656|   160k|            case 113:
  ------------------
  |  Branch (656:13): [True: 790, False: 257k]
  ------------------
  657|   160k|              CRCtriplet(crc, next, -113);
  ------------------
  |  |  432|   160k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   160k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   160k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  658|   160k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   160k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  659|   160k|            case 112:
  ------------------
  |  Branch (659:13): [True: 466, False: 258k]
  ------------------
  660|   160k|              CRCtriplet(crc, next, -112);
  ------------------
  |  |  432|   160k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   160k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   160k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  661|   160k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   160k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  662|   161k|            case 111:
  ------------------
  |  Branch (662:13): [True: 738, False: 257k]
  ------------------
  663|   161k|              CRCtriplet(crc, next, -111);
  ------------------
  |  |  432|   161k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   161k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   161k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  664|   161k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   161k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  665|   162k|            case 110:
  ------------------
  |  Branch (665:13): [True: 512, False: 258k]
  ------------------
  666|   162k|              CRCtriplet(crc, next, -110);
  ------------------
  |  |  432|   162k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   162k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   162k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  667|   162k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   162k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  668|   162k|            case 109:
  ------------------
  |  Branch (668:13): [True: 665, False: 257k]
  ------------------
  669|   162k|              CRCtriplet(crc, next, -109);
  ------------------
  |  |  432|   162k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   162k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   162k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  670|   162k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   162k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  671|   163k|            case 108:
  ------------------
  |  Branch (671:13): [True: 398, False: 258k]
  ------------------
  672|   163k|              CRCtriplet(crc, next, -108);
  ------------------
  |  |  432|   163k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   163k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   163k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  673|   163k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   163k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  674|   163k|            case 107:
  ------------------
  |  Branch (674:13): [True: 230, False: 258k]
  ------------------
  675|   163k|              CRCtriplet(crc, next, -107);
  ------------------
  |  |  432|   163k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   163k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   163k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  676|   163k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   163k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  677|   163k|            case 106:
  ------------------
  |  Branch (677:13): [True: 230, False: 258k]
  ------------------
  678|   163k|              CRCtriplet(crc, next, -106);
  ------------------
  |  |  432|   163k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   163k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   163k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  679|   163k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   163k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  680|   163k|            case 105:
  ------------------
  |  Branch (680:13): [True: 294, False: 258k]
  ------------------
  681|   163k|              CRCtriplet(crc, next, -105);
  ------------------
  |  |  432|   163k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   163k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   163k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  682|   163k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   163k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  683|   164k|            case 104:
  ------------------
  |  Branch (683:13): [True: 397, False: 258k]
  ------------------
  684|   164k|              CRCtriplet(crc, next, -104);
  ------------------
  |  |  432|   164k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   164k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   164k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  685|   164k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   164k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  686|   164k|            case 103:
  ------------------
  |  Branch (686:13): [True: 227, False: 258k]
  ------------------
  687|   164k|              CRCtriplet(crc, next, -103);
  ------------------
  |  |  432|   164k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   164k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   164k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  688|   164k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   164k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  689|   165k|            case 102:
  ------------------
  |  Branch (689:13): [True: 493, False: 258k]
  ------------------
  690|   165k|              CRCtriplet(crc, next, -102);
  ------------------
  |  |  432|   165k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   165k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   165k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  691|   165k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   165k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  692|   165k|            case 101:
  ------------------
  |  Branch (692:13): [True: 400, False: 258k]
  ------------------
  693|   165k|              CRCtriplet(crc, next, -101);
  ------------------
  |  |  432|   165k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   165k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   165k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  694|   165k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   165k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  695|   165k|            case 100:
  ------------------
  |  Branch (695:13): [True: 254, False: 258k]
  ------------------
  696|   165k|              CRCtriplet(crc, next, -100);
  ------------------
  |  |  432|   165k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   165k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   165k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  697|   165k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   165k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  698|   166k|            case 99:
  ------------------
  |  Branch (698:13): [True: 552, False: 258k]
  ------------------
  699|   166k|              CRCtriplet(crc, next, -99);
  ------------------
  |  |  432|   166k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   166k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   166k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  700|   166k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   166k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  701|   166k|            case 98:
  ------------------
  |  Branch (701:13): [True: 615, False: 257k]
  ------------------
  702|   166k|              CRCtriplet(crc, next, -98);
  ------------------
  |  |  432|   166k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   166k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   166k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  703|   166k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   166k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  704|   168k|            case 97:
  ------------------
  |  Branch (704:13): [True: 1.17k, False: 257k]
  ------------------
  705|   168k|              CRCtriplet(crc, next, -97);
  ------------------
  |  |  432|   168k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   168k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   168k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  706|   168k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   168k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  707|   168k|            case 96:
  ------------------
  |  Branch (707:13): [True: 334, False: 258k]
  ------------------
  708|   168k|              CRCtriplet(crc, next, -96);
  ------------------
  |  |  432|   168k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   168k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   168k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  709|   168k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   168k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  710|   168k|            case 95:
  ------------------
  |  Branch (710:13): [True: 341, False: 258k]
  ------------------
  711|   168k|              CRCtriplet(crc, next, -95);
  ------------------
  |  |  432|   168k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   168k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   168k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  712|   168k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   168k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  713|   169k|            case 94:
  ------------------
  |  Branch (713:13): [True: 690, False: 257k]
  ------------------
  714|   169k|              CRCtriplet(crc, next, -94);
  ------------------
  |  |  432|   169k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   169k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   169k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  715|   169k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   169k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  716|   171k|            case 93:
  ------------------
  |  Branch (716:13): [True: 1.62k, False: 256k]
  ------------------
  717|   171k|              CRCtriplet(crc, next, -93);
  ------------------
  |  |  432|   171k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   171k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   171k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  718|   171k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   171k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  719|   172k|            case 92:
  ------------------
  |  Branch (719:13): [True: 1.14k, False: 257k]
  ------------------
  720|   172k|              CRCtriplet(crc, next, -92);
  ------------------
  |  |  432|   172k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   172k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   172k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  721|   172k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   172k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  722|   173k|            case 91:
  ------------------
  |  Branch (722:13): [True: 1.36k, False: 257k]
  ------------------
  723|   173k|              CRCtriplet(crc, next, -91);
  ------------------
  |  |  432|   173k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   173k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   173k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  724|   173k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   173k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  725|   174k|            case 90:
  ------------------
  |  Branch (725:13): [True: 575, False: 258k]
  ------------------
  726|   174k|              CRCtriplet(crc, next, -90);
  ------------------
  |  |  432|   174k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   174k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   174k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  727|   174k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   174k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  728|   175k|            case 89:
  ------------------
  |  Branch (728:13): [True: 1.41k, False: 257k]
  ------------------
  729|   175k|              CRCtriplet(crc, next, -89);
  ------------------
  |  |  432|   175k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   175k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   175k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  730|   175k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   175k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  731|   175k|            case 88:
  ------------------
  |  Branch (731:13): [True: 399, False: 258k]
  ------------------
  732|   175k|              CRCtriplet(crc, next, -88);
  ------------------
  |  |  432|   175k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   175k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   175k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  733|   175k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   175k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  734|   176k|            case 87:
  ------------------
  |  Branch (734:13): [True: 420, False: 258k]
  ------------------
  735|   176k|              CRCtriplet(crc, next, -87);
  ------------------
  |  |  432|   176k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   176k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   176k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  736|   176k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   176k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  737|   176k|            case 86:
  ------------------
  |  Branch (737:13): [True: 497, False: 258k]
  ------------------
  738|   176k|              CRCtriplet(crc, next, -86);
  ------------------
  |  |  432|   176k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   176k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   176k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  739|   176k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   176k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  740|   181k|            case 85:
  ------------------
  |  Branch (740:13): [True: 4.91k, False: 253k]
  ------------------
  741|   181k|              CRCtriplet(crc, next, -85);
  ------------------
  |  |  432|   181k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   181k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   181k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  742|   181k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   181k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  743|   185k|            case 84:
  ------------------
  |  Branch (743:13): [True: 3.56k, False: 255k]
  ------------------
  744|   185k|              CRCtriplet(crc, next, -84);
  ------------------
  |  |  432|   185k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   185k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   185k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  745|   185k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   185k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  746|   186k|            case 83:
  ------------------
  |  Branch (746:13): [True: 1.00k, False: 257k]
  ------------------
  747|   186k|              CRCtriplet(crc, next, -83);
  ------------------
  |  |  432|   186k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   186k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   186k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  748|   186k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   186k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  749|   187k|            case 82:
  ------------------
  |  Branch (749:13): [True: 927, False: 257k]
  ------------------
  750|   187k|              CRCtriplet(crc, next, -82);
  ------------------
  |  |  432|   187k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   187k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   187k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  751|   187k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   187k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  752|   188k|            case 81:
  ------------------
  |  Branch (752:13): [True: 903, False: 257k]
  ------------------
  753|   188k|              CRCtriplet(crc, next, -81);
  ------------------
  |  |  432|   188k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   188k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   188k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  754|   188k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   188k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  755|   189k|            case 80:
  ------------------
  |  Branch (755:13): [True: 1.80k, False: 256k]
  ------------------
  756|   189k|              CRCtriplet(crc, next, -80);
  ------------------
  |  |  432|   189k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   189k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   189k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  757|   189k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   189k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  758|   190k|            case 79:
  ------------------
  |  Branch (758:13): [True: 649, False: 257k]
  ------------------
  759|   190k|              CRCtriplet(crc, next, -79);
  ------------------
  |  |  432|   190k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   190k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   190k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  760|   190k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   190k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  761|   191k|            case 78:
  ------------------
  |  Branch (761:13): [True: 441, False: 258k]
  ------------------
  762|   191k|              CRCtriplet(crc, next, -78);
  ------------------
  |  |  432|   191k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   191k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   191k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  763|   191k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   191k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  764|   191k|            case 77:
  ------------------
  |  Branch (764:13): [True: 364, False: 258k]
  ------------------
  765|   191k|              CRCtriplet(crc, next, -77);
  ------------------
  |  |  432|   191k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   191k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   191k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  766|   191k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   191k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  767|   192k|            case 76:
  ------------------
  |  Branch (767:13): [True: 606, False: 257k]
  ------------------
  768|   192k|              CRCtriplet(crc, next, -76);
  ------------------
  |  |  432|   192k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   192k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   192k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  769|   192k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   192k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  770|   192k|            case 75:
  ------------------
  |  Branch (770:13): [True: 401, False: 258k]
  ------------------
  771|   192k|              CRCtriplet(crc, next, -75);
  ------------------
  |  |  432|   192k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   192k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   192k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  772|   192k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   192k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  773|   192k|            case 74:
  ------------------
  |  Branch (773:13): [True: 314, False: 258k]
  ------------------
  774|   192k|              CRCtriplet(crc, next, -74);
  ------------------
  |  |  432|   192k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   192k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   192k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  775|   192k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   192k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  776|   193k|            case 73:
  ------------------
  |  Branch (776:13): [True: 591, False: 258k]
  ------------------
  777|   193k|              CRCtriplet(crc, next, -73);
  ------------------
  |  |  432|   193k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   193k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   193k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  778|   193k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   193k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  779|   193k|            case 72:
  ------------------
  |  Branch (779:13): [True: 446, False: 258k]
  ------------------
  780|   193k|              CRCtriplet(crc, next, -72);
  ------------------
  |  |  432|   193k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   193k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   193k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  781|   193k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   193k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  782|   194k|            case 71:
  ------------------
  |  Branch (782:13): [True: 617, False: 257k]
  ------------------
  783|   194k|              CRCtriplet(crc, next, -71);
  ------------------
  |  |  432|   194k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   194k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   194k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  784|   194k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   194k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  785|   195k|            case 70:
  ------------------
  |  Branch (785:13): [True: 714, False: 257k]
  ------------------
  786|   195k|              CRCtriplet(crc, next, -70);
  ------------------
  |  |  432|   195k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   195k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   195k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  787|   195k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   195k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  788|   195k|            case 69:
  ------------------
  |  Branch (788:13): [True: 515, False: 258k]
  ------------------
  789|   195k|              CRCtriplet(crc, next, -69);
  ------------------
  |  |  432|   195k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   195k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   195k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  790|   195k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   195k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  791|   196k|            case 68:
  ------------------
  |  Branch (791:13): [True: 827, False: 257k]
  ------------------
  792|   196k|              CRCtriplet(crc, next, -68);
  ------------------
  |  |  432|   196k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   196k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   196k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  793|   196k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   196k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  794|   197k|            case 67:
  ------------------
  |  Branch (794:13): [True: 866, False: 257k]
  ------------------
  795|   197k|              CRCtriplet(crc, next, -67);
  ------------------
  |  |  432|   197k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   197k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   197k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  796|   197k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   197k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  797|   197k|            case 66:
  ------------------
  |  Branch (797:13): [True: 634, False: 257k]
  ------------------
  798|   197k|              CRCtriplet(crc, next, -66);
  ------------------
  |  |  432|   197k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   197k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   197k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  799|   197k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   197k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  800|   198k|            case 65:
  ------------------
  |  Branch (800:13): [True: 894, False: 257k]
  ------------------
  801|   198k|              CRCtriplet(crc, next, -65);
  ------------------
  |  |  432|   198k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   198k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   198k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  802|   198k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   198k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  803|   199k|            case 64:
  ------------------
  |  Branch (803:13): [True: 1.11k, False: 257k]
  ------------------
  804|   199k|              CRCtriplet(crc, next, -64);
  ------------------
  |  |  432|   199k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   199k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   199k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  805|   199k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   199k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  806|   200k|            case 63:
  ------------------
  |  Branch (806:13): [True: 562, False: 258k]
  ------------------
  807|   200k|              CRCtriplet(crc, next, -63);
  ------------------
  |  |  432|   200k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   200k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   200k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  808|   200k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   200k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  809|   201k|            case 62:
  ------------------
  |  Branch (809:13): [True: 764, False: 257k]
  ------------------
  810|   201k|              CRCtriplet(crc, next, -62);
  ------------------
  |  |  432|   201k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   201k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   201k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  811|   201k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   201k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  812|   202k|            case 61:
  ------------------
  |  Branch (812:13): [True: 1.36k, False: 257k]
  ------------------
  813|   202k|              CRCtriplet(crc, next, -61);
  ------------------
  |  |  432|   202k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   202k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   202k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  814|   202k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   202k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  815|   203k|            case 60:
  ------------------
  |  Branch (815:13): [True: 744, False: 257k]
  ------------------
  816|   203k|              CRCtriplet(crc, next, -60);
  ------------------
  |  |  432|   203k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   203k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   203k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  817|   203k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   203k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  818|   203k|            case 59:
  ------------------
  |  Branch (818:13): [True: 535, False: 258k]
  ------------------
  819|   203k|              CRCtriplet(crc, next, -59);
  ------------------
  |  |  432|   203k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   203k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   203k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  820|   203k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   203k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  821|   204k|            case 58:
  ------------------
  |  Branch (821:13): [True: 930, False: 257k]
  ------------------
  822|   204k|              CRCtriplet(crc, next, -58);
  ------------------
  |  |  432|   204k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   204k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   204k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  823|   204k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   204k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  824|   207k|            case 57:
  ------------------
  |  Branch (824:13): [True: 2.77k, False: 255k]
  ------------------
  825|   207k|              CRCtriplet(crc, next, -57);
  ------------------
  |  |  432|   207k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   207k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   207k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  826|   207k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   207k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  827|   208k|            case 56:
  ------------------
  |  Branch (827:13): [True: 599, False: 258k]
  ------------------
  828|   208k|              CRCtriplet(crc, next, -56);
  ------------------
  |  |  432|   208k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   208k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   208k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  829|   208k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   208k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  830|   209k|            case 55:
  ------------------
  |  Branch (830:13): [True: 852, False: 257k]
  ------------------
  831|   209k|              CRCtriplet(crc, next, -55);
  ------------------
  |  |  432|   209k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   209k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   209k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  832|   209k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   209k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  833|   209k|            case 54:
  ------------------
  |  Branch (833:13): [True: 729, False: 257k]
  ------------------
  834|   209k|              CRCtriplet(crc, next, -54);
  ------------------
  |  |  432|   209k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   209k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   209k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  835|   209k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   209k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  836|   210k|            case 53:
  ------------------
  |  Branch (836:13): [True: 662, False: 257k]
  ------------------
  837|   210k|              CRCtriplet(crc, next, -53);
  ------------------
  |  |  432|   210k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   210k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   210k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  838|   210k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   210k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  839|   211k|            case 52:
  ------------------
  |  Branch (839:13): [True: 544, False: 258k]
  ------------------
  840|   211k|              CRCtriplet(crc, next, -52);
  ------------------
  |  |  432|   211k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   211k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   211k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  841|   211k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   211k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  842|   211k|            case 51:
  ------------------
  |  Branch (842:13): [True: 824, False: 257k]
  ------------------
  843|   211k|              CRCtriplet(crc, next, -51);
  ------------------
  |  |  432|   211k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   211k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   211k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  844|   211k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   211k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  845|   215k|            case 50:
  ------------------
  |  Branch (845:13): [True: 3.88k, False: 254k]
  ------------------
  846|   215k|              CRCtriplet(crc, next, -50);
  ------------------
  |  |  432|   215k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   215k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   215k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  847|   215k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   215k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  848|   216k|            case 49:
  ------------------
  |  Branch (848:13): [True: 888, False: 257k]
  ------------------
  849|   216k|              CRCtriplet(crc, next, -49);
  ------------------
  |  |  432|   216k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   216k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   216k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  850|   216k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   216k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  851|   218k|            case 48:
  ------------------
  |  Branch (851:13): [True: 1.66k, False: 256k]
  ------------------
  852|   218k|              CRCtriplet(crc, next, -48);
  ------------------
  |  |  432|   218k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   218k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   218k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  853|   218k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   218k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  854|   219k|            case 47:
  ------------------
  |  Branch (854:13): [True: 1.00k, False: 257k]
  ------------------
  855|   219k|              CRCtriplet(crc, next, -47);
  ------------------
  |  |  432|   219k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   219k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   219k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  856|   219k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   219k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  857|   220k|            case 46:
  ------------------
  |  Branch (857:13): [True: 1.10k, False: 257k]
  ------------------
  858|   220k|              CRCtriplet(crc, next, -46);
  ------------------
  |  |  432|   220k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   220k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   220k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  859|   220k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   220k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  860|   221k|            case 45:
  ------------------
  |  Branch (860:13): [True: 1.34k, False: 257k]
  ------------------
  861|   221k|              CRCtriplet(crc, next, -45);
  ------------------
  |  |  432|   221k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   221k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   221k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  862|   221k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   221k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  863|   224k|            case 44:
  ------------------
  |  Branch (863:13): [True: 2.55k, False: 256k]
  ------------------
  864|   224k|              CRCtriplet(crc, next, -44);
  ------------------
  |  |  432|   224k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   224k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   224k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  865|   224k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   224k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  866|   225k|            case 43:
  ------------------
  |  Branch (866:13): [True: 787, False: 257k]
  ------------------
  867|   225k|              CRCtriplet(crc, next, -43);
  ------------------
  |  |  432|   225k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   225k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   225k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  868|   225k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   225k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  869|   226k|            case 42:
  ------------------
  |  Branch (869:13): [True: 938, False: 257k]
  ------------------
  870|   226k|              CRCtriplet(crc, next, -42);
  ------------------
  |  |  432|   226k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   226k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   226k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  871|   226k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   226k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  872|   226k|            case 41:
  ------------------
  |  Branch (872:13): [True: 989, False: 257k]
  ------------------
  873|   226k|              CRCtriplet(crc, next, -41);
  ------------------
  |  |  432|   226k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   226k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   226k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  874|   226k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   226k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  875|   228k|            case 40:
  ------------------
  |  Branch (875:13): [True: 1.27k, False: 257k]
  ------------------
  876|   228k|              CRCtriplet(crc, next, -40);
  ------------------
  |  |  432|   228k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   228k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   228k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  877|   228k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   228k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  878|   231k|            case 39:
  ------------------
  |  Branch (878:13): [True: 3.34k, False: 255k]
  ------------------
  879|   231k|              CRCtriplet(crc, next, -39);
  ------------------
  |  |  432|   231k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   231k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   231k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  880|   231k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   231k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  881|   232k|            case 38:
  ------------------
  |  Branch (881:13): [True: 930, False: 257k]
  ------------------
  882|   232k|              CRCtriplet(crc, next, -38);
  ------------------
  |  |  432|   232k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   232k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   232k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  883|   232k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   232k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  884|   233k|            case 37:
  ------------------
  |  Branch (884:13): [True: 789, False: 257k]
  ------------------
  885|   233k|              CRCtriplet(crc, next, -37);
  ------------------
  |  |  432|   233k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   233k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   233k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  886|   233k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   233k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  887|   235k|            case 36:
  ------------------
  |  Branch (887:13): [True: 1.82k, False: 256k]
  ------------------
  888|   235k|              CRCtriplet(crc, next, -36);
  ------------------
  |  |  432|   235k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   235k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   235k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  889|   235k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   235k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  890|   235k|            case 35:
  ------------------
  |  Branch (890:13): [True: 676, False: 257k]
  ------------------
  891|   235k|              CRCtriplet(crc, next, -35);
  ------------------
  |  |  432|   235k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   235k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   235k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  892|   235k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   235k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  893|   237k|            case 34:
  ------------------
  |  Branch (893:13): [True: 1.28k, False: 257k]
  ------------------
  894|   237k|              CRCtriplet(crc, next, -34);
  ------------------
  |  |  432|   237k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   237k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   237k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  895|   237k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   237k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  896|   238k|            case 33:
  ------------------
  |  Branch (896:13): [True: 1.35k, False: 257k]
  ------------------
  897|   238k|              CRCtriplet(crc, next, -33);
  ------------------
  |  |  432|   238k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   238k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   238k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  898|   238k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   238k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  899|   239k|            case 32:
  ------------------
  |  Branch (899:13): [True: 859, False: 257k]
  ------------------
  900|   239k|              CRCtriplet(crc, next, -32);
  ------------------
  |  |  432|   239k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   239k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   239k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  901|   239k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   239k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  902|   239k|            case 31:
  ------------------
  |  Branch (902:13): [True: 642, False: 257k]
  ------------------
  903|   239k|              CRCtriplet(crc, next, -31);
  ------------------
  |  |  432|   239k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   239k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   239k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  904|   239k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   239k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  905|   241k|            case 30:
  ------------------
  |  Branch (905:13): [True: 1.95k, False: 256k]
  ------------------
  906|   241k|              CRCtriplet(crc, next, -30);
  ------------------
  |  |  432|   241k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   241k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   241k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  907|   241k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   241k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  908|   243k|            case 29:
  ------------------
  |  Branch (908:13): [True: 1.87k, False: 256k]
  ------------------
  909|   243k|              CRCtriplet(crc, next, -29);
  ------------------
  |  |  432|   243k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   243k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   243k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  910|   243k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   243k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  911|   244k|            case 28:
  ------------------
  |  Branch (911:13): [True: 833, False: 257k]
  ------------------
  912|   244k|              CRCtriplet(crc, next, -28);
  ------------------
  |  |  432|   244k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   244k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   244k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  913|   244k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   244k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  914|   245k|            case 27:
  ------------------
  |  Branch (914:13): [True: 996, False: 257k]
  ------------------
  915|   245k|              CRCtriplet(crc, next, -27);
  ------------------
  |  |  432|   245k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   245k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   245k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  916|   245k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   245k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  917|   246k|            case 26:
  ------------------
  |  Branch (917:13): [True: 998, False: 257k]
  ------------------
  918|   246k|              CRCtriplet(crc, next, -26);
  ------------------
  |  |  432|   246k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   246k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   246k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  919|   246k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   246k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  920|   249k|            case 25:
  ------------------
  |  Branch (920:13): [True: 2.73k, False: 255k]
  ------------------
  921|   249k|              CRCtriplet(crc, next, -25);
  ------------------
  |  |  432|   249k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   249k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   249k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  922|   249k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   249k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  923|   250k|            case 24:
  ------------------
  |  Branch (923:13): [True: 704, False: 257k]
  ------------------
  924|   250k|              CRCtriplet(crc, next, -24);
  ------------------
  |  |  432|   250k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   250k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   250k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  925|   250k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   250k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  926|   250k|            case 23:
  ------------------
  |  Branch (926:13): [True: 446, False: 258k]
  ------------------
  927|   250k|              CRCtriplet(crc, next, -23);
  ------------------
  |  |  432|   250k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   250k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   250k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  928|   250k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   250k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  929|   252k|            case 22:
  ------------------
  |  Branch (929:13): [True: 1.64k, False: 256k]
  ------------------
  930|   252k|              CRCtriplet(crc, next, -22);
  ------------------
  |  |  432|   252k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   252k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   252k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  931|   252k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   252k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  932|   253k|            case 21:
  ------------------
  |  Branch (932:13): [True: 1.73k, False: 256k]
  ------------------
  933|   253k|              CRCtriplet(crc, next, -21);
  ------------------
  |  |  432|   253k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   253k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   253k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  934|   253k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   253k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  935|   256k|            case 20:
  ------------------
  |  Branch (935:13): [True: 2.53k, False: 256k]
  ------------------
  936|   256k|              CRCtriplet(crc, next, -20);
  ------------------
  |  |  432|   256k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   256k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   256k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  937|   256k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   256k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  938|   257k|            case 19:
  ------------------
  |  Branch (938:13): [True: 1.14k, False: 257k]
  ------------------
  939|   257k|              CRCtriplet(crc, next, -19);
  ------------------
  |  |  432|   257k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   257k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   257k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  940|   257k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   257k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  941|   262k|            case 18:
  ------------------
  |  Branch (941:13): [True: 5.20k, False: 253k]
  ------------------
  942|   262k|              CRCtriplet(crc, next, -18);
  ------------------
  |  |  432|   262k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   262k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   262k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  943|   262k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   262k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  944|   265k|            case 17:
  ------------------
  |  Branch (944:13): [True: 2.29k, False: 256k]
  ------------------
  945|   265k|              CRCtriplet(crc, next, -17);
  ------------------
  |  |  432|   265k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   265k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   265k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  946|   265k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   265k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  947|   266k|            case 16:
  ------------------
  |  Branch (947:13): [True: 1.90k, False: 256k]
  ------------------
  948|   266k|              CRCtriplet(crc, next, -16);
  ------------------
  |  |  432|   266k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   266k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   266k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  949|   266k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   266k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  950|   276k|            case 15:
  ------------------
  |  Branch (950:13): [True: 9.09k, False: 249k]
  ------------------
  951|   276k|              CRCtriplet(crc, next, -15);
  ------------------
  |  |  432|   276k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   276k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   276k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  952|   276k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   276k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  953|   285k|            case 14:
  ------------------
  |  Branch (953:13): [True: 9.43k, False: 249k]
  ------------------
  954|   285k|              CRCtriplet(crc, next, -14);
  ------------------
  |  |  432|   285k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   285k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   285k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  955|   285k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   285k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  956|   296k|            case 13:
  ------------------
  |  Branch (956:13): [True: 11.2k, False: 247k]
  ------------------
  957|   296k|              CRCtriplet(crc, next, -13);
  ------------------
  |  |  432|   296k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   296k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   296k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  958|   296k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   296k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  959|   299k|            case 12:
  ------------------
  |  Branch (959:13): [True: 2.24k, False: 256k]
  ------------------
  960|   299k|              CRCtriplet(crc, next, -12);
  ------------------
  |  |  432|   299k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   299k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   299k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  961|   299k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   299k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  962|   324k|            case 11:
  ------------------
  |  Branch (962:13): [True: 25.5k, False: 233k]
  ------------------
  963|   324k|              CRCtriplet(crc, next, -11);
  ------------------
  |  |  432|   324k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   324k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   324k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  964|   324k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   324k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  965|   373k|            case 10:
  ------------------
  |  Branch (965:13): [True: 49.1k, False: 209k]
  ------------------
  966|   373k|              CRCtriplet(crc, next, -10);
  ------------------
  |  |  432|   373k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   373k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   373k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  967|   373k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   373k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  968|   406k|            case 9:
  ------------------
  |  Branch (968:13): [True: 33.0k, False: 225k]
  ------------------
  969|   406k|              CRCtriplet(crc, next, -9);
  ------------------
  |  |  432|   406k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   406k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   406k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  970|   406k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   406k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  971|   408k|            case 8:
  ------------------
  |  Branch (971:13): [True: 1.79k, False: 256k]
  ------------------
  972|   408k|              CRCtriplet(crc, next, -8);
  ------------------
  |  |  432|   408k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   408k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   408k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  973|   408k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   408k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  974|   409k|            case 7:
  ------------------
  |  Branch (974:13): [True: 617, False: 257k]
  ------------------
  975|   409k|              CRCtriplet(crc, next, -7);
  ------------------
  |  |  432|   409k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   409k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   409k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  976|   409k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   409k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  977|   410k|            case 6:
  ------------------
  |  Branch (977:13): [True: 908, False: 257k]
  ------------------
  978|   410k|              CRCtriplet(crc, next, -6);
  ------------------
  |  |  432|   410k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   410k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   410k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  979|   410k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   410k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  980|   410k|            case 5:
  ------------------
  |  Branch (980:13): [True: 275, False: 258k]
  ------------------
  981|   410k|              CRCtriplet(crc, next, -5);
  ------------------
  |  |  432|   410k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   410k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   410k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  982|   410k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   410k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  983|   411k|            case 4:
  ------------------
  |  Branch (983:13): [True: 674, False: 257k]
  ------------------
  984|   411k|              CRCtriplet(crc, next, -4);
  ------------------
  |  |  432|   411k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   411k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   411k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  985|   411k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   411k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  986|   411k|            case 3:
  ------------------
  |  Branch (986:13): [True: 385, False: 258k]
  ------------------
  987|   411k|              CRCtriplet(crc, next, -3);
  ------------------
  |  |  432|   411k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   411k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   411k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  988|   411k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   411k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  989|   411k|            case 2:
  ------------------
  |  Branch (989:13): [True: 259, False: 258k]
  ------------------
  990|   411k|              CRCtriplet(crc, next, -2);
  ------------------
  |  |  432|   411k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  433|   411k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset)); \
  |  |  434|   411k|  crc##2 = _mm_crc32_u64(crc##2, *(buf##2 + offset));
  ------------------
  991|   411k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   411k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
  992|   412k|            case 1:
  ------------------
  |  Branch (992:13): [True: 379, False: 258k]
  ------------------
  993|   412k|              CRCduplet(crc, next, -1); // the final triplet is actually only 2
  ------------------
  |  |  437|   412k|  crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
  |  |  438|   412k|  crc##1 = _mm_crc32_u64(crc##1, *(buf##1 + offset));
  ------------------
  994|       |              //{ CombineCRC(); }
  995|   412k|              crc0 = CombineCRC(block_size, crc0, crc1, crc2, next2);
  996|   412k|              if (--n > 0) {
  ------------------
  |  Branch (996:19): [True: 153k, False: 258k]
  ------------------
  997|   153k|                crc1 = crc2 = 0;
  998|   153k|                block_size = 128;
  999|       |                // points to the first byte of the next block
 1000|   153k|                next0 = next2 + 128;
 1001|   153k|                next1 = next0 + 128; // from here on all blocks are 128 long
 1002|   153k|                next2 = next1 + 128;
 1003|   153k|              }
 1004|   412k|              FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   412k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1005|   412k|            case 0:;
  ------------------
  |  Branch (1005:13): [True: 0, False: 258k]
  ------------------
 1006|   412k|          } while (n > 0);
  ------------------
  |  Branch (1006:20): [True: 153k, False: 258k]
  ------------------
 1007|   258k|      }
 1008|   258k|      next = (const unsigned char*)next2;
 1009|   258k|    }
 1010|  2.76M|    uint64_t count2 = len >> 3; // 216 of less bytes is 27 or less singlets
 1011|  2.76M|    len = len & 7;
 1012|  2.76M|    next += (count2 * 8);
 1013|  2.76M|    switch (count2) {
  ------------------
  |  Branch (1013:13): [True: 0, False: 2.76M]
  ------------------
 1014|  5.81k|      case 27:
  ------------------
  |  Branch (1014:7): [True: 5.81k, False: 2.76M]
  ------------------
 1015|  5.81k|        CRCsinglet(crc0, next, -27 * 8);
  ------------------
  |  |  441|  5.81k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1016|  5.81k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|  5.81k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1017|  31.4k|      case 26:
  ------------------
  |  Branch (1017:7): [True: 25.6k, False: 2.74M]
  ------------------
 1018|  31.4k|        CRCsinglet(crc0, next, -26 * 8);
  ------------------
  |  |  441|  31.4k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1019|  31.4k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|  31.4k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1020|  50.2k|      case 25:
  ------------------
  |  Branch (1020:7): [True: 18.7k, False: 2.74M]
  ------------------
 1021|  50.2k|        CRCsinglet(crc0, next, -25 * 8);
  ------------------
  |  |  441|  50.2k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1022|  50.2k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|  50.2k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1023|  59.2k|      case 24:
  ------------------
  |  Branch (1023:7): [True: 9.08k, False: 2.75M]
  ------------------
 1024|  59.2k|        CRCsinglet(crc0, next, -24 * 8);
  ------------------
  |  |  441|  59.2k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1025|  59.2k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|  59.2k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1026|  71.0k|      case 23:
  ------------------
  |  Branch (1026:7): [True: 11.8k, False: 2.75M]
  ------------------
 1027|  71.0k|        CRCsinglet(crc0, next, -23 * 8);
  ------------------
  |  |  441|  71.0k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1028|  71.0k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|  71.0k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1029|  89.5k|      case 22:
  ------------------
  |  Branch (1029:7): [True: 18.4k, False: 2.74M]
  ------------------
 1030|  89.5k|        CRCsinglet(crc0, next, -22 * 8);
  ------------------
  |  |  441|  89.5k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1031|  89.5k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|  89.5k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1032|   107k|      case 21:
  ------------------
  |  Branch (1032:7): [True: 17.9k, False: 2.74M]
  ------------------
 1033|   107k|        CRCsinglet(crc0, next, -21 * 8);
  ------------------
  |  |  441|   107k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1034|   107k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   107k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1035|   112k|      case 20:
  ------------------
  |  Branch (1035:7): [True: 4.55k, False: 2.76M]
  ------------------
 1036|   112k|        CRCsinglet(crc0, next, -20 * 8);
  ------------------
  |  |  441|   112k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1037|   112k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   112k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1038|   135k|      case 19:
  ------------------
  |  Branch (1038:7): [True: 22.9k, False: 2.74M]
  ------------------
 1039|   135k|        CRCsinglet(crc0, next, -19 * 8);
  ------------------
  |  |  441|   135k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1040|   135k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   135k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1041|   144k|      case 18:
  ------------------
  |  Branch (1041:7): [True: 9.31k, False: 2.75M]
  ------------------
 1042|   144k|        CRCsinglet(crc0, next, -18 * 8);
  ------------------
  |  |  441|   144k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1043|   144k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   144k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1044|   156k|      case 17:
  ------------------
  |  Branch (1044:7): [True: 12.0k, False: 2.75M]
  ------------------
 1045|   156k|        CRCsinglet(crc0, next, -17 * 8);
  ------------------
  |  |  441|   156k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1046|   156k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   156k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1047|   170k|      case 16:
  ------------------
  |  Branch (1047:7): [True: 14.3k, False: 2.75M]
  ------------------
 1048|   170k|        CRCsinglet(crc0, next, -16 * 8);
  ------------------
  |  |  441|   170k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1049|   170k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   170k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1050|   185k|      case 15:
  ------------------
  |  Branch (1050:7): [True: 15.2k, False: 2.75M]
  ------------------
 1051|   185k|        CRCsinglet(crc0, next, -15 * 8);
  ------------------
  |  |  441|   185k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1052|   185k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   185k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1053|   202k|      case 14:
  ------------------
  |  Branch (1053:7): [True: 16.5k, False: 2.75M]
  ------------------
 1054|   202k|        CRCsinglet(crc0, next, -14 * 8);
  ------------------
  |  |  441|   202k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1055|   202k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   202k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1056|   214k|      case 13:
  ------------------
  |  Branch (1056:7): [True: 12.4k, False: 2.75M]
  ------------------
 1057|   214k|        CRCsinglet(crc0, next, -13 * 8);
  ------------------
  |  |  441|   214k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1058|   214k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   214k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1059|   228k|      case 12:
  ------------------
  |  Branch (1059:7): [True: 13.2k, False: 2.75M]
  ------------------
 1060|   228k|        CRCsinglet(crc0, next, -12 * 8);
  ------------------
  |  |  441|   228k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1061|   228k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   228k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1062|   250k|      case 11:
  ------------------
  |  Branch (1062:7): [True: 22.5k, False: 2.74M]
  ------------------
 1063|   250k|        CRCsinglet(crc0, next, -11 * 8);
  ------------------
  |  |  441|   250k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1064|   250k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   250k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1065|   278k|      case 10:
  ------------------
  |  Branch (1065:7): [True: 27.3k, False: 2.73M]
  ------------------
 1066|   278k|        CRCsinglet(crc0, next, -10 * 8);
  ------------------
  |  |  441|   278k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1067|   278k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   278k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1068|   311k|      case 9:
  ------------------
  |  Branch (1068:7): [True: 33.0k, False: 2.73M]
  ------------------
 1069|   311k|        CRCsinglet(crc0, next, -9 * 8);
  ------------------
  |  |  441|   311k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1070|   311k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   311k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1071|   328k|      case 8:
  ------------------
  |  Branch (1071:7): [True: 17.6k, False: 2.74M]
  ------------------
 1072|   328k|        CRCsinglet(crc0, next, -8 * 8);
  ------------------
  |  |  441|   328k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1073|   328k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   328k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1074|   369k|      case 7:
  ------------------
  |  Branch (1074:7): [True: 40.9k, False: 2.72M]
  ------------------
 1075|   369k|        CRCsinglet(crc0, next, -7 * 8);
  ------------------
  |  |  441|   369k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1076|   369k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   369k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1077|   408k|      case 6:
  ------------------
  |  Branch (1077:7): [True: 38.8k, False: 2.72M]
  ------------------
 1078|   408k|        CRCsinglet(crc0, next, -6 * 8);
  ------------------
  |  |  441|   408k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1079|   408k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   408k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1080|   496k|      case 5:
  ------------------
  |  Branch (1080:7): [True: 87.8k, False: 2.67M]
  ------------------
 1081|   496k|        CRCsinglet(crc0, next, -5 * 8);
  ------------------
  |  |  441|   496k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1082|   496k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   496k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1083|   595k|      case 4:
  ------------------
  |  Branch (1083:7): [True: 99.2k, False: 2.66M]
  ------------------
 1084|   595k|        CRCsinglet(crc0, next, -4 * 8);
  ------------------
  |  |  441|   595k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1085|   595k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   595k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1086|   742k|      case 3:
  ------------------
  |  Branch (1086:7): [True: 147k, False: 2.61M]
  ------------------
 1087|   742k|        CRCsinglet(crc0, next, -3 * 8);
  ------------------
  |  |  441|   742k|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1088|   742k|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|   742k|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1089|  1.91M|      case 2:
  ------------------
  |  Branch (1089:7): [True: 1.17M, False: 1.59M]
  ------------------
 1090|  1.91M|        CRCsinglet(crc0, next, -2 * 8);
  ------------------
  |  |  441|  1.91M|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1091|  1.91M|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|  1.91M|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1092|  2.66M|      case 1:
  ------------------
  |  Branch (1092:7): [True: 744k, False: 2.02M]
  ------------------
 1093|  2.66M|        CRCsinglet(crc0, next, -1 * 8);
  ------------------
  |  |  441|  2.66M|  crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
  ------------------
 1094|  2.66M|        FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|  2.66M|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
 1095|  2.76M|      case 0:;
  ------------------
  |  Branch (1095:7): [True: 104k, False: 2.66M]
  ------------------
 1096|  2.76M|    }
 1097|  2.76M|  }
 1098|  4.16M|  {
 1099|  4.16M|    align_to_8(len, crc0, next);
 1100|  4.16M|    return (uint32_t)crc0 ^ 0xffffffffu;
 1101|  4.16M|  }
 1102|  4.16M|}
_ZN7rocksdb6crc32c6ExtendEjPKcm:
 1132|  4.16M|uint32_t Extend(uint32_t crc, const char* buf, size_t size) {
 1133|  4.16M|  return ChosenExtend(crc, buf, size);
 1134|  4.16M|}
_ZN7rocksdb6crc32c13Crc32cCombineEjjm:
 1278|  1.42M|uint32_t Crc32cCombine(uint32_t crc1, uint32_t crc2, size_t crc2len) {
 1279|  1.42M|  uint32_t pure_crc1_with_init = InvertedToPure(crc1);
 1280|  1.42M|  uint32_t pure_crc2_with_init = InvertedToPure(crc2);
 1281|  1.42M|  uint32_t pure_crc2_init = static_cast<uint32_t>(-1);
 1282|       |
 1283|       |  // Append up to 32 bits of zeroes in the normal way
 1284|  1.42M|  char zeros[4] = {0, 0, 0, 0};
 1285|  1.42M|  auto len = crc2len & 3;
 1286|  1.42M|  uint32_t tmp = pure_crc1_with_init ^ pure_crc2_init;
 1287|  1.42M|  if (len) {
  ------------------
  |  Branch (1287:7): [True: 1.07M, False: 342k]
  ------------------
 1288|  1.07M|    tmp = PureExtend(tmp, zeros, len);
 1289|  1.07M|  }
 1290|  1.42M|  return PureToInverted(
 1291|  1.42M|      Crc32AppendZeroes(tmp, crc2len / 4, crc32c_m, crc32c_powers) ^
 1292|  1.42M|      pure_crc2_with_init);
 1293|  1.42M|}
_ZN7rocksdb6crc32c10align_to_8EmRmRPKh:
  523|  4.42M|    const unsigned char*& next) { // next data pointer, updated on return
  524|  4.42M|  uint32_t crc32bit = static_cast<uint32_t>(crc0);
  525|  4.42M|  if (len & 0x04) {
  ------------------
  |  Branch (525:7): [True: 1.39M, False: 3.02M]
  ------------------
  526|  1.39M|    crc32bit = _mm_crc32_u32(crc32bit, *(uint32_t*)next);
  527|  1.39M|    next += sizeof(uint32_t);
  528|  1.39M|  }
  529|  4.42M|  if (len & 0x02) {
  ------------------
  |  Branch (529:7): [True: 2.31M, False: 2.11M]
  ------------------
  530|  2.31M|    crc32bit = _mm_crc32_u16(crc32bit, *(uint16_t*)next);
  531|  2.31M|    next += sizeof(uint16_t);
  532|  2.31M|  }
  533|  4.42M|  if (len & 0x01) {
  ------------------
  |  Branch (533:7): [True: 2.54M, False: 1.88M]
  ------------------
  534|  2.54M|    crc32bit = _mm_crc32_u8(crc32bit, *(next));
  535|  2.54M|    next++;
  536|  2.54M|  }
  537|  4.42M|  crc0 = crc32bit;
  538|  4.42M|}
_ZN7rocksdb6crc32c10CombineCRCEmmmmPKm:
  549|   412k|    const uint64_t* next2) {
  550|   412k|  const auto multiplier =
  551|   412k|      *(reinterpret_cast<const __m128i*>(clmul_constants) + block_size - 1);
  552|   412k|  const auto crc0_xmm = _mm_set_epi64x(0, crc0);
  553|   412k|  const auto res0 = _mm_clmulepi64_si128(crc0_xmm, multiplier, 0x00);
  554|   412k|  const auto crc1_xmm = _mm_set_epi64x(0, crc1);
  555|   412k|  const auto res1 = _mm_clmulepi64_si128(crc1_xmm, multiplier, 0x10);
  556|   412k|  const auto res = _mm_xor_si128(res0, res1);
  557|   412k|  crc0 = _mm_cvtsi128_si64(res);
  558|   412k|  crc0 = crc0 ^ *((uint64_t*)next2 - 1);
  559|   412k|  crc2 = _mm_crc32_u64(crc2, crc0);
  560|   412k|  return crc2;
  561|   412k|}
crc32c.cc:_ZN7rocksdb6crc32cL13Choose_ExtendEv:
 1106|      2|static inline Function Choose_Extend() {
 1107|       |#ifdef HAVE_POWER8
 1108|       |  return isAltiVec() ? ExtendPPCImpl : ExtendImpl<DefaultCRC32>;
 1109|       |#elif defined(HAVE_ARM64_CRC)
 1110|       |  if(crc32c_runtime_check()) {
 1111|       |    pmull_runtime_flag = crc32c_pmull_runtime_check();
 1112|       |    return ExtendARMImpl;
 1113|       |  } else {
 1114|       |    return ExtendImpl<DefaultCRC32>;
 1115|       |  }
 1116|       |#elif defined(__SSE4_2__) && defined(__PCLMUL__) && !defined NO_THREEWAY_CRC32C
 1117|       |  // NOTE: runtime detection no longer supported on x86
 1118|       |#ifdef _MSC_VER
 1119|       |#pragma warning(disable: 4551)
 1120|       |#endif
 1121|      2|  (void)ExtendImpl<DefaultCRC32>; // suppress unused warning
 1122|       |#ifdef _MSC_VER
 1123|       |#pragma warning(default: 4551)
 1124|       |#endif
 1125|      2|  return crc32c_3way;
 1126|       |#else
 1127|       |  return ExtendImpl<DefaultCRC32>;
 1128|       |#endif
 1129|      2|}
crc32c.cc:_ZN7rocksdb6crc32cL14InvertedToPureEj:
 1226|  3.92M|static inline uint32_t InvertedToPure(uint32_t crc) { return ~crc; }
crc32c.cc:_ZN7rocksdb6crc32cL10PureExtendEjPKcm:
 1230|  1.07M|static inline uint32_t PureExtend(uint32_t crc, const char* buf, size_t size) {
 1231|  1.07M|  return InvertedToPure(Extend(PureToInverted(crc), buf, size));
 1232|  1.07M|}
crc32c.cc:_ZN7rocksdb6crc32cL14PureToInvertedEj:
 1228|  2.50M|static inline uint32_t PureToInverted(uint32_t crc) { return ~crc; }
crc32c.cc:_ZN7rocksdb6crc32cL17Crc32AppendZeroesEjmjRKNSt3__15arrayIjLm62EEE:
 1205|  1.42M|    std::array<uint32_t, 62> const& powers_array) {
 1206|  1.42M|  auto powers = powers_array.data();
 1207|       |  // Append by multiplying by consecutive powers of two of the zeroes
 1208|       |  // array
 1209|  1.42M|  size_t len_bits = len_over_4;
 1210|       |
 1211|  4.52M|  while (len_bits) {
  ------------------
  |  Branch (1211:10): [True: 3.10M, False: 1.42M]
  ------------------
 1212|       |    // Advance directly to next bit set.
 1213|  3.10M|    auto r = CountTrailingZeroBits(len_bits);
 1214|  3.10M|    len_bits >>= r;
 1215|  3.10M|    powers += r;
 1216|       |
 1217|  3.10M|    crc = gf_multiply_sw(crc, *powers, polynomial);
 1218|       |
 1219|  3.10M|    len_bits >>= 1;
 1220|  3.10M|    powers++;
 1221|  3.10M|  }
 1222|       |
 1223|  1.42M|  return crc;
 1224|  1.42M|}
crc32c.cc:_ZN7rocksdb6crc32cL14gf_multiply_swEjjj:
 1153|  3.10M|static constexpr uint32_t gf_multiply_sw(uint32_t a, uint32_t b, uint32_t m) {
 1154|  3.10M|  return gf_multiply_sw_1(/* i = */ 0, /* p = */ 0, a, b, m);
 1155|  3.10M|}
crc32c.cc:_ZN7rocksdb6crc32cL16gf_multiply_sw_1Emjjjj:
 1143|   102M|    size_t i, uint32_t p, uint32_t a, uint32_t b, uint32_t m) {
 1144|       |  // clang-format off
 1145|   102M|  return i == 32 ? p : gf_multiply_sw_1(
  ------------------
  |  Branch (1145:10): [True: 3.10M, False: 99.4M]
  ------------------
 1146|  99.4M|      /* i = */ i + 1,
 1147|  99.4M|      /* p = */ p ^ ((0u-((b >> 31) & 1)) & a),
 1148|  99.4M|      /* a = */ (a >> 1) ^ ((0u-(a & 1)) & m),
 1149|  99.4M|      /* b = */ b << 1,
 1150|  99.4M|      /* m = */ m);
 1151|       |  // clang-format on
 1152|   102M|}

_ZN7rocksdb6crc32c5ValueEPKcm:
   35|  3.08M|inline uint32_t Value(const char* data, size_t n) { return Extend(0, data, n); }
_ZN7rocksdb6crc32c4MaskEj:
   44|  1.42M|inline uint32_t Mask(uint32_t crc) {
   45|       |  // Rotate right by 15 bits and add a constant.
   46|  1.42M|  return ((crc >> 15) | (crc << 17)) + kMaskDelta;
   47|  1.42M|}
_ZN7rocksdb6crc32c6UnmaskEj:
   50|  1.39M|inline uint32_t Unmask(uint32_t masked_crc) {
   51|  1.39M|  uint32_t rot = masked_crc - kMaskDelta;
   52|  1.39M|  return ((rot >> 17) | (rot << 15));
   53|  1.39M|}

_ZN7rocksdb5DeferC2EONSt3__18functionIFvvEEE:
   44|  18.0k|  explicit Defer(std::function<void()>&& fn) : fn_(std::move(fn)) {}
_ZN7rocksdb5DeferD2Ev:
   45|  18.0k|  ~Defer() { fn_(); }

_ZN7rocksdb16FastRangeGenericImmEET0_T_S1_:
   97|  4.48k|inline Range FastRangeGeneric(Hash hash, Range range) {
   98|  4.48k|  return detail::FastRangeGenericImpl<Hash, Range>::Fn(hash, range);
   99|  4.48k|}
_ZN7rocksdb6detail20FastRangeGenericImplImmE2FnEmm:
   55|  4.48k|  static inline Range Fn(uint64_t hash, Range range) {
   56|  4.48k|    static_assert(std::is_unsigned<Range>::value, "must be unsigned");
   57|  4.48k|    static_assert(sizeof(Range) <= sizeof(uint64_t),
   58|  4.48k|                  "cannot be larger than hash (64 bits)");
   59|       |
   60|  4.48k|#ifdef HAVE_UINT128_EXTENSION
   61|       |    // Can use compiler's 128-bit type. Trust it to do the right thing.
   62|  4.48k|    __uint128_t wide = __uint128_t{range} * hash;
   63|  4.48k|    return static_cast<Range>(wide >> 64);
   64|       |#else
   65|       |    // Fall back: full decomposition.
   66|       |    // NOTE: GCC seems to fully understand this code as 64-bit x 64-bit
   67|       |    // -> 128-bit multiplication and optimize it appropriately
   68|       |    uint64_t range64 = range;  // ok to shift by 32, even if Range is 32-bit
   69|       |    uint64_t tmp = uint64_t{range64 & 0xffffFFFF} * uint64_t{hash & 0xffffFFFF};
   70|       |    tmp >>= 32;
   71|       |    tmp += uint64_t{range64 & 0xffffFFFF} * uint64_t{hash >> 32};
   72|       |    // Avoid overflow: first add lower 32 of tmp2, and later upper 32
   73|       |    uint64_t tmp2 = uint64_t{range64 >> 32} * uint64_t{hash & 0xffffFFFF};
   74|       |    tmp += static_cast<uint32_t>(tmp2);
   75|       |    tmp >>= 32;
   76|       |    tmp += (tmp2 >> 32);
   77|       |    tmp += uint64_t{range64 >> 32} * uint64_t{hash >> 32};
   78|       |    return static_cast<Range>(tmp);
   79|       |#endif
   80|  4.48k|  }

_ZN7rocksdb22FileChecksumGenFactory16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIS0_EE:
  157|  9.02k|    std::shared_ptr<FileChecksumGenFactory>* result) {
  158|  9.02k|  static std::once_flag once;
  159|  9.02k|  std::call_once(once, [&]() {
  160|  9.02k|    RegisterFileChecksumGenFactories(*(ObjectLibrary::Default().get()), "");
  161|  9.02k|  });
  162|  9.02k|  if (value == FileChecksumGenCrc32cFactory::kClassName()) {
  ------------------
  |  Branch (162:7): [True: 0, False: 9.02k]
  ------------------
  163|      0|    *result = GetFileChecksumGenCrc32cFactory();
  164|      0|    return Status::OK();
  165|  9.02k|  } else {
  166|  9.02k|    Status s = LoadSharedObject<FileChecksumGenFactory>(options, value, result);
  167|  9.02k|    return s;
  168|  9.02k|  }
  169|  9.02k|}
file_checksum_helper.cc:_ZZN7rocksdb22FileChecksumGenFactory16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIS0_EEENK3$_0clEv:
  159|      1|  std::call_once(once, [&]() {
  160|      1|    RegisterFileChecksumGenFactories(*(ObjectLibrary::Default().get()), "");
  161|      1|  });
file_checksum_helper.cc:_ZN7rocksdb12_GLOBAL__N_132RegisterFileChecksumGenFactoriesERNS_13ObjectLibraryERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEE:
  142|      1|                                            const std::string& /*arg*/) {
  143|      1|  library.AddFactory<FileChecksumGenFactory>(
  144|      1|      FileChecksumGenCrc32cFactory::kClassName(),
  145|      1|      [](const std::string& /*uri*/,
  146|      1|         std::unique_ptr<FileChecksumGenFactory>* guard,
  147|      1|         std::string* /* errmsg */) {
  148|      1|        guard->reset(new FileChecksumGenCrc32cFactory());
  149|      1|        return guard->get();
  150|      1|      });
  151|      1|  return 1;
  152|      1|}

_ZN7rocksdb28FileChecksumGenCrc32cFactory10kClassNameEv:
   63|  9.02k|  static const char* kClassName() { return "FileChecksumGenCrc32cFactory"; }

_ZN7rocksdb4HashEPKcmj:
   25|  94.7k|uint32_t Hash(const char* data, size_t n, uint32_t seed) {
   26|       |  // MurmurHash1 - fast but mediocre quality
   27|       |  // https://github.com/aappleby/smhasher/wiki/MurmurHash1
   28|       |  //
   29|  94.7k|  const uint32_t m = 0xc6a4a793;
   30|  94.7k|  const uint32_t r = 24;
   31|  94.7k|  const char* limit = data + n;
   32|  94.7k|  uint32_t h = static_cast<uint32_t>(seed ^ (n * m));
   33|       |
   34|       |  // Pick up four bytes at a time
   35|   379k|  while (data + 4 <= limit) {
  ------------------
  |  Branch (35:10): [True: 284k, False: 94.7k]
  ------------------
   36|   284k|    uint32_t w = DecodeFixed32(data);
   37|   284k|    data += 4;
   38|   284k|    h += w;
   39|   284k|    h *= m;
   40|   284k|    h ^= (h >> 16);
   41|   284k|  }
   42|       |
   43|       |  // Pick up remaining bytes
   44|  94.7k|  switch (limit - data) {
  ------------------
  |  Branch (44:11): [True: 94.7k, False: 0]
  ------------------
   45|       |    // Note: The original hash implementation used data[i] << shift, which
   46|       |    // promotes the char to int and then performs the shift. If the char is
   47|       |    // negative, the shift is undefined behavior in C++. The hash algorithm is
   48|       |    // part of the format definition, so we cannot change it; to obtain the same
   49|       |    // behavior in a legal way we just cast to uint32_t, which will do
   50|       |    // sign-extension. To guarantee compatibility with architectures where chars
   51|       |    // are unsigned we first cast the char to int8_t.
   52|      0|    case 3:
  ------------------
  |  Branch (52:5): [True: 0, False: 94.7k]
  ------------------
   53|      0|      h += static_cast<uint32_t>(static_cast<int8_t>(data[2])) << 16;
   54|      0|      FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
   55|      0|    case 2:
  ------------------
  |  Branch (55:5): [True: 0, False: 94.7k]
  ------------------
   56|      0|      h += static_cast<uint32_t>(static_cast<int8_t>(data[1])) << 8;
   57|      0|      FALLTHROUGH_INTENDED;
  ------------------
  |  |   10|      0|#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
  ------------------
   58|      0|    case 1:
  ------------------
  |  Branch (58:5): [True: 0, False: 94.7k]
  ------------------
   59|      0|      h += static_cast<uint32_t>(static_cast<int8_t>(data[0]));
   60|      0|      h *= m;
   61|      0|      h ^= (h >> r);
   62|      0|      break;
   63|  94.7k|  }
   64|  94.7k|  return h;
   65|  94.7k|}
_ZN7rocksdb6Hash64EPKcmm:
   81|  13.4M|uint64_t Hash64(const char* data, size_t n, uint64_t seed) {
   82|  13.4M|  return XXPH3_64bits_withSeed(data, n, seed);
  ------------------
  |  |  266|  13.4M|#  define XXPH3_64bits_withSeed XXPH_NAME2(XXPH_NAMESPACE, XXPH3_64bits_withSeed)
  |  |  ------------------
  |  |  |  |  125|  13.4M|#  define XXPH_NAME2(A,B) XXPH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  124|  13.4M|#  define XXPH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   83|  13.4M|}
_ZN7rocksdb8Hash2x64EPKcmPmS2_:
  116|      2|void Hash2x64(const char* data, size_t n, uint64_t* high64, uint64_t* low64) {
  117|       |  // Same as seed = 0
  118|      2|  auto h = XXH3_128bits(data, n);
  ------------------
  |  |  427|      2|#  define XXH3_128bits XXH_NAME2(XXH_NAMESPACE, XXH3_128bits)
  |  |  ------------------
  |  |  |  |  387|      2|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      2|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  119|      2|  *high64 = h.high64;
  120|      2|  *low64 = h.low64;
  121|      2|}
_ZN7rocksdb8Hash2x64EPKcmmPmS2_:
  124|  17.9k|              uint64_t* low64) {
  125|  17.9k|  auto h = XXH3_128bits_withSeed(data, n, seed);
  ------------------
  |  |  428|  17.9k|#  define XXH3_128bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSeed)
  |  |  ------------------
  |  |  |  |  387|  17.9k|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  17.9k|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  126|  17.9k|  *high64 = h.high64;
  127|  17.9k|  *low64 = h.low64;
  128|  17.9k|}

_ZNK7rocksdb15SliceNPHasher64clERKNS_5SliceEm:
  136|  4.48k|  uint64_t operator()(const Slice& s, uint64_t seed = 0) const {
  137|  4.48k|    return GetSliceNPHash64(s, seed);
  138|  4.48k|  }
_ZN7rocksdb8NPHash64EPKcmm:
   45|  13.4M|inline uint64_t NPHash64(const char* data, size_t n, uint64_t seed) {
   46|       |#ifdef ROCKSDB_MODIFY_NPHASH
   47|       |  // For testing "subject to change"
   48|       |  return Hash64(data, n, seed + 123456789);
   49|       |#else
   50|       |  // Currently same as Hash64
   51|  13.4M|  return Hash64(data, n, seed);
   52|  13.4M|#endif
   53|  13.4M|}
_ZN7rocksdb16GetSliceNPHash64ERKNS_5SliceEm:
  108|  5.32M|inline uint64_t GetSliceNPHash64(const Slice& s, uint64_t seed) {
  109|  5.32M|  return NPHash64(s.data(), s.size(), seed);
  110|  5.32M|}
_ZN7rocksdb12GetSliceHashERKNS_5SliceE:
  121|  94.7k|inline uint32_t GetSliceHash(const Slice& s) {
  122|  94.7k|  return Hash(s.data(), s.size(), 397);
  123|  94.7k|}
_ZN7rocksdb11Upper32of64Em:
  126|  63.8k|inline uint32_t Upper32of64(uint64_t v) {
  127|  63.8k|  return static_cast<uint32_t>(v >> 32);
  128|  63.8k|}
_ZN7rocksdb11Lower32of64Em:
  129|   272k|inline uint32_t Lower32of64(uint64_t v) { return static_cast<uint32_t>(v); }

_ZN7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ForwardRangeDelIterator19EndKeyMinComparatorEE4pushERKS9_:
   47|  50.9k|  void push(const T& value) {
   48|  50.9k|    data_.push_back(value);
   49|  50.9k|    upheap(data_.size() - 1);
   50|  50.9k|  }
_ZN7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ForwardRangeDelIterator19EndKeyMinComparatorEE6upheapEm:
  115|  50.9k|  void upheap(size_t index) {
  116|  50.9k|    T v = std::move(data_[index]);
  117|  50.9k|    while (index > get_root()) {
  ------------------
  |  Branch (117:12): [True: 0, False: 50.9k]
  ------------------
  118|      0|      const size_t parent = get_parent(index);
  119|      0|      if (!cmp_(data_[parent], v)) {
  ------------------
  |  Branch (119:11): [True: 0, False: 0]
  ------------------
  120|      0|        break;
  121|      0|      }
  122|      0|      data_[index] = std::move(data_[parent]);
  123|      0|      index = parent;
  124|      0|    }
  125|  50.9k|    data_[index] = std::move(v);
  126|  50.9k|    reset_root_cmp_cache();
  127|  50.9k|  }
_ZN7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ForwardRangeDelIterator19EndKeyMinComparatorEE8get_rootEv:
  110|  50.9k|  static inline size_t get_root() { return 0; }
_ZN7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ForwardRangeDelIterator19EndKeyMinComparatorEE20reset_root_cmp_cacheEv:
  105|   103k|  void reset_root_cmp_cache() {
  106|   103k|    root_cmp_cache_ = std::numeric_limits<size_t>::max();
  107|   103k|  }
_ZNK7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ForwardRangeDelIterator19EndKeyMinComparatorEE3topEv:
   57|   200k|  const T& top() const {
   58|   200k|    assert(!empty());
   59|   200k|    return data_.front();
   60|   200k|  }
_ZN7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ForwardRangeDelIterator19EndKeyMinComparatorEE3popEv:
   74|  49.5k|  void pop() {
   75|  49.5k|    assert(!empty());
   76|  49.5k|    if (data_.size() > 1) {
  ------------------
  |  Branch (76:9): [True: 0, False: 49.5k]
  ------------------
   77|       |      // Avoid self-move-assign, because it could cause problems with
   78|       |      // classes which are not prepared for this and it trips up the
   79|       |      // STL debugger when activated.
   80|      0|      data_.front() = std::move(data_.back());
   81|      0|    }
   82|  49.5k|    data_.pop_back();
   83|  49.5k|    if (!empty()) {
  ------------------
  |  Branch (83:9): [True: 0, False: 49.5k]
  ------------------
   84|      0|      downheap(get_root());
   85|  49.5k|    } else {
   86|  49.5k|      reset_root_cmp_cache();
   87|  49.5k|    }
   88|  49.5k|  }
_ZNK7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ForwardRangeDelIterator19EndKeyMinComparatorEE5emptyEv:
  101|   217k|  bool empty() const { return data_.empty(); }
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEE4pushERKS2_:
   47|  9.52k|  void push(const T& value) {
   48|  9.52k|    data_.push_back(value);
   49|  9.52k|    upheap(data_.size() - 1);
   50|  9.52k|  }
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEE6upheapEm:
  115|  9.52k|  void upheap(size_t index) {
  116|  9.52k|    T v = std::move(data_[index]);
  117|  9.52k|    while (index > get_root()) {
  ------------------
  |  Branch (117:12): [True: 0, False: 9.52k]
  ------------------
  118|      0|      const size_t parent = get_parent(index);
  119|      0|      if (!cmp_(data_[parent], v)) {
  ------------------
  |  Branch (119:11): [True: 0, False: 0]
  ------------------
  120|      0|        break;
  121|      0|      }
  122|      0|      data_[index] = std::move(data_[parent]);
  123|      0|      index = parent;
  124|      0|    }
  125|  9.52k|    data_[index] = std::move(v);
  126|  9.52k|    reset_root_cmp_cache();
  127|  9.52k|  }
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEE8get_rootEv:
  110|  74.7M|  static inline size_t get_root() { return 0; }
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEE20reset_root_cmp_cacheEv:
  105|  30.7k|  void reset_root_cmp_cache() {
  106|  30.7k|    root_cmp_cache_ = std::numeric_limits<size_t>::max();
  107|  30.7k|  }
_ZNK7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEE3topEv:
   57|   373M|  const T& top() const {
   58|   373M|    assert(!empty());
   59|   373M|    return data_.front();
   60|   373M|  }
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEE3popEv:
   74|  9.30k|  void pop() {
   75|  9.30k|    assert(!empty());
   76|  9.30k|    if (data_.size() > 1) {
  ------------------
  |  Branch (76:9): [True: 0, False: 9.30k]
  ------------------
   77|       |      // Avoid self-move-assign, because it could cause problems with
   78|       |      // classes which are not prepared for this and it trips up the
   79|       |      // STL debugger when activated.
   80|      0|      data_.front() = std::move(data_.back());
   81|      0|    }
   82|  9.30k|    data_.pop_back();
   83|  9.30k|    if (!empty()) {
  ------------------
  |  Branch (83:9): [True: 0, False: 9.30k]
  ------------------
   84|      0|      downheap(get_root());
   85|  9.30k|    } else {
   86|  9.30k|      reset_root_cmp_cache();
   87|  9.30k|    }
   88|  9.30k|  }
_ZNK7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEE5emptyEv:
  101|  74.9M|  bool empty() const { return data_.empty(); }
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEE8downheapEm:
  129|  74.7M|  void downheap(size_t index) {
  130|  74.7M|    T v = std::move(data_[index]);
  131|       |
  132|  74.7M|    size_t picked_child = std::numeric_limits<size_t>::max();
  133|  74.7M|    while (1) {
  ------------------
  |  Branch (133:12): [Folded - Ignored]
  ------------------
  134|  74.7M|      const size_t left_child = get_left(index);
  135|  74.7M|      if (get_left(index) >= data_.size()) {
  ------------------
  |  Branch (135:11): [True: 74.7M, False: 0]
  ------------------
  136|  74.7M|        break;
  137|  74.7M|      }
  138|      0|      const size_t right_child = left_child + 1;
  139|      0|      assert(right_child == get_right(index));
  140|      0|      picked_child = left_child;
  141|      0|      if (index == 0 && root_cmp_cache_ < data_.size()) {
  ------------------
  |  Branch (141:11): [True: 0, False: 0]
  |  Branch (141:25): [True: 0, False: 0]
  ------------------
  142|      0|        picked_child = root_cmp_cache_;
  143|      0|      } else if (right_child < data_.size() &&
  ------------------
  |  Branch (143:18): [True: 0, False: 0]
  ------------------
  144|      0|                 cmp_(data_[left_child], data_[right_child])) {
  ------------------
  |  Branch (144:18): [True: 0, False: 0]
  ------------------
  145|      0|        picked_child = right_child;
  146|      0|      }
  147|      0|      if (!cmp_(v, data_[picked_child])) {
  ------------------
  |  Branch (147:11): [True: 0, False: 0]
  ------------------
  148|      0|        break;
  149|      0|      }
  150|      0|      data_[index] = std::move(data_[picked_child]);
  151|      0|      index = picked_child;
  152|      0|    }
  153|       |
  154|  74.7M|    if (index == 0) {
  ------------------
  |  Branch (154:9): [True: 74.7M, False: 0]
  ------------------
  155|       |      // We did not change anything in the tree except for the value
  156|       |      // of the root node, left and right child did not change, we can
  157|       |      // cache that `picked_child` is the smallest child
  158|       |      // so next time we compare againist it directly
  159|  74.7M|      root_cmp_cache_ = picked_child;
  160|  74.7M|    } else {
  161|       |      // the tree changed, reset cache
  162|      0|      reset_root_cmp_cache();
  163|      0|    }
  164|       |
  165|  74.7M|    data_[index] = std::move(v);
  166|  74.7M|  }
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEE8get_leftEm:
  112|   149M|  static inline size_t get_left(size_t index) { return 2 * index + 1; }
_ZN7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ReverseRangeDelIterator21StartKeyMaxComparatorEE20reset_root_cmp_cacheEv:
  105|   121k|  void reset_root_cmp_cache() {
  106|   121k|    root_cmp_cache_ = std::numeric_limits<size_t>::max();
  107|   121k|  }
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_23ReverseRangeDelIterator19EndKeyMaxComparatorEE20reset_root_cmp_cacheEv:
  105|   121k|  void reset_root_cmp_cache() {
  106|   121k|    root_cmp_cache_ = std::numeric_limits<size_t>::max();
  107|   121k|  }
_ZN7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ForwardRangeDelIterator19EndKeyMinComparatorEEC2ESB_:
   45|  2.90k|  explicit BinaryHeap(Compare cmp) : cmp_(std::move(cmp)) {}
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEEC2ES3_:
   45|  7.39k|  explicit BinaryHeap(Compare cmp) : cmp_(std::move(cmp)) {}
_ZN7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ForwardRangeDelIterator19EndKeyMinComparatorEE5clearEv:
   96|  2.90k|  void clear() {
   97|  2.90k|    data_.clear();
   98|  2.90k|    reset_root_cmp_cache();
   99|  2.90k|  }
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEE5clearEv:
   96|  11.8k|  void clear() {
   97|  11.8k|    data_.clear();
   98|  11.8k|    reset_root_cmp_cache();
   99|  11.8k|  }
_ZN7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ReverseRangeDelIterator21StartKeyMaxComparatorEEC2ESB_:
   45|  2.90k|  explicit BinaryHeap(Compare cmp) : cmp_(std::move(cmp)) {}
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_23ReverseRangeDelIterator19EndKeyMaxComparatorEEC2ES4_:
   45|  2.90k|  explicit BinaryHeap(Compare cmp) : cmp_(std::move(cmp)) {}
_ZN7rocksdb10BinaryHeapINSt3__121__tree_const_iteratorIPNS_25TruncatedRangeDelIteratorEPNS1_11__tree_nodeIS4_PvEElEENS_23ReverseRangeDelIterator21StartKeyMaxComparatorEE5clearEv:
   96|   121k|  void clear() {
   97|   121k|    data_.clear();
   98|   121k|    reset_root_cmp_cache();
   99|   121k|  }
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_23ReverseRangeDelIterator19EndKeyMaxComparatorEE5clearEv:
   96|   121k|  void clear() {
   97|   121k|    data_.clear();
   98|   121k|    reset_root_cmp_cache();
   99|   121k|  }
_ZN7rocksdb10BinaryHeapIPNS_25TruncatedRangeDelIteratorENS_21StartKeyMinComparatorEE11replace_topERKS2_:
   62|  74.7M|  void replace_top(const T& value) {
   63|  74.7M|    assert(!empty());
   64|  74.7M|    data_.front() = value;
   65|  74.7M|    downheap(get_root());
   66|  74.7M|  }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE11replace_topEOS3_:
   68|   259k|  void replace_top(T&& value) {
   69|   259k|    assert(!empty());
   70|   259k|    data_.front() = std::move(value);
   71|   259k|    downheap(get_root());
   72|   259k|  }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE8downheapEm:
  129|   292k|  void downheap(size_t index) {
  130|   292k|    T v = std::move(data_[index]);
  131|       |
  132|   292k|    size_t picked_child = std::numeric_limits<size_t>::max();
  133|   307k|    while (1) {
  ------------------
  |  Branch (133:12): [Folded - Ignored]
  ------------------
  134|   307k|      const size_t left_child = get_left(index);
  135|   307k|      if (get_left(index) >= data_.size()) {
  ------------------
  |  Branch (135:11): [True: 132k, False: 175k]
  ------------------
  136|   132k|        break;
  137|   132k|      }
  138|   175k|      const size_t right_child = left_child + 1;
  139|   175k|      assert(right_child == get_right(index));
  140|   175k|      picked_child = left_child;
  141|   175k|      if (index == 0 && root_cmp_cache_ < data_.size()) {
  ------------------
  |  Branch (141:11): [True: 175k, False: 0]
  |  Branch (141:25): [True: 158k, False: 16.5k]
  ------------------
  142|   158k|        picked_child = root_cmp_cache_;
  143|   158k|      } else if (right_child < data_.size() &&
  ------------------
  |  Branch (143:18): [True: 0, False: 16.5k]
  ------------------
  144|  16.5k|                 cmp_(data_[left_child], data_[right_child])) {
  ------------------
  |  Branch (144:18): [True: 0, False: 0]
  ------------------
  145|      0|        picked_child = right_child;
  146|      0|      }
  147|   175k|      if (!cmp_(v, data_[picked_child])) {
  ------------------
  |  Branch (147:11): [True: 159k, False: 15.6k]
  ------------------
  148|   159k|        break;
  149|   159k|      }
  150|  15.6k|      data_[index] = std::move(data_[picked_child]);
  151|  15.6k|      index = picked_child;
  152|  15.6k|    }
  153|       |
  154|   292k|    if (index == 0) {
  ------------------
  |  Branch (154:9): [True: 276k, False: 15.6k]
  ------------------
  155|       |      // We did not change anything in the tree except for the value
  156|       |      // of the root node, left and right child did not change, we can
  157|       |      // cache that `picked_child` is the smallest child
  158|       |      // so next time we compare againist it directly
  159|   276k|      root_cmp_cache_ = picked_child;
  160|   276k|    } else {
  161|       |      // the tree changed, reset cache
  162|  15.6k|      reset_root_cmp_cache();
  163|  15.6k|    }
  164|       |
  165|   292k|    data_[index] = std::move(v);
  166|   292k|  }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE8get_leftEm:
  112|   615k|  static inline size_t get_left(size_t index) { return 2 * index + 1; }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE20reset_root_cmp_cacheEv:
  105|  31.3k|  void reset_root_cmp_cache() {
  106|  31.3k|    root_cmp_cache_ = std::numeric_limits<size_t>::max();
  107|  31.3k|  }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE8get_rootEv:
  110|   299k|  static inline size_t get_root() { return 0; }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEEC2ES4_:
   45|  4.51k|  explicit BinaryHeap(Compare cmp) : cmp_(std::move(cmp)) {}
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE3popEv:
   74|  6.72k|  void pop() {
   75|  6.72k|    assert(!empty());
   76|  6.72k|    if (data_.size() > 1) {
  ------------------
  |  Branch (76:9): [True: 2.23k, False: 4.48k]
  ------------------
   77|       |      // Avoid self-move-assign, because it could cause problems with
   78|       |      // classes which are not prepared for this and it trips up the
   79|       |      // STL debugger when activated.
   80|  2.23k|      data_.front() = std::move(data_.back());
   81|  2.23k|    }
   82|  6.72k|    data_.pop_back();
   83|  6.72k|    if (!empty()) {
  ------------------
  |  Branch (83:9): [True: 2.23k, False: 4.48k]
  ------------------
   84|  2.23k|      downheap(get_root());
   85|  4.48k|    } else {
   86|  4.48k|      reset_root_cmp_cache();
   87|  4.48k|    }
   88|  6.72k|  }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE4pushEOS3_:
   52|  2.90k|  void push(T&& value) {
   53|  2.90k|    data_.push_back(std::move(value));
   54|  2.90k|    upheap(data_.size() - 1);
   55|  2.90k|  }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE6upheapEm:
  115|  6.72k|  void upheap(size_t index) {
  116|  6.72k|    T v = std::move(data_[index]);
  117|  7.35k|    while (index > get_root()) {
  ------------------
  |  Branch (117:12): [True: 2.23k, False: 5.12k]
  ------------------
  118|  2.23k|      const size_t parent = get_parent(index);
  119|  2.23k|      if (!cmp_(data_[parent], v)) {
  ------------------
  |  Branch (119:11): [True: 1.60k, False: 636]
  ------------------
  120|  1.60k|        break;
  121|  1.60k|      }
  122|    636|      data_[index] = std::move(data_[parent]);
  123|    636|      index = parent;
  124|    636|    }
  125|  6.72k|    data_[index] = std::move(v);
  126|  6.72k|    reset_root_cmp_cache();
  127|  6.72k|  }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE10get_parentEm:
  111|  2.23k|  static inline size_t get_parent(size_t index) { return (index - 1) / 2; }
_ZNK7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE5emptyEv:
  101|   517k|  bool empty() const { return data_.empty(); }
_ZNK7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE3topEv:
   57|   659k|  const T& top() const {
   58|   659k|    assert(!empty());
   59|   659k|    return data_.front();
   60|   659k|  }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE11replace_topERKS3_:
   62|  30.8k|  void replace_top(const T& value) {
   63|  30.8k|    assert(!empty());
   64|  30.8k|    data_.front() = value;
   65|  30.8k|    downheap(get_root());
   66|  30.8k|  }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE4pushERKS3_:
   47|  3.81k|  void push(const T& value) {
   48|  3.81k|    data_.push_back(value);
   49|  3.81k|    upheap(data_.size() - 1);
   50|  3.81k|  }
_ZN7rocksdb10BinaryHeapIPNS_15MergingIterator8HeapItemENS1_21MinHeapItemComparatorEE5clearEv:
   96|  4.48k|  void clear() {
   97|  4.48k|    data_.clear();
   98|  4.48k|    reset_root_cmp_cache();
   99|  4.48k|  }

_ZN7rocksdb12stl_wrappers16LessOfComparatorC2EPKNS_10ComparatorE:
   19|  8.96k|      : cmp(c) {}
_ZNK7rocksdb12stl_wrappers16LessOfComparatorclERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEESA_:
   21|   869k|  bool operator()(const std::string& a, const std::string& b) const {
   22|   869k|    return cmp->Compare(Slice(a), Slice(b)) < 0;
   23|   869k|  }

_ZN7rocksdb12BitsSetToOneIjEEiT_:
  173|  9.02k|inline int BitsSetToOne(T v) {
  174|  9.02k|  static_assert(std::is_integral_v<T>, "non-integral type");
  175|  9.02k|  static_assert(!std::is_reference_v<T>, "use std::remove_reference_t");
  176|       |
  177|       |#ifdef _MSC_VER
  178|       |  static_assert(sizeof(T) <= sizeof(uint64_t), "type too big");
  179|       |  if (sizeof(T) < sizeof(uint32_t)) {
  180|       |    // This bit mask is to avoid a compiler warning on unused path
  181|       |    constexpr auto mm = 8 * sizeof(uint32_t) - 1;
  182|       |    // The bit mask is to neutralize sign extension on small signed types
  183|       |    constexpr uint32_t m = (uint32_t{1} << ((8 * sizeof(T)) & mm)) - 1;
  184|       |#if __POPCNT__
  185|       |    return static_cast<int>(__popcnt(static_cast<uint32_t>(v) & m));
  186|       |#else
  187|       |    return static_cast<int>(detail::BitsSetToOneFallback(v) & m);
  188|       |#endif  // __POPCNT__
  189|       |  } else if (sizeof(T) == sizeof(uint32_t)) {
  190|       |#if __POPCNT__
  191|       |    return static_cast<int>(__popcnt(static_cast<uint32_t>(v)));
  192|       |#else
  193|       |    return detail::BitsSetToOneFallback(static_cast<uint32_t>(v));
  194|       |#endif  // __POPCNT__
  195|       |  } else {
  196|       |#if __POPCNT__
  197|       |#ifdef _M_X64
  198|       |    return static_cast<int>(__popcnt64(static_cast<uint64_t>(v)));
  199|       |#else
  200|       |    return static_cast<int>(
  201|       |        __popcnt(static_cast<uint32_t>(static_cast<uint64_t>(v) >> 32) +
  202|       |                 __popcnt(static_cast<uint32_t>(v))));
  203|       |#endif  // _M_X64
  204|       |#else
  205|       |    return detail::BitsSetToOneFallback(static_cast<uint64_t>(v));
  206|       |#endif  // __POPCNT__
  207|       |  }
  208|       |#else
  209|  9.02k|  static_assert(sizeof(T) <= sizeof(unsigned long long), "type too big");
  210|  9.02k|  if (sizeof(T) < sizeof(unsigned int)) {
  ------------------
  |  Branch (210:7): [Folded - Ignored]
  ------------------
  211|       |    // This bit mask is to avoid a compiler warning on unused path
  212|      0|    constexpr auto mm = 8 * sizeof(unsigned int) - 1;
  213|       |    // This bit mask is to neutralize sign extension on small signed types
  214|      0|    constexpr unsigned int m = (1U << ((8 * sizeof(T)) & mm)) - 1;
  215|      0|    return __builtin_popcount(static_cast<unsigned int>(v) & m);
  216|  9.02k|  } else if (sizeof(T) == sizeof(unsigned int)) {
  ------------------
  |  Branch (216:14): [Folded - Ignored]
  ------------------
  217|  9.02k|    return __builtin_popcount(static_cast<unsigned int>(v));
  218|  9.02k|  } else if (sizeof(T) <= sizeof(unsigned long)) {
  ------------------
  |  Branch (218:14): [Folded - Ignored]
  ------------------
  219|      0|    return __builtin_popcountl(static_cast<unsigned long>(v));
  220|      0|  } else {
  221|      0|    return __builtin_popcountll(static_cast<unsigned long long>(v));
  222|      0|  }
  223|  9.02k|#endif
  224|  9.02k|}
_ZN7rocksdb11BottomNBitsIiEET_S1_i:
   29|  2.90k|inline T BottomNBits(T v, int nbits) {
   30|  2.90k|  static_assert(std::is_integral_v<T>, "non-integral type");
   31|  2.90k|  static_assert(!std::is_reference_v<T>, "use std::remove_reference_t");
   32|  2.90k|  assert(nbits >= 0);
   33|  2.90k|  assert(nbits < int{8 * sizeof(T)});
   34|  2.90k|#ifdef __BMI2__
   35|  2.90k|  if constexpr (sizeof(T) <= 4) {
  ------------------
  |  Branch (35:17): [Folded - Ignored]
  ------------------
   36|  2.90k|    return static_cast<T>(_bzhi_u32(static_cast<uint32_t>(v), nbits));
   37|  2.90k|  }
   38|      0|  if constexpr (sizeof(T) <= 8) {
  ------------------
  |  Branch (38:17): [Folded - Ignored]
  ------------------
   39|      0|    return static_cast<T>(_bzhi_u64(static_cast<uint64_t>(v), nbits));
   40|      0|  }
   41|      0|#endif
   42|       |  // Newer compilers compile this down to bzhi on x86, but some older
   43|       |  // ones don't, thus the need for the intrinsic above.
   44|      0|  return static_cast<T>(v & ((T{1} << nbits) - 1));
   45|      0|}
_ZN7rocksdb15EndianSwapValueImEET_S1_:
  251|  17.9k|inline T EndianSwapValue(T v) {
  252|  17.9k|  static_assert(std::is_integral_v<T>, "non-integral type");
  253|  17.9k|  static_assert(!std::is_reference_v<T>, "use std::remove_reference_t");
  254|       |
  255|       |#ifdef _MSC_VER
  256|       |  if (sizeof(T) == 2) {
  257|       |    return static_cast<T>(_byteswap_ushort(static_cast<uint16_t>(v)));
  258|       |  } else if (sizeof(T) == 4) {
  259|       |    return static_cast<T>(_byteswap_ulong(static_cast<uint32_t>(v)));
  260|       |  } else if (sizeof(T) == 8) {
  261|       |    return static_cast<T>(_byteswap_uint64(static_cast<uint64_t>(v)));
  262|       |  }
  263|       |#else
  264|  17.9k|  if (sizeof(T) == 2) {
  ------------------
  |  Branch (264:7): [Folded - Ignored]
  ------------------
  265|      0|    return static_cast<T>(__builtin_bswap16(static_cast<uint16_t>(v)));
  266|  17.9k|  } else if (sizeof(T) == 4) {
  ------------------
  |  Branch (266:14): [Folded - Ignored]
  ------------------
  267|      0|    return static_cast<T>(__builtin_bswap32(static_cast<uint32_t>(v)));
  268|  17.9k|  } else if (sizeof(T) == 8) {
  ------------------
  |  Branch (268:14): [Folded - Ignored]
  ------------------
  269|  17.9k|    return static_cast<T>(__builtin_bswap64(static_cast<uint64_t>(v)));
  270|  17.9k|  }
  271|      0|#endif
  272|       |  // Recognized by clang as bswap, but not by gcc :(
  273|      0|  T ret_val = 0;
  274|      0|  for (std::size_t i = 0; i < sizeof(T); ++i) {
  ------------------
  |  Branch (274:27): [True: 0, False: 0]
  ------------------
  275|      0|    ret_val |= ((v >> (8 * i)) & 0xff) << (8 * (sizeof(T) - 1 - i));
  276|      0|  }
  277|      0|  return ret_val;
  278|  17.9k|}
_ZN7rocksdb21CountTrailingZeroBitsImEEiT_:
  103|  3.10M|inline int CountTrailingZeroBits(T v) {
  104|  3.10M|  static_assert(std::is_integral_v<T>, "non-integral type");
  105|  3.10M|  static_assert(!std::is_reference_v<T>, "use std::remove_reference_t");
  106|  3.10M|  assert(v != 0);
  107|       |#ifdef _MSC_VER
  108|       |  static_assert(sizeof(T) <= sizeof(uint64_t), "type too big");
  109|       |  unsigned long tz = 0;
  110|       |  if (sizeof(T) <= sizeof(uint32_t)) {
  111|       |    _BitScanForward(&tz, static_cast<uint32_t>(v));
  112|       |  } else {
  113|       |#if defined(_M_X64) || defined(_M_ARM64)
  114|       |    _BitScanForward64(&tz, static_cast<uint64_t>(v));
  115|       |#else
  116|       |    _BitScanForward(&tz, static_cast<uint32_t>(v));
  117|       |    if (tz == 0) {
  118|       |      _BitScanForward(&tz,
  119|       |                      static_cast<uint32_t>(static_cast<uint64_t>(v) >> 32));
  120|       |      tz += 32;
  121|       |    }
  122|       |#endif
  123|       |  }
  124|       |  return static_cast<int>(tz);
  125|       |#else
  126|  3.10M|  static_assert(sizeof(T) <= sizeof(unsigned long long), "type too big");
  127|  3.10M|  if (sizeof(T) <= sizeof(unsigned int)) {
  ------------------
  |  Branch (127:7): [Folded - Ignored]
  ------------------
  128|      0|    return __builtin_ctz(static_cast<unsigned int>(v));
  129|  3.10M|  } else if (sizeof(T) <= sizeof(unsigned long)) {
  ------------------
  |  Branch (129:14): [Folded - Ignored]
  ------------------
  130|  3.10M|    return __builtin_ctzl(static_cast<unsigned long>(v));
  131|  3.10M|  } else {
  132|      0|    return __builtin_ctzll(static_cast<unsigned long long>(v));
  133|      0|  }
  134|  3.10M|#endif
  135|  3.10M|}
_ZN7rocksdb11ReverseBitsImEET_S1_:
  282|  17.9k|inline T ReverseBits(T v) {
  283|  17.9k|  static_assert(std::is_integral_v<T>, "non-integral type");
  284|  17.9k|  static_assert(!std::is_reference_v<T>, "use std::remove_reference_t");
  285|       |
  286|  17.9k|  T r = EndianSwapValue(v);
  287|  17.9k|  const T kHighestByte = T{1} << ((sizeof(T) - 1) * 8);
  288|  17.9k|  const T kEveryByte = kHighestByte | (kHighestByte / 255);
  289|       |
  290|  17.9k|  r = ((r & (kEveryByte * 0x0f)) << 4) | ((r >> 4) & (kEveryByte * 0x0f));
  291|  17.9k|  r = ((r & (kEveryByte * 0x33)) << 2) | ((r >> 2) & (kEveryByte * 0x33));
  292|  17.9k|  r = ((r & (kEveryByte * 0x55)) << 1) | ((r >> 1) & (kEveryByte * 0x55));
  293|       |
  294|  17.9k|  return r;
  295|  17.9k|}
_ZN7rocksdb18DownwardInvolutionImEET_S1_:
  318|  8.96k|inline T DownwardInvolution(T v) {
  319|  8.96k|  static_assert(std::is_integral_v<T>, "non-integral type");
  320|  8.96k|  static_assert(!std::is_reference_v<T>, "use std::remove_reference_t");
  321|  8.96k|  static_assert(sizeof(T) <= 8, "only supported up to 64 bits");
  322|       |
  323|  8.96k|  uint64_t r = static_cast<uint64_t>(v);
  324|  8.96k|  if constexpr (sizeof(T) > 4) {
  ------------------
  |  Branch (324:17): [Folded - Ignored]
  ------------------
  325|  8.96k|    r ^= r >> 32;
  326|  8.96k|  }
  327|  8.96k|  if constexpr (sizeof(T) > 2) {
  ------------------
  |  Branch (327:17): [Folded - Ignored]
  ------------------
  328|  8.96k|    r ^= (r & 0xffff0000ffff0000U) >> 16;
  329|  8.96k|  }
  330|  8.96k|  if constexpr (sizeof(T) > 1) {
  ------------------
  |  Branch (330:17): [Folded - Ignored]
  ------------------
  331|  8.96k|    r ^= (r & 0xff00ff00ff00ff00U) >> 8;
  332|  8.96k|  }
  333|  8.96k|  r ^= (r & 0xf0f0f0f0f0f0f0f0U) >> 4;
  334|  8.96k|  r ^= (r & 0xccccccccccccccccU) >> 2;
  335|  8.96k|  r ^= (r & 0xaaaaaaaaaaaaaaaaU) >> 1;
  336|  8.96k|  return static_cast<T>(r);
  337|  8.96k|}

_ZN7rocksdb9MutexLockC2EPNS_4port5MutexE:
   37|   370k|  explicit MutexLock(port::Mutex *mu) : mu_(mu) { this->mu_->Lock(); }
_ZN7rocksdb9MutexLockD2Ev:
   42|   370k|  ~MutexLock() { this->mu_->Unlock(); }
_ZN7rocksdb8ReadLockC2EPNS_4port7RWMutexE:
   55|  9.02k|  explicit ReadLock(port::RWMutex *mu) : mu_(mu) { this->mu_->ReadLock(); }
_ZN7rocksdb8ReadLockD2Ev:
   60|  9.02k|  ~ReadLock() { this->mu_->ReadUnlock(); }
_ZN7rocksdb9WriteLockC2EPNS_4port7RWMutexE:
   89|  18.0k|  explicit WriteLock(port::RWMutex *mu) : mu_(mu) { this->mu_->WriteLock(); }
_ZN7rocksdb9WriteLockD2Ev:
   94|  18.0k|  ~WriteLock() { this->mu_->WriteUnlock(); }
_ZN7rocksdb9SpinMutexC2Ev:
  106|   445k|  SpinMutex() : locked_(false) {}
_ZN7rocksdb9SpinMutex8try_lockEv:
  108|  2.58M|  bool try_lock() {
  109|  2.58M|    auto currently_locked = locked_.load(std::memory_order_relaxed);
  110|  2.58M|    return !currently_locked &&
  ------------------
  |  Branch (110:12): [True: 2.58M, False: 0]
  ------------------
  111|  2.58M|           locked_.compare_exchange_weak(currently_locked, true,
  ------------------
  |  Branch (111:12): [True: 2.58M, False: 0]
  ------------------
  112|  2.58M|                                         std::memory_order_acquire,
  113|  2.58M|                                         std::memory_order_relaxed);
  114|  2.58M|  }
_ZN7rocksdb9SpinMutex4lockEv:
  116|  3.21k|  void lock() {
  117|  3.21k|    for (size_t tries = 0;; ++tries) {
  118|  3.21k|      if (try_lock()) {
  ------------------
  |  Branch (118:11): [True: 3.21k, False: 0]
  ------------------
  119|       |        // success
  120|  3.21k|        break;
  121|  3.21k|      }
  122|      0|      port::AsmVolatilePause();
  123|      0|      if (tries > 100) {
  ------------------
  |  Branch (123:11): [True: 0, False: 0]
  ------------------
  124|      0|        std::this_thread::yield();
  125|      0|      }
  126|      0|    }
  127|  3.21k|  }
_ZN7rocksdb9SpinMutex6unlockEv:
  129|  2.58M|  void unlock() { locked_.store(false, std::memory_order_release); }
_ZN7rocksdb7StripedINS_19CacheAlignedWrapperINS_4port5MutexEEENS_5SliceENS_15SliceNPHasher64EEC2Em:
  169|  18.0k|      : stripe_count_(stripe_count), data_(new T[stripe_count]) {}
_ZN7rocksdb7StripedINS_19CacheAlignedWrapperINS_4port5MutexEEENS_5SliceENS_15SliceNPHasher64EE3GetERKS5_m:
  172|  4.48k|  Unwrapped &Get(const Key &key, uint64_t seed = 0) {
  173|  4.48k|    size_t index = FastRangeGeneric(hash_(key, seed), stripe_count_);
  174|  4.48k|    return Unwrap<T>::Go(data_[index]);
  175|  4.48k|  }
_ZN7rocksdb6UnwrapINS_19CacheAlignedWrapperINS_4port5MutexEEEE2GoERS4_:
  153|  4.48k|  static type &Go(CacheAlignedWrapper<T> &t) { return t.obj_; }

_ZN7rocksdb6Random14GetTLSInstanceEv:
   23|  2.54M|Random* Random::GetTLSInstance() {
   24|  2.54M|  STORAGE_DECL Random* tls_instance;
  ------------------
  |  |   19|  2.54M|#define STORAGE_DECL static thread_local
  ------------------
   25|  2.54M|  STORAGE_DECL aligned_storage<Random>::type tls_instance_bytes;
  ------------------
  |  |   19|  2.54M|#define STORAGE_DECL static thread_local
  ------------------
   26|       |
   27|  2.54M|  auto rv = tls_instance;
   28|  2.54M|  if (UNLIKELY(rv == nullptr)) {
  ------------------
  |  |   14|  2.54M|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 1, False: 2.54M]
  |  |  ------------------
  ------------------
   29|      1|    size_t seed = std::hash<std::thread::id>()(std::this_thread::get_id());
   30|      1|    rv = new (&tls_instance_bytes) Random((uint32_t)seed);
   31|      1|    tls_instance = rv;
   32|      1|  }
   33|  2.54M|  return rv;
   34|  2.54M|}

_ZN7rocksdb6Random8GoodSeedEj:
   34|  9.02k|  static uint32_t GoodSeed(uint32_t s) { return (s & M) != 0 ? (s & M) : 1; }
  ------------------
  |  Branch (34:49): [True: 9.02k, False: 0]
  ------------------
_ZN7rocksdb6RandomC2Ej:
   40|  9.02k|  explicit Random(uint32_t s) : seed_(GoodSeed(s)) {}
_ZN7rocksdb6Random4NextEv:
   44|  3.38M|  uint32_t Next() {
   45|       |    // We are computing
   46|       |    //       seed_ = (seed_ * A) % M,    where M = 2^31-1
   47|       |    //
   48|       |    // seed_ must not be zero or M, or else all subsequent computed values
   49|       |    // will be zero or M respectively.  For all other values, seed_ will end
   50|       |    // up cycling through every number in [1,M-1]
   51|  3.38M|    uint64_t product = seed_ * A;
   52|       |
   53|       |    // Compute (product % M) using the fact that ((x << 31) % M) == x.
   54|  3.38M|    seed_ = static_cast<uint32_t>((product >> 31) + (product & M));
   55|       |    // The first reduction may overflow by 1 bit, so we may need to
   56|       |    // repeat.  mod == M is not possible; using > allows the faster
   57|       |    // sign-bit-based test.
   58|  3.38M|    if (seed_ > M) {
  ------------------
  |  Branch (58:9): [True: 12, False: 3.38M]
  ------------------
   59|     12|      seed_ -= M;
   60|     12|    }
   61|  3.38M|    return seed_;
   62|  3.38M|  }

_ZN7rocksdb18GenericRateLimiterC2ElliNS_11RateLimiter4ModeERKNSt3__110shared_ptrINS_11SystemClockEEEbl:
   69|  9.02k|      tuned_time_(NowMicrosMonotonicLocked()) {
   70|  45.1k|  for (int i = Env::IO_LOW; i < Env::IO_TOTAL; ++i) {
  ------------------
  |  Branch (70:29): [True: 36.1k, False: 9.02k]
  ------------------
   71|  36.1k|    total_requests_[i] = 0;
   72|  36.1k|    total_bytes_through_[i] = 0;
   73|  36.1k|  }
   74|  9.02k|}
_ZN7rocksdb18GenericRateLimiterD2Ev:
   76|  9.02k|GenericRateLimiter::~GenericRateLimiter() {
   77|  9.02k|  MutexLock g(&request_mutex_);
   78|  9.02k|  stop_ = true;
   79|  9.02k|  std::deque<Req*>::size_type queues_size_sum = 0;
   80|  45.1k|  for (int i = Env::IO_LOW; i < Env::IO_TOTAL; ++i) {
  ------------------
  |  Branch (80:29): [True: 36.1k, False: 9.02k]
  ------------------
   81|  36.1k|    queues_size_sum += queue_[i].size();
   82|  36.1k|  }
   83|  9.02k|  requests_to_wait_ = static_cast<int32_t>(queues_size_sum);
   84|       |
   85|  45.1k|  for (int i = Env::IO_TOTAL - 1; i >= Env::IO_LOW; --i) {
  ------------------
  |  Branch (85:35): [True: 36.1k, False: 9.02k]
  ------------------
   86|  36.1k|    std::deque<Req*> queue = queue_[i];
   87|  36.1k|    for (auto& r : queue) {
  ------------------
  |  Branch (87:18): [True: 0, False: 36.1k]
  ------------------
   88|      0|      r->cv.Signal();
   89|      0|    }
   90|  36.1k|  }
   91|       |
   92|  9.02k|  while (requests_to_wait_ > 0) {
  ------------------
  |  Branch (92:10): [True: 0, False: 9.02k]
  ------------------
   93|      0|    exit_cv_.Wait();
   94|      0|  }
   95|  9.02k|}
_ZN7rocksdb18GenericRateLimiter35CalculateRefillBytesPerPeriodLockedEl:
  316|  9.02k|    int64_t rate_bytes_per_sec) {
  317|  9.02k|  if (std::numeric_limits<int64_t>::max() / rate_bytes_per_sec <
  ------------------
  |  Branch (317:7): [True: 0, False: 9.02k]
  ------------------
  318|  9.02k|      refill_period_us_) {
  319|       |    // Avoid unexpected result in the overflow case. The result now is still
  320|       |    // inaccurate but is a number that is large enough.
  321|      0|    return std::numeric_limits<int64_t>::max() / kMicrosecondsPerSecond;
  322|  9.02k|  } else {
  323|  9.02k|    return rate_bytes_per_sec * refill_period_us_ / kMicrosecondsPerSecond;
  324|  9.02k|  }
  325|  9.02k|}
_ZN7rocksdb21NewGenericRateLimiterElliNS_11RateLimiter4ModeEbl:
  381|  9.02k|    bool auto_tuned /* = false */, int64_t single_burst_bytes /* = 0 */) {
  382|  9.02k|  assert(rate_bytes_per_sec > 0);
  383|  9.02k|  assert(refill_period_us > 0);
  384|  9.02k|  assert(fairness > 0);
  385|  9.02k|  std::unique_ptr<RateLimiter> limiter(new GenericRateLimiter(
  386|  9.02k|      rate_bytes_per_sec, refill_period_us, fairness, mode,
  387|  9.02k|      SystemClock::Default(), auto_tuned, single_burst_bytes));
  388|  9.02k|  return limiter.release();
  389|  9.02k|}

_ZN7rocksdb18GenericRateLimiter24NowMicrosMonotonicLockedEv:
  119|  18.0k|  uint64_t NowMicrosMonotonicLocked() {
  120|  18.0k|    return clock_->NowNanos() / std::milli::den;
  121|  18.0k|  }

_ZN7rocksdb14SliceTransform16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIKS0_EE:
  216|  22.5k|    std::shared_ptr<const SliceTransform>* result) {
  217|  22.5k|  static std::once_flag once;
  218|  22.5k|  std::call_once(once, [&]() {
  219|  22.5k|    RegisterBuiltinSliceTransform(*(ObjectLibrary::Default().get()), "");
  220|  22.5k|  });
  221|  22.5k|  std::string id;
  222|  22.5k|  std::unordered_map<std::string, std::string> opt_map;
  223|  22.5k|  Status status = Customizable::GetOptionsMap(config_options, result->get(),
  224|  22.5k|                                              value, &id, &opt_map);
  225|  22.5k|  if (!status.ok()) {  // GetOptionsMap failed
  ------------------
  |  Branch (225:7): [True: 0, False: 22.5k]
  ------------------
  226|      0|    return status;
  227|  22.5k|  } else if (id.empty() && opt_map.empty()) {
  ------------------
  |  Branch (227:14): [True: 22.5k, False: 0]
  |  Branch (227:28): [True: 22.5k, False: 0]
  ------------------
  228|  22.5k|    result->reset();
  229|  22.5k|  } else {
  230|      0|    status = config_options.registry->NewSharedObject(id, result);
  231|      0|    if (config_options.ignore_unsupported_options && status.IsNotSupported()) {
  ------------------
  |  Branch (231:9): [True: 0, False: 0]
  |  Branch (231:54): [True: 0, False: 0]
  ------------------
  232|      0|      return Status::OK();
  233|      0|    } else if (status.ok()) {
  ------------------
  |  Branch (233:16): [True: 0, False: 0]
  ------------------
  234|      0|      SliceTransform* transform = const_cast<SliceTransform*>(result->get());
  235|      0|      status =
  236|      0|          Customizable::ConfigureNewObject(config_options, transform, opt_map);
  237|      0|    }
  238|      0|  }
  239|  22.5k|  return status;
  240|  22.5k|}
_ZNK7rocksdb5Slice8ToStringEb:
  292|   324k|std::string Slice::ToString(bool hex) const {
  293|   324k|  std::string result;  // RVO/NRVO/move
  294|   324k|  if (hex) {
  ------------------
  |  Branch (294:7): [True: 4.48k, False: 319k]
  ------------------
  295|  4.48k|    result.reserve(2 * size_);
  296|  4.48k|    for (size_t i = 0; i < size_; ++i) {
  ------------------
  |  Branch (296:24): [True: 0, False: 4.48k]
  ------------------
  297|      0|      unsigned char c = data_[i];
  298|      0|      result.push_back(toHex(c >> 4));
  299|      0|      result.push_back(toHex(c & 0xf));
  300|      0|    }
  301|  4.48k|    return result;
  302|   319k|  } else {
  303|   319k|    result.assign(data_, size_);
  304|   319k|    return result;
  305|   319k|  }
  306|   324k|}
slice.cc:_ZN7rocksdb12_GLOBAL__N_120FixedPrefixTransform10kClassNameEv:
   35|      1|  static const char* kClassName() { return "rocksdb.FixedPrefix"; }
slice.cc:_ZN7rocksdb12_GLOBAL__N_120FixedPrefixTransform9kNickNameEv:
   36|      1|  static const char* kNickName() { return "fixed"; }
slice.cc:_ZN7rocksdb12_GLOBAL__N_121CappedPrefixTransform10kClassNameEv:
   88|      1|  static const char* kClassName() { return "rocksdb.CappedPrefix"; }
slice.cc:_ZN7rocksdb12_GLOBAL__N_121CappedPrefixTransform9kNickNameEv:
   89|      1|  static const char* kNickName() { return "capped"; }
slice.cc:_ZN7rocksdb12_GLOBAL__N_113NoopTransform10kClassNameEv:
  132|      1|  static const char* kClassName() { return "rocksdb.Noop"; }
slice.cc:_ZZN7rocksdb14SliceTransform16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIKS0_EEENK3$_0clEv:
  218|      1|  std::call_once(once, [&]() {
  219|      1|    RegisterBuiltinSliceTransform(*(ObjectLibrary::Default().get()), "");
  220|      1|  });
slice.cc:_ZN7rocksdbL29RegisterBuiltinSliceTransformERNS_13ObjectLibraryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  159|      1|                                         const std::string& /*arg*/) {
  160|       |  // For the builtin transforms, the format is typically
  161|       |  // [Name].[0-9]+ or [NickName]:[0-9]+
  162|      1|  library.AddFactory<const SliceTransform>(
  163|      1|      NoopTransform::kClassName(),
  164|      1|      [](const std::string& /*uri*/,
  165|      1|         std::unique_ptr<const SliceTransform>* guard,
  166|      1|         std::string* /*errmsg*/) {
  167|      1|        guard->reset(NewNoopTransform());
  168|      1|        return guard->get();
  169|      1|      });
  170|      1|  library.AddFactory<const SliceTransform>(
  171|      1|      ObjectLibrary::PatternEntry(FixedPrefixTransform::kNickName(), false)
  172|      1|          .AddNumber(":"),
  173|      1|      [](const std::string& uri, std::unique_ptr<const SliceTransform>* guard,
  174|      1|         std::string* /*errmsg*/) {
  175|      1|        auto colon = uri.find(':');
  176|      1|        auto len = ParseSizeT(uri.substr(colon + 1));
  177|      1|        guard->reset(NewFixedPrefixTransform(len));
  178|      1|        return guard->get();
  179|      1|      });
  180|      1|  library.AddFactory<const SliceTransform>(
  181|      1|      ObjectLibrary::PatternEntry(FixedPrefixTransform::kClassName(), false)
  182|      1|          .AddNumber("."),
  183|      1|      [](const std::string& uri, std::unique_ptr<const SliceTransform>* guard,
  184|      1|         std::string* /*errmsg*/) {
  185|      1|        auto len = ParseSizeT(
  186|      1|            uri.substr(strlen(FixedPrefixTransform::kClassName()) + 1));
  187|      1|        guard->reset(NewFixedPrefixTransform(len));
  188|      1|        return guard->get();
  189|      1|      });
  190|      1|  library.AddFactory<const SliceTransform>(
  191|      1|      ObjectLibrary::PatternEntry(CappedPrefixTransform::kNickName(), false)
  192|      1|          .AddNumber(":"),
  193|      1|      [](const std::string& uri, std::unique_ptr<const SliceTransform>* guard,
  194|      1|         std::string* /*errmsg*/) {
  195|      1|        auto colon = uri.find(':');
  196|      1|        auto len = ParseSizeT(uri.substr(colon + 1));
  197|      1|        guard->reset(NewCappedPrefixTransform(len));
  198|      1|        return guard->get();
  199|      1|      });
  200|      1|  library.AddFactory<const SliceTransform>(
  201|      1|      ObjectLibrary::PatternEntry(CappedPrefixTransform::kClassName(), false)
  202|      1|          .AddNumber("."),
  203|      1|      [](const std::string& uri, std::unique_ptr<const SliceTransform>* guard,
  204|      1|         std::string* /*errmsg*/) {
  205|      1|        auto len = ParseSizeT(
  206|      1|            uri.substr(strlen(CappedPrefixTransform::kClassName()) + 1));
  207|      1|        guard->reset(NewCappedPrefixTransform(len));
  208|      1|        return guard->get();
  209|      1|      });
  210|      1|  size_t num_types;
  211|      1|  return static_cast<int>(library.GetFactoryCount(&num_types));
  212|      1|}

_ZN7rocksdb6StatusC2ENS0_4CodeENS0_7SubCodeERKNS_5SliceES5_NS0_8SeverityE:
   58|  63.1k|      scope_(0) {
   59|  63.1k|  assert(subcode_ != kMaxSubCode);
   60|  63.1k|  const size_t len1 = msg.size();
   61|  63.1k|  const size_t len2 = msg2.size();
   62|  63.1k|  const size_t size = len1 + (len2 ? (2 + len2) : 0);
  ------------------
  |  Branch (62:31): [True: 0, False: 63.1k]
  ------------------
   63|  63.1k|  char* const result = new char[size + 1];  // +1 for null terminator
   64|  63.1k|  memcpy(result, msg.data(), len1);
   65|  63.1k|  if (len2) {
  ------------------
  |  Branch (65:7): [True: 0, False: 63.1k]
  ------------------
   66|      0|    result[len1] = ':';
   67|      0|    result[len1 + 1] = ' ';
   68|      0|    memcpy(result + len1 + 2, msg2.data(), len2);
   69|      0|  }
   70|  63.1k|  result[size] = '\0';  // null terminator for C style string
   71|  63.1k|  state_.reset(result);
   72|  63.1k|}
_ZNK7rocksdb6Status8ToStringEv:
   81|  18.0k|std::string Status::ToString() const {
   82|       |#ifdef ROCKSDB_ASSERT_STATUS_CHECKED
   83|       |  checked_ = true;
   84|       |#endif  // ROCKSDB_ASSERT_STATUS_CHECKED
   85|  18.0k|  const char* type = nullptr;
   86|  18.0k|  switch (code_) {
  ------------------
  |  Branch (86:11): [True: 0, False: 18.0k]
  ------------------
   87|  18.0k|    case kOk:
  ------------------
  |  Branch (87:5): [True: 18.0k, False: 0]
  ------------------
   88|  18.0k|      return "OK";
   89|      0|    case kNotFound:
  ------------------
  |  Branch (89:5): [True: 0, False: 18.0k]
  ------------------
   90|      0|      type = "NotFound: ";
   91|      0|      break;
   92|      0|    case kCorruption:
  ------------------
  |  Branch (92:5): [True: 0, False: 18.0k]
  ------------------
   93|      0|      type = "Corruption: ";
   94|      0|      break;
   95|      0|    case kNotSupported:
  ------------------
  |  Branch (95:5): [True: 0, False: 18.0k]
  ------------------
   96|      0|      type = "Not implemented: ";
   97|      0|      break;
   98|      0|    case kInvalidArgument:
  ------------------
  |  Branch (98:5): [True: 0, False: 18.0k]
  ------------------
   99|      0|      type = "Invalid argument: ";
  100|      0|      break;
  101|      0|    case kIOError:
  ------------------
  |  Branch (101:5): [True: 0, False: 18.0k]
  ------------------
  102|      0|      type = "IO error: ";
  103|      0|      break;
  104|      0|    case kMergeInProgress:
  ------------------
  |  Branch (104:5): [True: 0, False: 18.0k]
  ------------------
  105|      0|      type = "Merge in progress: ";
  106|      0|      break;
  107|      0|    case kIncomplete:
  ------------------
  |  Branch (107:5): [True: 0, False: 18.0k]
  ------------------
  108|      0|      type = "Result incomplete: ";
  109|      0|      break;
  110|      0|    case kShutdownInProgress:
  ------------------
  |  Branch (110:5): [True: 0, False: 18.0k]
  ------------------
  111|      0|      type = "Shutdown in progress: ";
  112|      0|      break;
  113|      0|    case kTimedOut:
  ------------------
  |  Branch (113:5): [True: 0, False: 18.0k]
  ------------------
  114|      0|      type = "Operation timed out: ";
  115|      0|      break;
  116|      0|    case kAborted:
  ------------------
  |  Branch (116:5): [True: 0, False: 18.0k]
  ------------------
  117|      0|      type = "Operation aborted: ";
  118|      0|      break;
  119|      0|    case kBusy:
  ------------------
  |  Branch (119:5): [True: 0, False: 18.0k]
  ------------------
  120|      0|      type = "Resource busy: ";
  121|      0|      break;
  122|      0|    case kExpired:
  ------------------
  |  Branch (122:5): [True: 0, False: 18.0k]
  ------------------
  123|      0|      type = "Operation expired: ";
  124|      0|      break;
  125|      0|    case kTryAgain:
  ------------------
  |  Branch (125:5): [True: 0, False: 18.0k]
  ------------------
  126|      0|      type = "Operation failed. Try again.: ";
  127|      0|      break;
  128|      0|    case kCompactionTooLarge:
  ------------------
  |  Branch (128:5): [True: 0, False: 18.0k]
  ------------------
  129|      0|      type = "Compaction too large: ";
  130|      0|      break;
  131|      0|    case kColumnFamilyDropped:
  ------------------
  |  Branch (131:5): [True: 0, False: 18.0k]
  ------------------
  132|      0|      type = "Column family dropped: ";
  133|      0|      break;
  134|      0|    case kMaxCode:
  ------------------
  |  Branch (134:5): [True: 0, False: 18.0k]
  ------------------
  135|      0|      assert(false);
  136|      0|      break;
  137|  18.0k|  }
  138|      0|  char tmp[30];
  139|      0|  if (type == nullptr) {
  ------------------
  |  Branch (139:7): [True: 0, False: 0]
  ------------------
  140|       |    // This should not happen since `code_` should be a valid non-`kMaxCode`
  141|       |    // member of the `Code` enum. The above switch-statement should have had a
  142|       |    // case assigning `type` to a corresponding string.
  143|      0|    assert(false);
  144|      0|    snprintf(tmp, sizeof(tmp), "Unknown code(%d): ", static_cast<int>(code()));
  145|      0|    type = tmp;
  146|      0|  }
  147|      0|  std::string result(type);
  148|      0|  if (subcode_ != kNone) {
  ------------------
  |  Branch (148:7): [True: 0, False: 0]
  ------------------
  149|      0|    uint32_t index = static_cast<int32_t>(subcode_);
  150|      0|    assert(sizeof(msgs) / sizeof(msgs[0]) > index);
  151|      0|    result.append(msgs[index]);
  152|      0|  }
  153|       |
  154|      0|  if (state_ != nullptr) {
  ------------------
  |  Branch (154:7): [True: 0, False: 0]
  ------------------
  155|      0|    if (subcode_ != kNone) {
  ------------------
  |  Branch (155:9): [True: 0, False: 0]
  ------------------
  156|      0|      result.append(": ");
  157|      0|    }
  158|      0|    result.append(state_.get());
  159|      0|  }
  160|      0|  return result;
  161|  18.0k|}

_ZN7rocksdb9StopWatchC2EPNS_11SystemClockEPNS_10StatisticsEjjPmbb:
   43|  6.39M|                                                           : 0) {}
_ZN7rocksdb9StopWatchD2Ev:
   45|  6.39M|  ~StopWatch() {
   46|  6.39M|    if (elapsed_) {
  ------------------
  |  Branch (46:9): [True: 0, False: 6.39M]
  ------------------
   47|      0|      if (overwrite_) {
  ------------------
  |  Branch (47:11): [True: 0, False: 0]
  ------------------
   48|      0|        *elapsed_ = clock_->NowMicros() - start_time_;
   49|      0|      } else {
   50|      0|        *elapsed_ += clock_->NowMicros() - start_time_;
   51|      0|      }
   52|      0|    }
   53|  6.39M|    if (elapsed_ && delay_enabled_) {
  ------------------
  |  Branch (53:9): [True: 0, False: 6.39M]
  |  Branch (53:21): [True: 0, False: 0]
  ------------------
   54|      0|      *elapsed_ -= total_delay_;
   55|      0|    }
   56|  6.39M|    if (stats_enabled_) {
  ------------------
  |  Branch (56:9): [True: 0, False: 6.39M]
  ------------------
   57|      0|      const auto time = (elapsed_ != nullptr)
  ------------------
  |  Branch (57:25): [True: 0, False: 0]
  ------------------
   58|      0|                            ? *elapsed_
   59|      0|                            : (clock_->NowMicros() - start_time_);
   60|      0|      if (hist_type_1_ != Histograms::HISTOGRAM_ENUM_MAX) {
  ------------------
  |  Branch (60:11): [True: 0, False: 0]
  ------------------
   61|      0|        statistics_->reportTimeToHistogram(hist_type_1_, time);
   62|      0|      }
   63|      0|      if (hist_type_2_ != Histograms::HISTOGRAM_ENUM_MAX) {
  ------------------
  |  Branch (63:11): [True: 0, False: 0]
  ------------------
   64|      0|        statistics_->reportTimeToHistogram(hist_type_2_, time);
   65|      0|      }
   66|      0|    }
   67|  6.39M|  }
_ZN7rocksdb13StopWatchNanoC2EPNS_11SystemClockEb:
  108|  17.8k|      : clock_(clock), start_(0) {
  109|  17.8k|    if (auto_start) {
  ------------------
  |  Branch (109:9): [True: 0, False: 17.8k]
  ------------------
  110|      0|      Start();
  111|      0|    }
  112|  17.8k|  }
_ZN7rocksdb13StopWatchNano9IsStartedEv:
  129|  13.3k|  bool IsStarted() { return start_ != 0; }

_ZN7rocksdb17AppendHumanMicrosEmPcib:
   57|     92|                      bool fixed_format) {
   58|     92|  if (micros < 10000 && !fixed_format) {
  ------------------
  |  Branch (58:7): [True: 92, False: 0]
  |  Branch (58:25): [True: 0, False: 92]
  ------------------
   59|      0|    return snprintf(output, len, "%" PRIu64 " us", micros);
   60|     92|  } else if (micros < 10000000 && !fixed_format) {
  ------------------
  |  Branch (60:14): [True: 92, False: 0]
  |  Branch (60:35): [True: 0, False: 92]
  ------------------
   61|      0|    return snprintf(output, len, "%.3lf ms",
   62|      0|                    static_cast<double>(micros) / 1000);
   63|     92|  } else if (micros < 1000000l * 60 && !fixed_format) {
  ------------------
  |  Branch (63:14): [True: 92, False: 0]
  |  Branch (63:40): [True: 0, False: 92]
  ------------------
   64|      0|    return snprintf(output, len, "%.3lf sec",
   65|      0|                    static_cast<double>(micros) / 1000000);
   66|     92|  } else if (micros < 1000000ll * 60 * 60 && !fixed_format) {
  ------------------
  |  Branch (66:14): [True: 92, False: 0]
  |  Branch (66:46): [True: 0, False: 92]
  ------------------
   67|      0|    return snprintf(output, len, "%02" PRIu64 ":%05.3f M:S",
   68|      0|                    micros / 1000000 / 60,
   69|      0|                    static_cast<double>(micros % 60000000) / 1000000);
   70|     92|  } else {
   71|     92|    return snprintf(output, len, "%02" PRIu64 ":%02" PRIu64 ":%05.3f H:M:S",
   72|     92|                    micros / 1000000 / 3600, (micros / 1000000 / 60) % 60,
   73|     92|                    static_cast<double>(micros % 60000000) / 1000000);
   74|     92|  }
   75|     92|}
_ZN7rocksdb19NumberToHumanStringEl:
  116|    644|std::string NumberToHumanString(int64_t num) {
  117|    644|  char buf[21];
  118|    644|  int64_t absnum;
  119|       |
  120|    644|  if (num < 0) {
  ------------------
  |  Branch (120:7): [True: 0, False: 644]
  ------------------
  121|       |    // abs(INT64_MIN) is INT64_MAX+1 which overflows int64_t and become itself.
  122|       |    // So we convert it to INT64_MAX to avoid fall into <10000 slot.
  123|      0|    absnum = num == INT64_MIN ? INT64_MAX : -num;
  ------------------
  |  Branch (123:14): [True: 0, False: 0]
  ------------------
  124|    644|  } else {
  125|    644|    absnum = num;
  126|    644|  }
  127|       |
  128|    644|  if (absnum < 10000) {
  ------------------
  |  Branch (128:7): [True: 644, False: 0]
  ------------------
  129|    644|    snprintf(buf, sizeof(buf), "%" PRIi64, num);
  130|    644|  } else if (absnum < 10000000) {
  ------------------
  |  Branch (130:14): [True: 0, False: 0]
  ------------------
  131|      0|    snprintf(buf, sizeof(buf), "%" PRIi64 "K", num / 1000);
  132|      0|  } else if (absnum < 10000000000LL) {
  ------------------
  |  Branch (132:14): [True: 0, False: 0]
  ------------------
  133|      0|    snprintf(buf, sizeof(buf), "%" PRIi64 "M", num / 1000000);
  134|      0|  } else {
  135|      0|    snprintf(buf, sizeof(buf), "%" PRIi64 "G", num / 1000000000);
  136|      0|  }
  137|    644|  return std::string(buf);
  138|    644|}
_ZN7rocksdb18BytesToHumanStringEm:
  140|    230|std::string BytesToHumanString(uint64_t bytes) {
  141|    230|  const char* size_name[] = {"KB", "MB", "GB", "TB"};
  142|    230|  double final_size = static_cast<double>(bytes);
  143|    230|  size_t size_idx;
  144|       |
  145|       |  // always start with KB
  146|    230|  final_size /= 1024;
  147|    230|  size_idx = 0;
  148|       |
  149|    276|  while (size_idx < 3 && final_size >= 1024) {
  ------------------
  |  Branch (149:10): [True: 276, False: 0]
  |  Branch (149:26): [True: 46, False: 230]
  ------------------
  150|     46|    final_size /= 1024;
  151|     46|    size_idx++;
  152|     46|  }
  153|       |
  154|    230|  char buf[20];
  155|    230|  snprintf(buf, sizeof(buf), "%.2f %s", final_size, size_name[size_idx]);
  156|    230|  return std::string(buf);
  157|    230|}
_ZN7rocksdb20ConsumeDecimalNumberEPNS_5SliceEPm:
  175|   478k|bool ConsumeDecimalNumber(Slice* in, uint64_t* val) {
  176|   478k|  uint64_t v = 0;
  177|   478k|  int digits = 0;
  178|  3.38M|  while (!in->empty()) {
  ------------------
  |  Branch (178:10): [True: 3.09M, False: 288k]
  ------------------
  179|  3.09M|    char c = (*in)[0];
  180|  3.09M|    if (c >= '0' && c <= '9') {
  ------------------
  |  Branch (180:9): [True: 2.95M, False: 135k]
  |  Branch (180:21): [True: 2.90M, False: 54.1k]
  ------------------
  181|  2.90M|      ++digits;
  182|  2.90M|      const unsigned int delta = (c - '0');
  183|  2.90M|      static const uint64_t kMaxUint64 = ~static_cast<uint64_t>(0);
  184|  2.90M|      if (v > kMaxUint64 / 10 ||
  ------------------
  |  Branch (184:11): [True: 0, False: 2.90M]
  ------------------
  185|  2.90M|          (v == kMaxUint64 / 10 && delta > kMaxUint64 % 10)) {
  ------------------
  |  Branch (185:12): [True: 0, False: 2.90M]
  |  Branch (185:36): [True: 0, False: 0]
  ------------------
  186|       |        // Overflow
  187|      0|        return false;
  188|      0|      }
  189|  2.90M|      v = (v * 10) + delta;
  190|  2.90M|      in->remove_prefix(1);
  191|  2.90M|    } else {
  192|   189k|      break;
  193|   189k|    }
  194|  3.09M|  }
  195|   478k|  *val = v;
  196|   478k|  return (digits > 0);
  197|   478k|}
_ZN7rocksdb13isSpecialCharEc:
  199|   343k|bool isSpecialChar(const char c) {
  200|   343k|  if (c == '\\' || c == '#' || c == ':' || c == '\r' || c == '\n') {
  ------------------
  |  Branch (200:7): [True: 0, False: 343k]
  |  Branch (200:20): [True: 0, False: 343k]
  |  Branch (200:32): [True: 0, False: 343k]
  |  Branch (200:44): [True: 0, False: 343k]
  |  Branch (200:57): [True: 0, False: 343k]
  ------------------
  201|      0|    return true;
  202|      0|  }
  203|   343k|  return false;
  204|   343k|}
_ZN7rocksdb18EscapeOptionStringERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  234|  90.2k|std::string EscapeOptionString(const std::string& raw_string) {
  235|  90.2k|  std::string output;
  236|   343k|  for (auto c : raw_string) {
  ------------------
  |  Branch (236:15): [True: 343k, False: 90.2k]
  ------------------
  237|   343k|    if (isSpecialChar(c)) {
  ------------------
  |  Branch (237:9): [True: 0, False: 343k]
  ------------------
  238|      0|      output += '\\';
  239|      0|      output += EscapeChar(c);
  240|   343k|    } else {
  241|   343k|      output += c;
  242|   343k|    }
  243|   343k|  }
  244|       |
  245|  90.2k|  return output;
  246|  90.2k|}
_ZN7rocksdb20UnescapeOptionStringERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  248|  2.46M|std::string UnescapeOptionString(const std::string& escaped_string) {
  249|  2.46M|  bool escaped = false;
  250|  2.46M|  std::string output;
  251|       |
  252|  21.7M|  for (auto c : escaped_string) {
  ------------------
  |  Branch (252:15): [True: 21.7M, False: 2.46M]
  ------------------
  253|  21.7M|    if (escaped) {
  ------------------
  |  Branch (253:9): [True: 0, False: 21.7M]
  ------------------
  254|      0|      output += UnescapeChar(c);
  255|      0|      escaped = false;
  256|  21.7M|    } else {
  257|  21.7M|      if (c == '\\') {
  ------------------
  |  Branch (257:11): [True: 0, False: 21.7M]
  ------------------
  258|      0|        escaped = true;
  259|      0|        continue;
  260|      0|      }
  261|  21.7M|      output += c;
  262|  21.7M|    }
  263|  21.7M|  }
  264|  2.46M|  return output;
  265|  2.46M|}
_ZN7rocksdb4trimERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  267|  1.51M|std::string trim(const std::string& str) {
  268|  1.51M|  if (str.empty()) {
  ------------------
  |  Branch (268:7): [True: 36.1k, False: 1.48M]
  ------------------
  269|  36.1k|    return std::string();
  270|  36.1k|  }
  271|  1.48M|  size_t start = 0;
  272|  1.48M|  size_t end = str.size() - 1;
  273|  1.48M|  while (isspace(str[start]) != 0 && start < end) {
  ------------------
  |  Branch (273:10): [True: 0, False: 1.48M]
  |  Branch (273:38): [True: 0, False: 0]
  ------------------
  274|      0|    ++start;
  275|      0|  }
  276|  1.48M|  while (isspace(str[end]) != 0 && start < end) {
  ------------------
  |  Branch (276:10): [True: 0, False: 1.48M]
  |  Branch (276:36): [True: 0, False: 0]
  ------------------
  277|      0|    --end;
  278|      0|  }
  279|  1.48M|  if (start <= end) {
  ------------------
  |  Branch (279:7): [True: 1.48M, False: 0]
  ------------------
  280|  1.48M|    return str.substr(start, end - start + 1);
  281|  1.48M|  }
  282|      0|  return std::string();
  283|  1.48M|}
_ZN7rocksdb8EndsWithERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_:
  285|   144k|bool EndsWith(const std::string& string, const std::string& pattern) {
  286|   144k|  size_t plen = pattern.size();
  287|   144k|  size_t slen = string.size();
  288|   144k|  if (plen <= slen) {
  ------------------
  |  Branch (288:7): [True: 144k, False: 0]
  ------------------
  289|   144k|    return string.compare(slen - plen, plen, pattern) == 0;
  290|   144k|  } else {
  291|      0|    return false;
  292|      0|  }
  293|   144k|}
_ZN7rocksdb12ParseBooleanERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_:
  300|   794k|bool ParseBoolean(const std::string& type, const std::string& value) {
  301|   794k|  if (value == "true" || value == "1") {
  ------------------
  |  Branch (301:7): [True: 261k, False: 532k]
  |  Branch (301:26): [True: 0, False: 532k]
  ------------------
  302|   261k|    return true;
  303|   532k|  } else if (value == "false" || value == "0") {
  ------------------
  |  Branch (303:14): [True: 532k, False: 0]
  |  Branch (303:34): [True: 0, False: 0]
  ------------------
  304|   532k|    return false;
  305|   532k|  }
  306|      0|  throw std::invalid_argument(type);
  307|   794k|}
_ZN7rocksdb10ParseUint8ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  309|  9.02k|uint8_t ParseUint8(const std::string& value) {
  310|  9.02k|  uint64_t num = ParseUint64(value);
  311|  9.02k|  if ((num >> 8LL) == 0) {
  ------------------
  |  Branch (311:7): [True: 9.02k, False: 0]
  ------------------
  312|  9.02k|    return static_cast<uint8_t>(num);
  313|  9.02k|  } else {
  314|      0|    throw std::out_of_range(value);
  315|      0|  }
  316|  9.02k|}
_ZN7rocksdb11ParseUint32ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  318|   162k|uint32_t ParseUint32(const std::string& value) {
  319|   162k|  uint64_t num = ParseUint64(value);
  320|   162k|  if ((num >> 32LL) == 0) {
  ------------------
  |  Branch (320:7): [True: 162k, False: 0]
  ------------------
  321|   162k|    return static_cast<uint32_t>(num);
  322|   162k|  } else {
  323|      0|    throw std::out_of_range(value);
  324|      0|  }
  325|   162k|}
_ZN7rocksdb11ParseUint64ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  338|   722k|uint64_t ParseUint64(const std::string& value) {
  339|   722k|  size_t endchar;
  340|   722k|#ifndef CYGWIN
  341|   722k|  uint64_t num = std::stoull(value.c_str(), &endchar);
  342|       |#else
  343|       |  char* endptr;
  344|       |  uint64_t num = std::strtoul(value.c_str(), &endptr, 0);
  345|       |  endchar = endptr - value.c_str();
  346|       |#endif
  347|       |
  348|   722k|  if (endchar < value.length()) {
  ------------------
  |  Branch (348:7): [True: 0, False: 722k]
  ------------------
  349|      0|    char c = value[endchar];
  350|      0|    if (c == 'k' || c == 'K') {
  ------------------
  |  Branch (350:9): [True: 0, False: 0]
  |  Branch (350:21): [True: 0, False: 0]
  ------------------
  351|      0|      num <<= 10LL;
  352|      0|    } else if (c == 'm' || c == 'M') {
  ------------------
  |  Branch (352:16): [True: 0, False: 0]
  |  Branch (352:28): [True: 0, False: 0]
  ------------------
  353|      0|      num <<= 20LL;
  354|      0|    } else if (c == 'g' || c == 'G') {
  ------------------
  |  Branch (354:16): [True: 0, False: 0]
  |  Branch (354:28): [True: 0, False: 0]
  ------------------
  355|      0|      num <<= 30LL;
  356|      0|    } else if (c == 't' || c == 'T') {
  ------------------
  |  Branch (356:16): [True: 0, False: 0]
  |  Branch (356:28): [True: 0, False: 0]
  ------------------
  357|      0|      num <<= 40LL;
  358|      0|    }
  359|      0|  }
  360|       |
  361|   722k|  return num;
  362|   722k|}
_ZN7rocksdb10ParseInt64ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  364|  9.02k|int64_t ParseInt64(const std::string& value) {
  365|  9.02k|  size_t endchar;
  366|  9.02k|#ifndef CYGWIN
  367|  9.02k|  int64_t num = std::stoll(value.c_str(), &endchar);
  368|       |#else
  369|       |  char* endptr;
  370|       |  int64_t num = std::strtoll(value.c_str(), &endptr, 0);
  371|       |  endchar = endptr - value.c_str();
  372|       |#endif
  373|       |
  374|  9.02k|  if (endchar < value.length()) {
  ------------------
  |  Branch (374:7): [True: 0, False: 9.02k]
  ------------------
  375|      0|    char c = value[endchar];
  376|      0|    if (c == 'k' || c == 'K') {
  ------------------
  |  Branch (376:9): [True: 0, False: 0]
  |  Branch (376:21): [True: 0, False: 0]
  ------------------
  377|      0|      num <<= 10LL;
  378|      0|    } else if (c == 'm' || c == 'M') {
  ------------------
  |  Branch (378:16): [True: 0, False: 0]
  |  Branch (378:28): [True: 0, False: 0]
  ------------------
  379|      0|      num <<= 20LL;
  380|      0|    } else if (c == 'g' || c == 'G') {
  ------------------
  |  Branch (380:16): [True: 0, False: 0]
  |  Branch (380:28): [True: 0, False: 0]
  ------------------
  381|      0|      num <<= 30LL;
  382|      0|    } else if (c == 't' || c == 'T') {
  ------------------
  |  Branch (382:16): [True: 0, False: 0]
  |  Branch (382:28): [True: 0, False: 0]
  ------------------
  383|      0|      num <<= 40LL;
  384|      0|    }
  385|      0|  }
  386|       |
  387|  9.02k|  return num;
  388|  9.02k|}
_ZN7rocksdb8ParseIntERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  390|   370k|int ParseInt(const std::string& value) {
  391|   370k|  size_t endchar;
  392|   370k|#ifndef CYGWIN
  393|   370k|  int num = std::stoi(value.c_str(), &endchar);
  394|       |#else
  395|       |  char* endptr;
  396|       |  int num = std::strtoul(value.c_str(), &endptr, 0);
  397|       |  endchar = endptr - value.c_str();
  398|       |#endif
  399|       |
  400|   370k|  if (endchar < value.length()) {
  ------------------
  |  Branch (400:7): [True: 0, False: 370k]
  ------------------
  401|      0|    char c = value[endchar];
  402|      0|    if (c == 'k' || c == 'K') {
  ------------------
  |  Branch (402:9): [True: 0, False: 0]
  |  Branch (402:21): [True: 0, False: 0]
  ------------------
  403|      0|      num <<= 10;
  404|      0|    } else if (c == 'm' || c == 'M') {
  ------------------
  |  Branch (404:16): [True: 0, False: 0]
  |  Branch (404:28): [True: 0, False: 0]
  ------------------
  405|      0|      num <<= 20;
  406|      0|    } else if (c == 'g' || c == 'G') {
  ------------------
  |  Branch (406:16): [True: 0, False: 0]
  |  Branch (406:28): [True: 0, False: 0]
  ------------------
  407|      0|      num <<= 30;
  408|      0|    }
  409|      0|  }
  410|       |
  411|   370k|  return num;
  412|   370k|}
_ZN7rocksdb11ParseDoubleERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  414|  63.1k|double ParseDouble(const std::string& value) {
  415|  63.1k|#ifndef CYGWIN
  416|  63.1k|  return std::stod(value);
  417|       |#else
  418|       |  return std::strtod(value.c_str(), 0);
  419|       |#endif
  420|  63.1k|}
_ZN7rocksdb10ParseSizeTERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  422|   198k|size_t ParseSizeT(const std::string& value) {
  423|   198k|  return static_cast<size_t>(ParseUint64(value));
  424|   198k|}
_ZN7rocksdb23TryParseTimeRangeStringERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERiS9_:
  471|  9.02k|                             int& end_time) {
  472|  9.02k|  if (value.empty()) {
  ------------------
  |  Branch (472:7): [True: 9.02k, False: 0]
  ------------------
  473|  9.02k|    start_time = 0;
  474|  9.02k|    end_time = 0;
  475|  9.02k|    return true;
  476|  9.02k|  }
  477|      0|  auto split = StringSplit(value, '-');
  478|      0|  if (split.size() != 2) {
  ------------------
  |  Branch (478:7): [True: 0, False: 0]
  ------------------
  479|      0|    return false;
  480|      0|  }
  481|      0|  start_time = ParseTimeStringToSeconds(split[0]);
  482|      0|  if (start_time < 0) {
  ------------------
  |  Branch (482:7): [True: 0, False: 0]
  ------------------
  483|      0|    return false;
  484|      0|  }
  485|      0|  end_time = ParseTimeStringToSeconds(split[1]);
  486|      0|  if (end_time < 0) {
  ------------------
  |  Branch (486:7): [True: 0, False: 0]
  ------------------
  487|      0|    return false;
  488|      0|  }
  489|      0|  return true;
  490|      0|}

_ZN7rocksdb12PutBaseCharsILm36EEEvPPcmmb:
   33|  18.0k|inline void PutBaseChars(char** buf, size_t n, uint64_t v, bool uppercase) {
   34|  18.0k|  const char* digitChars = uppercase ? "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  ------------------
  |  Branch (34:28): [True: 18.0k, False: 0]
  ------------------
   35|  18.0k|                                     : "0123456789abcdefghijklmnopqrstuvwxyz";
   36|   198k|  for (size_t i = n; i > 0; --i) {
  ------------------
  |  Branch (36:22): [True: 180k, False: 18.0k]
  ------------------
   37|   180k|    (*buf)[i - 1] = digitChars[static_cast<size_t>(v % kBase)];
   38|   180k|    v /= kBase;
   39|   180k|  }
   40|  18.0k|  *buf += n;
   41|  18.0k|}
_ZN7rocksdb14ParseBaseCharsILi36EEEbPPKcmPm:
   53|  35.8k|inline bool ParseBaseChars(const char** buf, size_t n, uint64_t* v) {
   54|   394k|  while (n) {
  ------------------
  |  Branch (54:10): [True: 358k, False: 35.8k]
  ------------------
   55|   358k|    char c = **buf;
   56|   358k|    *v *= static_cast<uint64_t>(kBase);
   57|   358k|    if (c >= '0' && (kBase >= 10 ? c <= '9' : c < '0' + kBase)) {
  ------------------
  |  Branch (57:9): [True: 358k, False: 0]
  |  Branch (57:21): [True: 64.8k, False: 293k]
  |  Branch (57:22): [Folded - Ignored]
  ------------------
   58|  64.8k|      *v += static_cast<uint64_t>(c - '0');
   59|   293k|    } else if (kBase > 10 && c >= 'A' && c < 'A' + kBase - 10) {
  ------------------
  |  Branch (59:16): [Folded - Ignored]
  |  Branch (59:30): [True: 293k, False: 0]
  |  Branch (59:42): [True: 293k, False: 0]
  ------------------
   60|   293k|      *v += static_cast<uint64_t>(c - 'A' + 10);
   61|   293k|    } else if (kBase > 10 && c >= 'a' && c < 'a' + kBase - 10) {
  ------------------
  |  Branch (61:16): [Folded - Ignored]
  |  Branch (61:30): [True: 0, False: 0]
  |  Branch (61:42): [True: 0, False: 0]
  ------------------
   62|      0|      *v += static_cast<uint64_t>(c - 'a' + 10);
   63|      0|    } else {
   64|      0|      return false;
   65|      0|    }
   66|   358k|    --n;
   67|   358k|    ++*buf;
   68|   358k|  }
   69|  35.8k|  return true;
   70|  35.8k|}

_ZN7rocksdb14ThreadLocalPtr14InitSingletonsEv:
  240|   361k|void ThreadLocalPtr::InitSingletons() { ThreadLocalPtr::Instance(); }
_ZN7rocksdb14ThreadLocalPtr8InstanceEv:
  242|   496k|ThreadLocalPtr::StaticMeta* ThreadLocalPtr::Instance() {
  243|       |  // Here we prefer function static variable instead of global
  244|       |  // static variable as function static variable is initialized
  245|       |  // when the function is first call.  As a result, we can properly
  246|       |  // control their construction order by properly preparing their
  247|       |  // first function call.
  248|       |  //
  249|       |  // Note that here we decide to make "inst" a static pointer w/o deleting
  250|       |  // it at the end instead of a static variable.  This is to avoid the following
  251|       |  // destruction order disaster happens when a child thread using ThreadLocalPtr
  252|       |  // dies AFTER the main thread dies:  When a child thread happens to use
  253|       |  // ThreadLocalPtr, it will try to delete its thread-local data on its
  254|       |  // OnThreadExit when the child thread dies.  However, OnThreadExit depends
  255|       |  // on the following variable.  As a result, if the main thread dies before any
  256|       |  // child thread happen to use ThreadLocalPtr dies, then the destruction of
  257|       |  // the following variable will go first, then OnThreadExit, therefore causing
  258|       |  // invalid access.
  259|       |  //
  260|       |  // The above problem can be solved by using thread_local to store tls_.
  261|       |  // thread_local supports dynamic construction and destruction of
  262|       |  // non-primitive typed variables.  As a result, we can guarantee the
  263|       |  // destruction order even when the main thread dies before any child threads.
  264|   496k|  static ThreadLocalPtr::StaticMeta* inst = new ThreadLocalPtr::StaticMeta();
  265|   496k|  return inst;
  266|   496k|}
_ZN7rocksdb14ThreadLocalPtr10StaticMeta5MutexEv:
  268|  72.2k|port::Mutex* ThreadLocalPtr::StaticMeta::Mutex() { return &Instance()->mutex_; }
_ZN7rocksdb14ThreadLocalPtr10StaticMeta12OnThreadExitEPv:
  270|      1|void ThreadLocalPtr::StaticMeta::OnThreadExit(void* ptr) {
  271|      1|  auto* tls = static_cast<ThreadData*>(ptr);
  272|      1|  assert(tls != nullptr);
  273|       |
  274|       |  // Use the cached StaticMeta::Instance() instead of directly calling
  275|       |  // the variable inside StaticMeta::Instance() might already go out of
  276|       |  // scope here in case this OnThreadExit is called after the main thread
  277|       |  // dies.
  278|      1|  auto* inst = tls->inst;
  279|      1|  pthread_setspecific(inst->pthread_key_, nullptr);
  280|       |
  281|      1|  MutexLock l(inst->MemberMutex());
  282|      1|  inst->RemoveThreadData(tls);
  283|       |  // Unref stored pointers of current thread from all instances
  284|      1|  uint32_t id = 0;
  285|      2|  for (auto& e : tls->entries) {
  ------------------
  |  Branch (285:16): [True: 2, False: 1]
  ------------------
  286|      2|    void* raw = e.ptr.load();
  287|      2|    if (raw != nullptr) {
  ------------------
  |  Branch (287:9): [True: 0, False: 2]
  ------------------
  288|      0|      auto unref = inst->GetHandler(id);
  289|      0|      if (unref != nullptr) {
  ------------------
  |  Branch (289:11): [True: 0, False: 0]
  ------------------
  290|      0|        unref(raw);
  291|      0|      }
  292|      0|    }
  293|      2|    ++id;
  294|      2|  }
  295|       |  // Delete thread local structure no matter if it is Mac platform
  296|      1|  delete tls;
  297|      1|}
_ZN7rocksdb14ThreadLocalPtr10StaticMetaC2Ev:
  300|      1|    : next_instance_id_(0), head_(this), pthread_key_(0) {
  301|      1|  if (pthread_key_create(&pthread_key_, &OnThreadExit) != 0) {
  ------------------
  |  Branch (301:7): [True: 0, False: 1]
  ------------------
  302|      0|    abort();
  303|      0|  }
  304|       |
  305|       |  // OnThreadExit is not getting called on the main thread.
  306|       |  // Call through the static destructor mechanism to avoid memory leak.
  307|       |  //
  308|       |  // Caveats: ~A() will be invoked _after_ ~StaticMeta for the global
  309|       |  // singleton (destructors are invoked in reverse order of constructor
  310|       |  // _completion_); the latter must not mutate internal members. This
  311|       |  // cleanup mechanism inherently relies on use-after-release of the
  312|       |  // StaticMeta, and is brittle with respect to compiler-specific handling
  313|       |  // of memory backing destructed statically-scoped objects. Perhaps
  314|       |  // registering with atexit(3) would be more robust.
  315|       |  //
  316|       |// This is not required on Windows.
  317|      1|#if !defined(OS_WIN)
  318|      1|  static struct A {
  319|      1|    ~A() {
  320|      1|      if (tls_) {
  321|      1|        OnThreadExit(tls_);
  322|      1|      }
  323|      1|    }
  324|      1|  } a;
  325|      1|#endif  // !defined(OS_WIN)
  326|       |
  327|      1|  head_.next = &head_;
  328|      1|  head_.prev = &head_;
  329|       |
  330|       |#ifdef OS_WIN
  331|       |  // Share with Windows its cleanup routine and the key
  332|       |  wintlscleanup::thread_local_inclass_routine = OnThreadExit;
  333|       |  wintlscleanup::thread_local_key = pthread_key_;
  334|       |#endif
  335|      1|}
_ZN7rocksdb14ThreadLocalPtr10StaticMeta13AddThreadDataEPNS_10ThreadDataE:
  337|      1|void ThreadLocalPtr::StaticMeta::AddThreadData(ThreadData* d) {
  338|      1|  Mutex()->AssertHeld();
  339|      1|  d->next = &head_;
  340|      1|  d->prev = head_.prev;
  341|      1|  head_.prev->next = d;
  342|      1|  head_.prev = d;
  343|      1|}
_ZN7rocksdb14ThreadLocalPtr10StaticMeta16RemoveThreadDataEPNS_10ThreadDataE:
  345|      1|void ThreadLocalPtr::StaticMeta::RemoveThreadData(ThreadData* d) {
  346|      1|  Mutex()->AssertHeld();
  347|      1|  d->next->prev = d->prev;
  348|      1|  d->prev->next = d->next;
  349|      1|  d->next = d->prev = d;
  350|      1|}
_ZN7rocksdb14ThreadLocalPtr10StaticMeta14GetThreadLocalEv:
  352|  9.02k|ThreadData* ThreadLocalPtr::StaticMeta::GetThreadLocal() {
  353|  9.02k|  if (UNLIKELY(tls_ == nullptr)) {
  ------------------
  |  |   14|  9.02k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 1, False: 9.02k]
  |  |  ------------------
  ------------------
  354|      1|    auto* inst = Instance();
  355|      1|    tls_ = new ThreadData(inst);
  356|      1|    {
  357|       |      // Register it in the global chain, needs to be done before thread exit
  358|       |      // handler registration
  359|      1|      MutexLock l(Mutex());
  360|      1|      inst->AddThreadData(tls_);
  361|      1|    }
  362|       |    // Even it is not OS_MACOSX, need to register value for pthread_key_ so that
  363|       |    // its exit handler will be triggered.
  364|      1|    if (pthread_setspecific(inst->pthread_key_, tls_) != 0) {
  ------------------
  |  Branch (364:9): [True: 0, False: 1]
  ------------------
  365|      0|      {
  366|      0|        MutexLock l(Mutex());
  367|      0|        inst->RemoveThreadData(tls_);
  368|      0|      }
  369|      0|      delete tls_;
  370|      0|      abort();
  371|      0|    }
  372|      1|  }
  373|  9.02k|  return tls_;
  374|  9.02k|}
_ZN7rocksdb14ThreadLocalPtr10StaticMeta4SwapEjPv:
  394|  4.51k|void* ThreadLocalPtr::StaticMeta::Swap(uint32_t id, void* ptr) {
  395|  4.51k|  auto* tls = GetThreadLocal();
  396|  4.51k|  if (UNLIKELY(id >= tls->entries.size())) {
  ------------------
  |  |   14|  4.51k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 1, False: 4.51k]
  |  |  ------------------
  ------------------
  397|       |    // Need mutex to protect entries access within ReclaimId
  398|      1|    MutexLock l(Mutex());
  399|      1|    tls->entries.resize(id + 1);
  400|      1|  }
  401|  4.51k|  return tls->entries[id].ptr.exchange(ptr, std::memory_order_acquire);
  402|  4.51k|}
_ZN7rocksdb14ThreadLocalPtr10StaticMeta14CompareAndSwapEjPvRS2_:
  405|  4.51k|                                                void*& expected) {
  406|  4.51k|  auto* tls = GetThreadLocal();
  407|  4.51k|  if (UNLIKELY(id >= tls->entries.size())) {
  ------------------
  |  |   14|  4.51k|#define UNLIKELY(x) (__builtin_expect((x), 0))
  |  |  ------------------
  |  |  |  Branch (14:21): [True: 0, False: 4.51k]
  |  |  ------------------
  ------------------
  408|       |    // Need mutex to protect entries access within ReclaimId
  409|      0|    MutexLock l(Mutex());
  410|      0|    tls->entries.resize(id + 1);
  411|      0|  }
  412|  4.51k|  return tls->entries[id].ptr.compare_exchange_strong(
  413|  4.51k|      expected, ptr, std::memory_order_release, std::memory_order_relaxed);
  414|  4.51k|}
_ZN7rocksdb14ThreadLocalPtr10StaticMeta10SetHandlerEjPFvPvE:
  444|  18.0k|void ThreadLocalPtr::StaticMeta::SetHandler(uint32_t id, UnrefHandler handler) {
  445|  18.0k|  MutexLock l(Mutex());
  446|  18.0k|  handler_map_[id] = handler;
  447|  18.0k|}
_ZN7rocksdb14ThreadLocalPtr10StaticMeta10GetHandlerEj:
  449|  18.0k|UnrefHandler ThreadLocalPtr::StaticMeta::GetHandler(uint32_t id) {
  450|  18.0k|  Mutex()->AssertHeld();
  451|  18.0k|  auto iter = handler_map_.find(id);
  452|  18.0k|  if (iter == handler_map_.end()) {
  ------------------
  |  Branch (452:7): [True: 0, False: 18.0k]
  ------------------
  453|      0|    return nullptr;
  454|      0|  }
  455|  18.0k|  return iter->second;
  456|  18.0k|}
_ZN7rocksdb14ThreadLocalPtr10StaticMeta5GetIdEv:
  458|  18.0k|uint32_t ThreadLocalPtr::StaticMeta::GetId() {
  459|  18.0k|  MutexLock l(Mutex());
  460|  18.0k|  if (free_instance_ids_.empty()) {
  ------------------
  |  Branch (460:7): [True: 2, False: 18.0k]
  ------------------
  461|      2|    return next_instance_id_++;
  462|      2|  }
  463|       |
  464|  18.0k|  uint32_t id = free_instance_ids_.back();
  465|  18.0k|  free_instance_ids_.pop_back();
  466|  18.0k|  return id;
  467|  18.0k|}
_ZN7rocksdb14ThreadLocalPtr10StaticMeta9ReclaimIdEj:
  477|  18.0k|void ThreadLocalPtr::StaticMeta::ReclaimId(uint32_t id) {
  478|       |  // This id is not used, go through all thread local data and release
  479|       |  // corresponding value
  480|  18.0k|  MutexLock l(Mutex());
  481|  18.0k|  auto unref = GetHandler(id);
  482|  36.1k|  for (ThreadData* t = head_.next; t != &head_; t = t->next) {
  ------------------
  |  Branch (482:36): [True: 18.0k, False: 18.0k]
  ------------------
  483|  18.0k|    if (id < t->entries.size()) {
  ------------------
  |  Branch (483:9): [True: 18.0k, False: 0]
  ------------------
  484|  18.0k|      void* ptr = t->entries[id].ptr.exchange(nullptr);
  485|  18.0k|      if (ptr != nullptr && unref != nullptr) {
  ------------------
  |  Branch (485:11): [True: 4.51k, False: 13.5k]
  |  Branch (485:29): [True: 4.51k, False: 0]
  ------------------
  486|  4.51k|        unref(ptr);
  487|  4.51k|      }
  488|  18.0k|    }
  489|  18.0k|  }
  490|  18.0k|  handler_map_[id] = nullptr;
  491|  18.0k|  free_instance_ids_.push_back(id);
  492|  18.0k|}
_ZN7rocksdb14ThreadLocalPtrC2EPFvPvE:
  495|  18.0k|    : id_(Instance()->GetId()) {
  496|  18.0k|  if (handler != nullptr) {
  ------------------
  |  Branch (496:7): [True: 18.0k, False: 0]
  ------------------
  497|  18.0k|    Instance()->SetHandler(id_, handler);
  498|  18.0k|  }
  499|  18.0k|}
_ZN7rocksdb14ThreadLocalPtrD2Ev:
  501|  18.0k|ThreadLocalPtr::~ThreadLocalPtr() { Instance()->ReclaimId(id_); }
_ZN7rocksdb14ThreadLocalPtr4SwapEPv:
  507|  4.51k|void* ThreadLocalPtr::Swap(void* ptr) { return Instance()->Swap(id_, ptr); }
_ZN7rocksdb14ThreadLocalPtr14CompareAndSwapEPvRS1_:
  509|  4.51k|bool ThreadLocalPtr::CompareAndSwap(void* ptr, void*& expected) {
  510|  4.51k|  return Instance()->CompareAndSwap(id_, ptr, expected);
  511|  4.51k|}
_ZN7rocksdb14ThreadLocalPtr10StaticMeta11MemberMutexEv:
  107|      1|  port::Mutex* MemberMutex() { return &mutex_; }
_ZN7rocksdb10ThreadDataC2EPNS_14ThreadLocalPtr10StaticMetaE:
   44|      2|      : entries(), next(nullptr), prev(nullptr), inst(_inst) {}
thread_local.cc:_ZZN7rocksdb14ThreadLocalPtr10StaticMetaC1EvEN1AD2Ev:
  319|      1|    ~A() {
  320|      1|      if (tls_) {
  ------------------
  |  Branch (320:11): [True: 1, False: 0]
  ------------------
  321|      1|        OnThreadExit(tls_);
  322|      1|      }
  323|      1|    }
_ZN7rocksdb5EntryC2Ev:
   20|      2|  Entry() : ptr(nullptr) {}

_ZN7rocksdb14ThreadPoolImpl11PthreadCallEPKci:
   38|      1|void ThreadPoolImpl::PthreadCall(const char* label, int result) {
   39|      1|  if (result != 0) {
  ------------------
  |  Branch (39:7): [True: 0, False: 1]
  ------------------
   40|      0|    fprintf(stderr, "pthread %s: %s\n", label, errnoStr(result).c_str());
   41|      0|    abort();
   42|      0|  }
   43|      1|}
_ZN7rocksdb14ThreadPoolImpl4Impl11JoinThreadsEb:
  179|      4|void ThreadPoolImpl::Impl::JoinThreads(bool wait_for_jobs_to_complete) {
  180|      4|  std::unique_lock<std::mutex> lock(mu_);
  181|      4|  assert(!exit_all_threads_);
  182|       |
  183|      4|  wait_for_jobs_to_complete_ = wait_for_jobs_to_complete;
  184|      4|  exit_all_threads_ = true;
  185|       |  // prevent threads from being recreated right after they're joined, in case
  186|       |  // the user is concurrently submitting jobs.
  187|      4|  total_threads_limit_ = 0;
  188|      4|  reserved_threads_ = 0;
  189|      4|  num_waiting_threads_ = 0;
  190|       |
  191|      4|  lock.unlock();
  192|       |
  193|      4|  bgsignal_.notify_all();
  194|       |
  195|      4|  for (auto& th : bgthreads_) {
  ------------------
  |  Branch (195:17): [True: 2, False: 4]
  ------------------
  196|      2|    th.join();
  197|      2|  }
  198|       |
  199|      4|  bgthreads_.clear();
  200|       |
  201|      4|  exit_all_threads_ = false;
  202|      4|  wait_for_jobs_to_complete_ = false;
  203|      4|}
_ZN7rocksdb14ThreadPoolImpl4Impl8BGThreadEm:
  215|      2|void ThreadPoolImpl::Impl::BGThread(size_t thread_id) {
  216|      2|  bool low_io_priority = false;
  217|      2|  CpuPriority current_cpu_priority = CpuPriority::kNormal;
  218|       |
  219|      2|  while (true) {
  ------------------
  |  Branch (219:10): [Folded - Ignored]
  ------------------
  220|       |    // Wait until there is an item that is ready to run
  221|      2|    std::unique_lock<std::mutex> lock(mu_);
  222|       |    // Stop waiting if the thread needs to do work or needs to terminate.
  223|       |    // Increase num_waiting_threads_ once this task has started waiting
  224|      2|    num_waiting_threads_++;
  225|       |
  226|      2|    TEST_SYNC_POINT("ThreadPoolImpl::BGThread::WaitingThreadsInc");
  227|      2|    TEST_IDX_SYNC_POINT("ThreadPoolImpl::BGThread::Start:th", thread_id);
  228|       |    // When not exist_all_threads and the current thread id is not the last
  229|       |    // excessive thread, it may be blocked due to 3 reasons: 1) queue is empty
  230|       |    // 2) it is the excessive thread (not the last one)
  231|       |    // 3) the number of waiting threads is not greater than reserved threads
  232|       |    // (i.e, no available threads due to full reservation")
  233|      4|    while (!exit_all_threads_ && !IsLastExcessiveThread(thread_id) &&
  ------------------
  |  Branch (233:12): [True: 2, False: 2]
  |  Branch (233:34): [True: 2, False: 0]
  ------------------
  234|      4|           (queue_.empty() || IsExcessiveThread(thread_id) ||
  ------------------
  |  Branch (234:13): [True: 2, False: 0]
  |  Branch (234:31): [True: 0, False: 0]
  ------------------
  235|      2|            num_waiting_threads_ <= reserved_threads_)) {
  ------------------
  |  Branch (235:13): [True: 0, False: 0]
  ------------------
  236|      2|      bgsignal_.wait(lock);
  237|      2|    }
  238|       |    // Decrease num_waiting_threads_ once the thread is not waiting
  239|      2|    num_waiting_threads_--;
  240|       |
  241|      2|    if (exit_all_threads_) {  // mechanism to let BG threads exit safely
  ------------------
  |  Branch (241:9): [True: 2, False: 0]
  ------------------
  242|       |
  243|      2|      if (!wait_for_jobs_to_complete_ || queue_.empty()) {
  ------------------
  |  Branch (243:11): [True: 2, False: 0]
  |  Branch (243:42): [True: 0, False: 0]
  ------------------
  244|      2|        break;
  245|      2|      }
  246|      2|    } else if (IsLastExcessiveThread(thread_id)) {
  ------------------
  |  Branch (246:16): [True: 0, False: 0]
  ------------------
  247|       |      // Current thread is the last generated one and is excessive.
  248|       |      // We always terminate excessive thread in the reverse order of
  249|       |      // generation time. But not when `exit_all_threads_ == true`,
  250|       |      // otherwise `JoinThreads()` could try to `join()` a `detach()`ed
  251|       |      // thread.
  252|      0|      auto& terminating_thread = bgthreads_.back();
  253|      0|      terminating_thread.detach();
  254|      0|      bgthreads_.pop_back();
  255|      0|      if (HasExcessiveThread()) {
  ------------------
  |  Branch (255:11): [True: 0, False: 0]
  ------------------
  256|       |        // There is still at least more excessive thread to terminate.
  257|      0|        WakeUpAllThreads();
  258|      0|      }
  259|      0|      TEST_IDX_SYNC_POINT("ThreadPoolImpl::BGThread::Termination:th",
  260|      0|                          thread_id);
  261|      0|      TEST_SYNC_POINT("ThreadPoolImpl::BGThread::Termination");
  262|      0|      break;
  263|      0|    }
  264|       |
  265|      0|    auto func = std::move(queue_.front().function);
  266|      0|    queue_.pop_front();
  267|       |
  268|      0|    queue_len_.store(static_cast<unsigned int>(queue_.size()),
  269|      0|                     std::memory_order_relaxed);
  270|       |
  271|      0|    bool decrease_io_priority = (low_io_priority != low_io_priority_);
  272|      0|    CpuPriority cpu_priority = cpu_priority_;
  273|      0|    lock.unlock();
  274|       |
  275|      0|    if (cpu_priority < current_cpu_priority) {
  ------------------
  |  Branch (275:9): [True: 0, False: 0]
  ------------------
  276|      0|      TEST_SYNC_POINT_CALLBACK("ThreadPoolImpl::BGThread::BeforeSetCpuPriority",
  277|      0|                               &current_cpu_priority);
  278|       |      // 0 means current thread.
  279|      0|      port::SetCpuPriority(0, cpu_priority);
  280|      0|      current_cpu_priority = cpu_priority;
  281|      0|      TEST_SYNC_POINT_CALLBACK("ThreadPoolImpl::BGThread::AfterSetCpuPriority",
  282|      0|                               &current_cpu_priority);
  283|      0|    }
  284|       |
  285|      0|#ifdef OS_LINUX
  286|      0|    if (decrease_io_priority) {
  ------------------
  |  Branch (286:9): [True: 0, False: 0]
  ------------------
  287|      0|#define IOPRIO_CLASS_SHIFT (13)
  288|      0|#define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | data)
  289|       |      // Put schedule into IOPRIO_CLASS_IDLE class (lowest)
  290|       |      // These system calls only have an effect when used in conjunction
  291|       |      // with an I/O scheduler that supports I/O priorities. As at
  292|       |      // kernel 2.6.17 the only such scheduler is the Completely
  293|       |      // Fair Queuing (CFQ) I/O scheduler.
  294|       |      // To change scheduler:
  295|       |      //  echo cfq > /sys/block/<device_name>/queue/schedule
  296|       |      // Tunables to consider:
  297|       |      //  /sys/block/<device_name>/queue/slice_idle
  298|       |      //  /sys/block/<device_name>/queue/slice_sync
  299|      0|      syscall(SYS_ioprio_set, 1,  // IOPRIO_WHO_PROCESS
  300|      0|              0,                  // current thread
  301|      0|              IOPRIO_PRIO_VALUE(3, 0));
  ------------------
  |  |  288|      0|#define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | data)
  |  |  ------------------
  |  |  |  |  287|      0|#define IOPRIO_CLASS_SHIFT (13)
  |  |  ------------------
  ------------------
  302|      0|      low_io_priority = true;
  303|      0|    }
  304|       |#else
  305|       |    (void)decrease_io_priority;  // avoid 'unused variable' error
  306|       |#endif
  307|       |
  308|      0|    TEST_SYNC_POINT_CALLBACK("ThreadPoolImpl::Impl::BGThread:BeforeRun",
  309|      0|                             &priority_);
  310|       |
  311|      0|    func();
  312|      0|  }
  313|      2|}
_ZN7rocksdb14ThreadPoolImpl4Impl15BGThreadWrapperEPv:
  323|      2|void ThreadPoolImpl::Impl::BGThreadWrapper(void* arg) {
  324|      2|  BGThreadMetadata* meta = static_cast<BGThreadMetadata*>(arg);
  325|      2|  size_t thread_id = meta->thread_id_;
  326|      2|  ThreadPoolImpl::Impl* tp = meta->thread_pool_;
  327|      2|#ifdef ROCKSDB_USING_THREAD_STATUS
  328|       |  // initialize it because compiler isn't good enough to see we don't use it
  329|       |  // uninitialized
  330|      2|  ThreadStatus::ThreadType thread_type = ThreadStatus::NUM_THREAD_TYPES;
  331|      2|  switch (tp->GetThreadPriority()) {
  ------------------
  |  Branch (331:11): [True: 0, False: 2]
  ------------------
  332|      1|    case Env::Priority::HIGH:
  ------------------
  |  Branch (332:5): [True: 1, False: 1]
  ------------------
  333|      1|      thread_type = ThreadStatus::HIGH_PRIORITY;
  334|      1|      break;
  335|      1|    case Env::Priority::LOW:
  ------------------
  |  Branch (335:5): [True: 1, False: 1]
  ------------------
  336|      1|      thread_type = ThreadStatus::LOW_PRIORITY;
  337|      1|      break;
  338|      0|    case Env::Priority::BOTTOM:
  ------------------
  |  Branch (338:5): [True: 0, False: 2]
  ------------------
  339|      0|      thread_type = ThreadStatus::BOTTOM_PRIORITY;
  340|      0|      break;
  341|      0|    case Env::Priority::USER:
  ------------------
  |  Branch (341:5): [True: 0, False: 2]
  ------------------
  342|      0|      thread_type = ThreadStatus::USER;
  343|      0|      break;
  344|      0|    case Env::Priority::TOTAL:
  ------------------
  |  Branch (344:5): [True: 0, False: 2]
  ------------------
  345|      0|      assert(false);
  346|      0|      return;
  347|      2|  }
  348|      2|  assert(thread_type != ThreadStatus::NUM_THREAD_TYPES);
  349|      2|  ThreadStatusUtil::RegisterThread(tp->GetHostEnv(), thread_type);
  350|      2|#endif
  351|      2|  delete meta;
  352|      2|  tp->BGThread(thread_id);
  353|      2|#ifdef ROCKSDB_USING_THREAD_STATUS
  354|      2|  ThreadStatusUtil::UnregisterThread();
  355|      2|#endif
  356|      2|  return;
  357|      2|}
_ZN7rocksdb14ThreadPoolImpl4Impl28SetBackgroundThreadsInternalEib:
  360|  27.0k|                                                        bool allow_reduce) {
  361|  27.0k|  std::lock_guard<std::mutex> lock(mu_);
  362|  27.0k|  if (exit_all_threads_) {
  ------------------
  |  Branch (362:7): [True: 0, False: 27.0k]
  ------------------
  363|      0|    return;
  364|      0|  }
  365|  27.0k|  if (num > total_threads_limit_ ||
  ------------------
  |  Branch (365:7): [True: 2, False: 27.0k]
  ------------------
  366|  27.0k|      (num < total_threads_limit_ && allow_reduce)) {
  ------------------
  |  Branch (366:8): [True: 0, False: 27.0k]
  |  Branch (366:38): [True: 0, False: 0]
  ------------------
  367|      2|    total_threads_limit_ = std::max(0, num);
  368|      2|    WakeUpAllThreads();
  369|      2|    StartBGThreads();
  370|      2|  }
  371|  27.0k|}
_ZN7rocksdb14ThreadPoolImpl4Impl20GetBackgroundThreadsEv:
  373|  9.02k|int ThreadPoolImpl::Impl::GetBackgroundThreads() {
  374|  9.02k|  std::unique_lock<std::mutex> lock(mu_);
  375|  9.02k|  return total_threads_limit_;
  376|  9.02k|}
_ZN7rocksdb14ThreadPoolImpl4Impl14StartBGThreadsEv:
  378|      2|void ThreadPoolImpl::Impl::StartBGThreads() {
  379|       |  // Start background thread if necessary
  380|      4|  while ((int)bgthreads_.size() < total_threads_limit_) {
  ------------------
  |  Branch (380:10): [True: 2, False: 2]
  ------------------
  381|      2|    port::Thread p_t(&BGThreadWrapper,
  382|      2|                     new BGThreadMetadata(this, bgthreads_.size()));
  383|       |
  384|       |// Set the thread name to aid debugging
  385|      2|#if defined(_GNU_SOURCE) && defined(__GLIBC_PREREQ)
  386|      2|#if __GLIBC_PREREQ(2, 12)
  387|      2|    auto th_handle = p_t.native_handle();
  388|      2|    std::string thread_priority = Env::PriorityToString(GetThreadPriority());
  389|      2|    std::ostringstream thread_name_stream;
  390|      2|    thread_name_stream << "rocksdb:";
  391|      7|    for (char c : thread_priority) {
  ------------------
  |  Branch (391:17): [True: 7, False: 2]
  ------------------
  392|      7|      thread_name_stream << static_cast<char>(tolower(c));
  393|      7|    }
  394|      2|    pthread_setname_np(th_handle, thread_name_stream.str().c_str());
  395|      2|#endif
  396|      2|#endif
  397|      2|    bgthreads_.push_back(std::move(p_t));
  398|      2|  }
  399|      2|}
_ZN7rocksdb14ThreadPoolImpl4Impl10UnScheduleEPv:
  433|  54.1k|int ThreadPoolImpl::Impl::UnSchedule(void* arg) {
  434|  54.1k|  int count = 0;
  435|       |
  436|  54.1k|  std::vector<std::function<void()>> candidates;
  437|  54.1k|  {
  438|  54.1k|    std::lock_guard<std::mutex> lock(mu_);
  439|       |
  440|       |    // Remove from priority queue
  441|  54.1k|    BGQueue::iterator it = queue_.begin();
  442|  54.1k|    while (it != queue_.end()) {
  ------------------
  |  Branch (442:12): [True: 0, False: 54.1k]
  ------------------
  443|      0|      if (arg == (*it).tag) {
  ------------------
  |  Branch (443:11): [True: 0, False: 0]
  ------------------
  444|      0|        if (it->unschedFunction) {
  ------------------
  |  Branch (444:13): [True: 0, False: 0]
  ------------------
  445|      0|          candidates.push_back(std::move(it->unschedFunction));
  446|      0|        }
  447|      0|        it = queue_.erase(it);
  448|      0|        count++;
  449|      0|      } else {
  450|      0|        ++it;
  451|      0|      }
  452|      0|    }
  453|  54.1k|    queue_len_.store(static_cast<unsigned int>(queue_.size()),
  454|  54.1k|                     std::memory_order_relaxed);
  455|  54.1k|  }
  456|       |
  457|       |  // Run unschedule functions outside the mutex
  458|  54.1k|  for (auto& f : candidates) {
  ------------------
  |  Branch (458:16): [True: 0, False: 54.1k]
  ------------------
  459|      0|    f();
  460|      0|  }
  461|       |
  462|  54.1k|  return count;
  463|  54.1k|}
_ZN7rocksdb14ThreadPoolImplC2Ev:
  465|      4|ThreadPoolImpl::ThreadPoolImpl() : impl_(new Impl()) {}
_ZN7rocksdb14ThreadPoolImpl14JoinAllThreadsEv:
  469|      4|void ThreadPoolImpl::JoinAllThreads() { impl_->JoinThreads(false); }
_ZN7rocksdb14ThreadPoolImpl20GetBackgroundThreadsEv:
  475|  9.02k|int ThreadPoolImpl::GetBackgroundThreads() {
  476|  9.02k|  return impl_->GetBackgroundThreads();
  477|  9.02k|}
_ZN7rocksdb14ThreadPoolImpl28IncBackgroundThreadsIfNeededEi:
  493|  27.0k|void ThreadPoolImpl::IncBackgroundThreadsIfNeeded(int num) {
  494|  27.0k|  impl_->SetBackgroundThreadsInternal(num, false);
  495|  27.0k|}
_ZN7rocksdb14ThreadPoolImpl10UnScheduleEPv:
  516|  54.1k|int ThreadPoolImpl::UnSchedule(void* arg) { return impl_->UnSchedule(arg); }
_ZN7rocksdb14ThreadPoolImpl10SetHostEnvEPNS_3EnvE:
  518|      4|void ThreadPoolImpl::SetHostEnv(Env* env) { impl_->SetHostEnv(env); }
_ZN7rocksdb14ThreadPoolImpl17SetThreadPriorityENS_3Env8PriorityE:
  529|      4|void ThreadPoolImpl::SetThreadPriority(Env::Priority priority) {
  530|      4|  impl_->SetThreadPriority(priority);
  531|      4|}
_ZNK7rocksdb14ThreadPoolImpl4Impl21IsLastExcessiveThreadEm:
   84|      2|  bool IsLastExcessiveThread(size_t thread_id) const {
   85|      2|    return HasExcessiveThread() && thread_id == bgthreads_.size() - 1;
  ------------------
  |  Branch (85:12): [True: 0, False: 2]
  |  Branch (85:36): [True: 0, False: 0]
  ------------------
   86|      2|  }
_ZNK7rocksdb14ThreadPoolImpl4Impl18HasExcessiveThreadEv:
   77|      2|  bool HasExcessiveThread() const {
   78|      2|    return static_cast<int>(bgthreads_.size()) > total_threads_limit_;
   79|      2|  }
_ZN7rocksdb14ThreadPoolImpl4Impl16WakeUpAllThreadsEv:
   62|      2|  void WakeUpAllThreads() { bgsignal_.notify_all(); }
_ZNK7rocksdb14ThreadPoolImpl4Impl17GetThreadPriorityEv:
   94|      4|  Env::Priority GetThreadPriority() const { return priority_; }
_ZNK7rocksdb14ThreadPoolImpl4Impl10GetHostEnvEv:
   75|      2|  Env* GetHostEnv() const { return env_; }
_ZN7rocksdb16BGThreadMetadataC2EPNS_14ThreadPoolImpl4ImplEm:
  320|      2|      : thread_pool_(thread_pool), thread_id_(thread_id) {}
_ZN7rocksdb14ThreadPoolImpl4ImplC2Ev:
  175|      4|      bgthreads_() {}
_ZN7rocksdb14ThreadPoolImpl4Impl10SetHostEnvEPNS_3EnvE:
   73|      4|  void SetHostEnv(Env* env) { env_ = env; }
_ZN7rocksdb14ThreadPoolImpl4Impl17SetThreadPriorityENS_3Env8PriorityE:
   97|      4|  void SetThreadPriority(Env::Priority priority) { priority_ = priority; }

_ZN7rocksdb5TimerC2EPNS_11SystemClockE:
   46|      1|        executing_task_(false) {}
_ZN7rocksdb5Timer3AddENSt3__18functionIFvvEEERKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEmm:
   59|  27.0k|           uint64_t start_after_us, uint64_t repeat_every_us) {
   60|  27.0k|    auto fn_info = std::make_unique<FunctionInfo>(std::move(fn), fn_name, 0,
   61|  27.0k|                                                  repeat_every_us);
   62|  27.0k|    InstrumentedMutexLock l(&mutex_);
   63|       |    // Assign time within mutex to make sure the next_run_time is larger than
   64|       |    // the current running one
   65|  27.0k|    fn_info->next_run_time_us = clock_->NowMicros() + start_after_us;
   66|       |    // the new task start time should never before the current task executing
   67|       |    // time, as the executing task can only be running if it's next_run_time_us
   68|       |    // is due (<= clock_->NowMicros()).
   69|  27.0k|    if (executing_task_ &&
  ------------------
  |  Branch (69:9): [True: 0, False: 27.0k]
  ------------------
   70|  27.0k|        fn_info->next_run_time_us < heap_.top()->next_run_time_us) {
  ------------------
  |  Branch (70:9): [True: 0, False: 0]
  ------------------
   71|      0|      return false;
   72|      0|    }
   73|  27.0k|    auto it = map_.find(fn_name);
   74|  27.0k|    if (it == map_.end()) {
  ------------------
  |  Branch (74:9): [True: 27.0k, False: 0]
  ------------------
   75|  27.0k|      heap_.push(fn_info.get());
   76|  27.0k|      map_.try_emplace(fn_name, std::move(fn_info));
   77|  27.0k|    } else {
   78|       |      // timer doesn't support duplicated function name
   79|      0|      return false;
   80|      0|    }
   81|  27.0k|    cond_var_.SignalAll();
   82|  27.0k|    return true;
   83|  27.0k|  }
_ZN7rocksdb5Timer6CancelERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
   85|  27.0k|  void Cancel(const std::string& fn_name) {
   86|  27.0k|    InstrumentedMutexLock l(&mutex_);
   87|       |
   88|       |    // Mark the function with fn_name as invalid so that it will not be
   89|       |    // requeued.
   90|  27.0k|    auto it = map_.find(fn_name);
   91|  27.0k|    if (it != map_.end() && it->second) {
  ------------------
  |  Branch (91:9): [True: 27.0k, False: 0]
  |  Branch (91:9): [True: 27.0k, False: 0]
  |  Branch (91:29): [True: 27.0k, False: 0]
  ------------------
   92|  27.0k|      it->second->Cancel();
   93|  27.0k|    }
   94|       |
   95|       |    // If the currently running function is fn_name, then we need to wait
   96|       |    // until it finishes before returning to caller.
   97|  27.1k|    while (!heap_.empty() && executing_task_) {
  ------------------
  |  Branch (97:12): [True: 27.1k, False: 0]
  |  Branch (97:30): [True: 18, False: 27.0k]
  ------------------
   98|     18|      FunctionInfo* func_info = heap_.top();
   99|     18|      assert(func_info);
  100|     18|      if (func_info->name == fn_name) {
  ------------------
  |  Branch (100:11): [True: 18, False: 0]
  ------------------
  101|     18|        WaitForTaskCompleteIfNecessary();
  102|     18|      } else {
  103|      0|        break;
  104|      0|      }
  105|     18|    }
  106|  27.0k|  }
_ZN7rocksdb5Timer5StartEv:
  114|  27.0k|  bool Start() {
  115|  27.0k|    InstrumentedMutexLock l(&mutex_);
  116|  27.0k|    if (running_) {
  ------------------
  |  Branch (116:9): [True: 18.0k, False: 9.02k]
  ------------------
  117|  18.0k|      return false;
  118|  18.0k|    }
  119|       |
  120|  9.02k|    running_ = true;
  121|  9.02k|    thread_ = std::make_unique<port::Thread>(&Timer::Run, this);
  122|  9.02k|    return true;
  123|  27.0k|  }
_ZN7rocksdb5Timer8ShutdownEv:
  126|  18.0k|  bool Shutdown() {
  127|  18.0k|    {
  128|  18.0k|      InstrumentedMutexLock l(&mutex_);
  129|  18.0k|      if (!running_) {
  ------------------
  |  Branch (129:11): [True: 9.02k, False: 9.02k]
  ------------------
  130|  9.02k|        return false;
  131|  9.02k|      }
  132|  9.02k|      running_ = false;
  133|  9.02k|      CancelAllWithLock();
  134|  9.02k|      cond_var_.SignalAll();
  135|  9.02k|    }
  136|       |
  137|  9.02k|    if (thread_) {
  ------------------
  |  Branch (137:9): [True: 9.02k, False: 0]
  ------------------
  138|  9.02k|      thread_->join();
  139|  9.02k|    }
  140|  9.02k|    return true;
  141|  18.0k|  }
_ZNK7rocksdb5Timer14HasPendingTaskEv:
  143|  45.1k|  bool HasPendingTask() const {
  144|  45.1k|    InstrumentedMutexLock l(&mutex_);
  145|  55.5k|    for (const auto& fn_info : map_) {
  ------------------
  |  Branch (145:30): [True: 55.5k, False: 18.0k]
  ------------------
  146|  55.5k|      if (fn_info.second->IsValid()) {
  ------------------
  |  Branch (146:11): [True: 27.0k, False: 28.5k]
  ------------------
  147|  27.0k|        return true;
  148|  27.0k|      }
  149|  55.5k|    }
  150|  18.0k|    return false;
  151|  45.1k|  }
_ZN7rocksdb5Timer3RunEv:
  197|  9.02k|  void Run() {
  198|  9.02k|    InstrumentedMutexLock l(&mutex_);
  199|       |
  200|  19.0k|    while (running_) {
  ------------------
  |  Branch (200:12): [True: 9.98k, False: 9.02k]
  ------------------
  201|  9.98k|      if (heap_.empty()) {
  ------------------
  |  Branch (201:11): [True: 5, False: 9.98k]
  ------------------
  202|       |        // wait
  203|      5|        TEST_SYNC_POINT("Timer::Run::Waiting");
  204|      5|        cond_var_.Wait();
  205|      5|        continue;
  206|      5|      }
  207|       |
  208|  9.98k|      FunctionInfo* current_fn = heap_.top();
  209|  9.98k|      assert(current_fn);
  210|       |
  211|  9.98k|      if (!current_fn->IsValid()) {
  ------------------
  |  Branch (211:11): [True: 0, False: 9.98k]
  ------------------
  212|      0|        heap_.pop();
  213|      0|        map_.erase(current_fn->name);
  214|      0|        continue;
  215|      0|      }
  216|       |
  217|  9.98k|      if (current_fn->next_run_time_us <= clock_->NowMicros()) {
  ------------------
  |  Branch (217:11): [True: 948, False: 9.03k]
  ------------------
  218|       |        // make a copy of the function so it won't be changed after
  219|       |        // mutex_.unlock.
  220|    948|        std::function<void()> fn = current_fn->fn;
  221|    948|        executing_task_ = true;
  222|    948|        mutex_.Unlock();
  223|       |        // Execute the work
  224|    948|        fn();
  225|    948|        mutex_.Lock();
  226|    948|        executing_task_ = false;
  227|    948|        cond_var_.SignalAll();
  228|       |
  229|       |        // Remove the work from the heap once it is done executing, make sure
  230|       |        // it's the same function after executing the work while mutex is
  231|       |        // released.
  232|       |        // Note that we are just removing the pointer from the heap. Its
  233|       |        // memory is still managed in the map (as it holds a unique ptr).
  234|       |        // So current_fn is still a valid ptr.
  235|    948|        assert(heap_.top() == current_fn);
  236|    948|        heap_.pop();
  237|       |
  238|       |        // current_fn may be cancelled already.
  239|    948|        if (current_fn->IsValid() && current_fn->repeat_every_us > 0) {
  ------------------
  |  Branch (239:13): [True: 930, False: 18]
  |  Branch (239:38): [True: 930, False: 0]
  ------------------
  240|    930|          assert(running_);
  241|    930|          current_fn->next_run_time_us =
  242|    930|              clock_->NowMicros() + current_fn->repeat_every_us;
  243|       |
  244|       |          // Schedule new work into the heap with new time.
  245|    930|          heap_.push(current_fn);
  246|    930|        } else {
  247|       |          // if current_fn is cancelled or no need to repeat, remove it from the
  248|       |          // map to avoid leak.
  249|     18|          map_.erase(current_fn->name);
  250|     18|        }
  251|  9.03k|      } else {
  252|  9.03k|        cond_var_.TimedWait(current_fn->next_run_time_us);
  253|  9.03k|      }
  254|  9.98k|    }
  255|  9.02k|  }
_ZN7rocksdb5Timer17CancelAllWithLockEv:
  257|  9.02k|  void CancelAllWithLock() {
  258|  9.02k|    mutex_.AssertHeld();
  259|  9.02k|    if (map_.empty() && heap_.empty()) {
  ------------------
  |  Branch (259:9): [True: 0, False: 9.02k]
  |  Branch (259:25): [True: 0, False: 0]
  ------------------
  260|      0|      return;
  261|      0|    }
  262|       |
  263|       |    // With mutex_ held, set all tasks to invalid so that they will not be
  264|       |    // re-queued.
  265|  27.0k|    for (auto& elem : map_) {
  ------------------
  |  Branch (265:21): [True: 27.0k, False: 9.02k]
  ------------------
  266|  27.0k|      auto& func_info = elem.second;
  267|  27.0k|      assert(func_info);
  268|  27.0k|      func_info->Cancel();
  269|  27.0k|    }
  270|       |
  271|       |    // WaitForTaskCompleteIfNecessary() may release mutex_
  272|  9.02k|    WaitForTaskCompleteIfNecessary();
  273|       |
  274|  36.0k|    while (!heap_.empty()) {
  ------------------
  |  Branch (274:12): [True: 27.0k, False: 9.02k]
  ------------------
  275|  27.0k|      heap_.pop();
  276|  27.0k|    }
  277|  9.02k|    map_.clear();
  278|  9.02k|  }
_ZN7rocksdb5Timer12FunctionInfoC2EONSt3__18functionIFvvEEENS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEmm:
  302|  27.0k|          valid(true) {}
_ZN7rocksdb5Timer12FunctionInfo6CancelEv:
  304|  54.1k|    void Cancel() { valid = false; }
_ZNK7rocksdb5Timer12FunctionInfo7IsValidEv:
  306|  66.5k|    bool IsValid() const { return valid; }
_ZN7rocksdb5Timer30WaitForTaskCompleteIfNecessaryEv:
  309|  9.04k|  void WaitForTaskCompleteIfNecessary() {
  310|  9.04k|    mutex_.AssertHeld();
  311|  9.06k|    while (executing_task_) {
  ------------------
  |  Branch (311:12): [True: 18, False: 9.04k]
  ------------------
  312|     18|      TEST_SYNC_POINT("Timer::WaitForTaskCompleteIfNecessary:TaskExecuting");
  313|     18|      cond_var_.Wait();
  314|     18|    }
  315|  9.04k|  }
_ZN7rocksdb5Timer12RunTimeOrderclEPKNS0_12FunctionInfoES4_:
  318|  29.1k|    bool operator()(const FunctionInfo* f1, const FunctionInfo* f2) {
  319|  29.1k|      return f1->next_run_time_us > f2->next_run_time_us;
  320|  29.1k|    }

_ZN7rocksdb39HandleWriteBatchTimestampSizeDifferenceEPKNS_10WriteBatchERKNSt3__113unordered_mapIjmNS3_4hashIjEENS3_8equal_toIjEENS3_9allocatorINS3_4pairIKjmEEEEEESG_NS_28TimestampSizeConsistencyModeEPNS3_10unique_ptrIS0_NS3_14default_deleteIS0_EEEE:
  308|  1.36M|    std::unique_ptr<WriteBatch>* new_batch) {
  309|       |  // Quick path to bypass checking the WriteBatch.
  310|  1.36M|  if (AllRunningColumnFamiliesConsistent(running_ts_sz, record_ts_sz)) {
  ------------------
  |  Branch (310:7): [True: 1.36M, False: 0]
  ------------------
  311|  1.36M|    return Status::OK();
  312|  1.36M|  }
  313|      0|  bool need_recovery = false;
  314|      0|  Status status = CheckWriteBatchTimestampSizeConsistency(
  315|      0|      batch, running_ts_sz, record_ts_sz, check_mode, &need_recovery);
  316|      0|  if (!status.ok()) {
  ------------------
  |  Branch (316:7): [True: 0, False: 0]
  ------------------
  317|      0|    return status;
  318|      0|  } else if (need_recovery) {
  ------------------
  |  Branch (318:14): [True: 0, False: 0]
  ------------------
  319|      0|    assert(new_batch);
  320|      0|    SequenceNumber sequence = WriteBatchInternal::Sequence(batch);
  321|      0|    TimestampRecoveryHandler recovery_handler(running_ts_sz, record_ts_sz);
  322|      0|    status = batch->Iterate(&recovery_handler);
  323|      0|    if (!status.ok()) {
  ------------------
  |  Branch (323:9): [True: 0, False: 0]
  ------------------
  324|      0|      return status;
  325|      0|    } else {
  326|      0|      *new_batch = recovery_handler.TransferNewBatch();
  327|      0|      WriteBatchInternal::SetSequence(new_batch->get(), sequence);
  328|      0|    }
  329|      0|  }
  330|      0|  return Status::OK();
  331|      0|}
_ZN7rocksdb36ValidateUserDefinedTimestampsOptionsEPKNS_10ComparatorERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEbbPb:
  336|  4.51k|    bool* mark_sst_files_has_no_udt) {
  337|  4.51k|  size_t ts_sz = new_comparator->timestamp_size();
  338|  4.51k|  ToggleUDT res = CompareComparator(new_comparator, old_comparator_name);
  339|  4.51k|  switch (res) {
  340|  4.51k|    case ToggleUDT::kUnchanged:
  ------------------
  |  Branch (340:5): [True: 4.51k, False: 0]
  ------------------
  341|  4.51k|      if (old_persist_udt == new_persist_udt) {
  ------------------
  |  Branch (341:11): [True: 4.51k, False: 0]
  ------------------
  342|  4.51k|        return Status::OK();
  343|  4.51k|      }
  344|      0|      if (ts_sz == 0) {
  ------------------
  |  Branch (344:11): [True: 0, False: 0]
  ------------------
  345|      0|        return Status::OK();
  346|      0|      }
  347|      0|      return Status::InvalidArgument(
  348|      0|          "Cannot toggle the persist_user_defined_timestamps flag for a column "
  349|      0|          "family with user-defined timestamps feature enabled.");
  350|      0|    case ToggleUDT::kEnableUDT:
  ------------------
  |  Branch (350:5): [True: 0, False: 4.51k]
  ------------------
  351|      0|      if (!new_persist_udt) {
  ------------------
  |  Branch (351:11): [True: 0, False: 0]
  ------------------
  352|      0|        *mark_sst_files_has_no_udt = true;
  353|      0|        return Status::OK();
  354|      0|      }
  355|      0|      return Status::InvalidArgument(
  356|      0|          "Cannot open a column family and enable user-defined timestamps "
  357|      0|          "feature without setting persist_user_defined_timestamps flag to "
  358|      0|          "false.");
  359|      0|    case ToggleUDT::kDisableUDT:
  ------------------
  |  Branch (359:5): [True: 0, False: 4.51k]
  ------------------
  360|      0|      if (!old_persist_udt) {
  ------------------
  |  Branch (360:11): [True: 0, False: 0]
  ------------------
  361|      0|        return Status::OK();
  362|      0|      }
  363|      0|      return Status::InvalidArgument(
  364|      0|          "Cannot open a column family and disable user-defined timestamps "
  365|      0|          "feature if its existing persist_user_defined_timestamps flag is not "
  366|      0|          "false.");
  367|      0|    case ToggleUDT::kInvalidChange:
  ------------------
  |  Branch (367:5): [True: 0, False: 4.51k]
  ------------------
  368|      0|      return Status::InvalidArgument(
  369|      0|          new_comparator->Name(),
  370|      0|          "does not match existing comparator " + old_comparator_name);
  371|      0|    default:
  ------------------
  |  Branch (371:5): [True: 0, False: 4.51k]
  ------------------
  372|      0|      break;
  373|  4.51k|  }
  374|      0|  return Status::InvalidArgument(
  375|      0|      "Unsupported user defined timestamps settings change.");
  376|  4.51k|}
udt_util.cc:_ZN7rocksdb12_GLOBAL__N_115GetRecoveryTypeEmRKNSt3__18optionalImEE:
   24|  1.36M|                             const std::optional<size_t>& recorded_ts_sz) {
   25|  1.36M|  if (running_ts_sz == 0) {
  ------------------
  |  Branch (25:7): [True: 1.36M, False: 0]
  ------------------
   26|  1.36M|    if (!recorded_ts_sz.has_value()) {
  ------------------
  |  Branch (26:9): [True: 1.36M, False: 0]
  ------------------
   27|       |      // A column family id not recorded is equivalent to that column family has
   28|       |      // zero timestamp size.
   29|  1.36M|      return RecoveryType::kNoop;
   30|  1.36M|    }
   31|      0|    return RecoveryType::kStripTimestamp;
   32|  1.36M|  }
   33|       |
   34|      0|  assert(running_ts_sz != 0);
   35|       |
   36|      0|  if (!recorded_ts_sz.has_value()) {
  ------------------
  |  Branch (36:7): [True: 0, False: 0]
  ------------------
   37|      0|    return RecoveryType::kPadTimestamp;
   38|      0|  }
   39|       |
   40|      0|  if (running_ts_sz != *recorded_ts_sz) {
  ------------------
  |  Branch (40:7): [True: 0, False: 0]
  ------------------
   41|      0|    return RecoveryType::kUnrecoverable;
   42|      0|  }
   43|       |
   44|      0|  return RecoveryType::kNoop;
   45|      0|}
udt_util.cc:_ZN7rocksdb12_GLOBAL__N_134AllRunningColumnFamiliesConsistentERKNSt3__113unordered_mapIjmNS1_4hashIjEENS1_8equal_toIjEENS1_9allocatorINS1_4pairIKjmEEEEEESE_:
   49|  1.36M|    const UnorderedMap<uint32_t, size_t>& record_ts_sz) {
   50|  1.36M|  for (const auto& [cf_id, ts_sz] : running_ts_sz) {
  ------------------
  |  Branch (50:35): [True: 1.36M, False: 1.36M]
  ------------------
   51|  1.36M|    auto record_it = record_ts_sz.find(cf_id);
   52|  1.36M|    RecoveryType recovery_type =
   53|  1.36M|        GetRecoveryType(ts_sz, record_it != record_ts_sz.end()
  ------------------
  |  Branch (53:32): [True: 0, False: 1.36M]
  ------------------
   54|  1.36M|                                   ? std::optional<size_t>(record_it->second)
   55|  1.36M|                                   : std::nullopt);
   56|  1.36M|    if (recovery_type != RecoveryType::kNoop) {
  ------------------
  |  Branch (56:9): [True: 0, False: 1.36M]
  ------------------
   57|      0|      return false;
   58|      0|    }
   59|  1.36M|  }
   60|  1.36M|  return true;
   61|  1.36M|}
udt_util.cc:_ZN7rocksdb12_GLOBAL__N_117CompareComparatorEPKNS_10ComparatorERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE:
  113|  4.51k|                            const std::string& old_comparator_name) {
  114|  4.51k|  static const char* kUDTSuffix = ".u64ts";
  115|  4.51k|  static const Slice kSuffixSlice = kUDTSuffix;
  116|  4.51k|  static const size_t kSuffixSize = 6;
  117|  4.51k|  size_t ts_sz = new_comparator->timestamp_size();
  118|  4.51k|  (void)ts_sz;
  119|  4.51k|  Slice new_ucmp_name(new_comparator->Name());
  120|  4.51k|  Slice old_ucmp_name(old_comparator_name);
  121|  4.51k|  if (new_ucmp_name.compare(old_ucmp_name) == 0) {
  ------------------
  |  Branch (121:7): [True: 4.51k, False: 0]
  ------------------
  122|  4.51k|    return ToggleUDT::kUnchanged;
  123|  4.51k|  }
  124|      0|  if (new_ucmp_name.size() == old_ucmp_name.size() + kSuffixSize &&
  ------------------
  |  Branch (124:7): [True: 0, False: 0]
  ------------------
  125|      0|      new_ucmp_name.starts_with(old_ucmp_name) &&
  ------------------
  |  Branch (125:7): [True: 0, False: 0]
  ------------------
  126|      0|      new_ucmp_name.ends_with(kSuffixSlice)) {
  ------------------
  |  Branch (126:7): [True: 0, False: 0]
  ------------------
  127|      0|    assert(ts_sz == 8);
  128|      0|    return ToggleUDT::kEnableUDT;
  129|      0|  }
  130|      0|  if (old_ucmp_name.size() == new_ucmp_name.size() + kSuffixSize &&
  ------------------
  |  Branch (130:7): [True: 0, False: 0]
  ------------------
  131|      0|      old_ucmp_name.starts_with(new_ucmp_name) &&
  ------------------
  |  Branch (131:7): [True: 0, False: 0]
  ------------------
  132|      0|      old_ucmp_name.ends_with(kSuffixSlice)) {
  ------------------
  |  Branch (132:7): [True: 0, False: 0]
  ------------------
  133|      0|    assert(ts_sz == 0);
  134|      0|    return ToggleUDT::kDisableUDT;
  135|      0|  }
  136|      0|  return ToggleUDT::kInvalidChange;
  137|      0|}

_ZNK7rocksdb21UserComparatorWrapper7CompareERKNS_5SliceES3_:
   31|  1.28G|  int Compare(const Slice& a, const Slice& b) const {
   32|  1.28G|    PERF_COUNTER_ADD(user_key_comparison_count, 1);
  ------------------
  |  |   81|  1.28G|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 1.28G, False: 0]
  |  |  ------------------
  |  |   82|  1.28G|    perf_context.metric += value;              \
  |  |   83|  1.28G|  }                                            \
  |  |   84|  1.28G|  static_assert(true, "semicolon required")
  ------------------
   33|  1.28G|    return user_comparator_->Compare(a, b);
   34|  1.28G|  }
_ZNK7rocksdb21UserComparatorWrapper15user_comparatorEv:
   29|  81.4M|  const Comparator* user_comparator() const { return user_comparator_; }
_ZN7rocksdb21UserComparatorWrapperC2EPKNS_10ComparatorE:
   25|   128k|      : user_comparator_(user_cmp) {}
_ZNK7rocksdb21UserComparatorWrapper23CompareWithoutTimestampERKNS_5SliceES3_:
   45|  30.8k|  int CompareWithoutTimestamp(const Slice& a, const Slice& b) const {
   46|  30.8k|    PERF_COUNTER_ADD(user_key_comparison_count, 1);
  ------------------
  |  |   81|  30.8k|  if (perf_level >= PerfLevel::kEnableCount) { \
  |  |  ------------------
  |  |  |  Branch (81:7): [True: 30.8k, False: 0]
  |  |  ------------------
  |  |   82|  30.8k|    perf_context.metric += value;              \
  |  |   83|  30.8k|  }                                            \
  |  |   84|  30.8k|  static_assert(true, "semicolon required")
  ------------------
   47|  30.8k|    return user_comparator_->CompareWithoutTimestamp(a, b);
   48|  30.8k|  }

ROCKSDB_XXH3_64bits:
 5319|  2.77M|{
 5320|  2.77M|    return XXH3_64bits_internal(input, length, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_default);
 5321|  2.77M|}
ROCKSDB_XXH3_64bits_withSecret:
 5326|  1.24k|{
 5327|  1.24k|    return XXH3_64bits_internal(input, length, 0, secret, secretSize, XXH3_hashLong_64b_withSecret);
 5328|  1.24k|}
ROCKSDB_XXH3_createState:
 5415|  4.51k|{
 5416|  4.51k|    XXH3_state_t* const state = (XXH3_state_t*)XXH_alignedMalloc(sizeof(XXH3_state_t), 64);
 5417|  4.51k|    if (state==nullptr) return nullptr;
  ------------------
  |  Branch (5417:9): [True: 0, False: 4.51k]
  ------------------
 5418|  4.51k|    XXH3_INITSTATE(state);
  ------------------
  |  | 1306|  4.51k|#define XXH3_INITSTATE(XXH3_state_ptr)   do { (XXH3_state_ptr)->seed = 0; } while (0)
  |  |  ------------------
  |  |  |  Branch (1306:84): [Folded - Ignored]
  |  |  ------------------
  ------------------
 5419|  4.51k|    return state;
 5420|  4.51k|}
ROCKSDB_XXH3_freeState:
 5424|  4.51k|{
 5425|  4.51k|    XXH_alignedFree(statePtr);
 5426|  4.51k|    return XXH_OK;
 5427|  4.51k|}
ROCKSDB_XXH3_64bits_reset:
 5466|  1.36M|{
 5467|  1.36M|    if (statePtr == nullptr) return XXH_ERROR;
  ------------------
  |  Branch (5467:9): [True: 0, False: 1.36M]
  ------------------
 5468|  1.36M|    XXH3_reset_internal(statePtr, 0, XXH3_kSecret, XXH_SECRET_DEFAULT_SIZE);
  ------------------
  |  | 3644|  1.36M|#define XXH_SECRET_DEFAULT_SIZE 192   /* minimum XXH3_SECRET_SIZE_MIN */
  ------------------
 5469|  1.36M|    return XXH_OK;
 5470|  1.36M|}
ROCKSDB_XXH3_64bits_update:
 5660|  17.2k|{
 5661|  17.2k|    return XXH3_update(state, (const xxh_u8*)input, len,
 5662|  17.2k|                       XXH3_accumulate, XXH3_scrambleAcc);
  ------------------
  |  | 5084|  17.2k|#define XXH3_accumulate     XXH3_accumulate_avx2
  ------------------
                                     XXH3_accumulate, XXH3_scrambleAcc);
  ------------------
  |  | 5085|  17.2k|#define XXH3_scrambleAcc    XXH3_scrambleAcc_avx2
  ------------------
 5663|  17.2k|}
ROCKSDB_XXH3_64bits_digest:
 5702|  7.03k|{
 5703|  7.03k|    const unsigned char* const secret = (state->extSecret == nullptr) ? state->customSecret : state->extSecret;
  ------------------
  |  Branch (5703:41): [True: 0, False: 7.03k]
  ------------------
 5704|  7.03k|    if (state->totalLen > XXH3_MIDSIZE_MAX) {
  ------------------
  |  | 4087|  7.03k|#define XXH3_MIDSIZE_MAX 240
  ------------------
  |  Branch (5704:9): [True: 5.79k, False: 1.24k]
  ------------------
 5705|  5.79k|        XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB];
  ------------------
  |  | 1206|  5.79k|#  define XXH_ALIGN(n)      alignas(n)
  ------------------
 5706|  5.79k|        XXH3_digest_long(acc, state, secret);
 5707|  5.79k|        return XXH3_mergeAccs(acc,
 5708|  5.79k|                              secret + XXH_SECRET_MERGEACCS_START,
  ------------------
  |  | 5213|  5.79k|#define XXH_SECRET_MERGEACCS_START 11
  ------------------
 5709|  5.79k|                              (xxh_u64)state->totalLen * XXH_PRIME64_1);
  ------------------
  |  | 2749|  5.79k|#define XXH_PRIME64_1  0x9E3779B185EBCA87ULL  /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */
  ------------------
 5710|  5.79k|    }
 5711|       |    /* totalLen <= XXH3_MIDSIZE_MAX: digesting a short input */
 5712|  1.24k|    if (state->useSeed)
  ------------------
  |  Branch (5712:9): [True: 0, False: 1.24k]
  ------------------
 5713|      0|        return XXH3_64bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed);
  ------------------
  |  |  412|      0|#  define XXH3_64bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSeed)
  |  |  ------------------
  |  |  |  |  387|      0|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|      0|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5714|  1.24k|    return XXH3_64bits_withSecret(state->buffer, (size_t)(state->totalLen),
  ------------------
  |  |  411|  1.24k|#  define XXH3_64bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecret)
  |  |  ------------------
  |  |  |  |  387|  1.24k|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  386|  1.24k|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5715|  1.24k|                                  secret, state->secretLimit + XXH_STRIPE_LEN);
  ------------------
  |  | 4151|  1.24k|#define XXH_STRIPE_LEN 64
  ------------------
 5716|  1.24k|}
ROCKSDB_XXH3_128bits:
 6112|      2|{
 6113|      2|    return XXH3_128bits_internal(input, len, 0,
 6114|      2|                                 XXH3_kSecret, sizeof(XXH3_kSecret),
 6115|      2|                                 XXH3_hashLong_128b_default);
 6116|      2|}
ROCKSDB_XXH3_128bits_withSeed:
 6130|  17.9k|{
 6131|  17.9k|    return XXH3_128bits_internal(input, len, seed,
 6132|  17.9k|                                 XXH3_kSecret, sizeof(XXH3_kSecret),
 6133|  17.9k|                                 XXH3_hashLong_128b_withSeed);
 6134|  17.9k|}
xxhash.cc:_ZL10XXH_mallocm:
 1765|  4.51k|static XXH_MALLOCF void* XXH_malloc(size_t s) { return malloc(s); }
xxhash.cc:_ZL8XXH_freePv:
 1771|  4.51k|static void XXH_free(void* p) { free(p); }
xxhash.cc:_ZL10XXH_memcpyPvPKvm:
 1782|  53.0k|{
 1783|  53.0k|    return memcpy(dest,src,size);
 1784|  53.0k|}
xxhash.cc:_ZL12XXH_readLE32PKv:
 2179|  2.68k|{
 2180|  2.68k|    return XXH_CPU_LITTLE_ENDIAN ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr));
  ------------------
  |  | 2031|  2.68k|#    define XXH_CPU_LITTLE_ENDIAN 1
  |  |  ------------------
  |  |  |  Branch (2031:35): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2181|  2.68k|}
xxhash.cc:_ZL10XXH_read32PKv:
 1984|  2.68k|{
 1985|  2.68k|    typedef __attribute__((aligned(1))) xxh_u32 xxh_unalign32;
 1986|  2.68k|    return *((const xxh_unalign32*)ptr);
 1987|  2.68k|}
xxhash.cc:_ZL10XXH_swap32j:
 2130|  1.34k|{
 2131|  1.34k|    return  ((x << 24) & 0xff000000 ) |
 2132|  1.34k|            ((x <<  8) & 0x00ff0000 ) |
 2133|  1.34k|            ((x >>  8) & 0x0000ff00 ) |
 2134|  1.34k|            ((x >> 24) & 0x000000ff );
 2135|  1.34k|}
xxhash.cc:_ZL12XXH_readLE64PKv:
 2719|  33.0M|{
 2720|  33.0M|    return XXH_CPU_LITTLE_ENDIAN ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr));
  ------------------
  |  | 2031|  33.0M|#    define XXH_CPU_LITTLE_ENDIAN 1
  |  |  ------------------
  |  |  |  Branch (2031:35): [Folded - Ignored]
  |  |  ------------------
  ------------------
 2721|  33.0M|}
xxhash.cc:_ZL10XXH_read64PKv:
 2649|  33.0M|{
 2650|  33.0M|    typedef __attribute__((aligned(1))) xxh_u64 xxh_unalign64;
 2651|  33.0M|    return *((const xxh_unalign64*)ptr);
 2652|  33.0M|}
xxhash.cc:_ZL10XXH_swap64m:
 2675|  1.36M|{
 2676|  1.36M|    return  ((x << 56) & 0xff00000000000000ULL) |
 2677|  1.36M|            ((x << 40) & 0x00ff000000000000ULL) |
 2678|  1.36M|            ((x << 24) & 0x0000ff0000000000ULL) |
 2679|  1.36M|            ((x << 8)  & 0x000000ff00000000ULL) |
 2680|  1.36M|            ((x >> 8)  & 0x00000000ff000000ULL) |
 2681|  1.36M|            ((x >> 24) & 0x0000000000ff0000ULL) |
 2682|  1.36M|            ((x >> 40) & 0x000000000000ff00ULL) |
 2683|  1.36M|            ((x >> 56) & 0x00000000000000ffULL);
 2684|  1.36M|}
xxhash.cc:_ZL20XXH3_64bits_internalPKvmmS0_mPFmS0_mmPKhmE:
 5296|  2.77M|{
 5297|  2.77M|    XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN)
  ------------------
  |  | 1844|  2.77M|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  2.77M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 2.77M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5298|       |    /*
 5299|       |     * If an action is to be taken if `secretLen` condition is not respected,
 5300|       |     * it should be done here.
 5301|       |     * For now, it's a contract pre-condition.
 5302|       |     * Adding a check and a branch here would cost performance at every hash.
 5303|       |     * Also, note that function signature doesn't offer room to return an error.
 5304|       |     */
 5305|  2.77M|    if (len <= 16)
  ------------------
  |  Branch (5305:9): [True: 1.36M, False: 1.41M]
  ------------------
 5306|  1.36M|        return XXH3_len_0to16_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64);
 5307|  1.41M|    if (len <= 128)
  ------------------
  |  Branch (5307:9): [True: 979k, False: 433k]
  ------------------
 5308|   979k|        return XXH3_len_17to128_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);
 5309|   433k|    if (len <= XXH3_MIDSIZE_MAX)
  ------------------
  |  | 4087|   433k|#define XXH3_MIDSIZE_MAX 240
  ------------------
  |  Branch (5309:9): [True: 204k, False: 229k]
  ------------------
 5310|   204k|        return XXH3_len_129to240_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);
 5311|   229k|    return f_hashLong(input, len, seed64, (const xxh_u8*)secret, secretLen);
 5312|   433k|}
xxhash.cc:_ZL18XXH3_len_0to16_64bPKhmS0_m:
 3981|  1.36M|{
 3982|  1.36M|    XXH_ASSERT(len <= 16)
  ------------------
  |  | 1844|  1.36M|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  1.36M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 1.36M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3983|  1.36M|    {   if (XXH_likely(len >  8)) return XXH3_len_9to16_64b(input, len, secret, seed);
  ------------------
  |  | 3058|  1.36M|#    define XXH_likely(x) __builtin_expect(x, 1)
  |  |  ------------------
  |  |  |  Branch (3058:27): [True: 1.36M, False: 1.34k]
  |  |  ------------------
  ------------------
 3984|  1.34k|        if (XXH_likely(len >= 4)) return XXH3_len_4to8_64b(input, len, secret, seed);
  ------------------
  |  | 3058|  1.34k|#    define XXH_likely(x) __builtin_expect(x, 1)
  |  |  ------------------
  |  |  |  Branch (3058:27): [True: 1.34k, False: 0]
  |  |  ------------------
  ------------------
 3985|      0|        if (len) return XXH3_len_1to3_64b(input, len, secret, seed);
  ------------------
  |  Branch (3985:13): [True: 0, False: 0]
  ------------------
 3986|      0|        return XXH64_avalanche(seed ^ (XXH_readLE64(secret+56) ^ XXH_readLE64(secret+64)));
 3987|      0|    }
 3988|      0|}
xxhash.cc:_ZL18XXH3_len_9to16_64bPKhmS0_m:
 3964|  1.36M|{
 3965|  1.36M|    XXH_ASSERT(input != NULL)
  ------------------
  |  | 1844|  1.36M|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  1.36M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 1.36M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3966|  1.36M|    XXH_ASSERT(secret != NULL)
  ------------------
  |  | 1844|  1.36M|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  1.36M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 1.36M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3967|  1.36M|    XXH_ASSERT(9 <= len && len <= 16)
  ------------------
  |  | 1844|  1.36M|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  2.72M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:29): [True: 1.36M, False: 0]
  |  |  |  |  |  Branch (2088:29): [True: 1.36M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3968|  1.36M|    {   xxh_u64 const bitflip1 = (XXH_readLE64(secret+24) ^ XXH_readLE64(secret+32)) + seed;
 3969|  1.36M|        xxh_u64 const bitflip2 = (XXH_readLE64(secret+40) ^ XXH_readLE64(secret+48)) - seed;
 3970|  1.36M|        xxh_u64 const input_lo = XXH_readLE64(input)           ^ bitflip1;
 3971|  1.36M|        xxh_u64 const input_hi = XXH_readLE64(input + len - 8) ^ bitflip2;
 3972|  1.36M|        xxh_u64 const acc = len
 3973|  1.36M|                          + XXH_swap64(input_lo) + input_hi
 3974|  1.36M|                          + XXH3_mul128_fold64(input_lo, input_hi);
 3975|  1.36M|        return XXH3_avalanche(acc);
 3976|  1.36M|    }
 3977|  1.36M|}
xxhash.cc:_ZL18XXH3_mul128_fold64mm:
 3851|  8.02M|{
 3852|  8.02M|    XXH128_hash_t product = XXH_mult64to128(lhs, rhs);
 3853|  8.02M|    return product.low64 ^ product.high64;
 3854|  8.02M|}
xxhash.cc:_ZL15XXH_mult64to128mm:
 3717|  8.02M|{
 3718|       |    /*
 3719|       |     * GCC/Clang __uint128_t method.
 3720|       |     *
 3721|       |     * On most 64-bit targets, GCC and Clang define a __uint128_t type.
 3722|       |     * This is usually the best way as it usually uses a native long 64-bit
 3723|       |     * multiply, such as MULQ on x86_64 or MUL + UMULH on aarch64.
 3724|       |     *
 3725|       |     * Usually.
 3726|       |     *
 3727|       |     * Despite being a 32-bit platform, Clang (and emscripten) define this type
 3728|       |     * despite not having the arithmetic for it. This results in a laggy
 3729|       |     * compiler builtin call which calculates a full 128-bit multiply.
 3730|       |     * In that case it is best to use the portable one.
 3731|       |     * https://github.com/Cyan4973/xxHash/issues/211#issuecomment-515575677
 3732|       |     */
 3733|  8.02M|#if (defined(__GNUC__) || defined(__clang__)) && !defined(__wasm__) \
 3734|  8.02M|    && defined(__SIZEOF_INT128__) \
 3735|  8.02M|    || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 128)
 3736|       |
 3737|  8.02M|    __uint128_t const product = (__uint128_t)lhs * (__uint128_t)rhs;
 3738|  8.02M|    XXH128_hash_t r128;
 3739|  8.02M|    r128.low64  = (xxh_u64)(product);
 3740|  8.02M|    r128.high64 = (xxh_u64)(product >> 64);
 3741|  8.02M|    return r128;
 3742|       |
 3743|       |    /*
 3744|       |     * MSVC for x64's _umul128 method.
 3745|       |     *
 3746|       |     * xxh_u64 _umul128(xxh_u64 Multiplier, xxh_u64 Multiplicand, xxh_u64 *HighProduct);
 3747|       |     *
 3748|       |     * This compiles to single operand MUL on x64.
 3749|       |     */
 3750|       |#elif (defined(_M_X64) || defined(_M_IA64)) && !defined(_M_ARM64EC)
 3751|       |
 3752|       |#ifndef _MSC_VER
 3753|       |#   pragma intrinsic(_umul128)
 3754|       |#endif
 3755|       |    xxh_u64 product_high;
 3756|       |    xxh_u64 const product_low = _umul128(lhs, rhs, &product_high);
 3757|       |    XXH128_hash_t r128;
 3758|       |    r128.low64  = product_low;
 3759|       |    r128.high64 = product_high;
 3760|       |    return r128;
 3761|       |
 3762|       |    /*
 3763|       |     * MSVC for ARM64's __umulh method.
 3764|       |     *
 3765|       |     * This compiles to the same MUL + UMULH as GCC/Clang's __uint128_t method.
 3766|       |     */
 3767|       |#elif defined(_M_ARM64) || defined(_M_ARM64EC)
 3768|       |
 3769|       |#ifndef _MSC_VER
 3770|       |#   pragma intrinsic(__umulh)
 3771|       |#endif
 3772|       |    XXH128_hash_t r128;
 3773|       |    r128.low64  = lhs * rhs;
 3774|       |    r128.high64 = __umulh(lhs, rhs);
 3775|       |    return r128;
 3776|       |
 3777|       |#else
 3778|       |    /*
 3779|       |     * Portable scalar method. Optimized for 32-bit and 64-bit ALUs.
 3780|       |     *
 3781|       |     * This is a fast and simple grade school multiply, which is shown below
 3782|       |     * with base 10 arithmetic instead of base 0x100000000.
 3783|       |     *
 3784|       |     *           9 3 // D2 lhs = 93
 3785|       |     *         x 7 5 // D2 rhs = 75
 3786|       |     *     ----------
 3787|       |     *           1 5 // D2 lo_lo = (93 % 10) * (75 % 10) = 15
 3788|       |     *         4 5 | // D2 hi_lo = (93 / 10) * (75 % 10) = 45
 3789|       |     *         2 1 | // D2 lo_hi = (93 % 10) * (75 / 10) = 21
 3790|       |     *     + 6 3 | | // D2 hi_hi = (93 / 10) * (75 / 10) = 63
 3791|       |     *     ---------
 3792|       |     *         2 7 | // D2 cross = (15 / 10) + (45 % 10) + 21 = 27
 3793|       |     *     + 6 7 | | // D2 upper = (27 / 10) + (45 / 10) + 63 = 67
 3794|       |     *     ---------
 3795|       |     *       6 9 7 5 // D4 res = (27 * 10) + (15 % 10) + (67 * 100) = 6975
 3796|       |     *
 3797|       |     * The reasons for adding the products like this are:
 3798|       |     *  1. It avoids manual carry tracking. Just like how
 3799|       |     *     (9 * 9) + 9 + 9 = 99, the same applies with this for UINT64_MAX.
 3800|       |     *     This avoids a lot of complexity.
 3801|       |     *
 3802|       |     *  2. It hints for, and on Clang, compiles to, the powerful UMAAL
 3803|       |     *     instruction available in ARM's Digital Signal Processing extension
 3804|       |     *     in 32-bit ARMv6 and later, which is shown below:
 3805|       |     *
 3806|       |     *         void UMAAL(xxh_u32 *RdLo, xxh_u32 *RdHi, xxh_u32 Rn, xxh_u32 Rm)
 3807|       |     *         {
 3808|       |     *             xxh_u64 product = (xxh_u64)*RdLo * (xxh_u64)*RdHi + Rn + Rm;
 3809|       |     *             *RdLo = (xxh_u32)(product & 0xFFFFFFFF);
 3810|       |     *             *RdHi = (xxh_u32)(product >> 32);
 3811|       |     *         }
 3812|       |     *
 3813|       |     *     This instruction was designed for efficient long multiplication, and
 3814|       |     *     allows this to be calculated in only 4 instructions at speeds
 3815|       |     *     comparable to some 64-bit ALUs.
 3816|       |     *
 3817|       |     *  3. It isn't terrible on other platforms. Usually this will be a couple
 3818|       |     *     of 32-bit ADD/ADCs.
 3819|       |     */
 3820|       |
 3821|       |    /* First calculate all of the cross products. */
 3822|       |    xxh_u64 const lo_lo = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs & 0xFFFFFFFF);
 3823|       |    xxh_u64 const hi_lo = XXH_mult32to64(lhs >> 32,        rhs & 0xFFFFFFFF);
 3824|       |    xxh_u64 const lo_hi = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs >> 32);
 3825|       |    xxh_u64 const hi_hi = XXH_mult32to64(lhs >> 32,        rhs >> 32);
 3826|       |
 3827|       |    /* Now add the products together. These will never overflow. */
 3828|       |    xxh_u64 const cross = (lo_lo >> 32) + (hi_lo & 0xFFFFFFFF) + lo_hi;
 3829|       |    xxh_u64 const upper = (hi_lo >> 32) + (cross >> 32)        + hi_hi;
 3830|       |    xxh_u64 const lower = (cross << 32) | (lo_lo & 0xFFFFFFFF);
 3831|       |
 3832|       |    XXH128_hash_t r128;
 3833|       |    r128.low64  = lower;
 3834|       |    r128.high64 = upper;
 3835|       |    return r128;
 3836|       |#endif
 3837|  8.02M|}
xxhash.cc:_ZL14XXH3_avalanchem:
 3868|  3.02M|{
 3869|  3.02M|    h64 = XXH_xorshift64(h64, 37);
 3870|  3.02M|    h64 *= 0x165667919E3779F9ULL;
 3871|  3.02M|    h64 = XXH_xorshift64(h64, 32);
 3872|  3.02M|    return h64;
 3873|  3.02M|}
xxhash.cc:_ZL14XXH_xorshift64mi:
 3858|  6.04M|{
 3859|  6.04M|    XXH_ASSERT(0 <= shift && shift < 64)
  ------------------
  |  | 1844|  6.04M|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  12.0M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:29): [True: 6.04M, False: 0]
  |  |  |  |  |  Branch (2088:29): [True: 6.04M, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3860|  6.04M|    return v64 ^ (v64 >> shift);
 3861|  6.04M|}
xxhash.cc:_ZL17XXH3_len_4to8_64bPKhmS0_m:
 3948|  1.34k|{
 3949|  1.34k|    XXH_ASSERT(input != NULL)
  ------------------
  |  | 1844|  1.34k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  1.34k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 1.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3950|  1.34k|    XXH_ASSERT(secret != NULL)
  ------------------
  |  | 1844|  1.34k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  1.34k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 1.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3951|  1.34k|    XXH_ASSERT(4 <= len && len <= 8)
  ------------------
  |  | 1844|  1.34k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  2.68k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:29): [True: 1.34k, False: 0]
  |  |  |  |  |  Branch (2088:29): [True: 1.34k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3952|  1.34k|    seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32;
 3953|  1.34k|    {   xxh_u32 const input1 = XXH_readLE32(input);
 3954|  1.34k|        xxh_u32 const input2 = XXH_readLE32(input + len - 4);
 3955|  1.34k|        xxh_u64 const bitflip = (XXH_readLE64(secret+8) ^ XXH_readLE64(secret+16)) - seed;
 3956|  1.34k|        xxh_u64 const input64 = input2 + (((xxh_u64)input1) << 32);
 3957|  1.34k|        xxh_u64 const keyed = input64 ^ bitflip;
 3958|  1.34k|        return XXH3_rrmxmx(keyed, len);
 3959|  1.34k|    }
 3960|  1.34k|}
xxhash.cc:_ZL11XXH3_rrmxmxmm:
 3881|  1.34k|{
 3882|       |    /* this mix is inspired by Pelle Evensen's rrmxmx */
 3883|  1.34k|    h64 ^= XXH_rotl64(h64, 49) ^ XXH_rotl64(h64, 24);
  ------------------
  |  | 2106|  1.34k|#  define XXH_rotl64 __builtin_rotateleft64
  ------------------
                  h64 ^= XXH_rotl64(h64, 49) ^ XXH_rotl64(h64, 24);
  ------------------
  |  | 2106|  1.34k|#  define XXH_rotl64 __builtin_rotateleft64
  ------------------
 3884|  1.34k|    h64 *= 0x9FB21C651E98DF25ULL;
 3885|  1.34k|    h64 ^= (h64 >> 35) + len ;
 3886|  1.34k|    h64 *= 0x9FB21C651E98DF25ULL;
 3887|  1.34k|    return XXH_xorshift64(h64, 28);
 3888|  1.34k|}
xxhash.cc:_ZL20XXH3_len_17to128_64bPKhmS0_mm:
 4053|   979k|{
 4054|   979k|    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN) (void)secretSize;
  ------------------
  |  | 1844|   979k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|   979k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 979k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4055|   979k|    XXH_ASSERT(16 < len && len <= 128)
  ------------------
  |  | 1844|   979k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  1.95M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:29): [True: 979k, False: 0]
  |  |  |  |  |  Branch (2088:29): [True: 979k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4056|       |
 4057|   979k|    {   xxh_u64 acc = len * XXH_PRIME64_1, acc_end;
  ------------------
  |  | 2749|   979k|#define XXH_PRIME64_1  0x9E3779B185EBCA87ULL  /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */
  ------------------
 4058|       |#if XXH_SIZE_OPT >= 1
 4059|       |        /* Smaller and cleaner, but slightly slower. */
 4060|       |        unsigned int i = (unsigned int)(len - 1) / 32;
 4061|       |        do {
 4062|       |            acc += XXH3_mix16B(input+16 * i, secret+32*i, seed);
 4063|       |            acc += XXH3_mix16B(input+len-16*(i+1), secret+32*i+16, seed);
 4064|       |        } while (i-- != 0);
 4065|       |        acc_end = 0;
 4066|       |#else
 4067|   979k|        acc += XXH3_mix16B(input+0, secret+0, seed);
 4068|   979k|        acc_end = XXH3_mix16B(input+len-16, secret+16, seed);
 4069|   979k|        if (len > 32) {
  ------------------
  |  Branch (4069:13): [True: 405k, False: 573k]
  ------------------
 4070|   405k|            acc += XXH3_mix16B(input+16, secret+32, seed);
 4071|   405k|            acc_end += XXH3_mix16B(input+len-32, secret+48, seed);
 4072|   405k|            if (len > 64) {
  ------------------
  |  Branch (4072:17): [True: 157k, False: 248k]
  ------------------
 4073|   157k|                acc += XXH3_mix16B(input+32, secret+64, seed);
 4074|   157k|                acc_end += XXH3_mix16B(input+len-48, secret+80, seed);
 4075|       |
 4076|   157k|                if (len > 96) {
  ------------------
  |  Branch (4076:21): [True: 56.8k, False: 100k]
  ------------------
 4077|  56.8k|                    acc += XXH3_mix16B(input+48, secret+96, seed);
 4078|  56.8k|                    acc_end += XXH3_mix16B(input+len-64, secret+112, seed);
 4079|  56.8k|                }
 4080|   157k|            }
 4081|   405k|        }
 4082|   979k|#endif
 4083|   979k|        return XXH3_avalanche(acc + acc_end);
 4084|   979k|    }
 4085|   979k|}
xxhash.cc:_ZL11XXH3_mix16BPKhS0_m:
 4018|  5.72M|{
 4019|       |#if defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \
 4020|       |  && defined(__i386__) && defined(__SSE2__)  /* x86 + SSE2 */ \
 4021|       |  && !defined(XXH_ENABLE_AUTOVECTORIZE)      /* Define to disable like XXH32 hack */
 4022|       |    /*
 4023|       |     * UGLY HACK:
 4024|       |     * GCC for x86 tends to autovectorize the 128-bit multiply, resulting in
 4025|       |     * slower code.
 4026|       |     *
 4027|       |     * By forcing seed64 into a register, we disrupt the cost model and
 4028|       |     * cause it to scalarize. See `XXH32_round()`
 4029|       |     *
 4030|       |     * FIXME: Clang's output is still _much_ faster -- On an AMD Ryzen 3600,
 4031|       |     * XXH3_64bits @ len=240 runs at 4.6 GB/s with Clang 9, but 3.3 GB/s on
 4032|       |     * GCC 9.2, despite both emitting scalar code.
 4033|       |     *
 4034|       |     * GCC generates much better scalar code than Clang for the rest of XXH3,
 4035|       |     * which is why finding a more optimal codepath is an interest.
 4036|       |     */
 4037|       |    XXH_COMPILER_GUARD(seed64);
 4038|       |#endif
 4039|  5.72M|    {   xxh_u64 const input_lo = XXH_readLE64(input);
 4040|  5.72M|        xxh_u64 const input_hi = XXH_readLE64(input+8);
 4041|  5.72M|        return XXH3_mul128_fold64(
 4042|  5.72M|            input_lo ^ (XXH_readLE64(secret)   + seed64),
 4043|  5.72M|            input_hi ^ (XXH_readLE64(secret+8) - seed64)
 4044|  5.72M|        );
 4045|  5.72M|    }
 4046|  5.72M|}
xxhash.cc:_ZL21XXH3_len_129to240_64bPKhmS0_mm:
 4093|   204k|{
 4094|   204k|    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN) (void)secretSize;
  ------------------
  |  | 1844|   204k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|   204k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 204k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4095|   204k|    XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX)
  ------------------
  |  | 1844|   204k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|   408k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:29): [True: 204k, False: 0]
  |  |  |  |  |  Branch (2088:29): [True: 204k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4096|       |
 4097|   204k|    #define XXH3_MIDSIZE_STARTOFFSET 3
 4098|   204k|    #define XXH3_MIDSIZE_LASTOFFSET  17
 4099|       |
 4100|   204k|    {   xxh_u64 acc = len * XXH_PRIME64_1;
  ------------------
  |  | 2749|   204k|#define XXH_PRIME64_1  0x9E3779B185EBCA87ULL  /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */
  ------------------
 4101|   204k|        xxh_u64 acc_end;
 4102|   204k|        unsigned int const nbRounds = (unsigned int)len / 16;
 4103|   204k|        unsigned int i;
 4104|   204k|        XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX)
  ------------------
  |  | 1844|   204k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|   408k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:29): [True: 204k, False: 0]
  |  |  |  |  |  Branch (2088:29): [True: 204k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4105|  1.83M|        for (i=0; i<8; i++) {
  ------------------
  |  Branch (4105:19): [True: 1.63M, False: 204k]
  ------------------
 4106|  1.63M|            acc += XXH3_mix16B(input+(16*i), secret+(16*i), seed);
 4107|  1.63M|        }
 4108|       |        /* last bytes */
 4109|   204k|        acc_end = XXH3_mix16B(input + len - 16, secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET, seed);
  ------------------
  |  |  968|   204k|#define XXH3_SECRET_SIZE_MIN 136
  ------------------
                      acc_end = XXH3_mix16B(input + len - 16, secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET, seed);
  ------------------
  |  | 4098|   204k|    #define XXH3_MIDSIZE_LASTOFFSET  17
  ------------------
 4110|   204k|        XXH_ASSERT(nbRounds >= 8)
  ------------------
  |  | 1844|   204k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|   204k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 204k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4111|   204k|        acc = XXH3_avalanche(acc);
 4112|       |#if defined(__clang__)                                /* Clang */ \
 4113|       |    && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \
 4114|       |    && !defined(XXH_ENABLE_AUTOVECTORIZE)             /* Define to disable */
 4115|       |        /*
 4116|       |         * UGLY HACK:
 4117|       |         * Clang for ARMv7-A tries to vectorize this loop, similar to GCC x86.
 4118|       |         * In everywhere else, it uses scalar code.
 4119|       |         *
 4120|       |         * For 64->128-bit multiplies, even if the NEON was 100% optimal, it
 4121|       |         * would still be slower than UMAAL (see XXH_mult64to128).
 4122|       |         *
 4123|       |         * Unfortunately, Clang doesn't handle the long multiplies properly and
 4124|       |         * converts them to the nonexistent "vmulq_u64" intrinsic, which is then
 4125|       |         * scalarized into an ugly mess of VMOV.32 instructions.
 4126|       |         *
 4127|       |         * This mess is difficult to avoid without turning autovectorization
 4128|       |         * off completely, but they are usually relatively minor and/or not
 4129|       |         * worth it to fix.
 4130|       |         *
 4131|       |         * This loop is the easiest to fix, as unlike XXH32, this pragma
 4132|       |         * _actually works_ because it is a loop vectorization instead of an
 4133|       |         * SLP vectorization.
 4134|       |         */
 4135|       |        #pragma clang loop vectorize(disable)
 4136|       |#endif
 4137|   820k|        for (i=8 ; i < nbRounds; i++) {
  ------------------
  |  Branch (4137:20): [True: 616k, False: 204k]
  ------------------
 4138|       |            /*
 4139|       |             * Prevents clang for unrolling the acc loop and interleaving with this one.
 4140|       |             */
 4141|   616k|            XXH_COMPILER_GUARD(acc);
  ------------------
  |  | 1876|   616k|#  define XXH_COMPILER_GUARD(var) __asm__ __volatile__("" : "+r" (var))
  ------------------
 4142|   616k|            acc_end += XXH3_mix16B(input+(16*i), secret+(16*(i-8)) + XXH3_MIDSIZE_STARTOFFSET, seed);
  ------------------
  |  | 4097|   616k|    #define XXH3_MIDSIZE_STARTOFFSET 3
  ------------------
 4143|   616k|        }
 4144|   204k|        return XXH3_avalanche(acc + acc_end);
 4145|   204k|    }
 4146|   204k|}
xxhash.cc:_ZL25XXH3_hashLong_64b_defaultPKvmmPKhm:
 5240|   229k|{
 5241|   229k|    (void)seed64; (void)secret; (void)secretLen;
 5242|   229k|    return XXH3_hashLong_64b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate, XXH3_scrambleAcc);
  ------------------
  |  | 5084|   229k|#define XXH3_accumulate     XXH3_accumulate_avx2
  ------------------
                  return XXH3_hashLong_64b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate, XXH3_scrambleAcc);
  ------------------
  |  | 5085|   229k|#define XXH3_scrambleAcc    XXH3_scrambleAcc_avx2
  ------------------
 5243|   229k|}
xxhash.cc:_ZL26XXH3_hashLong_64b_internalPKvmS0_mPFvPmPKhS3_mEPFvPvS0_E:
 5205|   229k|{
 5206|   229k|    XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC;
  ------------------
  |  | 1206|   229k|#  define XXH_ALIGN(n)      alignas(n)
  ------------------
                  XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC;
  ------------------
  |  | 5197|   229k|#define XXH3_INIT_ACC { XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, \
  |  |  ------------------
  |  |  |  | 2221|   229k|#define XXH_PRIME32_3  0xC2B2AE3DU  /*!< 0b11000010101100101010111000111101 */
  |  |  ------------------
  |  |               #define XXH3_INIT_ACC { XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, \
  |  |  ------------------
  |  |  |  | 2749|   229k|#define XXH_PRIME64_1  0x9E3779B185EBCA87ULL  /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */
  |  |  ------------------
  |  |               #define XXH3_INIT_ACC { XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, \
  |  |  ------------------
  |  |  |  | 2750|   229k|#define XXH_PRIME64_2  0xC2B2AE3D27D4EB4FULL  /*!< 0b1100001010110010101011100011110100100111110101001110101101001111 */
  |  |  ------------------
  |  |               #define XXH3_INIT_ACC { XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, \
  |  |  ------------------
  |  |  |  | 2751|   229k|#define XXH_PRIME64_3  0x165667B19E3779F9ULL  /*!< 0b0001011001010110011001111011000110011110001101110111100111111001 */
  |  |  ------------------
  |  | 5198|   229k|                        XXH_PRIME64_4, XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1 }
  |  |  ------------------
  |  |  |  | 2752|   229k|#define XXH_PRIME64_4  0x85EBCA77C2B2AE63ULL  /*!< 0b1000010111101011110010100111011111000010101100101010111001100011 */
  |  |  ------------------
  |  |                                       XXH_PRIME64_4, XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1 }
  |  |  ------------------
  |  |  |  | 2220|   229k|#define XXH_PRIME32_2  0x85EBCA77U  /*!< 0b10000101111010111100101001110111 */
  |  |  ------------------
  |  |                                       XXH_PRIME64_4, XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1 }
  |  |  ------------------
  |  |  |  | 2753|   229k|#define XXH_PRIME64_5  0x27D4EB2F165667C5ULL  /*!< 0b0010011111010100111010110010111100010110010101100110011111000101 */
  |  |  ------------------
  |  |                                       XXH_PRIME64_4, XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1 }
  |  |  ------------------
  |  |  |  | 2219|   229k|#define XXH_PRIME32_1  0x9E3779B1U  /*!< 0b10011110001101110111100110110001 */
  |  |  ------------------
  ------------------
 5207|       |
 5208|   229k|    XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, (const xxh_u8*)secret, secretSize, f_acc, f_scramble);
 5209|       |
 5210|       |    /* converge into final hash */
 5211|   229k|    XXH_STATIC_ASSERT(sizeof(acc) == 64);
  ------------------
  |  | 1856|   229k|#  define XXH_STATIC_ASSERT(c) XXH_STATIC_ASSERT_WITH_MESSAGE((c),#c)
  |  |  ------------------
  |  |  |  | 1852|   229k|#    define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1852:84): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5212|       |    /* do not align on 8, so that the secret is different from the accumulator */
 5213|   229k|#define XXH_SECRET_MERGEACCS_START 11
 5214|   229k|    XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START)
  ------------------
  |  | 1844|   229k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|   229k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 229k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5215|   229k|    return XXH3_mergeAccs(acc, (const xxh_u8*)secret + XXH_SECRET_MERGEACCS_START, (xxh_u64)len * XXH_PRIME64_1);
  ------------------
  |  | 5213|   229k|#define XXH_SECRET_MERGEACCS_START 11
  ------------------
                  return XXH3_mergeAccs(acc, (const xxh_u8*)secret + XXH_SECRET_MERGEACCS_START, (xxh_u64)len * XXH_PRIME64_1);
  ------------------
  |  | 2749|   229k|#define XXH_PRIME64_1  0x9E3779B185EBCA87ULL  /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */
  ------------------
 5216|   229k|}
xxhash.cc:_ZL27XXH3_hashLong_internal_loopPmPKhmS1_mPFvS_S1_S1_mEPFvPvPKvE:
 5135|   229k|{
 5136|   229k|    size_t const nbStripesPerBlock = (secretSize - XXH_STRIPE_LEN) / XXH_SECRET_CONSUME_RATE;
  ------------------
  |  | 4151|   229k|#define XXH_STRIPE_LEN 64
  ------------------
                  size_t const nbStripesPerBlock = (secretSize - XXH_STRIPE_LEN) / XXH_SECRET_CONSUME_RATE;
  ------------------
  |  | 4152|   229k|#define XXH_SECRET_CONSUME_RATE 8   /* nb of secret bytes consumed at each accumulation */
  ------------------
 5137|   229k|    size_t const block_len = XXH_STRIPE_LEN * nbStripesPerBlock;
  ------------------
  |  | 4151|   229k|#define XXH_STRIPE_LEN 64
  ------------------
 5138|   229k|    size_t const nb_blocks = (len - 1) / block_len;
 5139|       |
 5140|   229k|    size_t n;
 5141|       |
 5142|   229k|    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN)
  ------------------
  |  | 1844|   229k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|   229k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 229k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5143|       |
 5144|  1.15M|    for (n = 0; n < nb_blocks; n++) {
  ------------------
  |  Branch (5144:17): [True: 924k, False: 229k]
  ------------------
 5145|   924k|        f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);
 5146|   924k|        f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
  ------------------
  |  | 4151|   924k|#define XXH_STRIPE_LEN 64
  ------------------
 5147|   924k|    }
 5148|       |
 5149|       |    /* last partial block */
 5150|   229k|    XXH_ASSERT(len > XXH_STRIPE_LEN)
  ------------------
  |  | 1844|   229k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|   229k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 229k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5151|   229k|    {   size_t const nbStripes = ((len - 1) - (block_len * nb_blocks)) / XXH_STRIPE_LEN;
  ------------------
  |  | 4151|   229k|#define XXH_STRIPE_LEN 64
  ------------------
 5152|   229k|        XXH_ASSERT(nbStripes <= (secretSize / XXH_SECRET_CONSUME_RATE))
  ------------------
  |  | 1844|   229k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|   229k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 229k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5153|   229k|        f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);
 5154|       |
 5155|       |        /* last stripe */
 5156|   229k|        {   const xxh_u8* const p = input + len - XXH_STRIPE_LEN;
  ------------------
  |  | 4151|   229k|#define XXH_STRIPE_LEN 64
  ------------------
 5157|   229k|#define XXH_SECRET_LASTACC_START 7  /* not aligned on 8, last secret is different from acc & scrambler */
 5158|   229k|            XXH3_accumulate_512(acc, p, secret + secretSize - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START);
  ------------------
  |  | 5083|   229k|#define XXH3_accumulate_512 XXH3_accumulate_512_avx2
  ------------------
                          XXH3_accumulate_512(acc, p, secret + secretSize - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START);
  ------------------
  |  | 4151|   229k|#define XXH_STRIPE_LEN 64
  ------------------
                          XXH3_accumulate_512(acc, p, secret + secretSize - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START);
  ------------------
  |  | 5157|   229k|#define XXH_SECRET_LASTACC_START 7  /* not aligned on 8, last secret is different from acc & scrambler */
  ------------------
 5159|   229k|    }   }
 5160|   229k|}
xxhash.cc:_ZL24XXH3_accumulate_512_avx2PvPKvS1_:
 4359|  19.4M|{
 4360|  19.4M|    XXH_ASSERT((((size_t)acc) & 31) == 0)
  ------------------
  |  | 1844|  19.4M|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  19.4M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 19.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4361|  19.4M|    {   __m256i* const xacc    =       (__m256i *) acc;
 4362|       |        /* Unaligned. This is mainly for pointer arithmetic, and because
 4363|       |         * _mm256_loadu_si256 requires  a const __m256i * pointer for some reason. */
 4364|  19.4M|        const         __m256i* const xinput  = (const __m256i *) input;
 4365|       |        /* Unaligned. This is mainly for pointer arithmetic, and because
 4366|       |         * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */
 4367|  19.4M|        const         __m256i* const xsecret = (const __m256i *) secret;
 4368|       |
 4369|  19.4M|        size_t i;
 4370|  58.3M|        for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) {
  ------------------
  |  | 4151|  58.3M|#define XXH_STRIPE_LEN 64
  ------------------
  |  Branch (4370:19): [True: 38.8M, False: 19.4M]
  ------------------
 4371|       |            /* data_vec    = xinput[i]; */
 4372|  38.8M|            __m256i const data_vec    = _mm256_loadu_si256    (xinput+i);
 4373|       |            /* key_vec     = xsecret[i]; */
 4374|  38.8M|            __m256i const key_vec     = _mm256_loadu_si256   (xsecret+i);
 4375|       |            /* data_key    = data_vec ^ key_vec; */
 4376|  38.8M|            __m256i const data_key    = _mm256_xor_si256     (data_vec, key_vec);
 4377|       |            /* data_key_lo = data_key >> 32; */
 4378|  38.8M|            __m256i const data_key_lo = _mm256_srli_epi64 (data_key, 32);
 4379|       |            /* product     = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */
 4380|  38.8M|            __m256i const product     = _mm256_mul_epu32     (data_key, data_key_lo);
 4381|       |            /* xacc[i] += swap(data_vec); */
 4382|  38.8M|            __m256i const data_swap = _mm256_shuffle_epi32(data_vec, _MM_SHUFFLE(1, 0, 3, 2));
 4383|  38.8M|            __m256i const sum       = _mm256_add_epi64(xacc[i], data_swap);
 4384|       |            /* xacc[i] += product; */
 4385|  38.8M|            xacc[i] = _mm256_add_epi64(product, sum);
 4386|  38.8M|    }   }
 4387|  19.4M|}
xxhash.cc:_ZL17XXH_alignedMallocmm:
 5372|  4.51k|{
 5373|       |    XXH_ASSERT(align <= 128 && align >= 8) /* range check */
  ------------------
  |  | 1844|  4.51k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  9.02k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:29): [True: 4.51k, False: 0]
  |  |  |  |  |  Branch (2088:29): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5374|       |    XXH_ASSERT((align & (align-1)) == 0)   /* power of 2 */
  ------------------
  |  | 1844|  4.51k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  4.51k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5375|       |    XXH_ASSERT(s != 0 && s < (s + align))  /* empty/overflow */
  ------------------
  |  | 1844|  4.51k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  9.02k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:29): [True: 4.51k, False: 0]
  |  |  |  |  |  Branch (2088:29): [True: 4.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5376|  4.51k|    {   /* Overallocate to make room for manual realignment and an offset byte */
 5377|  4.51k|        xxh_u8* base = (xxh_u8*)XXH_malloc(s + align);
 5378|  4.51k|        if (base != nullptr) {
  ------------------
  |  Branch (5378:13): [True: 4.51k, False: 0]
  ------------------
 5379|       |            /*
 5380|       |             * Get the offset needed to align this pointer.
 5381|       |             *
 5382|       |             * Even if the returned pointer is aligned, there will always be
 5383|       |             * at least one byte to store the offset to the original pointer.
 5384|       |             */
 5385|  4.51k|            size_t offset = align - ((size_t)base & (align - 1)); /* base % align */
 5386|       |            /* Add the offset for the now-aligned pointer */
 5387|  4.51k|            xxh_u8* ptr = base + offset;
 5388|       |
 5389|  4.51k|            XXH_ASSERT((size_t)ptr % align == 0)
  ------------------
  |  | 1844|  4.51k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  4.51k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5390|       |
 5391|       |            /* Store the offset immediately before the returned pointer. */
 5392|  4.51k|            ptr[-1] = (xxh_u8)offset;
 5393|  4.51k|            return ptr;
 5394|  4.51k|        }
 5395|      0|        return nullptr;
 5396|  4.51k|    }
 5397|  4.51k|}
xxhash.cc:_ZL15XXH_alignedFreePv:
 5403|  4.51k|{
 5404|  4.51k|    if (p != nullptr) {
  ------------------
  |  Branch (5404:9): [True: 4.51k, False: 0]
  ------------------
 5405|  4.51k|        xxh_u8* ptr = (xxh_u8*)p;
 5406|       |        /* Get the offset byte we added in XXH_malloc. */
 5407|  4.51k|        xxh_u8 offset = ptr[-1];
 5408|       |        /* Free the original malloc'd pointer */
 5409|  4.51k|        xxh_u8* base = ptr - offset;
 5410|  4.51k|        XXH_free(base);
 5411|  4.51k|    }
 5412|  4.51k|}
xxhash.cc:_ZL19XXH3_reset_internalP12XXH3_state_smPKvm:
 5440|  1.36M|{
 5441|  1.36M|    size_t const initStart = offsetof(XXH3_state_t, bufferedSize);
 5442|  1.36M|    size_t const initLength = offsetof(XXH3_state_t, nbStripesPerBlock) - initStart;
 5443|  1.36M|    XXH_ASSERT(offsetof(XXH3_state_t, nbStripesPerBlock) > initStart)
  ------------------
  |  | 1844|  1.36M|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  1.36M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5444|  1.36M|    XXH_ASSERT(statePtr != NULL)
  ------------------
  |  | 1844|  1.36M|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  1.36M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 1.36M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5445|       |    /* set members from bufferedSize to nbStripesPerBlock (excluded) to 0 */
 5446|  1.36M|    memset((char*)statePtr + initStart, 0, initLength);
 5447|  1.36M|    statePtr->acc[0] = XXH_PRIME32_3;
  ------------------
  |  | 2221|  1.36M|#define XXH_PRIME32_3  0xC2B2AE3DU  /*!< 0b11000010101100101010111000111101 */
  ------------------
 5448|  1.36M|    statePtr->acc[1] = XXH_PRIME64_1;
  ------------------
  |  | 2749|  1.36M|#define XXH_PRIME64_1  0x9E3779B185EBCA87ULL  /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */
  ------------------
 5449|  1.36M|    statePtr->acc[2] = XXH_PRIME64_2;
  ------------------
  |  | 2750|  1.36M|#define XXH_PRIME64_2  0xC2B2AE3D27D4EB4FULL  /*!< 0b1100001010110010101011100011110100100111110101001110101101001111 */
  ------------------
 5450|  1.36M|    statePtr->acc[3] = XXH_PRIME64_3;
  ------------------
  |  | 2751|  1.36M|#define XXH_PRIME64_3  0x165667B19E3779F9ULL  /*!< 0b0001011001010110011001111011000110011110001101110111100111111001 */
  ------------------
 5451|  1.36M|    statePtr->acc[4] = XXH_PRIME64_4;
  ------------------
  |  | 2752|  1.36M|#define XXH_PRIME64_4  0x85EBCA77C2B2AE63ULL  /*!< 0b1000010111101011110010100111011111000010101100101010111001100011 */
  ------------------
 5452|  1.36M|    statePtr->acc[5] = XXH_PRIME32_2;
  ------------------
  |  | 2220|  1.36M|#define XXH_PRIME32_2  0x85EBCA77U  /*!< 0b10000101111010111100101001110111 */
  ------------------
 5453|  1.36M|    statePtr->acc[6] = XXH_PRIME64_5;
  ------------------
  |  | 2753|  1.36M|#define XXH_PRIME64_5  0x27D4EB2F165667C5ULL  /*!< 0b0010011111010100111010110010111100010110010101100110011111000101 */
  ------------------
 5454|  1.36M|    statePtr->acc[7] = XXH_PRIME32_1;
  ------------------
  |  | 2219|  1.36M|#define XXH_PRIME32_1  0x9E3779B1U  /*!< 0b10011110001101110111100110110001 */
  ------------------
 5455|  1.36M|    statePtr->seed = seed;
 5456|  1.36M|    statePtr->useSeed = (seed != 0);
 5457|  1.36M|    statePtr->extSecret = (const unsigned char*)secret;
 5458|  1.36M|    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN)
  ------------------
  |  | 1844|  1.36M|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  1.36M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 1.36M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5459|  1.36M|    statePtr->secretLimit = secretSize - XXH_STRIPE_LEN;
  ------------------
  |  | 4151|  1.36M|#define XXH_STRIPE_LEN 64
  ------------------
 5460|  1.36M|    statePtr->nbStripesPerBlock = statePtr->secretLimit / XXH_SECRET_CONSUME_RATE;
  ------------------
  |  | 4152|  1.36M|#define XXH_SECRET_CONSUME_RATE 8   /* nb of secret bytes consumed at each accumulation */
  ------------------
 5461|  1.36M|}
xxhash.cc:_ZL11XXH3_updateP12XXH3_state_sPKhmPFvPmS2_S2_mEPFvPvPKvE:
 5547|  17.2k|{
 5548|  17.2k|    if (input==nullptr) {
  ------------------
  |  Branch (5548:9): [True: 0, False: 17.2k]
  ------------------
 5549|      0|        XXH_ASSERT(len == 0)
  ------------------
  |  | 1844|      0|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|      0|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5550|      0|        return XXH_OK;
 5551|      0|    }
 5552|       |
 5553|  17.2k|    XXH_ASSERT(state != NULL)
  ------------------
  |  | 1844|  17.2k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  17.2k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 17.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5554|  17.2k|    {   const xxh_u8* const bEnd = input + len;
 5555|  17.2k|        const unsigned char* const secret = (state->extSecret == nullptr) ? state->customSecret : state->extSecret;
  ------------------
  |  Branch (5555:45): [True: 0, False: 17.2k]
  ------------------
 5556|       |#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1
 5557|       |        /* For some reason, gcc and MSVC seem to suffer greatly
 5558|       |         * when operating accumulators directly into state.
 5559|       |         * Operating into stack space seems to enable proper optimization.
 5560|       |         * clang, on the other hand, doesn't seem to need this trick */
 5561|       |        XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[8]; memcpy(acc, state->acc, sizeof(acc));
 5562|       |#else
 5563|  17.2k|        xxh_u64* XXH_RESTRICT const acc = state->acc;
 5564|  17.2k|#endif
 5565|  17.2k|        state->totalLen += len;
 5566|  17.2k|        XXH_ASSERT(state->bufferedSize <= XXH3_INTERNALBUFFER_SIZE)
  ------------------
  |  | 1844|  17.2k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  17.2k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 17.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5567|       |
 5568|       |        /* small input : just fill in tmp buffer */
 5569|  17.2k|        if (state->bufferedSize + len <= XXH3_INTERNALBUFFER_SIZE) {
  ------------------
  |  | 1231|  17.2k|#define XXH3_INTERNALBUFFER_SIZE 256
  ------------------
  |  Branch (5569:13): [True: 3.54k, False: 13.6k]
  ------------------
 5570|  3.54k|            XXH_memcpy(state->buffer + state->bufferedSize, input, len);
 5571|  3.54k|            state->bufferedSize += (XXH32_hash_t)len;
 5572|  3.54k|            return XXH_OK;
 5573|  3.54k|        }
 5574|       |
 5575|       |        /* total input is now > XXH3_INTERNALBUFFER_SIZE */
 5576|  13.6k|        #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN)
 5577|  13.6k|        XXH_STATIC_ASSERT(XXH3_INTERNALBUFFER_SIZE % XXH_STRIPE_LEN == 0);   /* clean multiple */
  ------------------
  |  | 1856|  13.6k|#  define XXH_STATIC_ASSERT(c) XXH_STATIC_ASSERT_WITH_MESSAGE((c),#c)
  |  |  ------------------
  |  |  |  | 1852|  13.6k|#    define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1852:84): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5578|       |
 5579|       |        /*
 5580|       |         * Internal buffer is partially filled (always, except at beginning)
 5581|       |         * Complete it, then consume it.
 5582|       |         */
 5583|  13.6k|        if (state->bufferedSize) {
  ------------------
  |  Branch (5583:13): [True: 8.48k, False: 5.21k]
  ------------------
 5584|  8.48k|            size_t const loadSize = XXH3_INTERNALBUFFER_SIZE - state->bufferedSize;
  ------------------
  |  | 1231|  8.48k|#define XXH3_INTERNALBUFFER_SIZE 256
  ------------------
 5585|  8.48k|            XXH_memcpy(state->buffer + state->bufferedSize, input, loadSize);
 5586|  8.48k|            input += loadSize;
 5587|  8.48k|            XXH3_consumeStripes(acc,
 5588|  8.48k|                               &state->nbStripesSoFar, state->nbStripesPerBlock,
 5589|  8.48k|                                state->buffer, XXH3_INTERNALBUFFER_STRIPES,
  ------------------
  |  | 5576|  8.48k|        #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN)
  |  |  ------------------
  |  |  |  | 1231|  8.48k|#define XXH3_INTERNALBUFFER_SIZE 256
  |  |  ------------------
  |  |                       #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN)
  |  |  ------------------
  |  |  |  | 4151|  8.48k|#define XXH_STRIPE_LEN 64
  |  |  ------------------
  ------------------
 5590|  8.48k|                                secret, state->secretLimit,
 5591|  8.48k|                                f_acc, f_scramble);
 5592|  8.48k|            state->bufferedSize = 0;
 5593|  8.48k|        }
 5594|  13.6k|        XXH_ASSERT(input < bEnd)
  ------------------
  |  | 1844|  13.6k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  13.6k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5595|       |
 5596|       |        /* large input to consume : ingest per full block */
 5597|  13.6k|        if ((size_t)(bEnd - input) > state->nbStripesPerBlock * XXH_STRIPE_LEN) {
  ------------------
  |  | 4151|  13.6k|#define XXH_STRIPE_LEN 64
  ------------------
  |  Branch (5597:13): [True: 11.1k, False: 2.55k]
  ------------------
 5598|  11.1k|            size_t nbStripes = (size_t)(bEnd - 1 - input) / XXH_STRIPE_LEN;
  ------------------
  |  | 4151|  11.1k|#define XXH_STRIPE_LEN 64
  ------------------
 5599|  11.1k|            XXH_ASSERT(state->nbStripesPerBlock >= state->nbStripesSoFar)
  ------------------
  |  | 1844|  11.1k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  11.1k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5600|       |            /* join to current block's end */
 5601|  11.1k|            {   size_t const nbStripesToEnd = state->nbStripesPerBlock - state->nbStripesSoFar;
 5602|  11.1k|                XXH_ASSERT(nbStripesToEnd <= nbStripes)
  ------------------
  |  | 1844|  11.1k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  11.1k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5603|  11.1k|                f_acc(acc, input, secret + state->nbStripesSoFar * XXH_SECRET_CONSUME_RATE, nbStripesToEnd);
  ------------------
  |  | 4152|  11.1k|#define XXH_SECRET_CONSUME_RATE 8   /* nb of secret bytes consumed at each accumulation */
  ------------------
 5604|  11.1k|                f_scramble(acc, secret + state->secretLimit);
 5605|  11.1k|                state->nbStripesSoFar = 0;
 5606|  11.1k|                input += nbStripesToEnd * XXH_STRIPE_LEN;
  ------------------
  |  | 4151|  11.1k|#define XXH_STRIPE_LEN 64
  ------------------
 5607|  11.1k|                nbStripes -= nbStripesToEnd;
 5608|  11.1k|            }
 5609|       |            /* consume per entire blocks */
 5610|   183k|            while(nbStripes >= state->nbStripesPerBlock) {
  ------------------
  |  Branch (5610:19): [True: 172k, False: 11.1k]
  ------------------
 5611|   172k|                f_acc(acc, input, secret, state->nbStripesPerBlock);
 5612|   172k|                f_scramble(acc, secret + state->secretLimit);
 5613|   172k|                input += state->nbStripesPerBlock * XXH_STRIPE_LEN;
  ------------------
  |  | 4151|   172k|#define XXH_STRIPE_LEN 64
  ------------------
 5614|   172k|                nbStripes -= state->nbStripesPerBlock;
 5615|   172k|            }
 5616|       |            /* consume last partial block */
 5617|  11.1k|            f_acc(acc, input, secret, nbStripes);
 5618|  11.1k|            input += nbStripes * XXH_STRIPE_LEN;
  ------------------
  |  | 4151|  11.1k|#define XXH_STRIPE_LEN 64
  ------------------
 5619|       |            XXH_ASSERT(input < bEnd)  /* at least some bytes left */
  ------------------
  |  | 1844|  11.1k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  11.1k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5620|  11.1k|            state->nbStripesSoFar = nbStripes;
 5621|       |            /* buffer predecessor of last partial stripe */
 5622|  11.1k|            XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN);
  ------------------
  |  | 4151|  11.1k|#define XXH_STRIPE_LEN 64
  ------------------
                          XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN);
  ------------------
  |  | 4151|  11.1k|#define XXH_STRIPE_LEN 64
  ------------------
                          XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN);
  ------------------
  |  | 4151|  11.1k|#define XXH_STRIPE_LEN 64
  ------------------
 5623|  11.1k|            XXH_ASSERT(bEnd - input <= XXH_STRIPE_LEN)
  ------------------
  |  | 1844|  11.1k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  11.1k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5624|  11.1k|        } else {
 5625|       |            /* content to consume <= block size */
 5626|       |            /* Consume input by a multiple of internal buffer size */
 5627|  2.55k|            if (bEnd - input > XXH3_INTERNALBUFFER_SIZE) {
  ------------------
  |  | 1231|  2.55k|#define XXH3_INTERNALBUFFER_SIZE 256
  ------------------
  |  Branch (5627:17): [True: 1.99k, False: 565]
  ------------------
 5628|  1.99k|                const xxh_u8* const limit = bEnd - XXH3_INTERNALBUFFER_SIZE;
  ------------------
  |  | 1231|  1.99k|#define XXH3_INTERNALBUFFER_SIZE 256
  ------------------
 5629|  3.87k|                do {
 5630|  3.87k|                    XXH3_consumeStripes(acc,
 5631|  3.87k|                                       &state->nbStripesSoFar, state->nbStripesPerBlock,
 5632|  3.87k|                                        input, XXH3_INTERNALBUFFER_STRIPES,
  ------------------
  |  | 5576|  3.87k|        #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN)
  |  |  ------------------
  |  |  |  | 1231|  3.87k|#define XXH3_INTERNALBUFFER_SIZE 256
  |  |  ------------------
  |  |                       #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN)
  |  |  ------------------
  |  |  |  | 4151|  3.87k|#define XXH_STRIPE_LEN 64
  |  |  ------------------
  ------------------
 5633|  3.87k|                                        secret, state->secretLimit,
 5634|  3.87k|                                        f_acc, f_scramble);
 5635|  3.87k|                    input += XXH3_INTERNALBUFFER_SIZE;
  ------------------
  |  | 1231|  3.87k|#define XXH3_INTERNALBUFFER_SIZE 256
  ------------------
 5636|  3.87k|                } while (input<limit);
  ------------------
  |  Branch (5636:26): [True: 1.87k, False: 1.99k]
  ------------------
 5637|       |                /* buffer predecessor of last partial stripe */
 5638|  1.99k|                XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN);
  ------------------
  |  | 4151|  1.99k|#define XXH_STRIPE_LEN 64
  ------------------
                              XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN);
  ------------------
  |  | 4151|  1.99k|#define XXH_STRIPE_LEN 64
  ------------------
                              XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN);
  ------------------
  |  | 4151|  1.99k|#define XXH_STRIPE_LEN 64
  ------------------
 5639|  1.99k|            }
 5640|  2.55k|        }
 5641|       |
 5642|       |        /* Some remaining input (always) : buffer it */
 5643|  13.6k|        XXH_ASSERT(input < bEnd)
  ------------------
  |  | 1844|  13.6k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  13.6k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5644|  13.6k|        XXH_ASSERT(bEnd - input <= XXH3_INTERNALBUFFER_SIZE)
  ------------------
  |  | 1844|  13.6k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  13.6k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5645|  13.6k|        XXH_ASSERT(state->bufferedSize == 0)
  ------------------
  |  | 1844|  13.6k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  13.6k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5646|  13.6k|        XXH_memcpy(state->buffer, input, (size_t)(bEnd-input));
 5647|  13.6k|        state->bufferedSize = (XXH32_hash_t)(bEnd-input);
 5648|       |#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1
 5649|       |        /* save stack accumulators into state */
 5650|       |        memcpy(state->acc, acc, sizeof(acc));
 5651|       |#endif
 5652|  13.6k|    }
 5653|       |
 5654|      0|    return XXH_OK;
 5655|  13.6k|}
xxhash.cc:_ZL19XXH3_consumeStripesPmS_mPKhmS1_mPFvS_S1_S1_mEPFvPvPKvE:
 5517|  13.9k|{
 5518|       |    XXH_ASSERT(nbStripes <= nbStripesPerBlock)  /* can handle max 1 scramble per invocation */
  ------------------
  |  | 1844|  13.9k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  13.9k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 13.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5519|  13.9k|    XXH_ASSERT(*nbStripesSoFarPtr < nbStripesPerBlock)
  ------------------
  |  | 1844|  13.9k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  13.9k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 13.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5520|  13.9k|    if (nbStripesPerBlock - *nbStripesSoFarPtr <= nbStripes) {
  ------------------
  |  Branch (5520:9): [True: 3.40k, False: 10.5k]
  ------------------
 5521|       |        /* need a scrambling operation */
 5522|  3.40k|        size_t const nbStripesToEndofBlock = nbStripesPerBlock - *nbStripesSoFarPtr;
 5523|  3.40k|        size_t const nbStripesAfterBlock = nbStripes - nbStripesToEndofBlock;
 5524|  3.40k|        f_acc(acc, input, secret + nbStripesSoFarPtr[0] * XXH_SECRET_CONSUME_RATE, nbStripesToEndofBlock);
  ------------------
  |  | 4152|  3.40k|#define XXH_SECRET_CONSUME_RATE 8   /* nb of secret bytes consumed at each accumulation */
  ------------------
 5525|  3.40k|        f_scramble(acc, secret + secretLimit);
 5526|  3.40k|        f_acc(acc, input + nbStripesToEndofBlock * XXH_STRIPE_LEN, secret, nbStripesAfterBlock);
  ------------------
  |  | 4151|  3.40k|#define XXH_STRIPE_LEN 64
  ------------------
 5527|  3.40k|        *nbStripesSoFarPtr = nbStripesAfterBlock;
 5528|  10.5k|    } else {
 5529|  10.5k|        f_acc(acc, input, secret + nbStripesSoFarPtr[0] * XXH_SECRET_CONSUME_RATE, nbStripes);
  ------------------
  |  | 4152|  10.5k|#define XXH_SECRET_CONSUME_RATE 8   /* nb of secret bytes consumed at each accumulation */
  ------------------
 5530|  10.5k|        *nbStripesSoFarPtr += nbStripes;
 5531|  10.5k|    }
 5532|  13.9k|}
xxhash.cc:_ZL20XXH3_accumulate_avx2PmPKhS1_m:
 4187|  1.36M|                       size_t nbStripes)                    \
 4188|  1.36M|{                                                           \
 4189|  1.36M|    size_t n;                                               \
 4190|  20.5M|    for (n = 0; n < nbStripes; n++ ) {                      \
  ------------------
  |  Branch (4190:17): [True: 19.1M, False: 1.36M]
  ------------------
 4191|  19.1M|        const xxh_u8* const in = input + n*XXH_STRIPE_LEN;  \
  ------------------
  |  | 4151|  19.1M|#define XXH_STRIPE_LEN 64
  ------------------
 4192|  19.1M|        XXH_PREFETCH(in + XXH_PREFETCH_DIST);               \
  ------------------
  |  | 3633|  19.1M|#    define XXH_PREFETCH(ptr)  __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */)
  ------------------
 4193|  19.1M|        XXH3_accumulate_512_##name(                         \
 4194|  19.1M|                 acc,                                       \
 4195|  19.1M|                 in,                                        \
 4196|  19.1M|                 secret + n*XXH_SECRET_CONSUME_RATE);       \
  ------------------
  |  | 4152|  19.1M|#define XXH_SECRET_CONSUME_RATE 8   /* nb of secret bytes consumed at each accumulation */
  ------------------
 4197|  19.1M|    }                                                       \
 4198|  1.36M|}
xxhash.cc:_ZL21XXH3_scrambleAcc_avx2PvPKv:
 4392|  1.11M|{
 4393|  1.11M|    XXH_ASSERT((((size_t)acc) & 31) == 0)
  ------------------
  |  | 1844|  1.11M|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  1.11M|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 1.11M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4394|  1.11M|    {   __m256i* const xacc = (__m256i*) acc;
 4395|       |        /* Unaligned. This is mainly for pointer arithmetic, and because
 4396|       |         * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */
 4397|  1.11M|        const         __m256i* const xsecret = (const __m256i *) secret;
 4398|  1.11M|        const __m256i prime32 = _mm256_set1_epi32((int)XXH_PRIME32_1);
  ------------------
  |  | 2219|  1.11M|#define XXH_PRIME32_1  0x9E3779B1U  /*!< 0b10011110001101110111100110110001 */
  ------------------
 4399|       |
 4400|  1.11M|        size_t i;
 4401|  3.33M|        for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) {
  ------------------
  |  | 4151|  3.33M|#define XXH_STRIPE_LEN 64
  ------------------
  |  Branch (4401:19): [True: 2.22M, False: 1.11M]
  ------------------
 4402|       |            /* xacc[i] ^= (xacc[i] >> 47) */
 4403|  2.22M|            __m256i const acc_vec     = xacc[i];
 4404|  2.22M|            __m256i const shifted     = _mm256_srli_epi64    (acc_vec, 47);
 4405|  2.22M|            __m256i const data_vec    = _mm256_xor_si256     (acc_vec, shifted);
 4406|       |            /* xacc[i] ^= xsecret; */
 4407|  2.22M|            __m256i const key_vec     = _mm256_loadu_si256   (xsecret+i);
 4408|  2.22M|            __m256i const data_key    = _mm256_xor_si256     (data_vec, key_vec);
 4409|       |
 4410|       |            /* xacc[i] *= XXH_PRIME32_1; */
 4411|  2.22M|            __m256i const data_key_hi = _mm256_srli_epi64 (data_key, 32);
 4412|  2.22M|            __m256i const prod_lo     = _mm256_mul_epu32     (data_key, prime32);
 4413|  2.22M|            __m256i const prod_hi     = _mm256_mul_epu32     (data_key_hi, prime32);
 4414|  2.22M|            xacc[i] = _mm256_add_epi64(prod_lo, _mm256_slli_epi64(prod_hi, 32));
 4415|  2.22M|        }
 4416|  1.11M|    }
 4417|  1.11M|}
xxhash.cc:_ZL16XXH3_digest_longPmPK12XXH3_state_sPKh:
 5670|  5.79k|{
 5671|       |    /*
 5672|       |     * Digest on a local copy. This way, the state remains unaltered, and it can
 5673|       |     * continue ingesting more input afterwards.
 5674|       |     */
 5675|  5.79k|    XXH_memcpy(acc, state->acc, sizeof(state->acc));
 5676|  5.79k|    if (state->bufferedSize >= XXH_STRIPE_LEN) {
  ------------------
  |  | 4151|  5.79k|#define XXH_STRIPE_LEN 64
  ------------------
  |  Branch (5676:9): [True: 1.61k, False: 4.17k]
  ------------------
 5677|  1.61k|        size_t const nbStripes = (state->bufferedSize - 1) / XXH_STRIPE_LEN;
  ------------------
  |  | 4151|  1.61k|#define XXH_STRIPE_LEN 64
  ------------------
 5678|  1.61k|        size_t nbStripesSoFar = state->nbStripesSoFar;
 5679|  1.61k|        XXH3_consumeStripes(acc,
 5680|  1.61k|                           &nbStripesSoFar, state->nbStripesPerBlock,
 5681|  1.61k|                            state->buffer, nbStripes,
 5682|  1.61k|                            secret, state->secretLimit,
 5683|  1.61k|                            XXH3_accumulate, XXH3_scrambleAcc);
  ------------------
  |  | 5084|  1.61k|#define XXH3_accumulate     XXH3_accumulate_avx2
  ------------------
                                          XXH3_accumulate, XXH3_scrambleAcc);
  ------------------
  |  | 5085|  1.61k|#define XXH3_scrambleAcc    XXH3_scrambleAcc_avx2
  ------------------
 5684|       |        /* last stripe */
 5685|  1.61k|        XXH3_accumulate_512(acc,
  ------------------
  |  | 5083|  1.61k|#define XXH3_accumulate_512 XXH3_accumulate_512_avx2
  ------------------
 5686|  1.61k|                            state->buffer + state->bufferedSize - XXH_STRIPE_LEN,
  ------------------
  |  | 4151|  1.61k|#define XXH_STRIPE_LEN 64
  ------------------
 5687|  1.61k|                            secret + state->secretLimit - XXH_SECRET_LASTACC_START);
  ------------------
  |  | 5157|  1.61k|#define XXH_SECRET_LASTACC_START 7  /* not aligned on 8, last secret is different from acc & scrambler */
  ------------------
 5688|  4.17k|    } else {  /* bufferedSize < XXH_STRIPE_LEN */
 5689|  4.17k|        xxh_u8 lastStripe[XXH_STRIPE_LEN];
 5690|  4.17k|        size_t const catchupSize = XXH_STRIPE_LEN - state->bufferedSize;
  ------------------
  |  | 4151|  4.17k|#define XXH_STRIPE_LEN 64
  ------------------
 5691|       |        XXH_ASSERT(state->bufferedSize > 0)  /* there is always some input buffered */
  ------------------
  |  | 1844|  4.17k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  4.17k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 4.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5692|  4.17k|        XXH_memcpy(lastStripe, state->buffer + sizeof(state->buffer) - catchupSize, catchupSize);
 5693|  4.17k|        XXH_memcpy(lastStripe + catchupSize, state->buffer, state->bufferedSize);
 5694|  4.17k|        XXH3_accumulate_512(acc,
  ------------------
  |  | 5083|  4.17k|#define XXH3_accumulate_512 XXH3_accumulate_512_avx2
  ------------------
 5695|  4.17k|                            lastStripe,
 5696|  4.17k|                            secret + state->secretLimit - XXH_SECRET_LASTACC_START);
  ------------------
  |  | 5157|  4.17k|#define XXH_SECRET_LASTACC_START 7  /* not aligned on 8, last secret is different from acc & scrambler */
  ------------------
 5697|  4.17k|    }
 5698|  5.79k|}
xxhash.cc:_ZL14XXH3_mergeAccsPKmPKhm:
 5172|   235k|{
 5173|   235k|    xxh_u64 result64 = start;
 5174|   235k|    size_t i = 0;
 5175|       |
 5176|  1.17M|    for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (5176:17): [True: 940k, False: 235k]
  ------------------
 5177|   940k|        result64 += XXH3_mix2Accs(acc+2*i, secret + 16*i);
 5178|       |#if defined(__clang__)                                /* Clang */ \
 5179|       |    && (defined(__arm__) || defined(__thumb__))       /* ARMv7 */ \
 5180|       |    && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */  \
 5181|       |    && !defined(XXH_ENABLE_AUTOVECTORIZE)             /* Define to disable */
 5182|       |        /*
 5183|       |         * UGLY HACK:
 5184|       |         * Prevent autovectorization on Clang ARMv7-a. Exact same problem as
 5185|       |         * the one in XXH3_len_129to240_64b. Speeds up shorter keys > 240b.
 5186|       |         * XXH3_64bits, len == 256, Snapdragon 835:
 5187|       |         *   without hack: 2063.7 MB/s
 5188|       |         *   with hack:    2560.7 MB/s
 5189|       |         */
 5190|       |        XXH_COMPILER_GUARD(result64);
 5191|       |#endif
 5192|   940k|    }
 5193|       |
 5194|   235k|    return XXH3_avalanche(result64);
 5195|   235k|}
xxhash.cc:_ZL13XXH3_mix2AccsPKmPKh:
 5164|   940k|{
 5165|   940k|    return XXH3_mul128_fold64(
 5166|   940k|               acc[0] ^ XXH_readLE64(secret),
 5167|   940k|               acc[1] ^ XXH_readLE64(secret+8) );
 5168|   940k|}
xxhash.cc:_ZL21XXH3_128bits_internalPKvmmS0_mPF13XXH128_hash_tS0_mmS0_mE:
 6090|  17.9k|{
 6091|  17.9k|    XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN)
  ------------------
  |  | 1844|  17.9k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  17.9k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 17.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 6092|       |    /*
 6093|       |     * If an action is to be taken if `secret` conditions are not respected,
 6094|       |     * it should be done here.
 6095|       |     * For now, it's a contract pre-condition.
 6096|       |     * Adding a check and a branch here would cost performance at every hash.
 6097|       |     */
 6098|  17.9k|    if (len <= 16)
  ------------------
  |  Branch (6098:9): [True: 0, False: 17.9k]
  ------------------
 6099|      0|        return XXH3_len_0to16_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64);
 6100|  17.9k|    if (len <= 128)
  ------------------
  |  Branch (6100:9): [True: 17.9k, False: 2]
  ------------------
 6101|  17.9k|        return XXH3_len_17to128_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);
 6102|      2|    if (len <= XXH3_MIDSIZE_MAX)
  ------------------
  |  | 4087|      2|#define XXH3_MIDSIZE_MAX 240
  ------------------
  |  Branch (6102:9): [True: 2, False: 0]
  ------------------
 6103|      2|        return XXH3_len_129to240_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);
 6104|      0|    return f_hl128(input, len, seed64, secret, secretLen);
 6105|      2|}
xxhash.cc:_ZL21XXH3_len_17to128_128bPKhmS0_mm:
 5903|  17.9k|{
 5904|  17.9k|    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN) (void)secretSize;
  ------------------
  |  | 1844|  17.9k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  17.9k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 17.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5905|  17.9k|    XXH_ASSERT(16 < len && len <= 128)
  ------------------
  |  | 1844|  17.9k|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|  35.8k|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:29): [True: 17.9k, False: 0]
  |  |  |  |  |  Branch (2088:29): [True: 17.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5906|       |
 5907|  17.9k|    {   XXH128_hash_t acc;
 5908|  17.9k|        acc.low64 = len * XXH_PRIME64_1;
  ------------------
  |  | 2749|  17.9k|#define XXH_PRIME64_1  0x9E3779B185EBCA87ULL  /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */
  ------------------
 5909|  17.9k|        acc.high64 = 0;
 5910|       |
 5911|       |#if XXH_SIZE_OPT >= 1
 5912|       |        {
 5913|       |            /* Smaller, but slightly slower. */
 5914|       |            unsigned int i = (unsigned int)(len - 1) / 32;
 5915|       |            do {
 5916|       |                acc = XXH128_mix32B(acc, input+16*i, input+len-16*(i+1), secret+32*i, seed);
 5917|       |            } while (i-- != 0);
 5918|       |        }
 5919|       |#else
 5920|  17.9k|        if (len > 32) {
  ------------------
  |  Branch (5920:13): [True: 17.9k, False: 0]
  ------------------
 5921|  17.9k|            if (len > 64) {
  ------------------
  |  Branch (5921:17): [True: 0, False: 17.9k]
  ------------------
 5922|      0|                if (len > 96) {
  ------------------
  |  Branch (5922:21): [True: 0, False: 0]
  ------------------
 5923|      0|                    acc = XXH128_mix32B(acc, input+48, input+len-64, secret+96, seed);
 5924|      0|                }
 5925|      0|                acc = XXH128_mix32B(acc, input+32, input+len-48, secret+64, seed);
 5926|      0|            }
 5927|  17.9k|            acc = XXH128_mix32B(acc, input+16, input+len-32, secret+32, seed);
 5928|  17.9k|        }
 5929|  17.9k|        acc = XXH128_mix32B(acc, input, input+len-16, secret, seed);
 5930|  17.9k|#endif
 5931|  17.9k|        {   XXH128_hash_t h128;
 5932|  17.9k|            h128.low64  = acc.low64 + acc.high64;
 5933|  17.9k|            h128.high64 = (acc.low64    * XXH_PRIME64_1)
  ------------------
  |  | 2749|  17.9k|#define XXH_PRIME64_1  0x9E3779B185EBCA87ULL  /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */
  ------------------
 5934|  17.9k|                        + (acc.high64   * XXH_PRIME64_4)
  ------------------
  |  | 2752|  17.9k|#define XXH_PRIME64_4  0x85EBCA77C2B2AE63ULL  /*!< 0b1000010111101011110010100111011111000010101100101010111001100011 */
  ------------------
 5935|  17.9k|                        + ((len - seed) * XXH_PRIME64_2);
  ------------------
  |  | 2750|  17.9k|#define XXH_PRIME64_2  0xC2B2AE3D27D4EB4FULL  /*!< 0b1100001010110010101011100011110100100111110101001110101101001111 */
  ------------------
 5936|  17.9k|            h128.low64  = XXH3_avalanche(h128.low64);
 5937|  17.9k|            h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64);
 5938|  17.9k|            return h128;
 5939|  17.9k|        }
 5940|  17.9k|    }
 5941|  17.9k|}
xxhash.cc:_ZL13XXH128_mix32B13XXH128_hash_tPKhS1_S1_m:
 5890|  35.8k|{
 5891|  35.8k|    acc.low64  += XXH3_mix16B (input_1, secret+0, seed);
 5892|  35.8k|    acc.low64  ^= XXH_readLE64(input_2) + XXH_readLE64(input_2 + 8);
 5893|  35.8k|    acc.high64 += XXH3_mix16B (input_2, secret+16, seed);
 5894|  35.8k|    acc.high64 ^= XXH_readLE64(input_1) + XXH_readLE64(input_1 + 8);
 5895|  35.8k|    return acc;
 5896|  35.8k|}
xxhash.cc:_ZL22XXH3_len_129to240_128bPKhmS0_mm:
 5947|      2|{
 5948|      2|    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN) (void)secretSize;
  ------------------
  |  | 1844|      2|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|      2|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:27): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5949|      2|    XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX)
  ------------------
  |  | 1844|      2|#  define XXH_ASSERT(c)   XXH_ASSUME(c)
  |  |  ------------------
  |  |  |  | 2088|      4|#define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
  |  |  |  |  ------------------
  |  |  |  |  |  | 2079|      0|#  define XXH_UNREACHABLE() __builtin_unreachable()
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (2088:29): [True: 2, False: 0]
  |  |  |  |  |  Branch (2088:29): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5950|       |
 5951|      2|    {   XXH128_hash_t acc;
 5952|      2|        unsigned i;
 5953|      2|        acc.low64 = len * XXH_PRIME64_1;
  ------------------
  |  | 2749|      2|#define XXH_PRIME64_1  0x9E3779B185EBCA87ULL  /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */
  ------------------
 5954|      2|        acc.high64 = 0;
 5955|       |        /*
 5956|       |         *  We set as `i` as offset + 32. We do this so that unchanged
 5957|       |         * `len` can be used as upper bound. This reaches a sweet spot
 5958|       |         * where both x86 and aarch64 get simple agen and good codegen
 5959|       |         * for the loop.
 5960|       |         */
 5961|     10|        for (i = 32; i < 160; i += 32) {
  ------------------
  |  Branch (5961:22): [True: 8, False: 2]
  ------------------
 5962|      8|            acc = XXH128_mix32B(acc,
 5963|      8|                                input  + i - 32,
 5964|      8|                                input  + i - 16,
 5965|      8|                                secret + i - 32,
 5966|      8|                                seed);
 5967|      8|        }
 5968|      2|        acc.low64 = XXH3_avalanche(acc.low64);
 5969|      2|        acc.high64 = XXH3_avalanche(acc.high64);
 5970|       |        /*
 5971|       |         * NB: `i <= len` will duplicate the last 32-bytes if
 5972|       |         * len % 32 was zero. This is an unfortunate necessity to keep
 5973|       |         * the hash result stable.
 5974|       |         */
 5975|      4|        for (i=160; i <= len; i += 32) {
  ------------------
  |  Branch (5975:21): [True: 2, False: 2]
  ------------------
 5976|      2|            acc = XXH128_mix32B(acc,
 5977|      2|                                input + i - 32,
 5978|      2|                                input + i - 16,
 5979|      2|                                secret + XXH3_MIDSIZE_STARTOFFSET + i - 160,
  ------------------
  |  | 4097|      2|    #define XXH3_MIDSIZE_STARTOFFSET 3
  ------------------
 5980|      2|                                seed);
 5981|      2|        }
 5982|       |        /* last bytes */
 5983|      2|        acc = XXH128_mix32B(acc,
 5984|      2|                            input + len - 16,
 5985|      2|                            input + len - 32,
 5986|      2|                            secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET - 16,
  ------------------
  |  |  968|      2|#define XXH3_SECRET_SIZE_MIN 136
  ------------------
                                          secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET - 16,
  ------------------
  |  | 4098|      2|    #define XXH3_MIDSIZE_LASTOFFSET  17
  ------------------
 5987|      2|                            (XXH64_hash_t)0 - seed);
 5988|       |
 5989|      2|        {   XXH128_hash_t h128;
 5990|      2|            h128.low64  = acc.low64 + acc.high64;
 5991|      2|            h128.high64 = (acc.low64    * XXH_PRIME64_1)
  ------------------
  |  | 2749|      2|#define XXH_PRIME64_1  0x9E3779B185EBCA87ULL  /*!< 0b1001111000110111011110011011000110000101111010111100101010000111 */
  ------------------
 5992|      2|                        + (acc.high64   * XXH_PRIME64_4)
  ------------------
  |  | 2752|      2|#define XXH_PRIME64_4  0x85EBCA77C2B2AE63ULL  /*!< 0b1000010111101011110010100111011111000010101100101010111001100011 */
  ------------------
 5993|      2|                        + ((len - seed) * XXH_PRIME64_2);
  ------------------
  |  | 2750|      2|#define XXH_PRIME64_2  0xC2B2AE3D27D4EB4FULL  /*!< 0b1100001010110010101011100011110100100111110101001110101101001111 */
  ------------------
 5994|      2|            h128.low64  = XXH3_avalanche(h128.low64);
 5995|      2|            h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64);
 5996|      2|            return h128;
 5997|      2|        }
 5998|      2|    }
 5999|      2|}

hash.cc:_ZL29ROCKSDB_XXPH3_64bits_withSeedPKvmm:
 1735|  13.4M|{
 1736|  13.4M|    if (len <= 16) return XXPH3_len_0to16_64b((const xxh_u8*)input, len, kSecret, seed);
  ------------------
  |  Branch (1736:9): [True: 12.6M, False: 835k]
  ------------------
 1737|   835k|    if (len <= 128) return XXPH3_len_17to128_64b((const xxh_u8*)input, len, kSecret, sizeof(kSecret), seed);
  ------------------
  |  Branch (1737:9): [True: 446k, False: 389k]
  ------------------
 1738|   389k|    if (len <= XXPH3_MIDSIZE_MAX) return XXPH3_len_129to240_64b((const xxh_u8*)input, len, kSecret, sizeof(kSecret), seed);
  ------------------
  |  | 1679|   389k|#define XXPH3_MIDSIZE_MAX 240
  ------------------
  |  Branch (1738:9): [True: 231k, False: 157k]
  ------------------
 1739|   157k|    return XXPH3_hashLong_64b_withSeed((const xxh_u8*)input, len, seed);
 1740|   389k|}
hash.cc:_ZL19XXPH3_len_0to16_64bPKhmS0_m:
 1128|  12.6M|{
 1129|  12.6M|    XXPH_ASSERT(len <= 16);
  ------------------
  |  |  427|  12.6M|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1130|  12.6M|    {   if (len > 8) return XXPH3_len_9to16_64b(input, len, secret, seed);
  ------------------
  |  Branch (1130:13): [True: 172k, False: 12.4M]
  ------------------
 1131|  12.4M|        if (len >= 4) return XXPH3_len_4to8_64b(input, len, secret, seed);
  ------------------
  |  Branch (1131:13): [True: 5.48M, False: 6.99M]
  ------------------
 1132|  6.99M|        if (len) return XXPH3_len_1to3_64b(input, len, secret, seed);
  ------------------
  |  Branch (1132:13): [True: 3.86M, False: 3.12M]
  ------------------
 1133|       |        /*
 1134|       |         * RocksDB modification from XXPH3 preview: zero result for empty
 1135|       |         * string can be problematic for multiplication-based algorithms.
 1136|       |         * Return a hash of the seed instead.
 1137|       |         */
 1138|  3.12M|        return XXPH3_mul128_fold64(seed + XXPH_readLE64(secret), PRIME64_2);
 1139|  6.99M|    }
 1140|  6.99M|}
hash.cc:_ZL19XXPH3_len_9to16_64bPKhmS0_m:
 1115|   172k|{
 1116|   172k|    XXPH_ASSERT(input != NULL);
  ------------------
  |  |  427|   172k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1117|   172k|    XXPH_ASSERT(secret != NULL);
  ------------------
  |  |  427|   172k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1118|   172k|    XXPH_ASSERT(9 <= len && len <= 16);
  ------------------
  |  |  427|   172k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1119|   172k|    {   xxh_u64 const input_lo = XXPH_readLE64(input)           ^ (XXPH_readLE64(secret)     + seed);
 1120|   172k|        xxh_u64 const input_hi = XXPH_readLE64(input + len - 8) ^ (XXPH_readLE64(secret + 8) - seed);
 1121|   172k|        xxh_u64 const acc = len + (input_lo + input_hi) + XXPH3_mul128_fold64(input_lo, input_hi);
 1122|   172k|        return XXPH3_avalanche(acc);
 1123|   172k|    }
 1124|   172k|}
hash.cc:_ZL15XXPH3_avalanchem:
 1070|  10.5M|{
 1071|  10.5M|    h64 ^= h64 >> 37;
 1072|  10.5M|    h64 *= PRIME64_3;
 1073|  10.5M|    h64 ^= h64 >> 32;
 1074|  10.5M|    return h64;
 1075|  10.5M|}
hash.cc:_ZL18XXPH3_len_4to8_64bPKhmS0_m:
 1100|  5.48M|{
 1101|  5.48M|    XXPH_ASSERT(input != NULL);
  ------------------
  |  |  427|  5.48M|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1102|  5.48M|    XXPH_ASSERT(secret != NULL);
  ------------------
  |  |  427|  5.48M|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1103|  5.48M|    XXPH_ASSERT(4 <= len && len <= 8);
  ------------------
  |  |  427|  5.48M|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1104|  5.48M|    {   xxh_u32 const input_lo = XXPH_readLE32(input);
 1105|  5.48M|        xxh_u32 const input_hi = XXPH_readLE32(input + len - 4);
 1106|  5.48M|        xxh_u64 const input_64 = input_lo | ((xxh_u64)input_hi << 32);
 1107|  5.48M|        xxh_u64 const keyed = input_64 ^ (XXPH_readLE64(secret) + seed);
 1108|  5.48M|        xxh_u64 const mix64 = len + ((keyed ^ (keyed >> 51)) * PRIME32_1);
 1109|  5.48M|        return XXPH3_avalanche((mix64 ^ (mix64 >> 47)) * PRIME64_2);
 1110|  5.48M|    }
 1111|  5.48M|}
hash.cc:_ZL13XXPH_readLE32PKv:
  543|  14.8M|{
  544|  14.8M|    return XXPH_CPU_LITTLE_ENDIAN ? XXPH_read32(ptr) : XXPH_swap32(XXPH_read32(ptr));
  ------------------
  |  |  484|  14.8M|#    define XXPH_CPU_LITTLE_ENDIAN 1
  |  |  ------------------
  |  |  |  Branch (484:36): [Folded - Ignored]
  |  |  ------------------
  ------------------
  545|  14.8M|}
hash.cc:_ZL11XXPH_read32PKv:
  468|  14.8M|{
  469|  14.8M|    xxh_u32 val;
  470|  14.8M|    memcpy(&val, memPtr, sizeof(val));
  471|  14.8M|    return val;
  472|  14.8M|}
hash.cc:_ZL18XXPH3_len_1to3_64bPKhmS0_m:
 1084|  3.86M|{
 1085|  3.86M|    XXPH_ASSERT(input != NULL);
  ------------------
  |  |  427|  3.86M|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1086|  3.86M|    XXPH_ASSERT(1 <= len && len <= 3);
  ------------------
  |  |  427|  3.86M|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1087|  3.86M|    XXPH_ASSERT(secret != NULL);
  ------------------
  |  |  427|  3.86M|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1088|  3.86M|    {   xxh_u8 const c1 = input[0];
 1089|  3.86M|        xxh_u8 const c2 = input[len >> 1];
 1090|  3.86M|        xxh_u8 const c3 = input[len - 1];
 1091|  3.86M|        xxh_u32  const combined = ((xxh_u32)c1) | (((xxh_u32)c2) << 8) | (((xxh_u32)c3) << 16) | (((xxh_u32)len) << 24);
 1092|  3.86M|        xxh_u64  const keyed = (xxh_u64)combined ^ (XXPH_readLE32(secret) + seed);
 1093|  3.86M|        xxh_u64  const mixed = keyed * PRIME64_1;
 1094|  3.86M|        return XXPH3_avalanche(mixed);
 1095|  3.86M|    }
 1096|  3.86M|}
hash.cc:_ZL19XXPH3_mul128_fold64mm:
 1063|  8.51M|{
 1064|  8.51M|    XXPH128_hash_t product = XXPH_mult64to128(lhs, rhs);
 1065|  8.51M|    return product.low64 ^ product.high64;
 1066|  8.51M|}
hash.cc:_ZL16XXPH_mult64to128mm:
  949|  8.51M|{
  950|       |    /*
  951|       |     * GCC/Clang __uint128_t method.
  952|       |     *
  953|       |     * On most 64-bit targets, GCC and Clang define a __uint128_t type.
  954|       |     * This is usually the best way as it usually uses a native long 64-bit
  955|       |     * multiply, such as MULQ on x86_64 or MUL + UMULH on aarch64.
  956|       |     *
  957|       |     * Usually.
  958|       |     *
  959|       |     * Despite being a 32-bit platform, Clang (and emscripten) define this
  960|       |     * type despite not having the arithmetic for it. This results in a
  961|       |     * laggy compiler builtin call which calculates a full 128-bit multiply.
  962|       |     * In that case it is best to use the portable one.
  963|       |     * https://github.com/Cyan4973/xxHash/issues/211#issuecomment-515575677
  964|       |     */
  965|  8.51M|#if defined(__GNUC__) && !defined(__wasm__) \
  966|  8.51M|    && defined(__SIZEOF_INT128__) \
  967|  8.51M|    || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 128)
  968|       |
  969|  8.51M|    __uint128_t product = (__uint128_t)lhs * (__uint128_t)rhs;
  970|  8.51M|    XXPH128_hash_t const r128 = { (xxh_u64)(product), (xxh_u64)(product >> 64) };
  971|  8.51M|    return r128;
  972|       |
  973|       |    /*
  974|       |     * MSVC for x64's _umul128 method.
  975|       |     *
  976|       |     * xxh_u64 _umul128(xxh_u64 Multiplier, xxh_u64 Multiplicand, xxh_u64 *HighProduct);
  977|       |     *
  978|       |     * This compiles to single operand MUL on x64.
  979|       |     */
  980|       |#elif defined(_M_X64) || defined(_M_IA64)
  981|       |
  982|       |#ifndef _MSC_VER
  983|       |#   pragma intrinsic(_umul128)
  984|       |#endif
  985|       |    xxh_u64 product_high;
  986|       |    xxh_u64 const product_low = _umul128(lhs, rhs, &product_high);
  987|       |    XXPH128_hash_t const r128 = { product_low, product_high };
  988|       |    return r128;
  989|       |
  990|       |#else
  991|       |    /*
  992|       |     * Portable scalar method. Optimized for 32-bit and 64-bit ALUs.
  993|       |     *
  994|       |     * This is a fast and simple grade school multiply, which is shown
  995|       |     * below with base 10 arithmetic instead of base 0x100000000.
  996|       |     *
  997|       |     *           9 3 // D2 lhs = 93
  998|       |     *         x 7 5 // D2 rhs = 75
  999|       |     *     ----------
 1000|       |     *           1 5 // D2 lo_lo = (93 % 10) * (75 % 10)
 1001|       |     *         4 5 | // D2 hi_lo = (93 / 10) * (75 % 10)
 1002|       |     *         2 1 | // D2 lo_hi = (93 % 10) * (75 / 10)
 1003|       |     *     + 6 3 | | // D2 hi_hi = (93 / 10) * (75 / 10)
 1004|       |     *     ---------
 1005|       |     *         2 7 | // D2 cross  = (15 / 10) + (45 % 10) + 21
 1006|       |     *     + 6 7 | | // D2 upper  = (27 / 10) + (45 / 10) + 63
 1007|       |     *     ---------
 1008|       |     *       6 9 7 5
 1009|       |     *
 1010|       |     * The reasons for adding the products like this are:
 1011|       |     *  1. It avoids manual carry tracking. Just like how
 1012|       |     *     (9 * 9) + 9 + 9 = 99, the same applies with this for
 1013|       |     *     UINT64_MAX. This avoids a lot of complexity.
 1014|       |     *
 1015|       |     *  2. It hints for, and on Clang, compiles to, the powerful UMAAL
 1016|       |     *     instruction available in ARMv6+ A32/T32, which is shown below:
 1017|       |     *
 1018|       |     *         void UMAAL(xxh_u32 *RdLo, xxh_u32 *RdHi, xxh_u32 Rn, xxh_u32 Rm)
 1019|       |     *         {
 1020|       |     *             xxh_u64 product = (xxh_u64)*RdLo * (xxh_u64)*RdHi + Rn + Rm;
 1021|       |     *             *RdLo = (xxh_u32)(product & 0xFFFFFFFF);
 1022|       |     *             *RdHi = (xxh_u32)(product >> 32);
 1023|       |     *         }
 1024|       |     *
 1025|       |     *     This instruction was designed for efficient long multiplication,
 1026|       |     *     and allows this to be calculated in only 4 instructions which
 1027|       |     *     is comparable to some 64-bit ALUs.
 1028|       |     *
 1029|       |     *  3. It isn't terrible on other platforms. Usually this will be
 1030|       |     *     a couple of 32-bit ADD/ADCs.
 1031|       |     */
 1032|       |
 1033|       |    /* First calculate all of the cross products. */
 1034|       |    xxh_u64 const lo_lo = XXPH_mult32to64(lhs & 0xFFFFFFFF, rhs & 0xFFFFFFFF);
 1035|       |    xxh_u64 const hi_lo = XXPH_mult32to64(lhs >> 32,        rhs & 0xFFFFFFFF);
 1036|       |    xxh_u64 const lo_hi = XXPH_mult32to64(lhs & 0xFFFFFFFF, rhs >> 32);
 1037|       |    xxh_u64 const hi_hi = XXPH_mult32to64(lhs >> 32,        rhs >> 32);
 1038|       |
 1039|       |    /* Now add the products together. These will never overflow. */
 1040|       |    xxh_u64 const cross = (lo_lo >> 32) + (hi_lo & 0xFFFFFFFF) + lo_hi;
 1041|       |    xxh_u64 const upper = (hi_lo >> 32) + (cross >> 32)        + hi_hi;
 1042|       |    xxh_u64 const lower = (cross << 32) | (lo_lo & 0xFFFFFFFF);
 1043|       |
 1044|       |    XXPH128_hash_t r128 = { lower, upper };
 1045|       |    return r128;
 1046|       |#endif
 1047|  8.51M|}
hash.cc:_ZL13XXPH_readLE64PKv:
  626|  30.7M|{
  627|  30.7M|    return XXPH_CPU_LITTLE_ENDIAN ? XXPH_read64(ptr) : XXPH_swap64(XXPH_read64(ptr));
  ------------------
  |  |  484|  30.7M|#    define XXPH_CPU_LITTLE_ENDIAN 1
  |  |  ------------------
  |  |  |  Branch (484:36): [Folded - Ignored]
  |  |  ------------------
  ------------------
  628|  30.7M|}
hash.cc:_ZL11XXPH_read64PKv:
  599|  30.7M|{
  600|  30.7M|    xxh_u64 val;
  601|  30.7M|    memcpy(&val, memPtr, sizeof(val));
  602|  30.7M|    return val;
  603|  30.7M|}
hash.cc:_ZL21XXPH3_len_17to128_64bPKhmS0_mm:
 1655|   446k|{
 1656|   446k|    XXPH_ASSERT(secretSize >= XXPH3_SECRET_SIZE_MIN); (void)secretSize;
  ------------------
  |  |  427|   446k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1657|   446k|    XXPH_ASSERT(16 < len && len <= 128);
  ------------------
  |  |  427|   446k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1658|       |
 1659|   446k|    {   xxh_u64 acc = len * PRIME64_1;
 1660|   446k|        if (len > 32) {
  ------------------
  |  Branch (1660:13): [True: 256k, False: 190k]
  ------------------
 1661|   256k|            if (len > 64) {
  ------------------
  |  Branch (1661:17): [True: 131k, False: 125k]
  ------------------
 1662|   131k|                if (len > 96) {
  ------------------
  |  Branch (1662:21): [True: 58.2k, False: 72.9k]
  ------------------
 1663|  58.2k|                    acc += XXPH3_mix16B(input+48, secret+96, seed);
 1664|  58.2k|                    acc += XXPH3_mix16B(input+len-64, secret+112, seed);
 1665|  58.2k|                }
 1666|   131k|                acc += XXPH3_mix16B(input+32, secret+64, seed);
 1667|   131k|                acc += XXPH3_mix16B(input+len-48, secret+80, seed);
 1668|   131k|            }
 1669|   256k|            acc += XXPH3_mix16B(input+16, secret+32, seed);
 1670|   256k|            acc += XXPH3_mix16B(input+len-32, secret+48, seed);
 1671|   256k|        }
 1672|   446k|        acc += XXPH3_mix16B(input+0, secret+0, seed);
 1673|   446k|        acc += XXPH3_mix16B(input+len-16, secret+16, seed);
 1674|       |
 1675|   446k|        return XXPH3_avalanche(acc);
 1676|   446k|    }
 1677|   446k|}
hash.cc:_ZL12XXPH3_mix16BPKhS0_m:
 1642|  4.58M|{
 1643|  4.58M|    xxh_u64 const input_lo = XXPH_readLE64(input);
 1644|  4.58M|    xxh_u64 const input_hi = XXPH_readLE64(input+8);
 1645|  4.58M|    return XXPH3_mul128_fold64(
 1646|  4.58M|               input_lo ^ (XXPH_readLE64(secret)   + seed64),
 1647|  4.58M|               input_hi ^ (XXPH_readLE64(secret+8) - seed64) );
 1648|  4.58M|}
hash.cc:_ZL22XXPH3_len_129to240_64bPKhmS0_mm:
 1685|   231k|{
 1686|   231k|    XXPH_ASSERT(secretSize >= XXPH3_SECRET_SIZE_MIN); (void)secretSize;
  ------------------
  |  |  427|   231k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1687|   231k|    XXPH_ASSERT(128 < len && len <= XXPH3_MIDSIZE_MAX);
  ------------------
  |  |  427|   231k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1688|       |
 1689|   231k|    #define XXPH3_MIDSIZE_STARTOFFSET 3
 1690|   231k|    #define XXPH3_MIDSIZE_LASTOFFSET  17
 1691|       |
 1692|   231k|    {   xxh_u64 acc = len * PRIME64_1;
 1693|   231k|        int const nbRounds = (int)len / 16;
 1694|   231k|        int i;
 1695|  2.08M|        for (i=0; i<8; i++) {
  ------------------
  |  Branch (1695:19): [True: 1.84M, False: 231k]
  ------------------
 1696|  1.84M|            acc += XXPH3_mix16B(input+(16*i), secret+(16*i), seed);
 1697|  1.84M|        }
 1698|   231k|        acc = XXPH3_avalanche(acc);
 1699|   231k|        XXPH_ASSERT(nbRounds >= 8);
  ------------------
  |  |  427|   231k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1700|   952k|        for (i=8 ; i < nbRounds; i++) {
  ------------------
  |  Branch (1700:20): [True: 721k, False: 231k]
  ------------------
 1701|   721k|            acc += XXPH3_mix16B(input+(16*i), secret+(16*(i-8)) + XXPH3_MIDSIZE_STARTOFFSET, seed);
  ------------------
  |  | 1689|   721k|    #define XXPH3_MIDSIZE_STARTOFFSET 3
  ------------------
 1702|   721k|        }
 1703|       |        /* last bytes */
 1704|   231k|        acc += XXPH3_mix16B(input + len - 16, secret + XXPH3_SECRET_SIZE_MIN - XXPH3_MIDSIZE_LASTOFFSET, seed);
  ------------------
  |  |  283|   231k|#define XXPH3_SECRET_SIZE_MIN 136
  ------------------
                      acc += XXPH3_mix16B(input + len - 16, secret + XXPH3_SECRET_SIZE_MIN - XXPH3_MIDSIZE_LASTOFFSET, seed);
  ------------------
  |  | 1690|   231k|    #define XXPH3_MIDSIZE_LASTOFFSET  17
  ------------------
 1705|   231k|        return XXPH3_avalanche(acc);
 1706|   231k|    }
 1707|   231k|}
hash.cc:_ZL27XXPH3_hashLong_64b_withSeedPKhmm:
 1632|   157k|{
 1633|   157k|    XXPH_ALIGN(8) xxh_u8 secret[XXPH_SECRET_DEFAULT_SIZE];
  ------------------
  |  |  297|   157k|#  define XXPH_ALIGN(n)      __attribute__ ((aligned(n)))
  ------------------
 1634|   157k|    if (seed==0) return XXPH3_hashLong_64b_defaultSecret(input, len);
  ------------------
  |  Branch (1634:9): [True: 83.0k, False: 74.7k]
  ------------------
 1635|  74.7k|    XXPH3_initCustomSecret(secret, seed);
 1636|  74.7k|    return XXPH3_hashLong_internal(input, len, secret, sizeof(secret));
 1637|   157k|}
hash.cc:_ZL32XXPH3_hashLong_64b_defaultSecretPKhm:
 1588|  83.0k|{
 1589|  83.0k|    return XXPH3_hashLong_internal(input, len, kSecret, sizeof(kSecret));
 1590|  83.0k|}
hash.cc:_ZL22XXPH3_initCustomSecretPhm:
 1610|  74.7k|{
 1611|  74.7k|    int const nbRounds = XXPH_SECRET_DEFAULT_SIZE / 16;
  ------------------
  |  |  914|  74.7k|#define XXPH_SECRET_DEFAULT_SIZE 192   /* minimum XXPH3_SECRET_SIZE_MIN */
  ------------------
 1612|  74.7k|    int i;
 1613|       |
 1614|  74.7k|    XXPH_STATIC_ASSERT((XXPH_SECRET_DEFAULT_SIZE & 15) == 0);
  ------------------
  |  |  431|  74.7k|#define XXPH_STATIC_ASSERT(c)  { enum { XXPH_sa = 1/(int)(!!(c)) }; }
  ------------------
 1615|       |
 1616|   972k|    for (i=0; i < nbRounds; i++) {
  ------------------
  |  Branch (1616:15): [True: 897k, False: 74.7k]
  ------------------
 1617|   897k|        XXPH_writeLE64(customSecret + 16*i,     XXPH_readLE64(kSecret + 16*i)     + seed64);
 1618|   897k|        XXPH_writeLE64(customSecret + 16*i + 8, XXPH_readLE64(kSecret + 16*i + 8) - seed64);
 1619|   897k|    }
 1620|  74.7k|}
hash.cc:_ZL14XXPH_writeLE64Pvm:
 1601|  1.79M|{
 1602|  1.79M|    if (!XXPH_CPU_LITTLE_ENDIAN) v64 = XXPH_swap64(v64);
  ------------------
  |  |  484|  1.79M|#    define XXPH_CPU_LITTLE_ENDIAN 1
  ------------------
  |  Branch (1602:9): [Folded - Ignored]
  ------------------
 1603|  1.79M|    memcpy(dst, &v64, sizeof(v64));
 1604|  1.79M|}
hash.cc:_ZL23XXPH3_hashLong_internalPKhmS0_m:
 1573|   157k|{
 1574|   157k|    XXPH_ALIGN(XXPH_ACC_ALIGN) xxh_u64 acc[ACC_NB] = XXPH3_INIT_ACC;
  ------------------
  |  |  297|   157k|#  define XXPH_ALIGN(n)      __attribute__ ((aligned(n)))
  ------------------
                  XXPH_ALIGN(XXPH_ACC_ALIGN) xxh_u64 acc[ACC_NB] = XXPH3_INIT_ACC;
  ------------------
  |  | 1567|   157k|#define XXPH3_INIT_ACC { PRIME32_3, PRIME64_1, PRIME64_2, PRIME64_3, \
  |  | 1568|   157k|                        PRIME64_4, PRIME32_2, PRIME64_5, PRIME32_1 };
  ------------------
 1575|       |
 1576|   157k|    XXPH3_hashLong_internal_loop(acc, input, len, secret, secretSize, XXPH3_acc_64bits);
 1577|       |
 1578|       |    /* converge into final hash */
 1579|   157k|    XXPH_STATIC_ASSERT(sizeof(acc) == 64);
  ------------------
  |  |  431|   157k|#define XXPH_STATIC_ASSERT(c)  { enum { XXPH_sa = 1/(int)(!!(c)) }; }
  ------------------
 1580|   157k|#define XXPH_SECRET_MERGEACCS_START 11  /* do not align on 8, so that secret is different from accumulator */
 1581|   157k|    XXPH_ASSERT(secretSize >= sizeof(acc) + XXPH_SECRET_MERGEACCS_START);
  ------------------
  |  |  427|   157k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1582|   157k|    return XXPH3_mergeAccs(acc, secret + XXPH_SECRET_MERGEACCS_START, (xxh_u64)len * PRIME64_1);
  ------------------
  |  | 1580|   157k|#define XXPH_SECRET_MERGEACCS_START 11  /* do not align on 8, so that secret is different from accumulator */
  ------------------
 1583|   157k|}
hash.cc:_ZL28XXPH3_hashLong_internal_loopPmPKhmS1_m16XXPH3_accWidth_e:
 1518|   157k|{
 1519|   157k|    size_t const nb_rounds = (secretSize - STRIPE_LEN) / XXPH_SECRET_CONSUME_RATE;
  ------------------
  |  | 1145|   157k|#define STRIPE_LEN 64
  ------------------
                  size_t const nb_rounds = (secretSize - STRIPE_LEN) / XXPH_SECRET_CONSUME_RATE;
  ------------------
  |  | 1146|   157k|#define XXPH_SECRET_CONSUME_RATE 8   /* nb of secret bytes consumed at each accumulation */
  ------------------
 1520|   157k|    size_t const block_len = STRIPE_LEN * nb_rounds;
  ------------------
  |  | 1145|   157k|#define STRIPE_LEN 64
  ------------------
 1521|   157k|    size_t const nb_blocks = len / block_len;
 1522|       |
 1523|   157k|    size_t n;
 1524|       |
 1525|   157k|    XXPH_ASSERT(secretSize >= XXPH3_SECRET_SIZE_MIN);
  ------------------
  |  |  427|   157k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1526|       |
 1527|   690k|    for (n = 0; n < nb_blocks; n++) {
  ------------------
  |  Branch (1527:17): [True: 532k, False: 157k]
  ------------------
 1528|   532k|        XXPH3_accumulate(acc, input + n*block_len, secret, nb_rounds, accWidth);
 1529|   532k|        XXPH3_scrambleAcc(acc, secret + secretSize - STRIPE_LEN);
  ------------------
  |  | 1145|   532k|#define STRIPE_LEN 64
  ------------------
 1530|   532k|    }
 1531|       |
 1532|       |    /* last partial block */
 1533|   157k|    XXPH_ASSERT(len > STRIPE_LEN);
  ------------------
  |  |  427|   157k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1534|   157k|    {   size_t const nbStripes = (len - (block_len * nb_blocks)) / STRIPE_LEN;
  ------------------
  |  | 1145|   157k|#define STRIPE_LEN 64
  ------------------
 1535|   157k|        XXPH_ASSERT(nbStripes <= (secretSize / XXPH_SECRET_CONSUME_RATE));
  ------------------
  |  |  427|   157k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1536|   157k|        XXPH3_accumulate(acc, input + nb_blocks*block_len, secret, nbStripes, accWidth);
 1537|       |
 1538|       |        /* last stripe */
 1539|   157k|        if (len & (STRIPE_LEN - 1)) {
  ------------------
  |  | 1145|   157k|#define STRIPE_LEN 64
  ------------------
  |  Branch (1539:13): [True: 155k, False: 2.47k]
  ------------------
 1540|   155k|            const xxh_u8* const p = input + len - STRIPE_LEN;
  ------------------
  |  | 1145|   155k|#define STRIPE_LEN 64
  ------------------
 1541|   155k|#define XXPH_SECRET_LASTACC_START 7  /* do not align on 8, so that secret is different from scrambler */
 1542|   155k|            XXPH3_accumulate_512(acc, p, secret + secretSize - STRIPE_LEN - XXPH_SECRET_LASTACC_START, accWidth);
  ------------------
  |  | 1145|   155k|#define STRIPE_LEN 64
  ------------------
                          XXPH3_accumulate_512(acc, p, secret + secretSize - STRIPE_LEN - XXPH_SECRET_LASTACC_START, accWidth);
  ------------------
  |  | 1541|   155k|#define XXPH_SECRET_LASTACC_START 7  /* do not align on 8, so that secret is different from scrambler */
  ------------------
 1543|   155k|    }   }
 1544|   157k|}
hash.cc:_ZL16XXPH3_accumulatePmPKhS1_m16XXPH3_accWidth_e:
 1491|   690k|{
 1492|   690k|    size_t n;
 1493|  10.1M|    for (n = 0; n < nbStripes; n++ ) {
  ------------------
  |  Branch (1493:17): [True: 9.49M, False: 690k]
  ------------------
 1494|  9.49M|        const xxh_u8* const in = input + n*STRIPE_LEN;
  ------------------
  |  | 1145|  9.49M|#define STRIPE_LEN 64
  ------------------
 1495|  9.49M|        XXPH_PREFETCH(in + XXPH_PREFETCH_DIST);
  ------------------
  |  |  903|  9.49M|#    define XXPH_PREFETCH(ptr)  __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */)
  ------------------
 1496|  9.49M|        XXPH3_accumulate_512(acc,
 1497|  9.49M|                            in,
 1498|  9.49M|                            secret + n*XXPH_SECRET_CONSUME_RATE,
  ------------------
  |  | 1146|  9.49M|#define XXPH_SECRET_CONSUME_RATE 8   /* nb of secret bytes consumed at each accumulation */
  ------------------
 1499|  9.49M|                            accWidth);
 1500|  9.49M|    }
 1501|   690k|}
hash.cc:_ZL17XXPH3_scrambleAccPvPKv:
 1345|   532k|{
 1346|   532k|#if (XXPH_VECTOR == XXPH_AVX2)
 1347|       |
 1348|   532k|    XXPH_ASSERT((((size_t)acc) & 31) == 0);
  ------------------
  |  |  427|   532k|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1349|   532k|    {   XXPH_ALIGN(32) __m256i* const xacc = (__m256i*) acc;
  ------------------
  |  |  297|   532k|#  define XXPH_ALIGN(n)      __attribute__ ((aligned(n)))
  ------------------
 1350|   532k|        const         __m256i* const xsecret = (const __m256i *) secret;   /* not really aligned, just for ptr arithmetic, and because _mm256_loadu_si256() requires this argument type */
 1351|   532k|        const __m256i prime32 = _mm256_set1_epi32((int)PRIME32_1);
 1352|       |
 1353|   532k|        size_t i;
 1354|  1.59M|        for (i=0; i < STRIPE_LEN/sizeof(__m256i); i++) {
  ------------------
  |  | 1145|  1.59M|#define STRIPE_LEN 64
  ------------------
  |  Branch (1354:19): [True: 1.06M, False: 532k]
  ------------------
 1355|       |            /* xacc[i] ^= (xacc[i] >> 47) */
 1356|  1.06M|            __m256i const acc_vec     = xacc[i];
 1357|  1.06M|            __m256i const shifted     = _mm256_srli_epi64    (acc_vec, 47);
 1358|  1.06M|            __m256i const data_vec    = _mm256_xor_si256     (acc_vec, shifted);
 1359|       |            /* xacc[i] ^= xsecret; */
 1360|  1.06M|            __m256i const key_vec     = _mm256_loadu_si256   (xsecret+i);
 1361|  1.06M|            __m256i const data_key    = _mm256_xor_si256     (data_vec, key_vec);
 1362|       |
 1363|       |            /* xacc[i] *= PRIME32_1; */
 1364|  1.06M|            __m256i const data_key_hi = _mm256_shuffle_epi32 (data_key, 0x31);
 1365|  1.06M|            __m256i const prod_lo     = _mm256_mul_epu32     (data_key, prime32);
 1366|  1.06M|            __m256i const prod_hi     = _mm256_mul_epu32     (data_key_hi, prime32);
 1367|  1.06M|            xacc[i] = _mm256_add_epi64(prod_lo, _mm256_slli_epi64(prod_hi, 32));
 1368|  1.06M|        }
 1369|   532k|    }
 1370|       |
 1371|       |#elif (XXPH_VECTOR == XXPH_SSE2)
 1372|       |
 1373|       |    XXPH_ASSERT((((size_t)acc) & 15) == 0);
 1374|       |    {   XXPH_ALIGN(16) __m128i* const xacc = (__m128i*) acc;
 1375|       |        const         __m128i* const xsecret = (const __m128i *) secret;   /* not really aligned, just for ptr arithmetic, and because _mm_loadu_si128() requires this argument type */
 1376|       |        const __m128i prime32 = _mm_set1_epi32((int)PRIME32_1);
 1377|       |
 1378|       |        size_t i;
 1379|       |        for (i=0; i < STRIPE_LEN/sizeof(__m128i); i++) {
 1380|       |            /* xacc[i] ^= (xacc[i] >> 47) */
 1381|       |            __m128i const acc_vec     = xacc[i];
 1382|       |            __m128i const shifted     = _mm_srli_epi64    (acc_vec, 47);
 1383|       |            __m128i const data_vec    = _mm_xor_si128     (acc_vec, shifted);
 1384|       |            /* xacc[i] ^= xsecret; */
 1385|       |            __m128i const key_vec     = _mm_loadu_si128   (xsecret+i);
 1386|       |            __m128i const data_key    = _mm_xor_si128     (data_vec, key_vec);
 1387|       |
 1388|       |            /* xacc[i] *= PRIME32_1; */
 1389|       |            __m128i const data_key_hi = _mm_shuffle_epi32 (data_key, 0x31);
 1390|       |            __m128i const prod_lo     = _mm_mul_epu32     (data_key, prime32);
 1391|       |            __m128i const prod_hi     = _mm_mul_epu32     (data_key_hi, prime32);
 1392|       |            xacc[i] = _mm_add_epi64(prod_lo, _mm_slli_epi64(prod_hi, 32));
 1393|       |        }
 1394|       |    }
 1395|       |
 1396|       |#elif (XXPH_VECTOR == XXPH_NEON)
 1397|       |
 1398|       |    XXPH_ASSERT((((size_t)acc) & 15) == 0);
 1399|       |
 1400|       |    {   uint64x2_t* const xacc =     (uint64x2_t*) acc;
 1401|       |        uint8_t const* const xsecret = (uint8_t const*) secret;
 1402|       |        uint32x2_t const prime     = vdup_n_u32 (PRIME32_1);
 1403|       |
 1404|       |        size_t i;
 1405|       |        for (i=0; i < STRIPE_LEN/sizeof(uint64x2_t); i++) {
 1406|       |            /* data_vec = xacc[i] ^ (xacc[i] >> 47); */
 1407|       |            uint64x2_t const   acc_vec  = xacc[i];
 1408|       |            uint64x2_t const   shifted  = vshrq_n_u64 (acc_vec, 47);
 1409|       |            uint64x2_t const   data_vec = veorq_u64   (acc_vec, shifted);
 1410|       |
 1411|       |            /* key_vec  = xsecret[i]; */
 1412|       |            uint32x4_t const   key_vec  = vreinterpretq_u32_u8(vld1q_u8(xsecret + (i * 16)));
 1413|       |            /* data_key = data_vec ^ key_vec; */
 1414|       |            uint32x4_t const   data_key = veorq_u32   (vreinterpretq_u32_u64(data_vec), key_vec);
 1415|       |            /* shuffled = { data_key[0, 2], data_key[1, 3] }; */
 1416|       |            uint32x2x2_t const shuffled = vzip_u32    (vget_low_u32(data_key), vget_high_u32(data_key));
 1417|       |
 1418|       |            /* data_key *= PRIME32_1 */
 1419|       |
 1420|       |            /* prod_hi = (data_key >> 32) * PRIME32_1; */
 1421|       |            uint64x2_t const   prod_hi = vmull_u32    (shuffled.val[1], prime);
 1422|       |            /* xacc[i] = prod_hi << 32; */
 1423|       |            xacc[i] = vshlq_n_u64(prod_hi, 32);
 1424|       |            /* xacc[i] += (prod_hi & 0xFFFFFFFF) * PRIME32_1; */
 1425|       |            xacc[i] = vmlal_u32(xacc[i], shuffled.val[0], prime);
 1426|       |    }   }
 1427|       |
 1428|       |#elif (XXPH_VECTOR == XXPH_VSX) && /* work around a compiler bug */ (__GNUC__ > 5)
 1429|       |
 1430|       |          U64x2* const xacc =       (U64x2*) acc;
 1431|       |    const U64x2* const xsecret = (const U64x2*) secret;
 1432|       |    /* constants */
 1433|       |    U64x2 const v32  = { 32, 32 };
 1434|       |    U64x2 const v47 = { 47, 47 };
 1435|       |    U32x4 const prime = { PRIME32_1, PRIME32_1, PRIME32_1, PRIME32_1 };
 1436|       |    size_t i;
 1437|       |#if XXPH_VSX_BE
 1438|       |    /* endian swap */
 1439|       |    U8x16 const vXorSwap  = { 0x07, 0x16, 0x25, 0x34, 0x43, 0x52, 0x61, 0x70,
 1440|       |                              0x8F, 0x9E, 0xAD, 0xBC, 0xCB, 0xDA, 0xE9, 0xF8 };
 1441|       |#endif
 1442|       |    for (i = 0; i < STRIPE_LEN / sizeof(U64x2); i++) {
 1443|       |        U64x2 const acc_vec  = xacc[i];
 1444|       |        U64x2 const data_vec = acc_vec ^ (acc_vec >> v47);
 1445|       |        /* key_vec = xsecret[i]; */
 1446|       |#if XXPH_VSX_BE
 1447|       |        /* swap bytes words */
 1448|       |        U64x2 const key_raw  = vec_vsx_ld(0, xsecret + i);
 1449|       |        U64x2 const data_key = (U64x2)XXPH_vec_permxor((U8x16)data_vec, (U8x16)key_raw, vXorSwap);
 1450|       |#else
 1451|       |        U64x2 const key_vec  = vec_vsx_ld(0, xsecret + i);
 1452|       |        U64x2 const data_key = data_vec ^ key_vec;
 1453|       |#endif
 1454|       |
 1455|       |        /* data_key *= PRIME32_1 */
 1456|       |
 1457|       |        /* prod_lo = ((U64x2)data_key & 0xFFFFFFFF) * ((U64x2)prime & 0xFFFFFFFF);  */
 1458|       |        U64x2 const prod_even  = XXPH_vec_mule((U32x4)data_key, prime);
 1459|       |        /* prod_hi = ((U64x2)data_key >> 32) * ((U64x2)prime >> 32);  */
 1460|       |        U64x2 const prod_odd  = XXPH_vec_mulo((U32x4)data_key, prime);
 1461|       |        xacc[i] = prod_odd + (prod_even << v32);
 1462|       |    }
 1463|       |
 1464|       |#else   /* scalar variant of Scrambler - universal */
 1465|       |
 1466|       |    XXPH_ALIGN(XXPH_ACC_ALIGN) xxh_u64* const xacc = (xxh_u64*) acc;   /* presumed aligned on 32-bytes boundaries, little hint for the auto-vectorizer */
 1467|       |    const xxh_u8* const xsecret = (const xxh_u8*) secret;   /* no alignment restriction */
 1468|       |    size_t i;
 1469|       |    XXPH_ASSERT((((size_t)acc) & (XXPH_ACC_ALIGN-1)) == 0);
 1470|       |    for (i=0; i < ACC_NB; i++) {
 1471|       |        xxh_u64 const key64 = XXPH_readLE64(xsecret + 8*i);
 1472|       |        xxh_u64 acc64 = xacc[i];
 1473|       |        acc64 ^= acc64 >> 47;
 1474|       |        acc64 ^= key64;
 1475|       |        acc64 *= PRIME32_1;
 1476|       |        xacc[i] = acc64;
 1477|       |    }
 1478|       |
 1479|       |#endif
 1480|   532k|}
hash.cc:_ZL20XXPH3_accumulate_512PvPKvS1_16XXPH3_accWidth_e:
 1156|  9.65M|{
 1157|  9.65M|#if (XXPH_VECTOR == XXPH_AVX2)
 1158|       |
 1159|  9.65M|    XXPH_ASSERT((((size_t)acc) & 31) == 0);
  ------------------
  |  |  427|  9.65M|#  define XXPH_ASSERT(c)   ((void)0)
  ------------------
 1160|  9.65M|    {   XXPH_ALIGN(32) __m256i* const xacc  =       (__m256i *) acc;
  ------------------
  |  |  297|  9.65M|#  define XXPH_ALIGN(n)      __attribute__ ((aligned(n)))
  ------------------
 1161|  9.65M|        const         __m256i* const xinput = (const __m256i *) input;  /* not really aligned, just for ptr arithmetic, and because _mm256_loadu_si256() requires this type */
 1162|  9.65M|        const         __m256i* const xsecret = (const __m256i *) secret;   /* not really aligned, just for ptr arithmetic, and because _mm256_loadu_si256() requires this type */
 1163|       |
 1164|  9.65M|        size_t i;
 1165|  28.9M|        for (i=0; i < STRIPE_LEN/sizeof(__m256i); i++) {
  ------------------
  |  | 1145|  28.9M|#define STRIPE_LEN 64
  ------------------
  |  Branch (1165:19): [True: 19.3M, False: 9.65M]
  ------------------
 1166|  19.3M|            __m256i const data_vec = _mm256_loadu_si256 (xinput+i);
 1167|  19.3M|            __m256i const key_vec = _mm256_loadu_si256 (xsecret+i);
 1168|  19.3M|            __m256i const data_key = _mm256_xor_si256 (data_vec, key_vec);                                  /* uint32 dk[8]  = {d0+k0, d1+k1, d2+k2, d3+k3, ...} */
 1169|  19.3M|            __m256i const product = _mm256_mul_epu32 (data_key, _mm256_shuffle_epi32 (data_key, 0x31));  /* uint64 mul[4] = {dk0*dk1, dk2*dk3, ...} */
 1170|  19.3M|            if (accWidth == XXPH3_acc_128bits) {
  ------------------
  |  Branch (1170:17): [True: 0, False: 19.3M]
  ------------------
 1171|      0|                __m256i const data_swap = _mm256_shuffle_epi32(data_vec, _MM_SHUFFLE(1,0,3,2));
 1172|      0|                __m256i const sum = _mm256_add_epi64(xacc[i], data_swap);
 1173|      0|                xacc[i]  = _mm256_add_epi64(product, sum);
 1174|  19.3M|            } else {  /* XXPH3_acc_64bits */
 1175|  19.3M|                __m256i const sum = _mm256_add_epi64(xacc[i], data_vec);
 1176|  19.3M|                xacc[i]  = _mm256_add_epi64(product, sum);
 1177|  19.3M|            }
 1178|  19.3M|    }   }
 1179|       |
 1180|       |#elif (XXPH_VECTOR == XXPH_SSE2)
 1181|       |
 1182|       |    XXPH_ASSERT((((size_t)acc) & 15) == 0);
 1183|       |    {   XXPH_ALIGN(16) __m128i* const xacc  =       (__m128i *) acc;
 1184|       |        const         __m128i* const xinput = (const __m128i *) input;  /* not really aligned, just for ptr arithmetic, and because _mm_loadu_si128() requires this type */
 1185|       |        const         __m128i* const xsecret = (const __m128i *) secret;   /* not really aligned, just for ptr arithmetic, and because _mm_loadu_si128() requires this type */
 1186|       |
 1187|       |        size_t i;
 1188|       |        for (i=0; i < STRIPE_LEN/sizeof(__m128i); i++) {
 1189|       |            __m128i const data_vec = _mm_loadu_si128 (xinput+i);
 1190|       |            __m128i const key_vec = _mm_loadu_si128 (xsecret+i);
 1191|       |            __m128i const data_key = _mm_xor_si128 (data_vec, key_vec);                                  /* uint32 dk[8]  = {d0+k0, d1+k1, d2+k2, d3+k3, ...} */
 1192|       |            __m128i const product = _mm_mul_epu32 (data_key, _mm_shuffle_epi32 (data_key, 0x31));  /* uint64 mul[4] = {dk0*dk1, dk2*dk3, ...} */
 1193|       |            if (accWidth == XXPH3_acc_128bits) {
 1194|       |                __m128i const data_swap = _mm_shuffle_epi32(data_vec, _MM_SHUFFLE(1,0,3,2));
 1195|       |                __m128i const sum = _mm_add_epi64(xacc[i], data_swap);
 1196|       |                xacc[i]  = _mm_add_epi64(product, sum);
 1197|       |            } else {  /* XXPH3_acc_64bits */
 1198|       |                __m128i const sum = _mm_add_epi64(xacc[i], data_vec);
 1199|       |                xacc[i]  = _mm_add_epi64(product, sum);
 1200|       |            }
 1201|       |    }   }
 1202|       |
 1203|       |#elif (XXPH_VECTOR == XXPH_NEON)
 1204|       |
 1205|       |    XXPH_ASSERT((((size_t)acc) & 15) == 0);
 1206|       |    {
 1207|       |        XXPH_ALIGN(16) uint64x2_t* const xacc = (uint64x2_t *) acc;
 1208|       |        /* We don't use a uint32x4_t pointer because it causes bus errors on ARMv7. */
 1209|       |        uint8_t const* const xinput = (const uint8_t *) input;
 1210|       |        uint8_t const* const xsecret  = (const uint8_t *) secret;
 1211|       |
 1212|       |        size_t i;
 1213|       |        for (i=0; i < STRIPE_LEN / sizeof(uint64x2_t); i++) {
 1214|       |#if !defined(__aarch64__) && !defined(__arm64__) && defined(__GNUC__) /* ARM32-specific hack */
 1215|       |            /* vzip on ARMv7 Clang generates a lot of vmovs (technically vorrs) without this.
 1216|       |             * vzip on 32-bit ARM NEON will overwrite the original register, and I think that Clang
 1217|       |             * assumes I don't want to destroy it and tries to make a copy. This slows down the code
 1218|       |             * a lot.
 1219|       |             * aarch64 not only uses an entirely different syntax, but it requires three
 1220|       |             * instructions...
 1221|       |             *    ext    v1.16B, v0.16B, #8    // select high bits because aarch64 can't address them directly
 1222|       |             *    zip1   v3.2s, v0.2s, v1.2s   // first zip
 1223|       |             *    zip2   v2.2s, v0.2s, v1.2s   // second zip
 1224|       |             * ...to do what ARM does in one:
 1225|       |             *    vzip.32 d0, d1               // Interleave high and low bits and overwrite. */
 1226|       |
 1227|       |            /* data_vec = xsecret[i]; */
 1228|       |            uint8x16_t const data_vec    = vld1q_u8(xinput + (i * 16));
 1229|       |            /* key_vec  = xsecret[i];  */
 1230|       |            uint8x16_t const key_vec     = vld1q_u8(xsecret  + (i * 16));
 1231|       |            /* data_key = data_vec ^ key_vec; */
 1232|       |            uint32x4_t       data_key;
 1233|       |
 1234|       |            if (accWidth == XXPH3_acc_64bits) {
 1235|       |                /* Add first to prevent register swaps */
 1236|       |                /* xacc[i] += data_vec; */
 1237|       |                xacc[i] = vaddq_u64 (xacc[i], vreinterpretq_u64_u8(data_vec));
 1238|       |            } else {  /* XXPH3_acc_128bits */
 1239|       |                /* xacc[i] += swap(data_vec); */
 1240|       |                /* can probably be optimized better */
 1241|       |                uint64x2_t const data64 = vreinterpretq_u64_u8(data_vec);
 1242|       |                uint64x2_t const swapped= vextq_u64(data64, data64, 1);
 1243|       |                xacc[i] = vaddq_u64 (xacc[i], swapped);
 1244|       |            }
 1245|       |
 1246|       |            data_key = vreinterpretq_u32_u8(veorq_u8(data_vec, key_vec));
 1247|       |
 1248|       |            /* Here's the magic. We use the quirkiness of vzip to shuffle data_key in place.
 1249|       |             * shuffle: data_key[0, 1, 2, 3] = data_key[0, 2, 1, 3] */
 1250|       |            __asm__("vzip.32 %e0, %f0" : "+w" (data_key));
 1251|       |            /* xacc[i] += (uint64x2_t) data_key[0, 1] * (uint64x2_t) data_key[2, 3]; */
 1252|       |            xacc[i] = vmlal_u32(xacc[i], vget_low_u32(data_key), vget_high_u32(data_key));
 1253|       |
 1254|       |#else
 1255|       |            /* On aarch64, vshrn/vmovn seems to be equivalent to, if not faster than, the vzip method. */
 1256|       |
 1257|       |            /* data_vec = xsecret[i]; */
 1258|       |            uint8x16_t const data_vec    = vld1q_u8(xinput + (i * 16));
 1259|       |            /* key_vec  = xsecret[i];  */
 1260|       |            uint8x16_t const key_vec     = vld1q_u8(xsecret  + (i * 16));
 1261|       |            /* data_key = data_vec ^ key_vec; */
 1262|       |            uint64x2_t const data_key    = vreinterpretq_u64_u8(veorq_u8(data_vec, key_vec));
 1263|       |            /* data_key_lo = (uint32x2_t) (data_key & 0xFFFFFFFF); */
 1264|       |            uint32x2_t const data_key_lo = vmovn_u64  (data_key);
 1265|       |            /* data_key_hi = (uint32x2_t) (data_key >> 32); */
 1266|       |            uint32x2_t const data_key_hi = vshrn_n_u64 (data_key, 32);
 1267|       |            if (accWidth == XXPH3_acc_64bits) {
 1268|       |                /* xacc[i] += data_vec; */
 1269|       |                xacc[i] = vaddq_u64 (xacc[i], vreinterpretq_u64_u8(data_vec));
 1270|       |            } else {  /* XXPH3_acc_128bits */
 1271|       |                /* xacc[i] += swap(data_vec); */
 1272|       |                uint64x2_t const data64 = vreinterpretq_u64_u8(data_vec);
 1273|       |                uint64x2_t const swapped= vextq_u64(data64, data64, 1);
 1274|       |                xacc[i] = vaddq_u64 (xacc[i], swapped);
 1275|       |            }
 1276|       |            /* xacc[i] += (uint64x2_t) data_key_lo * (uint64x2_t) data_key_hi; */
 1277|       |            xacc[i] = vmlal_u32 (xacc[i], data_key_lo, data_key_hi);
 1278|       |
 1279|       |#endif
 1280|       |        }
 1281|       |    }
 1282|       |
 1283|       |#elif (XXPH_VECTOR == XXPH_VSX) && /* work around a compiler bug */ (__GNUC__ > 5)
 1284|       |          U64x2* const xacc =        (U64x2*) acc;    /* presumed aligned */
 1285|       |    U64x2 const* const xinput = (U64x2 const*) input;   /* no alignment restriction */
 1286|       |    U64x2 const* const xsecret  = (U64x2 const*) secret;    /* no alignment restriction */
 1287|       |    U64x2 const v32 = { 32,  32 };
 1288|       |#if XXPH_VSX_BE
 1289|       |    U8x16 const vXorSwap  = { 0x07, 0x16, 0x25, 0x34, 0x43, 0x52, 0x61, 0x70,
 1290|       |                              0x8F, 0x9E, 0xAD, 0xBC, 0xCB, 0xDA, 0xE9, 0xF8 };
 1291|       |#endif
 1292|       |    size_t i;
 1293|       |    for (i = 0; i < STRIPE_LEN / sizeof(U64x2); i++) {
 1294|       |        /* data_vec = xinput[i]; */
 1295|       |        /* key_vec = xsecret[i]; */
 1296|       |#if XXPH_VSX_BE
 1297|       |        /* byteswap */
 1298|       |        U64x2 const data_vec = XXPH_vec_revb(vec_vsx_ld(0, xinput + i));
 1299|       |        U64x2 const key_raw = vec_vsx_ld(0, xsecret + i);
 1300|       |        /* See comment above. data_key = data_vec ^ swap(xsecret[i]); */
 1301|       |        U64x2 const data_key = (U64x2)XXPH_vec_permxor((U8x16)data_vec, (U8x16)key_raw, vXorSwap);
 1302|       |#else
 1303|       |        U64x2 const data_vec = vec_vsx_ld(0, xinput + i);
 1304|       |        U64x2 const key_vec = vec_vsx_ld(0, xsecret + i);
 1305|       |        U64x2 const data_key = data_vec ^ key_vec;
 1306|       |#endif
 1307|       |        /* shuffled = (data_key << 32) | (data_key >> 32); */
 1308|       |        U32x4 const shuffled = (U32x4)vec_rl(data_key, v32);
 1309|       |        /* product = ((U64x2)data_key & 0xFFFFFFFF) * ((U64x2)shuffled & 0xFFFFFFFF); */
 1310|       |        U64x2 const product = XXPH_vec_mulo((U32x4)data_key, shuffled);
 1311|       |        xacc[i] += product;
 1312|       |
 1313|       |        if (accWidth == XXPH3_acc_64bits) {
 1314|       |            xacc[i] += data_vec;
 1315|       |        } else {  /* XXPH3_acc_128bits */
 1316|       |            /* swap high and low halves */
 1317|       |            U64x2 const data_swapped = vec_xxpermdi(data_vec, data_vec, 2);
 1318|       |            xacc[i] += data_swapped;
 1319|       |        }
 1320|       |    }
 1321|       |
 1322|       |#else   /* scalar variant of Accumulator - universal */
 1323|       |
 1324|       |    XXPH_ALIGN(XXPH_ACC_ALIGN) xxh_u64* const xacc = (xxh_u64*) acc;    /* presumed aligned on 32-bytes boundaries, little hint for the auto-vectorizer */
 1325|       |    const xxh_u8* const xinput = (const xxh_u8*) input;  /* no alignment restriction */
 1326|       |    const xxh_u8* const xsecret  = (const xxh_u8*) secret;   /* no alignment restriction */
 1327|       |    size_t i;
 1328|       |    XXPH_ASSERT(((size_t)acc & (XXPH_ACC_ALIGN-1)) == 0);
 1329|       |    for (i=0; i < ACC_NB; i++) {
 1330|       |        xxh_u64 const data_val = XXPH_readLE64(xinput + 8*i);
 1331|       |        xxh_u64 const data_key = data_val ^ XXPH_readLE64(xsecret + i*8);
 1332|       |
 1333|       |        if (accWidth == XXPH3_acc_64bits) {
 1334|       |            xacc[i] += data_val;
 1335|       |        } else {
 1336|       |            xacc[i ^ 1] += data_val; /* swap adjacent lanes */
 1337|       |        }
 1338|       |        xacc[i] += XXPH_mult32to64(data_key & 0xFFFFFFFF, data_key >> 32);
 1339|       |    }
 1340|       |#endif
 1341|  9.65M|}
hash.cc:_ZL15XXPH3_mergeAccsPKmPKhm:
 1556|   157k|{
 1557|   157k|    xxh_u64 result64 = start;
 1558|       |
 1559|   157k|    result64 += XXPH3_mix2Accs(acc+0, secret +  0);
 1560|   157k|    result64 += XXPH3_mix2Accs(acc+2, secret + 16);
 1561|   157k|    result64 += XXPH3_mix2Accs(acc+4, secret + 32);
 1562|   157k|    result64 += XXPH3_mix2Accs(acc+6, secret + 48);
 1563|       |
 1564|   157k|    return XXPH3_avalanche(result64);
 1565|   157k|}
hash.cc:_ZL14XXPH3_mix2AccsPKmPKh:
 1548|   631k|{
 1549|   631k|    return XXPH3_mul128_fold64(
 1550|   631k|               acc[0] ^ XXPH_readLE64(secret),
 1551|   631k|               acc[1] ^ XXPH_readLE64(secret+8) );
 1552|   631k|}

_ZN7rocksdb16CompactionFilter16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPPKS0_:
   29|  9.02k|                                          const CompactionFilter** result) {
   30|  9.02k|  static std::once_flag once;
   31|  9.02k|  std::call_once(once, [&]() {
   32|  9.02k|    RegisterBuiltinCompactionFilters(*(ObjectLibrary::Default().get()), "");
   33|  9.02k|  });
   34|  9.02k|  CompactionFilter* filter = const_cast<CompactionFilter*>(*result);
   35|  9.02k|  Status status =
   36|  9.02k|      LoadStaticObject<CompactionFilter>(config_options, value, &filter);
   37|  9.02k|  if (status.ok()) {
  ------------------
  |  Branch (37:7): [True: 9.02k, False: 0]
  ------------------
   38|  9.02k|    *result = const_cast<CompactionFilter*>(filter);
   39|  9.02k|  }
   40|  9.02k|  return status;
   41|  9.02k|}
_ZN7rocksdb23CompactionFilterFactory16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIS0_EE:
   45|  9.02k|    std::shared_ptr<CompactionFilterFactory>* result) {
   46|       |  // Currently there are no builtin CompactionFilterFactories.
   47|       |  // If any are introduced, they need to be registered here.
   48|  9.02k|  Status status =
   49|  9.02k|      LoadSharedObject<CompactionFilterFactory>(config_options, value, result);
   50|  9.02k|  return status;
   51|  9.02k|}
compaction_filters.cc:_ZZN7rocksdb16CompactionFilter16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPPKS0_ENK3$_0clEv:
   31|      1|  std::call_once(once, [&]() {
   32|      1|    RegisterBuiltinCompactionFilters(*(ObjectLibrary::Default().get()), "");
   33|      1|  });
compaction_filters.cc:_ZN7rocksdbL32RegisterBuiltinCompactionFiltersERNS_13ObjectLibraryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   17|      1|                                            const std::string& /*arg*/) {
   18|      1|  library.AddFactory<CompactionFilter>(
   19|      1|      RemoveEmptyValueCompactionFilter::kClassName(),
   20|      1|      [](const std::string& /*uri*/,
   21|      1|         std::unique_ptr<CompactionFilter>* /*guard*/,
   22|      1|         std::string* /*errmsg*/) {
   23|      1|        return new RemoveEmptyValueCompactionFilter();
   24|      1|      });
   25|      1|  return 1;
   26|      1|}

_ZN7rocksdb32RemoveEmptyValueCompactionFilter10kClassNameEv:
   18|      1|  static const char* kClassName() { return "RemoveEmptyValueCompactionFilter"; }

_ZN7rocksdb13MergeOperator16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIS0_EE:
   95|  9.02k|                                       std::shared_ptr<MergeOperator>* result) {
   96|  9.02k|  static std::once_flag once;
   97|  9.02k|  std::call_once(once, [&]() {
   98|  9.02k|    RegisterBuiltinMergeOperators(*(ObjectLibrary::Default().get()), "");
   99|  9.02k|  });
  100|  9.02k|  return LoadSharedObject<MergeOperator>(config_options, value, result);
  101|  9.02k|}
merge_operators.cc:_ZZN7rocksdb13MergeOperator16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS4_10shared_ptrIS0_EEENK3$_0clEv:
   97|      1|  std::call_once(once, [&]() {
   98|      1|    RegisterBuiltinMergeOperators(*(ObjectLibrary::Default().get()), "");
   99|      1|  });
merge_operators.cc:_ZN7rocksdbL29RegisterBuiltinMergeOperatorsERNS_13ObjectLibraryERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
   24|      1|                                         const std::string& /*arg*/) {
   25|      1|  size_t num_types;
   26|      1|  library.AddFactory<MergeOperator>(
   27|      1|      ObjectLibrary::PatternEntry(StringAppendOperator::kClassName())
   28|      1|          .AnotherName(StringAppendOperator::kNickName()),
   29|      1|      [](const std::string& /*uri*/, std::unique_ptr<MergeOperator>* guard,
   30|      1|         std::string* /*errmsg*/) {
   31|      1|        guard->reset(new StringAppendOperator(","));
   32|      1|        return guard->get();
   33|      1|      });
   34|      1|  library.AddFactory<MergeOperator>(
   35|      1|      ObjectLibrary::PatternEntry(StringAppendTESTOperator::kClassName())
   36|      1|          .AnotherName(StringAppendTESTOperator::kNickName()),
   37|      1|      [](const std::string& /*uri*/, std::unique_ptr<MergeOperator>* guard,
   38|      1|         std::string* /*errmsg*/) {
   39|      1|        guard->reset(new StringAppendTESTOperator(","));
   40|      1|        return guard->get();
   41|      1|      });
   42|      1|  library.AddFactory<MergeOperator>(
   43|      1|      ObjectLibrary::PatternEntry(SortList::kClassName())
   44|      1|          .AnotherName(SortList::kNickName()),
   45|      1|      [](const std::string& /*uri*/, std::unique_ptr<MergeOperator>* guard,
   46|      1|         std::string* /*errmsg*/) {
   47|      1|        guard->reset(new SortList());
   48|      1|        return guard->get();
   49|      1|      });
   50|      1|  library.AddFactory<MergeOperator>(
   51|      1|      ObjectLibrary::PatternEntry(BytesXOROperator::kClassName())
   52|      1|          .AnotherName(BytesXOROperator::kNickName()),
   53|      1|      [](const std::string& /*uri*/, std::unique_ptr<MergeOperator>* guard,
   54|      1|         std::string* /*errmsg*/) {
   55|      1|        guard->reset(new BytesXOROperator());
   56|      1|        return guard->get();
   57|      1|      });
   58|      1|  library.AddFactory<MergeOperator>(
   59|      1|      ObjectLibrary::PatternEntry(UInt64AddOperator::kClassName())
   60|      1|          .AnotherName(UInt64AddOperator::kNickName()),
   61|      1|      [](const std::string& /*uri*/, std::unique_ptr<MergeOperator>* guard,
   62|      1|         std::string* /*errmsg*/) {
   63|      1|        guard->reset(new UInt64AddOperator());
   64|      1|        return guard->get();
   65|      1|      });
   66|      1|  library.AddFactory<MergeOperator>(
   67|      1|      ObjectLibrary::PatternEntry(MaxOperator::kClassName())
   68|      1|          .AnotherName(MaxOperator::kNickName()),
   69|      1|      [](const std::string& /*uri*/, std::unique_ptr<MergeOperator>* guard,
   70|      1|         std::string* /*errmsg*/) {
   71|      1|        guard->reset(new MaxOperator());
   72|      1|        return guard->get();
   73|      1|      });
   74|      1|  library.AddFactory<MergeOperator>(
   75|      1|      ObjectLibrary::PatternEntry(PutOperatorV2::kClassName())
   76|      1|          .AnotherName(PutOperatorV2::kNickName()),
   77|      1|      [](const std::string& /*uri*/, std::unique_ptr<MergeOperator>* guard,
   78|      1|         std::string* /*errmsg*/) {
   79|      1|        guard->reset(new PutOperatorV2());
   80|      1|        return guard->get();
   81|      1|      });
   82|      1|  library.AddFactory<MergeOperator>(
   83|      1|      ObjectLibrary::PatternEntry(PutOperator::kNickName()),
   84|      1|      [](const std::string& /*uri*/, std::unique_ptr<MergeOperator>* guard,
   85|      1|         std::string* /*errmsg*/) {
   86|      1|        guard->reset(new PutOperator());
   87|      1|        return guard->get();
   88|      1|      });
   89|       |
   90|      1|  return static_cast<int>(library.GetFactoryCount(&num_types));
   91|      1|}

_ZN7rocksdb16BytesXOROperator10kClassNameEv:
   29|      1|  static const char* kClassName() { return "BytesXOR"; }
_ZN7rocksdb16BytesXOROperator9kNickNameEv:
   30|      1|  static const char* kNickName() { return "bytesxor"; }

_ZN7rocksdb11MaxOperator10kClassNameEv:
   19|      1|  static const char* kClassName() { return "MaxOperator"; }
_ZN7rocksdb11MaxOperator9kNickNameEv:
   20|      1|  static const char* kNickName() { return "max"; }

_ZN7rocksdb11PutOperator10kClassNameEv:
   25|      1|  static const char* kClassName() { return "PutOperator"; }
_ZN7rocksdb13PutOperatorV29kNickNameEv:
   45|      1|  static const char* kNickName() { return "put"; }
_ZN7rocksdb11PutOperator9kNickNameEv:
   26|      1|  static const char* kNickName() { return "put_v1"; }

_ZN7rocksdb8SortList10kClassNameEv:
   30|      1|  static const char* kClassName() { return "MergeSortOperator"; }
_ZN7rocksdb8SortList9kNickNameEv:
   31|      1|  static const char* kNickName() { return "sortlist"; }

_ZN7rocksdb20StringAppendOperator10kClassNameEv:
   23|      1|  static const char* kClassName() { return "StringAppendOperator"; }
_ZN7rocksdb20StringAppendOperator9kNickNameEv:
   24|      1|  static const char* kNickName() { return "stringappend"; }

_ZN7rocksdb24StringAppendTESTOperator10kClassNameEv:
   36|      1|  static const char* kClassName() { return "StringAppendTESTOperator"; }
_ZN7rocksdb24StringAppendTESTOperator9kNickNameEv:
   37|      1|  static const char* kNickName() { return "stringappendtest"; }

_ZN7rocksdb17UInt64AddOperator10kClassNameEv:
   20|      1|  static const char* kClassName() { return "UInt64AddOperator"; }
_ZN7rocksdb17UInt64AddOperator9kNickNameEv:
   21|      1|  static const char* kNickName() { return "uint64add"; }

_ZNK7rocksdb13ObjectLibrary12PatternEntry13MatchesTargetERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEmSA_m:
   93|  63.1k|                                                size_t tlen) const {
   94|  63.1k|  if (separators_.empty()) {
  ------------------
  |  Branch (94:7): [True: 36.1k, False: 27.0k]
  ------------------
   95|  36.1k|    assert(optional_);  // If there are no separators, it must be only a name
   96|  36.1k|    return nlen == tlen && name == target;
  ------------------
  |  Branch (96:12): [True: 36.1k, False: 0]
  |  Branch (96:28): [True: 36.1k, False: 0]
  ------------------
   97|  36.1k|  } else if (nlen == tlen) {  // The lengths are the same
  ------------------
  |  Branch (97:14): [True: 9.02k, False: 18.0k]
  ------------------
   98|  9.02k|    return optional_ && name == target;
  ------------------
  |  Branch (98:12): [True: 9.02k, False: 0]
  |  Branch (98:25): [True: 9.02k, False: 0]
  ------------------
   99|  18.0k|  } else if (tlen < nlen + slength_) {
  ------------------
  |  Branch (99:14): [True: 9.02k, False: 9.02k]
  ------------------
  100|       |    // The target is not long enough
  101|  9.02k|    return false;
  102|  9.02k|  } else if (target.compare(0, nlen, name) != 0) {
  ------------------
  |  Branch (102:14): [True: 9.02k, False: 0]
  ------------------
  103|  9.02k|    return false;  // Target does not start with name
  104|  9.02k|  } else {
  105|       |    // Loop through all of the separators one at a time matching them.
  106|       |    // Note that we first match the separator and then its quantifiers.
  107|       |    // Since we expect the separator first, we start with an exact match
  108|       |    // Subsequent matches will use the quantifier of the previous separator
  109|      0|    size_t start = nlen;
  110|      0|    auto mode = kMatchExact;
  111|      0|    for (size_t idx = 0; idx < separators_.size(); ++idx) {
  ------------------
  |  Branch (111:26): [True: 0, False: 0]
  ------------------
  112|      0|      const auto &separator = separators_[idx];
  113|      0|      start = MatchSeparatorAt(start, mode, target, tlen, separator.first);
  114|      0|      if (start == std::string::npos) {
  ------------------
  |  Branch (114:11): [True: 0, False: 0]
  ------------------
  115|      0|        return false;
  116|      0|      } else {
  117|      0|        mode = separator.second;
  118|      0|      }
  119|      0|    }
  120|       |    // We have matched all of the separators.  Now check that what is left
  121|       |    // unmatched in the target is acceptable.
  122|      0|    if (mode == kMatchExact) {
  ------------------
  |  Branch (122:9): [True: 0, False: 0]
  ------------------
  123|      0|      return (start == tlen);
  124|      0|    } else if (start > tlen || (start == tlen && mode != kMatchZeroOrMore)) {
  ------------------
  |  Branch (124:16): [True: 0, False: 0]
  |  Branch (124:33): [True: 0, False: 0]
  |  Branch (124:50): [True: 0, False: 0]
  ------------------
  125|      0|      return false;
  126|      0|    } else if (mode == kMatchInteger) {
  ------------------
  |  Branch (126:16): [True: 0, False: 0]
  ------------------
  127|      0|      return MatchesInteger(target, start, tlen);
  128|      0|    } else if (mode == kMatchDecimal) {
  ------------------
  |  Branch (128:16): [True: 0, False: 0]
  ------------------
  129|      0|      return MatchesDecimal(target, start, tlen);
  130|      0|    }
  131|      0|  }
  132|      0|  return true;
  133|  63.1k|}
_ZNK7rocksdb13ObjectLibrary12PatternEntry7MatchesERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
  135|  54.1k|bool ObjectLibrary::PatternEntry::Matches(const std::string &target) const {
  136|  54.1k|  auto tlen = target.size();
  137|  54.1k|  if (MatchesTarget(name_, nlength_, target, tlen)) {
  ------------------
  |  Branch (137:7): [True: 45.1k, False: 9.02k]
  ------------------
  138|  45.1k|    return true;
  139|  45.1k|  } else if (!names_.empty()) {
  ------------------
  |  Branch (139:14): [True: 9.02k, False: 0]
  ------------------
  140|  9.02k|    for (const auto &alt : names_) {
  ------------------
  |  Branch (140:26): [True: 9.02k, False: 9.02k]
  ------------------
  141|  9.02k|      if (MatchesTarget(alt, alt.size(), target, tlen)) {
  ------------------
  |  Branch (141:11): [True: 0, False: 9.02k]
  ------------------
  142|      0|        return true;
  143|      0|      }
  144|  9.02k|    }
  145|  9.02k|  }
  146|  9.02k|  return false;
  147|  54.1k|}
_ZNK7rocksdb13ObjectLibrary15GetFactoryCountEPm:
  149|      3|size_t ObjectLibrary::GetFactoryCount(size_t *types) const {
  150|      3|  std::unique_lock<std::mutex> lock(mu_);
  151|      3|  *types = factories_.size();
  152|      3|  size_t factories = 0;
  153|     21|  for (const auto &e : factories_) {
  ------------------
  |  Branch (153:22): [True: 21, False: 3]
  ------------------
  154|     21|    factories += e.second.size();
  155|     21|  }
  156|      3|  return factories;
  157|      3|}
_ZN7rocksdb13ObjectLibrary7DefaultEv:
  208|     12|std::shared_ptr<ObjectLibrary> &ObjectLibrary::Default() {
  209|       |  // Use avoid destruction here so the default ObjectLibrary will not be
  210|       |  // statically destroyed and long-lived.
  211|     12|  STATIC_AVOID_DESTRUCTION(std::shared_ptr<ObjectLibrary>, instance)
  ------------------
  |  |   53|     12|#define STATIC_AVOID_DESTRUCTION(Type, name) static Type& name = *new Type
  ------------------
  212|     12|  (std::make_shared<ObjectLibrary>("default"));
  213|     12|  return instance;
  214|     12|}
_ZN7rocksdb14ObjectRegistryC2ERKNSt3__110shared_ptrINS_13ObjectLibraryEEE:
  216|      1|ObjectRegistry::ObjectRegistry(const std::shared_ptr<ObjectLibrary> &library) {
  217|      1|  libraries_.push_back(library);
  218|      1|  for (const auto &b : builtins_) {
  ------------------
  |  Branch (218:22): [True: 0, False: 1]
  ------------------
  219|      0|    RegisterPlugin(b.first, b.second);
  220|      0|  }
  221|      1|}
_ZN7rocksdb14ObjectRegistry7DefaultEv:
  223|  13.5k|std::shared_ptr<ObjectRegistry> ObjectRegistry::Default() {
  224|       |  // Use avoid destruction here so the default ObjectRegistry will not be
  225|       |  // statically destroyed and long-lived.
  226|  13.5k|  STATIC_AVOID_DESTRUCTION(std::shared_ptr<ObjectRegistry>, instance)
  ------------------
  |  |   53|  13.5k|#define STATIC_AVOID_DESTRUCTION(Type, name) static Type& name = *new Type
  ------------------
  227|  13.5k|  (std::make_shared<ObjectRegistry>(ObjectLibrary::Default()));
  228|  13.5k|  return instance;
  229|  13.5k|}
_ZN7rocksdb14ObjectRegistry11NewInstanceEv:
  231|  13.5k|std::shared_ptr<ObjectRegistry> ObjectRegistry::NewInstance() {
  232|  13.5k|  return std::make_shared<ObjectRegistry>(Default());
  233|  13.5k|}

_ZN7rocksdb9WalFilter16CreateFromStringERKNS_13ConfigOptionsERKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPPS0_:
   17|  9.02k|                                   WalFilter** filter) {
   18|  9.02k|  Status s = LoadStaticObject<WalFilter>(config_options, value, filter);
   19|  9.02k|  return s;
   20|  9.02k|}

_ZN6google8protobuf15DownCastMessageI12DBOperationsEEPT_PNS0_7MessageE:
   53|  4.51k|T* DownCastMessage(Message* message) {
   54|  4.51k|  return DownCastToGenerated<T>(message);
   55|  4.51k|}

