/Users/deen/code/yugabyte-db/src/yb/rocksdb/util/autovector.h
Line | Count | Source |
1 | | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. |
2 | | // This source code is licensed under the BSD-style license found in the |
3 | | // LICENSE file in the root directory of this source tree. An additional grant |
4 | | // of patent rights can be found in the PATENTS file in the same directory. |
5 | | // |
6 | | // The following only applies to changes made to this file as part of YugaByte development. |
7 | | // |
8 | | // Portions Copyright (c) YugaByte, Inc. |
9 | | // |
10 | | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
11 | | // in compliance with the License. You may obtain a copy of the License at |
12 | | // |
13 | | // http://www.apache.org/licenses/LICENSE-2.0 |
14 | | // |
15 | | // Unless required by applicable law or agreed to in writing, software distributed under the License |
16 | | // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
17 | | // or implied. See the License for the specific language governing permissions and limitations |
18 | | // under the License. |
19 | | // |
20 | | #pragma once |
21 | | |
22 | | #include <algorithm> |
23 | | #include <cassert> |
24 | | #include <vector> |
25 | | |
26 | | namespace rocksdb { |
27 | | |
28 | | #ifdef ROCKSDB_LITE |
29 | | template <class T, size_t kSize = 8> |
30 | | class autovector : public std::vector<T> {}; |
31 | | #else |
32 | | // A vector that leverages pre-allocated stack-based array to achieve better |
33 | | // performance for array with small amount of items. |
34 | | // |
35 | | // The interface resembles that of vector, but with less features since we aim |
36 | | // to solve the problem that we have in hand, rather than implementing a |
37 | | // full-fledged generic container. |
38 | | // |
39 | | // Currently we don't support: |
40 | | // * reserve()/shrink_to_fit() |
41 | | // If used correctly, in most cases, people should not touch the |
42 | | // underlying vector at all. |
43 | | // * random insert()/erase(), please only use push_back()/pop_back(). |
44 | | // * No move/swap operations. Each autovector instance has a |
45 | | // stack-allocated array and if we want support move/swap operations, we |
46 | | // need to copy the arrays other than just swapping the pointers. In this |
47 | | // case we'll just explicitly forbid these operations since they may |
48 | | // lead users to make false assumption by thinking they are inexpensive |
49 | | // operations. |
50 | | // |
51 | | // Naming style of public methods almost follows that of the STL's. |
52 | | template <class T, size_t kSize = 8> |
53 | | class autovector { |
54 | | public: |
55 | | // General STL-style container member types. |
56 | | typedef T value_type; |
57 | | typedef typename std::vector<T>::difference_type difference_type; |
58 | | typedef typename std::vector<T>::size_type size_type; |
59 | | typedef value_type& reference; |
60 | | typedef const value_type& const_reference; |
61 | | typedef value_type* pointer; |
62 | | typedef const value_type* const_pointer; |
63 | | |
64 | | // This class is the base for regular/const iterator |
65 | | template <class TAutoVector, class TValueType> |
66 | | class iterator_impl { |
67 | | public: |
68 | | // -- iterator traits |
69 | | typedef iterator_impl<TAutoVector, TValueType> self_type; |
70 | | typedef TValueType value_type; |
71 | | typedef TValueType& reference; |
72 | | typedef TValueType* pointer; |
73 | | typedef typename TAutoVector::difference_type difference_type; |
74 | | typedef std::random_access_iterator_tag iterator_category; |
75 | | |
76 | | iterator_impl(TAutoVector* vect, size_t index) |
77 | 433M | : vect_(vect), index_(index) {} _ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIS8_S7_EC2EPS8_m Line | Count | Source | 77 | 644k | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIKS8_KS7_EC2EPSA_m Line | Count | Source | 77 | 8.00k | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIS3_S2_EC2EPS3_m Line | Count | Source | 77 | 52.4M | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE13iterator_implIS3_S2_EC2EPS3_m Line | Count | Source | 77 | 5.92M | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE13iterator_implIS4_S3_EC2EPS4_m Line | Count | Source | 77 | 3.59M | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorIPvLm8EE13iterator_implIS2_S1_EC2EPS2_m Line | Count | Source | 77 | 2.00M | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIS3_S2_EC2EPS3_m Line | Count | Source | 77 | 261k | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorIPNS_11TableReaderELm16EE13iterator_implIS3_S2_EC2EPS3_m Line | Count | Source | 77 | 2 | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_EC2EPS8_m Line | Count | Source | 77 | 28 | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm1EE13iterator_implIS4_S3_EC2EPS4_m Line | Count | Source | 77 | 12 | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EE13iterator_implIS4_S3_EC2EPS4_m Line | Count | Source | 77 | 88.3M | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIKS3_KS2_EC2EPS5_m Line | Count | Source | 77 | 100k | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EE13iterator_implIS2_S1_EC2EPS2_m Line | Count | Source | 77 | 304 | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIS2_S1_EC2EPS2_m Line | Count | Source | 77 | 62.2M | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIKS2_KS1_EC2EPS4_m Line | Count | Source | 77 | 470k | : vect_(vect), index_(index) {} |
cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIS4_S3_EC2EPS4_m Line | Count | Source | 77 | 216M | : vect_(vect), index_(index) {} |
Unexecuted instantiation: cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIKS4_KS3_EC2EPS6_m _ZN7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE13iterator_implIS4_S3_EC2EPS4_m Line | Count | Source | 77 | 379k | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIS1_jEC2EPS1_m Line | Count | Source | 77 | 1.11M | : vect_(vect), index_(index) {} |
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIKS1_KjEC2EPS3_m Line | Count | Source | 77 | 4.12k | : vect_(vect), index_(index) {} |
|
78 | | iterator_impl(const iterator_impl&) = default; |
79 | 434M | ~iterator_impl() {} _ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIS8_S7_ED2Ev Line | Count | Source | 79 | 692k | ~iterator_impl() {} |
_ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIKS8_KS7_ED2Ev Line | Count | Source | 79 | 48.0k | ~iterator_impl() {} |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIS3_S2_ED2Ev Line | Count | Source | 79 | 52.4M | ~iterator_impl() {} |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE13iterator_implIS3_S2_ED2Ev Line | Count | Source | 79 | 5.92M | ~iterator_impl() {} |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE13iterator_implIS4_S3_ED2Ev Line | Count | Source | 79 | 3.59M | ~iterator_impl() {} |
_ZN7rocksdb10autovectorIPvLm8EE13iterator_implIS2_S1_ED2Ev Line | Count | Source | 79 | 2.00M | ~iterator_impl() {} |
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIS3_S2_ED2Ev Line | Count | Source | 79 | 261k | ~iterator_impl() {} |
_ZN7rocksdb10autovectorIPNS_11TableReaderELm16EE13iterator_implIS3_S2_ED2Ev Line | Count | Source | 79 | 2 | ~iterator_impl() {} |
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_ED2Ev Line | Count | Source | 79 | 28 | ~iterator_impl() {} |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm1EE13iterator_implIS4_S3_ED2Ev Line | Count | Source | 79 | 12 | ~iterator_impl() {} |
_ZN7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EE13iterator_implIS4_S3_ED2Ev Line | Count | Source | 79 | 88.3M | ~iterator_impl() {} |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIKS3_KS2_ED2Ev Line | Count | Source | 79 | 100k | ~iterator_impl() {} |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EE13iterator_implIS2_S1_ED2Ev Line | Count | Source | 79 | 304 | ~iterator_impl() {} |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIS2_S1_ED2Ev Line | Count | Source | 79 | 62.3M | ~iterator_impl() {} |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIKS2_KS1_ED2Ev Line | Count | Source | 79 | 470k | ~iterator_impl() {} |
cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIS4_S3_ED2Ev Line | Count | Source | 79 | 216M | ~iterator_impl() {} |
Unexecuted instantiation: cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIKS4_KS3_ED2Ev _ZN7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE13iterator_implIS4_S3_ED2Ev Line | Count | Source | 79 | 379k | ~iterator_impl() {} |
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIS1_jED2Ev Line | Count | Source | 79 | 1.11M | ~iterator_impl() {} |
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIKS1_KjED2Ev Line | Count | Source | 79 | 4.14k | ~iterator_impl() {} |
|
80 | | iterator_impl& operator=(const iterator_impl&) = default; |
81 | | |
82 | | // -- Advancement |
83 | | // ++iterator |
84 | 82.2M | self_type& operator++() { |
85 | 82.2M | ++index_; |
86 | 82.2M | return *this; |
87 | 82.2M | } _ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIS8_S7_EppEv Line | Count | Source | 84 | 2.80M | self_type& operator++() { | 85 | 2.80M | ++index_; | 86 | 2.80M | return *this; | 87 | 2.80M | } |
_ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIKS8_KS7_EppEv Line | Count | Source | 84 | 8.00k | self_type& operator++() { | 85 | 8.00k | ++index_; | 86 | 8.00k | return *this; | 87 | 8.00k | } |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIS3_S2_EppEv Line | Count | Source | 84 | 25.4k | self_type& operator++() { | 85 | 25.4k | ++index_; | 86 | 25.4k | return *this; | 87 | 25.4k | } |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE13iterator_implIS3_S2_EppEv Line | Count | Source | 84 | 56.1k | self_type& operator++() { | 85 | 56.1k | ++index_; | 86 | 56.1k | return *this; | 87 | 56.1k | } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE13iterator_implIS4_S3_EppEv Line | Count | Source | 84 | 20.1k | self_type& operator++() { | 85 | 20.1k | ++index_; | 86 | 20.1k | return *this; | 87 | 20.1k | } |
_ZN7rocksdb10autovectorIPvLm8EE13iterator_implIS2_S1_EppEv Line | Count | Source | 84 | 70.7k | self_type& operator++() { | 85 | 70.7k | ++index_; | 86 | 70.7k | return *this; | 87 | 70.7k | } |
Unexecuted instantiation: _ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIS3_S2_EppEv _ZN7rocksdb10autovectorIPNS_11TableReaderELm16EE13iterator_implIS3_S2_EppEv Line | Count | Source | 84 | 6 | self_type& operator++() { | 85 | 6 | ++index_; | 86 | 6 | return *this; | 87 | 6 | } |
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_EppEv Line | Count | Source | 84 | 14 | self_type& operator++() { | 85 | 14 | ++index_; | 86 | 14 | return *this; | 87 | 14 | } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm1EE13iterator_implIS4_S3_EppEv Line | Count | Source | 84 | 8 | self_type& operator++() { | 85 | 8 | ++index_; | 86 | 8 | return *this; | 87 | 8 | } |
_ZN7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EE13iterator_implIS4_S3_EppEv Line | Count | Source | 84 | 47.9M | self_type& operator++() { | 85 | 47.9M | ++index_; | 86 | 47.9M | return *this; | 87 | 47.9M | } |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIKS3_KS2_EppEv Line | Count | Source | 84 | 50.9k | self_type& operator++() { | 85 | 50.9k | ++index_; | 86 | 50.9k | return *this; | 87 | 50.9k | } |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EE13iterator_implIS2_S1_EppEv Line | Count | Source | 84 | 88 | self_type& operator++() { | 85 | 88 | ++index_; | 86 | 88 | return *this; | 87 | 88 | } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIS2_S1_EppEv Line | Count | Source | 84 | 27.3M | self_type& operator++() { | 85 | 27.3M | ++index_; | 86 | 27.3M | return *this; | 87 | 27.3M | } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIKS2_KS1_EppEv Line | Count | Source | 84 | 3.10M | self_type& operator++() { | 85 | 3.10M | ++index_; | 86 | 3.10M | return *this; | 87 | 3.10M | } |
cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIS4_S3_EppEv Line | Count | Source | 84 | 498k | self_type& operator++() { | 85 | 498k | ++index_; | 86 | 498k | return *this; | 87 | 498k | } |
Unexecuted instantiation: cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIKS4_KS3_EppEv _ZN7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE13iterator_implIS4_S3_EppEv Line | Count | Source | 84 | 252k | self_type& operator++() { | 85 | 252k | ++index_; | 86 | 252k | return *this; | 87 | 252k | } |
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIKS1_KjEppEv Line | Count | Source | 84 | 12 | self_type& operator++() { | 85 | 12 | ++index_; | 86 | 12 | return *this; | 87 | 12 | } |
|
88 | | |
89 | | // iterator++ |
90 | 8.00k | self_type operator++(int) { |
91 | 8.00k | auto old = *this; |
92 | 8.00k | ++index_; |
93 | 8.00k | return old; |
94 | 8.00k | } |
95 | | |
96 | | // --iterator |
97 | 32.0k | self_type& operator--() { |
98 | 32.0k | --index_; |
99 | 32.0k | return *this; |
100 | 32.0k | } _ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIS8_S7_EmmEv Line | Count | Source | 97 | 16.0k | self_type& operator--() { | 98 | 16.0k | --index_; | 99 | 16.0k | return *this; | 100 | 16.0k | } |
_ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIKS8_KS7_EmmEv Line | Count | Source | 97 | 16.0k | self_type& operator--() { | 98 | 16.0k | --index_; | 99 | 16.0k | return *this; | 100 | 16.0k | } |
|
101 | | |
102 | | // iterator-- |
103 | | self_type operator--(int) { |
104 | | auto old = *this; |
105 | | --index_; |
106 | | return old; |
107 | | } |
108 | | |
109 | 6.68M | self_type operator-(difference_type len) { |
110 | 6.68M | return self_type(vect_, index_ - len); |
111 | 6.68M | } _ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIS8_S7_EmiEl Line | Count | Source | 109 | 4.00k | self_type operator-(difference_type len) { | 110 | 4.00k | return self_type(vect_, index_ - len); | 111 | 4.00k | } |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIS3_S2_EmiEl Line | Count | Source | 109 | 25.0k | self_type operator-(difference_type len) { | 110 | 25.0k | return self_type(vect_, index_ - len); | 111 | 25.0k | } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIS2_S1_EmiEl Line | Count | Source | 109 | 6.09M | self_type operator-(difference_type len) { | 110 | 6.09M | return self_type(vect_, index_ - len); | 111 | 6.09M | } |
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIS1_jEmiEl Line | Count | Source | 109 | 556k | self_type operator-(difference_type len) { | 110 | 556k | return self_type(vect_, index_ - len); | 111 | 556k | } |
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIKS1_KjEmiEl Line | Count | Source | 109 | 2.05k | self_type operator-(difference_type len) { | 110 | 2.05k | return self_type(vect_, index_ - len); | 111 | 2.05k | } |
|
112 | | |
113 | 4.00k | difference_type operator-(const self_type& other) { |
114 | 4.00k | assert(vect_ == other.vect_); |
115 | 4.00k | return index_ - other.index_; |
116 | 4.00k | } _ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIS8_S7_EmiERKSA_ Line | Count | Source | 113 | 4.00k | difference_type operator-(const self_type& other) { | 114 | 4.00k | assert(vect_ == other.vect_); | 115 | 4.00k | return index_ - other.index_; | 116 | 4.00k | } |
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIKS1_KjEmiERKS5_ Line | Count | Source | 113 | 3 | difference_type operator-(const self_type& other) { | 114 | 3 | assert(vect_ == other.vect_); | 115 | 3 | return index_ - other.index_; | 116 | 3 | } |
|
117 | | |
118 | 4.00k | self_type operator+(difference_type len) { |
119 | 4.00k | return self_type(vect_, index_ + len); |
120 | 4.00k | } |
121 | | |
122 | 4.00k | self_type& operator+=(difference_type len) { |
123 | 4.00k | index_ += len; |
124 | 4.00k | return *this; |
125 | 4.00k | } |
126 | | |
127 | | self_type& operator-=(difference_type len) { |
128 | | index_ -= len; |
129 | | return *this; |
130 | | } |
131 | | |
132 | | // -- Reference |
133 | 86.1M | reference operator*() { |
134 | 86.1M | assert(vect_->size() >= index_); |
135 | 86.1M | return (*vect_)[index_]; |
136 | 86.1M | } _ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIS8_S7_EdeEv Line | Count | Source | 133 | 40.0k | reference operator*() { | 134 | 40.0k | assert(vect_->size() >= index_); | 135 | 40.0k | return (*vect_)[index_]; | 136 | 40.0k | } |
_ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIKS8_KS7_EdeEv Line | Count | Source | 133 | 16.0k | reference operator*() { | 134 | 16.0k | assert(vect_->size() >= index_); | 135 | 16.0k | return (*vect_)[index_]; | 136 | 16.0k | } |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIS3_S2_EdeEv Line | Count | Source | 133 | 50.5k | reference operator*() { | 134 | 50.5k | assert(vect_->size() >= index_); | 135 | 50.5k | return (*vect_)[index_]; | 136 | 50.5k | } |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE13iterator_implIS3_S2_EdeEv Line | Count | Source | 133 | 56.1k | reference operator*() { | 134 | 56.1k | assert(vect_->size() >= index_); | 135 | 56.1k | return (*vect_)[index_]; | 136 | 56.1k | } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE13iterator_implIS4_S3_EdeEv Line | Count | Source | 133 | 20.1k | reference operator*() { | 134 | 20.1k | assert(vect_->size() >= index_); | 135 | 20.1k | return (*vect_)[index_]; | 136 | 20.1k | } |
_ZN7rocksdb10autovectorIPvLm8EE13iterator_implIS2_S1_EdeEv Line | Count | Source | 133 | 70.7k | reference operator*() { | 134 | 70.7k | assert(vect_->size() >= index_); | 135 | 70.7k | return (*vect_)[index_]; | 136 | 70.7k | } |
Unexecuted instantiation: _ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIS3_S2_EdeEv _ZN7rocksdb10autovectorIPNS_11TableReaderELm16EE13iterator_implIS3_S2_EdeEv Line | Count | Source | 133 | 6 | reference operator*() { | 134 | 6 | assert(vect_->size() >= index_); | 135 | 6 | return (*vect_)[index_]; | 136 | 6 | } |
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_EdeEv Line | Count | Source | 133 | 14 | reference operator*() { | 134 | 14 | assert(vect_->size() >= index_); | 135 | 14 | return (*vect_)[index_]; | 136 | 14 | } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm1EE13iterator_implIS4_S3_EdeEv Line | Count | Source | 133 | 8 | reference operator*() { | 134 | 8 | assert(vect_->size() >= index_); | 135 | 8 | return (*vect_)[index_]; | 136 | 8 | } |
_ZN7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EE13iterator_implIS4_S3_EdeEv Line | Count | Source | 133 | 47.9M | reference operator*() { | 134 | 47.9M | assert(vect_->size() >= index_); | 135 | 47.9M | return (*vect_)[index_]; | 136 | 47.9M | } |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIKS3_KS2_EdeEv Line | Count | Source | 133 | 50.9k | reference operator*() { | 134 | 50.9k | assert(vect_->size() >= index_); | 135 | 50.9k | return (*vect_)[index_]; | 136 | 50.9k | } |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EE13iterator_implIS2_S1_EdeEv Line | Count | Source | 133 | 88 | reference operator*() { | 134 | 88 | assert(vect_->size() >= index_); | 135 | 88 | return (*vect_)[index_]; | 136 | 88 | } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIS2_S1_EdeEv Line | Count | Source | 133 | 33.4M | reference operator*() { | 134 | 33.4M | assert(vect_->size() >= index_); | 135 | 33.4M | return (*vect_)[index_]; | 136 | 33.4M | } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIKS2_KS1_EdeEv Line | Count | Source | 133 | 3.10M | reference operator*() { | 134 | 3.10M | assert(vect_->size() >= index_); | 135 | 3.10M | return (*vect_)[index_]; | 136 | 3.10M | } |
cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIS4_S3_EdeEv Line | Count | Source | 133 | 498k | reference operator*() { | 134 | 498k | assert(vect_->size() >= index_); | 135 | 498k | return (*vect_)[index_]; | 136 | 498k | } |
Unexecuted instantiation: cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIKS4_KS3_EdeEv _ZN7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE13iterator_implIS4_S3_EdeEv Line | Count | Source | 133 | 252k | reference operator*() { | 134 | 252k | assert(vect_->size() >= index_); | 135 | 252k | return (*vect_)[index_]; | 136 | 252k | } |
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIS1_jEdeEv Line | Count | Source | 133 | 556k | reference operator*() { | 134 | 556k | assert(vect_->size() >= index_); | 135 | 556k | return (*vect_)[index_]; | 136 | 556k | } |
_ZN7rocksdb10autovectorIjLm8EE13iterator_implIKS1_KjEdeEv Line | Count | Source | 133 | 2.07k | reference operator*() { | 134 | 2.07k | assert(vect_->size() >= index_); | 135 | 2.07k | return (*vect_)[index_]; | 136 | 2.07k | } |
|
137 | 2.80M | pointer operator->() { |
138 | 2.80M | assert(vect_->size() >= index_); |
139 | 2.80M | return &(*vect_)[index_]; |
140 | 2.80M | } |
141 | | |
142 | | // -- Logical Operators |
143 | 292M | bool operator==(const self_type& other) const { |
144 | 292M | assert(vect_ == other.vect_); |
145 | 292M | return index_ == other.index_; |
146 | 292M | } _ZNK7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIKS8_KS7_EeqERKSC_ Line | Count | Source | 143 | 16.0k | bool operator==(const self_type& other) const { | 144 | 16.0k | assert(vect_ == other.vect_); | 145 | 16.0k | return index_ == other.index_; | 146 | 16.0k | } |
_ZNK7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIS8_S7_EeqERKSA_ Line | Count | Source | 143 | 3.13M | bool operator==(const self_type& other) const { | 144 | 3.13M | assert(vect_ == other.vect_); | 145 | 3.13M | return index_ == other.index_; | 146 | 3.13M | } |
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIS3_S2_EeqERKS5_ Line | Count | Source | 143 | 26.2M | bool operator==(const self_type& other) const { | 144 | 26.2M | assert(vect_ == other.vect_); | 145 | 26.2M | return index_ == other.index_; | 146 | 26.2M | } |
_ZNK7rocksdb10autovectorIPNS_12SuperVersionELm8EE13iterator_implIS3_S2_EeqERKS5_ Line | Count | Source | 143 | 3.01M | bool operator==(const self_type& other) const { | 144 | 3.01M | assert(vect_ == other.vect_); | 145 | 3.01M | return index_ == other.index_; | 146 | 3.01M | } |
_ZNK7rocksdb10autovectorIPNS_3log6WriterELm8EE13iterator_implIS4_S3_EeqERKS6_ Line | Count | Source | 143 | 1.81M | bool operator==(const self_type& other) const { | 144 | 1.81M | assert(vect_ == other.vect_); | 145 | 1.81M | return index_ == other.index_; | 146 | 1.81M | } |
_ZNK7rocksdb10autovectorIPvLm8EE13iterator_implIS2_S1_EeqERKS4_ Line | Count | Source | 143 | 1.07M | bool operator==(const self_type& other) const { | 144 | 1.07M | assert(vect_ == other.vect_); | 145 | 1.07M | return index_ == other.index_; | 146 | 1.07M | } |
_ZNK7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIS3_S2_EeqERKS5_ Line | Count | Source | 143 | 130k | bool operator==(const self_type& other) const { | 144 | 130k | assert(vect_ == other.vect_); | 145 | 130k | return index_ == other.index_; | 146 | 130k | } |
_ZNK7rocksdb10autovectorIPNS_11TableReaderELm16EE13iterator_implIS3_S2_EeqERKS5_ Line | Count | Source | 143 | 7 | bool operator==(const self_type& other) const { | 144 | 7 | assert(vect_ == other.vect_); | 145 | 7 | return index_ == other.index_; | 146 | 7 | } |
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_EeqERKSA_ Line | Count | Source | 143 | 28 | bool operator==(const self_type& other) const { | 144 | 28 | assert(vect_ == other.vect_); | 145 | 28 | return index_ == other.index_; | 146 | 28 | } |
_ZNK7rocksdb10autovectorIPNS_3log6WriterELm1EE13iterator_implIS4_S3_EeqERKS6_ Line | Count | Source | 143 | 14 | bool operator==(const self_type& other) const { | 144 | 14 | assert(vect_ == other.vect_); | 145 | 14 | return index_ == other.index_; | 146 | 14 | } |
_ZNK7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EE13iterator_implIS4_S3_EeqERKS6_ Line | Count | Source | 143 | 92.1M | bool operator==(const self_type& other) const { | 144 | 92.1M | assert(vect_ == other.vect_); | 145 | 92.1M | return index_ == other.index_; | 146 | 92.1M | } |
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIKS3_KS2_EeqERKS7_ Line | Count | Source | 143 | 101k | bool operator==(const self_type& other) const { | 144 | 101k | assert(vect_ == other.vect_); | 145 | 101k | return index_ == other.index_; | 146 | 101k | } |
_ZNK7rocksdb10autovectorINS_15LevelFilesBriefELm8EE13iterator_implIS2_S1_EeqERKS4_ Line | Count | Source | 143 | 240 | bool operator==(const self_type& other) const { | 144 | 240 | assert(vect_ == other.vect_); | 145 | 240 | return index_ == other.index_; | 146 | 240 | } |
_ZNK7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIS2_S1_EeqERKS4_ Line | Count | Source | 143 | 52.4M | bool operator==(const self_type& other) const { | 144 | 52.4M | assert(vect_ == other.vect_); | 145 | 52.4M | return index_ == other.index_; | 146 | 52.4M | } |
_ZNK7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIKS2_KS1_EeqERKS6_ Line | Count | Source | 143 | 3.33M | bool operator==(const self_type& other) const { | 144 | 3.33M | assert(vect_ == other.vect_); | 145 | 3.33M | return index_ == other.index_; | 146 | 3.33M | } |
cache.cc:_ZNK7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIS4_S3_EeqERKS6_ Line | Count | Source | 143 | 108M | bool operator==(const self_type& other) const { | 144 | 108M | assert(vect_ == other.vect_); | 145 | 108M | return index_ == other.index_; | 146 | 108M | } |
Unexecuted instantiation: cache.cc:_ZNK7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIKS4_KS3_EeqERKS8_ _ZNK7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE13iterator_implIS4_S3_EeqERKS6_ Line | Count | Source | 143 | 441k | bool operator==(const self_type& other) const { | 144 | 441k | assert(vect_ == other.vect_); | 145 | 441k | return index_ == other.index_; | 146 | 441k | } |
_ZNK7rocksdb10autovectorIjLm8EE13iterator_implIKS1_KjEeqERKS5_ Line | Count | Source | 143 | 15 | bool operator==(const self_type& other) const { | 144 | 15 | assert(vect_ == other.vect_); | 145 | 15 | return index_ == other.index_; | 146 | 15 | } |
|
147 | | |
148 | 292M | bool operator!=(const self_type& other) const { return !(*this == other); } _ZNK7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIS8_S7_EneERKSA_ Line | Count | Source | 148 | 3.12M | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE13iterator_implIKS8_KS7_EneERKSC_ Line | Count | Source | 148 | 16.0k | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIS3_S2_EneERKS5_ Line | Count | Source | 148 | 26.2M | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorIPNS_12SuperVersionELm8EE13iterator_implIS3_S2_EneERKS5_ Line | Count | Source | 148 | 3.01M | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorIPNS_3log6WriterELm8EE13iterator_implIS4_S3_EneERKS6_ Line | Count | Source | 148 | 1.81M | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorIPvLm8EE13iterator_implIS2_S1_EneERKS4_ Line | Count | Source | 148 | 1.07M | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE13iterator_implIS3_S2_EneERKS5_ Line | Count | Source | 148 | 130k | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorIPNS_11TableReaderELm16EE13iterator_implIS3_S2_EneERKS5_ Line | Count | Source | 148 | 7 | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE13iterator_implIKS6_KS5_EneERKSA_ Line | Count | Source | 148 | 28 | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorIPNS_3log6WriterELm1EE13iterator_implIS4_S3_EneERKS6_ Line | Count | Source | 148 | 14 | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EE13iterator_implIS4_S3_EneERKS6_ Line | Count | Source | 148 | 92.1M | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EE13iterator_implIKS3_KS2_EneERKS7_ Line | Count | Source | 148 | 101k | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorINS_15LevelFilesBriefELm8EE13iterator_implIS2_S1_EneERKS4_ Line | Count | Source | 148 | 240 | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIS2_S1_EneERKS4_ Line | Count | Source | 148 | 52.4M | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorINS_15IteratorWrapperELm4EE13iterator_implIKS2_KS1_EneERKS6_ Line | Count | Source | 148 | 3.33M | bool operator!=(const self_type& other) const { return !(*this == other); } |
cache.cc:_ZNK7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIS4_S3_EneERKS6_ Line | Count | Source | 148 | 108M | bool operator!=(const self_type& other) const { return !(*this == other); } |
Unexecuted instantiation: cache.cc:_ZNK7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE13iterator_implIKS4_KS3_EneERKS8_ _ZNK7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE13iterator_implIS4_S3_EneERKS6_ Line | Count | Source | 148 | 441k | bool operator!=(const self_type& other) const { return !(*this == other); } |
_ZNK7rocksdb10autovectorIjLm8EE13iterator_implIKS1_KjEneERKS5_ Line | Count | Source | 148 | 15 | bool operator!=(const self_type& other) const { return !(*this == other); } |
|
149 | | |
150 | | bool operator>(const self_type& other) const { |
151 | | assert(vect_ == other.vect_); |
152 | | return index_ > other.index_; |
153 | | } |
154 | | |
155 | 1 | bool operator<(const self_type& other) const { |
156 | 1 | assert(vect_ == other.vect_); |
157 | 1 | return index_ < other.index_; |
158 | 1 | } |
159 | | |
160 | 4.00k | bool operator>=(const self_type& other) const { |
161 | 4.00k | assert(vect_ == other.vect_); |
162 | 4.00k | return index_ >= other.index_; |
163 | 4.00k | } |
164 | | |
165 | 4.00k | bool operator<=(const self_type& other) const { |
166 | 4.00k | assert(vect_ == other.vect_); |
167 | 4.00k | return index_ <= other.index_; |
168 | 4.00k | } |
169 | | |
170 | | private: |
171 | | TAutoVector* vect_ = nullptr; |
172 | | size_t index_ = 0; |
173 | | }; |
174 | | |
175 | | typedef iterator_impl<autovector, value_type> iterator; |
176 | | typedef iterator_impl<const autovector, const value_type> const_iterator; |
177 | | typedef std::reverse_iterator<iterator> reverse_iterator; |
178 | | typedef std::reverse_iterator<const_iterator> const_reverse_iterator; |
179 | | |
180 | 183M | autovector() = default; _ZN7rocksdb10autovectorImLm8EEC2Ev Line | Count | Source | 180 | 6 | autovector() = default; |
_ZN7rocksdb10autovectorINSt3__14pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEELm8EEC2Ev Line | Count | Source | 180 | 1 | autovector() = default; |
_ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EEC2Ev Line | Count | Source | 180 | 500k | autovector() = default; |
_ZN7rocksdb10autovectorIyLm8EEC2Ev Line | Count | Source | 180 | 500k | autovector() = default; |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EEC2Ev Line | Count | Source | 180 | 26.2M | autovector() = default; |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EEC2Ev Line | Count | Source | 180 | 2.96M | autovector() = default; |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EEC2Ev Line | Count | Source | 180 | 1.81M | autovector() = default; |
_ZN7rocksdb10autovectorIPvLm8EEC2Ev Line | Count | Source | 180 | 1.00M | autovector() = default; |
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EEC2Ev Line | Count | Source | 180 | 130k | autovector() = default; |
_ZN7rocksdb10autovectorIPNS_11TableReaderELm16EEC2Ev Line | Count | Source | 180 | 1 | autovector() = default; |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm2EEC2Ev Line | Count | Source | 180 | 23.0k | autovector() = default; |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm1EEC2Ev Line | Count | Source | 180 | 7 | autovector() = default; |
_ZN7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EEC2Ev Line | Count | Source | 180 | 22.7M | autovector() = default; |
_ZN7rocksdb10autovectorINS_11FileIndexer10IndexLevelELm8EEC2Ev Line | Count | Source | 180 | 1.34M | autovector() = default; |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EEC2Ev Line | Count | Source | 180 | 1.34M | autovector() = default; |
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EEC2Ev Line | Count | Source | 180 | 1.34M | autovector() = default; |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EEC2Ev Line | Count | Source | 180 | 15.3M | autovector() = default; |
cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EEC2Ev Line | Count | Source | 180 | 108M | autovector() = default; |
_ZN7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EEC2Ev Line | Count | Source | 180 | 153k | autovector() = default; |
_ZN7rocksdb10autovectorIjLm8EEC2Ev Line | Count | Source | 180 | 11.9k | autovector() = default; |
|
181 | 170M | ~autovector() = default; _ZN7rocksdb10autovectorImLm8EED2Ev Line | Count | Source | 181 | 8 | ~autovector() = default; |
_ZN7rocksdb10autovectorINSt3__14pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEELm8EED2Ev Line | Count | Source | 181 | 1 | ~autovector() = default; |
_ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EED2Ev Line | Count | Source | 181 | 500k | ~autovector() = default; |
_ZN7rocksdb10autovectorIyLm8EED2Ev Line | Count | Source | 181 | 500k | ~autovector() = default; |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EED2Ev Line | Count | Source | 181 | 1.79M | ~autovector() = default; |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EED2Ev Line | Count | Source | 181 | 2.96M | ~autovector() = default; |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EED2Ev Line | Count | Source | 181 | 26.2M | ~autovector() = default; |
_ZN7rocksdb10autovectorINS_11FileIndexer10IndexLevelELm8EED2Ev Line | Count | Source | 181 | 1.31M | ~autovector() = default; |
_ZN7rocksdb10autovectorIPvLm8EED2Ev Line | Count | Source | 181 | 1.00M | ~autovector() = default; |
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EED2Ev Line | Count | Source | 181 | 130k | ~autovector() = default; |
_ZN7rocksdb10autovectorIPNS_11TableReaderELm16EED2Ev Line | Count | Source | 181 | 1 | ~autovector() = default; |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm2EED2Ev Line | Count | Source | 181 | 23.0k | ~autovector() = default; |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm1EED2Ev Line | Count | Source | 181 | 7 | ~autovector() = default; |
_ZN7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EED2Ev Line | Count | Source | 181 | 22.7M | ~autovector() = default; |
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EED2Ev Line | Count | Source | 181 | 1.31M | ~autovector() = default; |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EED2Ev Line | Count | Source | 181 | 1.31M | ~autovector() = default; |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EED2Ev Line | Count | Source | 181 | 2.51M | ~autovector() = default; |
cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EED2Ev Line | Count | Source | 181 | 108M | ~autovector() = default; |
_ZN7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EED2Ev Line | Count | Source | 181 | 153k | ~autovector() = default; |
Unexecuted instantiation: _ZN7rocksdb10autovectorIjLm8EED2Ev |
182 | | |
183 | | // -- Immutable operations |
184 | | // Indicate if all data resides in in-stack data structure. |
185 | 24.0k | bool only_in_stack() const { |
186 | | // If no element was inserted at all, the vector's capacity will be `0`. |
187 | 24.0k | return vect_.capacity() == 0; |
188 | 24.0k | } _ZNK7rocksdb10autovectorImLm8EE13only_in_stackEv Line | Count | Source | 185 | 16.0k | bool only_in_stack() const { | 186 | | // If no element was inserted at all, the vector's capacity will be `0`. | 187 | 16.0k | return vect_.capacity() == 0; | 188 | 16.0k | } |
_ZNK7rocksdb10autovectorINSt3__14pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEELm8EE13only_in_stackEv Line | Count | Source | 185 | 8.00k | bool only_in_stack() const { | 186 | | // If no element was inserted at all, the vector's capacity will be `0`. | 187 | 8.00k | return vect_.capacity() == 0; | 188 | 8.00k | } |
|
189 | | |
190 | 691M | size_type size() const { return num_stack_items_ + vect_.size(); } _ZNK7rocksdb10autovectorImLm8EE4sizeEv Line | Count | Source | 190 | 104k | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorINSt3__14pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEELm8EE4sizeEv Line | Count | Source | 190 | 32.0k | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE4sizeEv Line | Count | Source | 190 | 6.08M | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EE4sizeEv Line | Count | Source | 190 | 28.6M | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorIPNS_12SuperVersionELm8EE4sizeEv Line | Count | Source | 190 | 5.01M | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorIPNS_3log6WriterELm8EE4sizeEv Line | Count | Source | 190 | 5.31M | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorINS_15LevelFilesBriefELm2EE4sizeEv Line | Count | Source | 190 | 109k | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE4sizeEv Line | Count | Source | 190 | 847k | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorINS_15LevelFilesBriefELm8EE4sizeEv Line | Count | Source | 190 | 74.4M | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorIPvLm8EE4sizeEv Line | Count | Source | 190 | 1.14M | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE4sizeEv Line | Count | Source | 190 | 130k | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorIPNS_11TableReaderELm16EE4sizeEv Line | Count | Source | 190 | 13 | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE4sizeEv Line | Count | Source | 190 | 132k | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorIPNS_3log6WriterELm1EE4sizeEv Line | Count | Source | 190 | 22 | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EE4sizeEv Line | Count | Source | 190 | 344M | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorINS_11FileIndexer10IndexLevelELm8EE4sizeEv Line | Count | Source | 190 | 780k | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorINS_15IteratorWrapperELm4EE4sizeEv Line | Count | Source | 190 | 110M | size_type size() const { return num_stack_items_ + vect_.size(); } |
cache.cc:_ZNK7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE4sizeEv Line | Count | Source | 190 | 109M | size_type size() const { return num_stack_items_ + vect_.size(); } |
_ZNK7rocksdb10autovectorIjLm8EE4sizeEv Line | Count | Source | 190 | 3.48M | size_type size() const { return num_stack_items_ + vect_.size(); } |
|
191 | | |
192 | | // resize does not guarantee anything about the contents of the newly |
193 | | // available elements |
194 | 16.1M | void resize(size_type n) { |
195 | 16.1M | if (n > kSize) { |
196 | 9.85k | vect_.resize(n - kSize); |
197 | 9.85k | num_stack_items_ = kSize; |
198 | 16.1M | } else { |
199 | 16.1M | vect_.clear(); |
200 | 16.1M | num_stack_items_ = n; |
201 | 16.1M | } |
202 | 16.1M | } _ZN7rocksdb10autovectorImLm8EE6resizeEm Line | Count | Source | 194 | 3 | void resize(size_type n) { | 195 | 3 | if (n > kSize) { | 196 | 1 | vect_.resize(n - kSize); | 197 | 1 | num_stack_items_ = kSize; | 198 | 2 | } else { | 199 | 2 | vect_.clear(); | 200 | 2 | num_stack_items_ = n; | 201 | 2 | } | 202 | 3 | } |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm2EE6resizeEm Line | Count | Source | 194 | 23.0k | void resize(size_type n) { | 195 | 23.0k | if (n > kSize) { | 196 | 2.76k | vect_.resize(n - kSize); | 197 | 2.76k | num_stack_items_ = kSize; | 198 | 20.2k | } else { | 199 | 20.2k | vect_.clear(); | 200 | 20.2k | num_stack_items_ = n; | 201 | 20.2k | } | 202 | 23.0k | } |
_ZN7rocksdb10autovectorINS_11FileIndexer10IndexLevelELm8EE6resizeEm Line | Count | Source | 194 | 67.0k | void resize(size_type n) { | 195 | 67.0k | if (n > kSize) { | 196 | 2.34k | vect_.resize(n - kSize); | 197 | 2.34k | num_stack_items_ = kSize; | 198 | 64.7k | } else { | 199 | 64.7k | vect_.clear(); | 200 | 64.7k | num_stack_items_ = n; | 201 | 64.7k | } | 202 | 67.0k | } |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EE6resizeEm Line | Count | Source | 194 | 653k | void resize(size_type n) { | 195 | 653k | if (n > kSize) { | 196 | 2.34k | vect_.resize(n - kSize); | 197 | 2.34k | num_stack_items_ = kSize; | 198 | 650k | } else { | 199 | 650k | vect_.clear(); | 200 | 650k | num_stack_items_ = n; | 201 | 650k | } | 202 | 653k | } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE6resizeEm Line | Count | Source | 194 | 15.3M | void resize(size_type n) { | 195 | 15.3M | if (n > kSize) { | 196 | 2.39k | vect_.resize(n - kSize); | 197 | 2.39k | num_stack_items_ = kSize; | 198 | 15.3M | } else { | 199 | 15.3M | vect_.clear(); | 200 | 15.3M | num_stack_items_ = n; | 201 | 15.3M | } | 202 | 15.3M | } |
|
203 | | |
204 | 9.75M | bool empty() const { return size() == 0; } _ZNK7rocksdb10autovectorImLm8EE5emptyEv Line | Count | Source | 204 | 16.0k | bool empty() const { return size() == 0; } |
_ZNK7rocksdb10autovectorINSt3__14pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEELm8EE5emptyEv Line | Count | Source | 204 | 8.00k | bool empty() const { return size() == 0; } |
_ZNK7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE5emptyEv Line | Count | Source | 204 | 2 | bool empty() const { return size() == 0; } |
_ZNK7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE5emptyEv Line | Count | Source | 204 | 153k | bool empty() const { return size() == 0; } |
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE5emptyEv Line | Count | Source | 204 | 132k | bool empty() const { return size() == 0; } |
_ZNK7rocksdb10autovectorIPNS_3log6WriterELm8EE5emptyEv Line | Count | Source | 204 | 1.47M | bool empty() const { return size() == 0; } |
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EE5emptyEv Line | Count | Source | 204 | 56.9k | bool empty() const { return size() == 0; } |
_ZNK7rocksdb10autovectorINS_15IteratorWrapperELm4EE5emptyEv Line | Count | Source | 204 | 6.10M | bool empty() const { return size() == 0; } |
_ZNK7rocksdb10autovectorIjLm8EE5emptyEv Line | Count | Source | 204 | 1.80M | bool empty() const { return size() == 0; } |
|
205 | | |
206 | 112M | const_reference operator[](size_type n) const { |
207 | 112M | assert(n < size()); |
208 | 110M | return n < kSize ? values_[n] : vect_[n - kSize]; |
209 | 112M | } _ZNK7rocksdb10autovectorImLm8EEixEm Line | Count | Source | 206 | 32.0k | const_reference operator[](size_type n) const { | 207 | 32.0k | assert(n < size()); | 208 | 31.9k | return n < kSize ? values_[n] : vect_[n - kSize]; | 209 | 32.0k | } |
_ZNK7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EEixEm Line | Count | Source | 206 | 32.0k | const_reference operator[](size_type n) const { | 207 | 32.0k | assert(n < size()); | 208 | 31.9k | return n < kSize ? values_[n] : vect_[n - kSize]; | 209 | 32.0k | } |
_ZNK7rocksdb10autovectorINS_15LevelFilesBriefELm8EEixEm Line | Count | Source | 206 | 16.1M | const_reference operator[](size_type n) const { | 207 | 16.1M | assert(n < size()); | 208 | 16.1M | return n < kSize ? values_[n] : vect_[n - kSize]; | 209 | 16.1M | } |
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EEixEm Line | Count | Source | 206 | 39 | const_reference operator[](size_type n) const { | 207 | 39 | assert(n < size()); | 208 | 39 | return n < kSize ? values_[n] : vect_[n - kSize]; | 209 | 39 | } |
_ZNK7rocksdb10autovectorINS_11FileIndexer10IndexLevelELm8EEixEm Line | Count | Source | 206 | 723k | const_reference operator[](size_type n) const { | 207 | 723k | assert(n < size()); | 208 | 541k | return n < kSize ? values_[n] : vect_[n - kSize]; | 209 | 723k | } |
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EEixEm Line | Count | Source | 206 | 155k | const_reference operator[](size_type n) const { | 207 | 155k | assert(n < size()); | 208 | 155k | return n < kSize ? values_[n] : vect_[n - kSize]; | 209 | 155k | } |
_ZNK7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EEixEm Line | Count | Source | 206 | 92.6M | const_reference operator[](size_type n) const { | 207 | 92.6M | assert(n < size()); | 208 | 92.5M | return n < kSize ? values_[n] : vect_[n - kSize]; | 209 | 92.6M | } |
_ZNK7rocksdb10autovectorINS_15IteratorWrapperELm4EEixEm Line | Count | Source | 206 | 3.10M | const_reference operator[](size_type n) const { | 207 | 3.10M | assert(n < size()); | 208 | 2.22M | return n < kSize ? values_[n] : vect_[n - kSize]; | 209 | 3.10M | } |
Unexecuted instantiation: cache.cc:_ZNK7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EEixEm _ZNK7rocksdb10autovectorIjLm8EEixEm Line | Count | Source | 206 | 2.07k | const_reference operator[](size_type n) const { | 207 | 2.07k | assert(n < size()); | 208 | 2.07k | return n < kSize ? values_[n] : vect_[n - kSize]; | 209 | 2.07k | } |
|
210 | | |
211 | 157M | reference operator[](size_type n) { |
212 | 157M | assert(n < size()); |
213 | 152M | return n < kSize ? values_[n] : vect_[n - kSize]; |
214 | 157M | } _ZN7rocksdb10autovectorImLm8EEixEm Line | Count | Source | 211 | 16.0k | reference operator[](size_type n) { | 212 | 16.0k | assert(n < size()); | 213 | 15.9k | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 16.0k | } |
_ZN7rocksdb10autovectorINSt3__14pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEELm8EEixEm Line | Count | Source | 211 | 16.0k | reference operator[](size_type n) { | 212 | 16.0k | assert(n < size()); | 213 | 15.9k | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 16.0k | } |
_ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EEixEm Line | Count | Source | 211 | 2.86M | reference operator[](size_type n) { | 212 | 2.86M | assert(n < size()); | 213 | 2.00M | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 2.86M | } |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EEixEm Line | Count | Source | 211 | 75.5k | reference operator[](size_type n) { | 212 | 75.5k | assert(n < size()); | 213 | 75.5k | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 75.5k | } |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EEixEm Line | Count | Source | 211 | 56.1k | reference operator[](size_type n) { | 212 | 56.1k | assert(n < size()); | 213 | 56.1k | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 56.1k | } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EEixEm Line | Count | Source | 211 | 20.1k | reference operator[](size_type n) { | 212 | 20.1k | assert(n < size()); | 213 | 20.1k | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 20.1k | } |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm2EEixEm Line | Count | Source | 211 | 109k | reference operator[](size_type n) { | 212 | 109k | assert(n < size()); | 213 | 77.4k | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 109k | } |
_ZN7rocksdb10autovectorIPvLm8EEixEm Line | Count | Source | 211 | 70.7k | reference operator[](size_type n) { | 212 | 70.7k | assert(n < size()); | 213 | 67.7k | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 70.7k | } |
Unexecuted instantiation: _ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EEixEm _ZN7rocksdb10autovectorIPNS_11TableReaderELm16EEixEm Line | Count | Source | 211 | 6 | reference operator[](size_type n) { | 212 | 6 | assert(n < size()); | 213 | 6 | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 6 | } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm1EEixEm Line | Count | Source | 211 | 8 | reference operator[](size_type n) { | 212 | 8 | assert(n < size()); | 213 | 6 | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 8 | } |
_ZN7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EEixEm Line | Count | Source | 211 | 77.8M | reference operator[](size_type n) { | 212 | 77.8M | assert(n < size()); | 213 | 77.8M | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 77.8M | } |
_ZN7rocksdb10autovectorINS_11FileIndexer10IndexLevelELm8EEixEm Line | Count | Source | 211 | 56.7k | reference operator[](size_type n) { | 212 | 56.7k | assert(n < size()); | 213 | 51.4k | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 56.7k | } |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EEixEm Line | Count | Source | 211 | 41.8M | reference operator[](size_type n) { | 212 | 41.8M | assert(n < size()); | 213 | 39.6M | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 41.8M | } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EEixEm Line | Count | Source | 211 | 33.5M | reference operator[](size_type n) { | 212 | 33.5M | assert(n < size()); | 213 | 31.6M | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 33.5M | } |
cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EEixEm Line | Count | Source | 211 | 498k | reference operator[](size_type n) { | 212 | 498k | assert(n < size()); | 213 | 498k | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 498k | } |
_ZN7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EEixEm Line | Count | Source | 211 | 252k | reference operator[](size_type n) { | 212 | 252k | assert(n < size()); | 213 | 248k | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 252k | } |
_ZN7rocksdb10autovectorIjLm8EEixEm Line | Count | Source | 211 | 556k | reference operator[](size_type n) { | 212 | 556k | assert(n < size()); | 213 | 385k | return n < kSize ? values_[n] : vect_[n - kSize]; | 214 | 556k | } |
|
215 | | |
216 | | const_reference at(size_type n) const { |
217 | | assert(n < size()); |
218 | | return (*this)[n]; |
219 | | } |
220 | | |
221 | 8.00k | reference at(size_type n) { |
222 | 8.00k | assert(n < size()); |
223 | 8.00k | return (*this)[n]; |
224 | 8.00k | } |
225 | | |
226 | 1 | reference front() { |
227 | 1 | assert(!empty()); |
228 | 1 | return *begin(); |
229 | 1 | } |
230 | | |
231 | | const_reference front() const { |
232 | | assert(!empty()); |
233 | | return *begin(); |
234 | | } |
235 | | |
236 | 6.68M | reference back() { |
237 | 6.68M | assert(!empty()); |
238 | 6.68M | return *(end() - 1); |
239 | 6.68M | } _ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE4backEv Line | Count | Source | 236 | 1 | reference back() { | 237 | 1 | assert(!empty()); | 238 | 1 | return *(end() - 1); | 239 | 1 | } |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE4backEv Line | Count | Source | 236 | 25.0k | reference back() { | 237 | 25.0k | assert(!empty()); | 238 | 25.0k | return *(end() - 1); | 239 | 25.0k | } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE4backEv Line | Count | Source | 236 | 6.10M | reference back() { | 237 | 6.10M | assert(!empty()); | 238 | 6.10M | return *(end() - 1); | 239 | 6.10M | } |
_ZN7rocksdb10autovectorIjLm8EE4backEv Line | Count | Source | 236 | 556k | reference back() { | 237 | 556k | assert(!empty()); | 238 | 556k | return *(end() - 1); | 239 | 556k | } |
|
240 | | |
241 | 2.05k | const_reference back() const { |
242 | 2.05k | assert(!empty()); |
243 | 2.05k | return *(end() - 1); |
244 | 2.05k | } |
245 | | |
246 | | // -- Mutable Operations |
247 | 6.19M | void push_back(T&& item) { |
248 | 6.19M | if (num_stack_items_ < kSize) { |
249 | 6.10M | values_[num_stack_items_++] = std::move(item); |
250 | 81.5k | } else { |
251 | 81.5k | vect_.push_back(item); |
252 | 81.5k | } |
253 | 6.19M | } _ZN7rocksdb10autovectorINSt3__14pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEELm8EE9push_backEOS9_ Line | Count | Source | 247 | 8.00k | void push_back(T&& item) { | 248 | 8.00k | if (num_stack_items_ < kSize) { | 249 | 8 | values_[num_stack_items_++] = std::move(item); | 250 | 7.99k | } else { | 251 | 7.99k | vect_.push_back(item); | 252 | 7.99k | } | 253 | 8.00k | } |
_ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE9push_backEOS7_ Line | Count | Source | 247 | 8.00k | void push_back(T&& item) { | 248 | 8.00k | if (num_stack_items_ < kSize) { | 249 | 8 | values_[num_stack_items_++] = std::move(item); | 250 | 7.99k | } else { | 251 | 7.99k | vect_.push_back(item); | 252 | 7.99k | } | 253 | 8.00k | } |
Unexecuted instantiation: _ZN7rocksdb10autovectorIPNS_11TableReaderELm16EE9push_backEOS2_ _ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE9push_backEOS3_ Line | Count | Source | 247 | 20.1k | void push_back(T&& item) { | 248 | 20.1k | if (num_stack_items_ < kSize) { | 249 | 20.1k | values_[num_stack_items_++] = std::move(item); | 250 | 33 | } else { | 251 | 33 | vect_.push_back(item); | 252 | 33 | } | 253 | 20.1k | } |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE9push_backEOS2_ Line | Count | Source | 247 | 54.8k | void push_back(T&& item) { | 248 | 54.8k | if (num_stack_items_ < kSize) { | 249 | 54.8k | values_[num_stack_items_++] = std::move(item); | 250 | 0 | } else { | 251 | 0 | vect_.push_back(item); | 252 | 0 | } | 253 | 54.8k | } |
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE9push_backEOS5_ Line | Count | Source | 247 | 35 | void push_back(T&& item) { | 248 | 35 | if (num_stack_items_ < kSize) { | 249 | 35 | values_[num_stack_items_++] = std::move(item); | 250 | 0 | } else { | 251 | 0 | vect_.push_back(item); | 252 | 0 | } | 253 | 35 | } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE9push_backEOS1_ Line | Count | Source | 247 | 6.09M | void push_back(T&& item) { | 248 | 6.09M | if (num_stack_items_ < kSize) { | 249 | 6.03M | values_[num_stack_items_++] = std::move(item); | 250 | 65.4k | } else { | 251 | 65.4k | vect_.push_back(item); | 252 | 65.4k | } | 253 | 6.09M | } |
|
254 | | |
255 | 31.3M | void push_back(const T& item) { |
256 | 31.3M | if (num_stack_items_ < kSize) { |
257 | 29.2M | values_[num_stack_items_++] = item; |
258 | 2.08M | } else { |
259 | 2.08M | vect_.push_back(item); |
260 | 2.08M | } |
261 | 31.3M | } _ZN7rocksdb10autovectorImLm8EE9push_backERKm Line | Count | Source | 255 | 16.0k | void push_back(const T& item) { | 256 | 16.0k | if (num_stack_items_ < kSize) { | 257 | 20 | values_[num_stack_items_++] = item; | 258 | 15.9k | } else { | 259 | 15.9k | vect_.push_back(item); | 260 | 15.9k | } | 261 | 16.0k | } |
_ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE9push_backERKS7_ Line | Count | Source | 255 | 2.90M | void push_back(const T& item) { | 256 | 2.90M | if (num_stack_items_ < kSize) { | 257 | 2.10M | values_[num_stack_items_++] = item; | 258 | 800k | } else { | 259 | 800k | vect_.push_back(item); | 260 | 800k | } | 261 | 2.90M | } |
_ZN7rocksdb10autovectorIyLm8EE9push_backERKy Line | Count | Source | 255 | 2.90M | void push_back(const T& item) { | 256 | 2.90M | if (num_stack_items_ < kSize) { | 257 | 2.10M | values_[num_stack_items_++] = item; | 258 | 800k | } else { | 259 | 800k | vect_.push_back(item); | 260 | 800k | } | 261 | 2.90M | } |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE9push_backERKS2_ Line | Count | Source | 255 | 50.9k | void push_back(const T& item) { | 256 | 50.9k | if (num_stack_items_ < kSize) { | 257 | 50.9k | values_[num_stack_items_++] = item; | 258 | 10 | } else { | 259 | 10 | vect_.push_back(item); | 260 | 10 | } | 261 | 50.9k | } |
Unexecuted instantiation: _ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE9push_backERKS2_ _ZN7rocksdb10autovectorIPNS_11TableReaderELm16EE9push_backERKS2_ Line | Count | Source | 255 | 6 | void push_back(const T& item) { | 256 | 6 | if (num_stack_items_ < kSize) { | 257 | 6 | values_[num_stack_items_++] = item; | 258 | 0 | } else { | 259 | 0 | vect_.push_back(item); | 260 | 0 | } | 261 | 6 | } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm1EE9push_backERKS3_ Line | Count | Source | 255 | 8 | void push_back(const T& item) { | 256 | 8 | if (num_stack_items_ < kSize) { | 257 | 6 | values_[num_stack_items_++] = item; | 258 | 2 | } else { | 259 | 2 | vect_.push_back(item); | 260 | 2 | } | 261 | 8 | } |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE9push_backERKS2_ Line | Count | Source | 255 | 1.30k | void push_back(const T& item) { | 256 | 1.30k | if (num_stack_items_ < kSize) { | 257 | 1.27k | values_[num_stack_items_++] = item; | 258 | 28 | } else { | 259 | 28 | vect_.push_back(item); | 260 | 28 | } | 261 | 1.30k | } |
_ZN7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EE9push_backERKS3_ Line | Count | Source | 255 | 24.0M | void push_back(const T& item) { | 256 | 24.0M | if (num_stack_items_ < kSize) { | 257 | 24.0M | values_[num_stack_items_++] = item; | 258 | 4.66k | } else { | 259 | 4.66k | vect_.push_back(item); | 260 | 4.66k | } | 261 | 24.0M | } |
cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE9push_backERKS3_ Line | Count | Source | 255 | 498k | void push_back(const T& item) { | 256 | 498k | if (num_stack_items_ < kSize) { | 257 | 498k | values_[num_stack_items_++] = item; | 258 | 18.4E | } else { | 259 | 18.4E | vect_.push_back(item); | 260 | 18.4E | } | 261 | 498k | } |
_ZN7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE9push_backERKS3_ Line | Count | Source | 255 | 252k | void push_back(const T& item) { | 256 | 252k | if (num_stack_items_ < kSize) { | 257 | 248k | values_[num_stack_items_++] = item; | 258 | 3.68k | } else { | 259 | 3.68k | vect_.push_back(item); | 260 | 3.68k | } | 261 | 252k | } |
_ZN7rocksdb10autovectorIPvLm8EE9push_backERKS1_ Line | Count | Source | 255 | 71.2k | void push_back(const T& item) { | 256 | 71.2k | if (num_stack_items_ < kSize) { | 257 | 67.7k | values_[num_stack_items_++] = item; | 258 | 3.45k | } else { | 259 | 3.45k | vect_.push_back(item); | 260 | 3.45k | } | 261 | 71.2k | } |
_ZN7rocksdb10autovectorIjLm8EE9push_backERKj Line | Count | Source | 255 | 653k | void push_back(const T& item) { | 256 | 653k | if (num_stack_items_ < kSize) { | 257 | 196k | values_[num_stack_items_++] = item; | 258 | 457k | } else { | 259 | 457k | vect_.push_back(item); | 260 | 457k | } | 261 | 653k | } |
|
262 | | |
263 | | template <class... Args> |
264 | 6.11M | void emplace_back(Args&&... args) { |
265 | 6.11M | push_back(value_type(args...)); |
266 | 6.11M | } _ZN7rocksdb10autovectorINSt3__14pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEELm8EE12emplace_backIJRmS8_EEEvDpOT_ Line | Count | Source | 264 | 8.00k | void emplace_back(Args&&... args) { | 265 | 8.00k | push_back(value_type(args...)); | 266 | 8.00k | } |
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE12emplace_backIJRiRS4_EEEvDpOT_ Line | Count | Source | 264 | 35 | void emplace_back(Args&&... args) { | 265 | 35 | push_back(value_type(args...)); | 266 | 35 | } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE12emplace_backIJRPNS_16InternalIteratorEEEEvDpOT_ Line | Count | Source | 264 | 6.10M | void emplace_back(Args&&... args) { | 265 | 6.10M | push_back(value_type(args...)); | 266 | 6.10M | } |
|
267 | | |
268 | 564k | void pop_back() { |
269 | 564k | assert(!empty()); |
270 | 564k | if (!vect_.empty()) { |
271 | 393k | vect_.pop_back(); |
272 | 170k | } else { |
273 | 170k | --num_stack_items_; |
274 | 170k | } |
275 | 564k | } _ZN7rocksdb10autovectorImLm8EE8pop_backEv Line | Count | Source | 268 | 8.00k | void pop_back() { | 269 | 8.00k | assert(!empty()); | 270 | 8.00k | if (!vect_.empty()) { | 271 | 7.99k | vect_.pop_back(); | 272 | 8 | } else { | 273 | 8 | --num_stack_items_; | 274 | 8 | } | 275 | 8.00k | } |
_ZN7rocksdb10autovectorIjLm8EE8pop_backEv Line | Count | Source | 268 | 556k | void pop_back() { | 269 | 556k | assert(!empty()); | 270 | 556k | if (!vect_.empty()) { | 271 | 385k | vect_.pop_back(); | 272 | 170k | } else { | 273 | 170k | --num_stack_items_; | 274 | 170k | } | 275 | 556k | } |
|
276 | | |
277 | 7.11M | void clear() { |
278 | 7.11M | num_stack_items_ = 0; |
279 | 7.11M | vect_.clear(); |
280 | 7.11M | } _ZN7rocksdb10autovectorINSt3__14pairImNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEELm8EE5clearEv Line | Count | Source | 277 | 1 | void clear() { | 278 | 1 | num_stack_items_ = 0; | 279 | 1 | vect_.clear(); | 280 | 1 | } |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE5clearEv Line | Count | Source | 277 | 1.47M | void clear() { | 278 | 1.47M | num_stack_items_ = 0; | 279 | 1.47M | vect_.clear(); | 280 | 1.47M | } |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE5clearEv Line | Count | Source | 277 | 1.47M | void clear() { | 278 | 1.47M | num_stack_items_ = 0; | 279 | 1.47M | vect_.clear(); | 280 | 1.47M | } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE5clearEv Line | Count | Source | 277 | 2.95M | void clear() { | 278 | 2.95M | num_stack_items_ = 0; | 279 | 2.95M | vect_.clear(); | 280 | 2.95M | } |
_ZN7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE5clearEv Line | Count | Source | 277 | 1.01M | void clear() { | 278 | 1.01M | num_stack_items_ = 0; | 279 | 1.01M | vect_.clear(); | 280 | 1.01M | } |
_ZN7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE5clearEv Line | Count | Source | 277 | 189k | void clear() { | 278 | 189k | num_stack_items_ = 0; | 279 | 189k | vect_.clear(); | 280 | 189k | } |
|
281 | | |
282 | | // -- Copy and Assignment |
283 | | autovector& assign(const autovector& other); |
284 | | |
285 | 2 | autovector(const autovector& other) { assign(other); } |
286 | | |
287 | 1.47M | autovector& operator=(const autovector& other) { return assign(other); } _ZN7rocksdb10autovectorImLm8EEaSERKS1_ Line | Count | Source | 287 | 2 | autovector& operator=(const autovector& other) { return assign(other); } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EEaSERKS4_ Line | Count | Source | 287 | 1.47M | autovector& operator=(const autovector& other) { return assign(other); } |
|
288 | | |
289 | | // move operation are disallowed since it is very hard to make sure both |
290 | | // autovectors are allocated from the same function stack. |
291 | | autovector& operator=(autovector&& other) = delete; |
292 | | autovector(autovector&& other) = delete; |
293 | | |
294 | | // -- Iterator Operations |
295 | 209M | iterator begin() { return iterator(this, 0); } _ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE5beginEv Line | Count | Source | 295 | 316k | iterator begin() { return iterator(this, 0); } |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE5beginEv Line | Count | Source | 295 | 26.1M | iterator begin() { return iterator(this, 0); } |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE5beginEv Line | Count | Source | 295 | 2.96M | iterator begin() { return iterator(this, 0); } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE5beginEv Line | Count | Source | 295 | 1.79M | iterator begin() { return iterator(this, 0); } |
_ZN7rocksdb10autovectorIPvLm8EE5beginEv Line | Count | Source | 295 | 1.00M | iterator begin() { return iterator(this, 0); } |
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE5beginEv Line | Count | Source | 295 | 130k | iterator begin() { return iterator(this, 0); } |
_ZN7rocksdb10autovectorIPNS_11TableReaderELm16EE5beginEv Line | Count | Source | 295 | 1 | iterator begin() { return iterator(this, 0); } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm1EE5beginEv Line | Count | Source | 295 | 6 | iterator begin() { return iterator(this, 0); } |
_ZN7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EE5beginEv Line | Count | Source | 295 | 44.1M | iterator begin() { return iterator(this, 0); } |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EE5beginEv Line | Count | Source | 295 | 152 | iterator begin() { return iterator(this, 0); } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE5beginEv Line | Count | Source | 295 | 25.0M | iterator begin() { return iterator(this, 0); } |
cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE5beginEv Line | Count | Source | 295 | 108M | iterator begin() { return iterator(this, 0); } |
_ZN7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE5beginEv Line | Count | Source | 295 | 189k | iterator begin() { return iterator(this, 0); } |
|
296 | | |
297 | 293k | const_iterator begin() const { return const_iterator(this, 0); } _ZNK7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE5beginEv Line | Count | Source | 297 | 8.00k | const_iterator begin() const { return const_iterator(this, 0); } |
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE5beginEv Line | Count | Source | 297 | 14 | const_iterator begin() const { return const_iterator(this, 0); } |
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EE5beginEv Line | Count | Source | 297 | 50.0k | const_iterator begin() const { return const_iterator(this, 0); } |
_ZNK7rocksdb10autovectorINS_15IteratorWrapperELm4EE5beginEv Line | Count | Source | 297 | 235k | const_iterator begin() const { return const_iterator(this, 0); } |
Unexecuted instantiation: cache.cc:_ZNK7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE5beginEv _ZNK7rocksdb10autovectorIjLm8EE5beginEv Line | Count | Source | 297 | 3 | const_iterator begin() const { return const_iterator(this, 0); } |
|
298 | | |
299 | 216M | iterator end() { return iterator(this, this->size()); } _ZN7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE3endEv Line | Count | Source | 299 | 320k | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorIPNS_8MemTableELm8EE3endEv Line | Count | Source | 299 | 26.2M | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorIPNS_12SuperVersionELm8EE3endEv Line | Count | Source | 299 | 2.96M | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE3endEv Line | Count | Source | 299 | 1.79M | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorIPvLm8EE3endEv Line | Count | Source | 299 | 1.00M | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorIPNS_16ColumnFamilyDataELm8EE3endEv Line | Count | Source | 299 | 130k | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorIPNS_11TableReaderELm16EE3endEv Line | Count | Source | 299 | 1 | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm1EE3endEv Line | Count | Source | 299 | 6 | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorIPNS_11WriteThread6WriterELm8EE3endEv Line | Count | Source | 299 | 44.1M | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorINS_15LevelFilesBriefELm8EE3endEv Line | Count | Source | 299 | 152 | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorINS_15IteratorWrapperELm4EE3endEv Line | Count | Source | 299 | 31.1M | iterator end() { return iterator(this, this->size()); } |
cache.cc:_ZN7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE3endEv Line | Count | Source | 299 | 108M | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorIPNS_9LogBuffer11BufferedLogELm8EE3endEv Line | Count | Source | 299 | 189k | iterator end() { return iterator(this, this->size()); } |
_ZN7rocksdb10autovectorIjLm8EE3endEv Line | Count | Source | 299 | 556k | iterator end() { return iterator(this, this->size()); } |
|
300 | | |
301 | 287k | const_iterator end() const { return const_iterator(this, this->size()); } _ZNK7rocksdb10autovectorINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEELm8EE3endEv Line | Count | Source | 301 | 2 | const_iterator end() const { return const_iterator(this, this->size()); } |
_ZNK7rocksdb10autovectorINSt3__14pairIiPNS_12FileMetaDataEEELm8EE3endEv Line | Count | Source | 301 | 14 | const_iterator end() const { return const_iterator(this, this->size()); } |
_ZNK7rocksdb10autovectorIPNS_8MemTableELm8EE3endEv Line | Count | Source | 301 | 50.0k | const_iterator end() const { return const_iterator(this, this->size()); } |
_ZNK7rocksdb10autovectorINS_15IteratorWrapperELm4EE3endEv Line | Count | Source | 301 | 235k | const_iterator end() const { return const_iterator(this, this->size()); } |
Unexecuted instantiation: cache.cc:_ZNK7rocksdb10autovectorIPNS_12_GLOBAL__N_19LRUHandleELm8EE3endEv _ZNK7rocksdb10autovectorIjLm8EE3endEv Line | Count | Source | 301 | 2.06k | const_iterator end() const { return const_iterator(this, this->size()); } |
|
302 | | |
303 | 1 | reverse_iterator rbegin() { return reverse_iterator(end()); } |
304 | | |
305 | 1 | const_reverse_iterator rbegin() const { |
306 | 1 | return const_reverse_iterator(end()); |
307 | 1 | } |
308 | | |
309 | 8.00k | reverse_iterator rend() { return reverse_iterator(begin()); } |
310 | | |
311 | 8.00k | const_reverse_iterator rend() const { |
312 | 8.00k | return const_reverse_iterator(begin()); |
313 | 8.00k | } |
314 | | |
315 | | private: |
316 | | size_type num_stack_items_ = 0; // current number of items |
317 | | value_type values_[kSize]; // the first `kSize` items |
318 | | // used only if there are more than `kSize` items. |
319 | | std::vector<T> vect_; |
320 | | }; |
321 | | |
322 | | template <class T, size_t kSize> |
323 | 1.47M | autovector<T, kSize>& autovector<T, kSize>::assign(const autovector& other) { |
324 | | // copy the internal vector |
325 | 1.47M | vect_.assign(other.vect_.begin(), other.vect_.end()); |
326 | | |
327 | | // copy array |
328 | 1.47M | num_stack_items_ = other.num_stack_items_; |
329 | 1.47M | std::copy(other.values_, other.values_ + num_stack_items_, values_); |
330 | | |
331 | 1.47M | return *this; |
332 | 1.47M | } _ZN7rocksdb10autovectorImLm8EE6assignERKS1_ Line | Count | Source | 323 | 4 | autovector<T, kSize>& autovector<T, kSize>::assign(const autovector& other) { | 324 | | // copy the internal vector | 325 | 4 | vect_.assign(other.vect_.begin(), other.vect_.end()); | 326 | | | 327 | | // copy array | 328 | 4 | num_stack_items_ = other.num_stack_items_; | 329 | 4 | std::copy(other.values_, other.values_ + num_stack_items_, values_); | 330 | | | 331 | 4 | return *this; | 332 | 4 | } |
_ZN7rocksdb10autovectorIPNS_3log6WriterELm8EE6assignERKS4_ Line | Count | Source | 323 | 1.47M | autovector<T, kSize>& autovector<T, kSize>::assign(const autovector& other) { | 324 | | // copy the internal vector | 325 | 1.47M | vect_.assign(other.vect_.begin(), other.vect_.end()); | 326 | | | 327 | | // copy array | 328 | 1.47M | num_stack_items_ = other.num_stack_items_; | 329 | 1.47M | std::copy(other.values_, other.values_ + num_stack_items_, values_); | 330 | | | 331 | 1.47M | return *this; | 332 | 1.47M | } |
|
333 | | #endif // ROCKSDB_LITE |
334 | | } // namespace rocksdb |