_ZN11addressbook6Person25internal_default_instanceEv:
  322|      2|  static inline const Person* internal_default_instance() {
  323|      2|    return reinterpret_cast<const Person*>(
  324|      2|               &_Person_default_instance_);
  325|      2|  }
_ZN11addressbook6Person16default_instanceEv:
  319|      2|  static const Person& default_instance() {
  320|      2|    return *internal_default_instance();
  321|      2|  }

_ZN4brpc22AdaptiveMaxConcurrencyC2Ei:
   37|      2|    : _max_concurrency(0) {
   38|      2|    if (max_concurrency <= 0) {
  ------------------
  |  Branch (38:9): [True: 2, False: 0]
  ------------------
   39|      2|        _value = UNLIMITED;
   40|      2|        _max_concurrency = 0;
   41|      2|    } else {
   42|      0|        _value = butil::string_printf("%d", max_concurrency);
   43|      0|        _max_concurrency = max_concurrency;
   44|      0|    }
   45|      2|}

_ZN4brpc10SerializerC2Ev:
   36|      2|    Serializer() :Serializer(NULL) {}
_ZN4brpc10SerializerC2ESt8functionIFbPN6google8protobuf2io20ZeroCopyOutputStreamEEE:
   39|      2|        :_callback(std::move(callback)) {
   40|      2|        SharedCtor();
   41|      2|    }
_ZN4brpc10Serializer10SharedCtorEv:
   90|      2|    void SharedCtor() {}
_ZN4brpc12DeserializerC2Ev:
  103|      2|    Deserializer() :Deserializer(NULL) {}
_ZN4brpc12DeserializerC2ESt8functionIFbPN6google8protobuf2io19ZeroCopyInputStreamEEE:
  105|      2|    explicit Deserializer(Callback callback) : _callback(std::move(callback)) {
  106|      2|        SharedCtor();
  107|      2|    }
_ZN4brpc12Deserializer10SharedCtorEv:
  155|      2|    void SharedCtor() {}

_ZN4brpc19CouchbaseOperations16CouchbaseRequest10sharedCtorEv:
  403|      2|void CouchbaseOperations::CouchbaseRequest::sharedCtor() {
  404|      2|  _pipelined_count = 0;
  405|      2|  _cached_size_ = 0;
  406|      2|}
_ZN4brpc19CouchbaseOperations17CouchbaseResponse10sharedCtorEv:
  623|      2|void CouchbaseOperations::CouchbaseResponse::sharedCtor() { _cached_size_ = 0; }

_ZN4brpc24CouchbaseManifestManagerC2Ev:
  134|      4|  CouchbaseManifestManager() {}
_ZN4brpc16ReaderWriterLockC2Ev:
   60|      4|      : reader_count_(0), writer_active_(false), waiting_writers_(0) {}
_ZN4brpc19CouchbaseOperations17CouchbaseResponseC2Ev:
  382|      2|    CouchbaseResponse() : NonreflectableMessage<CouchbaseResponse>() {
  383|      2|      sharedCtor();
  384|      2|    }
_ZN4brpc19CouchbaseOperations16CouchbaseRequestC2Ev:
  268|      2|    CouchbaseRequest() : NonreflectableMessage<CouchbaseRequest>() {
  269|      2|      metadata_tracking = &common_metadata_tracking;
  270|      2|      sharedCtor();
  271|      2|    }

_ZN4brpc10EspMessageC2Ev:
   26|      2|    : NonreflectableMessage<EspMessage>() {
   27|      2|    SharedCtor();
   28|      2|}
_ZN4brpc10EspMessage10SharedCtorEv:
   30|      2|void EspMessage::SharedCtor() {
   31|      2|    memset(&head, 0, sizeof(head));
   32|      2|}

_ZN4brpc15MemcacheRequestC2Ev:
   30|      2|    : NonreflectableMessage<MemcacheRequest>() {
   31|      2|    SharedCtor();
   32|      2|}
_ZN4brpc15MemcacheRequest10SharedCtorEv:
   40|      2|void MemcacheRequest::SharedCtor() {
   41|      2|    _pipelined_count = 0;
   42|      2|    _cached_size_ = 0;
   43|      2|}
_ZN4brpc16MemcacheResponseC2Ev:
  141|      2|    : NonreflectableMessage<MemcacheResponse>() {
  142|      2|    SharedCtor();
  143|      2|}
_ZN4brpc16MemcacheResponse10SharedCtorEv:
  151|      2|void MemcacheResponse::SharedCtor() {
  152|      2|    _cached_size_ = 0;
  153|      2|}

_ZN4brpc21NonreflectableMessageINS_10SerializerEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;
_ZN4brpc21NonreflectableMessageINS_12DeserializerEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;
_ZN4brpc21NonreflectableMessageINS_13NsheadMessageEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;
_ZN4brpc21NonreflectableMessageINS_19CouchbaseOperations17CouchbaseResponseEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;
_ZN4brpc21NonreflectableMessageINS_19CouchbaseOperations16CouchbaseRequestEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;
_ZN4brpc21NonreflectableMessageINS_12RedisRequestEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;
_ZN4brpc21NonreflectableMessageINS_13RedisResponseEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;
_ZN4brpc21NonreflectableMessageINS_17SerializedRequestEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;
_ZN4brpc21NonreflectableMessageINS_18SerializedResponseEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;
_ZN4brpc21NonreflectableMessageINS_10EspMessageEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;
_ZN4brpc21NonreflectableMessageINS_15MemcacheRequestEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;
_ZN4brpc21NonreflectableMessageINS_16MemcacheResponseEEC2Ev:
   43|      2|    inline NonreflectableMessage() = default;

_ZN4brpc13NsheadMessageC2Ev:
   26|      2|    : NonreflectableMessage<NsheadMessage>() {
   27|      2|    SharedCtor();
   28|      2|}
_ZN4brpc13NsheadMessage10SharedCtorEv:
   36|      2|void NsheadMessage::SharedCtor() {
   37|      2|    memset(&head, 0, sizeof(head));
   38|      2|}

_ZN4brpc6policy13CommonStringsC2Ev:
  120|      2|    : ACCEPT("accept")
  121|      2|    , DEFAULT_ACCEPT("*/*")
  122|      2|    , USER_AGENT("user-agent")
  123|      2|    , DEFAULT_USER_AGENT("brpc/1.0 curl/7.0")
  124|      2|    , CONTENT_TYPE("content-type")
  125|      2|    , CONTENT_TYPE_TEXT("text/plain")
  126|      2|    , CONTENT_TYPE_JSON("application/json")
  127|      2|    , CONTENT_TYPE_PROTO("application/proto")
  128|      2|    , CONTENT_TYPE_SPRING_PROTO("application/x-protobuf")
  129|      2|    , ERROR_CODE("x-bd-error-code")
  130|      2|    , AUTHORIZATION("authorization")
  131|      2|    , ACCEPT_ENCODING("accept-encoding")
  132|      2|    , CONTENT_ENCODING("content-encoding")
  133|      2|    , CONTENT_LENGTH("content_length")
  134|      2|    , EXPECT("expect")
  135|      2|    , CONTINUE_100("100-continue")
  136|      2|    , GZIP("gzip")
  137|      2|    , CONNECTION("connection")
  138|      2|    , KEEP_ALIVE("keep-alive")
  139|      2|    , CLOSE("close")
  140|      2|    , LOG_ID("log-id")
  141|      2|    , DEFAULT_METHOD("default_method")
  142|      2|    , NO_METHOD("no_method")
  143|      2|    , H2_SCHEME(":scheme")
  144|      2|    , H2_SCHEME_HTTP("http")
  145|      2|    , H2_SCHEME_HTTPS("https")
  146|      2|    , H2_AUTHORITY(":authority")
  147|      2|    , H2_PATH(":path")
  148|      2|    , H2_STATUS(":status")
  149|      2|    , STATUS_200("200")
  150|      2|    , H2_METHOD(":method")
  151|      2|    , METHOD_GET("GET")
  152|      2|    , METHOD_POST("POST")
  153|      2|    , TE("te")
  154|      2|    , TRAILERS("trailers")
  155|      2|    , GRPC_ENCODING("grpc-encoding")
  156|      2|    , GRPC_ACCEPT_ENCODING("grpc-accept-encoding")
  157|      2|    , GRPC_ACCEPT_ENCODING_VALUE("identity,gzip")
  158|      2|    , GRPC_STATUS("grpc-status")
  159|      2|    , GRPC_MESSAGE("grpc-message")
  160|      2|    , GRPC_TIMEOUT("grpc-timeout")
  161|      2|    , DEFAULT_PATH("/")
  162|      2|{}
_ZN4brpc6policy17InitCommonStringsEv:
  170|      2|int InitCommonStrings() {
  171|      2|    return pthread_once(&g_common_strings_once, CreateCommonStrings);
  172|      2|}
http_rpc_protocol.cpp:_ZN4brpc6policyL19CreateCommonStringsEv:
  166|      2|static void CreateCommonStrings() {
  167|      2|    common = new CommonStrings;
  168|      2|}

_ZN4brpc12RedisRequestC2Ev:
   33|      2|    : NonreflectableMessage<RedisRequest>() {
   34|      2|    SharedCtor();
   35|      2|}
_ZN4brpc12RedisRequest10SharedCtorEv:
   43|      2|void RedisRequest::SharedCtor() {
   44|      2|    _ncommand = 0;
   45|      2|    _has_error = false;
   46|      2|    _cached_size_ = 0;
   47|      2|}
_ZN4brpc13RedisResponseC2Ev:
  198|      2|    : NonreflectableMessage<RedisResponse>()
  199|      2|    , _first_reply(&_arena) {
  200|      2|    SharedCtor();
  201|      2|}
_ZN4brpc13RedisResponse10SharedCtorEv:
  209|      2|void RedisResponse::SharedCtor() {
  210|       |    _other_replies = NULL;
  211|      2|    _cached_size_ = 0;
  212|      2|    _nreply = 0;
  213|      2|}

_ZN4brpc10RedisReply5ResetEv:
  174|      2|inline void RedisReply::Reset() {
  175|      2|    _type = REDIS_REPLY_NIL;
  176|      2|    _length = 0;
  177|      2|    _data.array.last_index = -1;
  178|      2|    _data.array.replies = NULL;
  179|       |    // _arena should not be reset because further memory allocation needs it.
  180|      2|}
_ZN4brpc10RedisReplyC2EPN5butil5ArenaE:
  183|      2|    : _arena(arena) {
  184|      2|    Reset();
  185|      2|}

_ZN4brpc16RemoveRtmpPrefixERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE:
 2721|    542|butil::StringPiece RemoveRtmpPrefix(const butil::StringPiece& url_in) {
 2722|    542|    if (!url_in.starts_with("rtmp://")) {
  ------------------
  |  Branch (2722:9): [True: 516, False: 26]
  ------------------
 2723|    516|        return url_in;
 2724|    516|    }
 2725|     26|    butil::StringPiece url = url_in;
 2726|     26|    size_t i = 7;
 2727|    229|    for (; i < url.size() && url[i] == '/'; ++i);
  ------------------
  |  Branch (2727:12): [True: 225, False: 4]
  |  Branch (2727:30): [True: 203, False: 22]
  ------------------
 2728|     26|    url.remove_prefix(i);
 2729|     26|    return url;
 2730|    542|}
_ZN4brpc20ParseRtmpHostAndPortERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPS8_SB_:
 2746|    542|                          butil::StringPiece* port) {
 2747|    542|    size_t colon_pos = host_and_port.find(':');
 2748|    542|    if (colon_pos == butil::StringPiece::npos) {
  ------------------
  |  Branch (2748:9): [True: 413, False: 129]
  ------------------
 2749|    413|        if (host) {
  ------------------
  |  Branch (2749:13): [True: 413, False: 0]
  ------------------
 2750|    413|            *host = host_and_port;
 2751|    413|        }
 2752|    413|        if (port) {
  ------------------
  |  Branch (2752:13): [True: 413, False: 0]
  ------------------
 2753|    413|            *port = "1935";
 2754|    413|        }
 2755|    413|    } else {
 2756|    129|        if (host) {
  ------------------
  |  Branch (2756:13): [True: 129, False: 0]
  ------------------
 2757|    129|            *host = host_and_port.substr(0, colon_pos);
 2758|    129|        }
 2759|    129|        if (port) {
  ------------------
  |  Branch (2759:13): [True: 129, False: 0]
  ------------------
 2760|    129|            *port = host_and_port.substr(colon_pos + 1);
 2761|    129|        }
 2762|    129|    }
 2763|    542|}
_ZN4brpc12ParseRtmpURLERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPS8_SB_SB_SB_SB_:
 2823|    542|                  butil::StringPiece* stream_name) {
 2824|    542|    if (stream_name) {
  ------------------
  |  Branch (2824:9): [True: 542, False: 0]
  ------------------
 2825|    542|        stream_name->clear();
 2826|    542|    }
 2827|    542|    butil::StringPiece rtmp_url = RemoveRtmpPrefix(rtmp_url_in);
 2828|    542|    size_t slash1_pos = rtmp_url.find_first_of('/');
 2829|    542|    if (slash1_pos == butil::StringPiece::npos) {
  ------------------
  |  Branch (2829:9): [True: 204, False: 338]
  ------------------
 2830|    204|        if (host || port) {
  ------------------
  |  Branch (2830:13): [True: 204, False: 0]
  |  Branch (2830:21): [True: 0, False: 0]
  ------------------
 2831|    204|            ParseRtmpHostAndPort(rtmp_url, host, port);
 2832|    204|        }
 2833|    204|        if (app) {
  ------------------
  |  Branch (2833:13): [True: 204, False: 0]
  ------------------
 2834|    204|            app->clear();
 2835|    204|        }
 2836|    204|        return;
 2837|    204|    }
 2838|    338|    if (host || port) {
  ------------------
  |  Branch (2838:9): [True: 338, False: 0]
  |  Branch (2838:17): [True: 0, False: 0]
  ------------------
 2839|    338|        ParseRtmpHostAndPort(rtmp_url.substr(0, slash1_pos), host, port);
 2840|    338|    }
 2841|       |    // Remove duplicated slashes.
 2842|    572|    for (++slash1_pos; slash1_pos < rtmp_url.size() &&
  ------------------
  |  Branch (2842:24): [True: 529, False: 43]
  ------------------
 2843|    529|             rtmp_url[slash1_pos] == '/'; ++slash1_pos);
  ------------------
  |  Branch (2843:14): [True: 234, False: 295]
  ------------------
 2844|    338|    rtmp_url.remove_prefix(slash1_pos);
 2845|    338|    size_t slash2_pos = rtmp_url.find_first_of('/');
 2846|    338|    if (slash2_pos == butil::StringPiece::npos) {
  ------------------
  |  Branch (2846:9): [True: 277, False: 61]
  ------------------
 2847|    277|        return SplitVHostFromApp(rtmp_url, app, vhost);
 2848|    277|    }
 2849|     61|    SplitVHostFromApp(rtmp_url.substr(0, slash2_pos), app, vhost);
 2850|     61|    if (stream_name != NULL) {
  ------------------
  |  Branch (2850:9): [True: 61, False: 0]
  ------------------
 2851|       |        // Remove duplicated slashes.
 2852|    328|        for (++slash2_pos; slash2_pos < rtmp_url.size() &&
  ------------------
  |  Branch (2852:28): [True: 296, False: 32]
  ------------------
 2853|    296|                 rtmp_url[slash2_pos] == '/'; ++slash2_pos);
  ------------------
  |  Branch (2853:18): [True: 267, False: 29]
  ------------------
 2854|     61|        rtmp_url.remove_prefix(slash2_pos);
 2855|     61|        *stream_name = rtmp_url;
 2856|     61|    }
 2857|     61|}
rtmp.cpp:_ZN4brpcL17SplitVHostFromAppERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPS8_SB_:
 2784|    338|                              butil::StringPiece* vhost) {
 2785|    338|    const size_t q_pos = app_and_vhost.find('?');
 2786|    338|    if (q_pos == butil::StringPiece::npos) {
  ------------------
  |  Branch (2786:9): [True: 149, False: 189]
  ------------------
 2787|    149|        if (app) {
  ------------------
  |  Branch (2787:13): [True: 149, False: 0]
  ------------------
 2788|    149|            *app = app_and_vhost;
 2789|    149|        }
 2790|    149|        if (vhost) {
  ------------------
  |  Branch (2790:13): [True: 149, False: 0]
  ------------------
 2791|    149|            vhost->clear();
 2792|    149|        }
 2793|    149|        return;
 2794|    149|    }
 2795|       |    
 2796|    189|    if (app) {
  ------------------
  |  Branch (2796:9): [True: 189, False: 0]
  ------------------
 2797|    189|        *app = app_and_vhost.substr(0, q_pos);
 2798|    189|    }
 2799|    189|    if (vhost) {
  ------------------
  |  Branch (2799:9): [True: 189, False: 0]
  ------------------
 2800|    189|        butil::StringPiece qstr = app_and_vhost.substr(q_pos + 1);
 2801|    189|        butil::StringSplitter sp(qstr.data(), qstr.data() + qstr.size(), '&');
 2802|  1.36k|        for (; sp; ++sp) {
  ------------------
  |  Branch (2802:16): [True: 1.23k, False: 134]
  ------------------
 2803|  1.23k|            butil::StringPiece field(sp.field(), sp.length());
 2804|  1.23k|            if (field.starts_with("vhost=")) {
  ------------------
  |  Branch (2804:17): [True: 55, False: 1.17k]
  ------------------
 2805|     55|                *vhost = field.substr(6);
 2806|       |                // vhost cannot have port.
 2807|     55|                const size_t colon_pos = vhost->find_last_of(':');
 2808|     55|                if (colon_pos != butil::StringPiece::npos) {
  ------------------
  |  Branch (2808:21): [True: 22, False: 33]
  ------------------
 2809|     22|                    vhost->remove_suffix(vhost->size() - colon_pos);
 2810|     22|                }
 2811|     55|                return;
 2812|     55|            }
 2813|  1.23k|        }
 2814|    134|        vhost->clear();
 2815|    134|    }
 2816|    189|}

_ZN4brpc17SerializedRequestC2Ev:
   26|      2|    : NonreflectableMessage<SerializedRequest>() {
   27|      2|    SharedCtor();
   28|      2|}
_ZN4brpc17SerializedRequest10SharedCtorEv:
   36|      2|void SerializedRequest::SharedCtor() {
   37|      2|}

_ZN4brpc18SerializedResponseC2Ev:
   26|      2|    : NonreflectableMessage<SerializedResponse>() {
   27|      2|    SharedCtor();
   28|      2|}
_ZN4brpc18SerializedResponse10SharedCtorEv:
   36|      2|void SerializedResponse::SharedCtor() {
   37|      2|}

_ZN4brpc3URIC2Ev:
   31|    542|    : _port(-1)
   32|    542|    , _query_was_modified(false)
   33|    542|    , _initialized_query_map(false)
   34|    542|{}
_ZN4brpc3URID2Ev:
   36|    542|URI::~URI() {
   37|    542|}
_ZN4brpc3URI5ClearEv:
   39|    542|void URI::Clear() {
   40|    542|    _st.reset();
   41|    542|    _port = -1;
   42|    542|    _query_was_modified = false;
   43|    542|    _initialized_query_map = false;
   44|    542|    _host.clear();
   45|    542|    _path.clear();
   46|    542|    _user_info.clear();
   47|    542|    _fragment.clear();
   48|    542|    _scheme.clear();
   49|    542|    _query.clear();
   50|    542|    _query_map.clear();
   51|    542|}
_ZN4brpc3URI10SetHttpURLEPKc:
  158|    542|int URI::SetHttpURL(const char* url) {
  159|    542|    Clear();
  160|       |    
  161|    542|    const char* p = url;
  162|       |    // skip heading blanks
  163|    542|    if (*p == ' ') {
  ------------------
  |  Branch (163:9): [True: 15, False: 527]
  ------------------
  164|    228|        for (++p; *p == ' '; ++p) {}
  ------------------
  |  Branch (164:19): [True: 213, False: 15]
  ------------------
  165|     15|    }
  166|    542|    const char* start = p;
  167|       |    // Find end of host, locate scheme and user_info during the searching
  168|    542|    bool need_scheme = true;
  169|    542|    bool need_user_info = true;
  170|  5.42k|    for (; true; ++p) {
  ------------------
  |  Branch (170:12): [True: 5.42k, Folded]
  ------------------
  171|  5.42k|        const char action = g_url_parsing_fast_action_map[(int)*p];
  172|  5.42k|        if (action == URI_PARSE_CONTINUE) {
  ------------------
  |  Branch (172:13): [True: 2.25k, False: 3.16k]
  ------------------
  173|  2.25k|            continue;
  174|  2.25k|        }
  175|  3.16k|        if (action == URI_PARSE_BREAK) {
  ------------------
  |  Branch (175:13): [True: 512, False: 2.65k]
  ------------------
  176|    512|            break;
  177|    512|        }
  178|  2.65k|        if (!is_valid_char(*p)) {
  ------------------
  |  Branch (178:13): [True: 0, False: 2.65k]
  ------------------
  179|      0|            _st.set_error(EINVAL, "invalid character in url");
  180|      0|            return -1;
  181|  2.65k|        } else if (*p == ':') {
  ------------------
  |  Branch (181:20): [True: 1.08k, False: 1.57k]
  ------------------
  182|  1.08k|            if (p[1] == '/' && p[2] == '/' && need_scheme) {
  ------------------
  |  Branch (182:17): [True: 70, False: 1.01k]
  |  Branch (182:32): [True: 38, False: 32]
  |  Branch (182:47): [True: 37, False: 1]
  ------------------
  183|     37|                need_scheme = false;
  184|     37|                _scheme.assign(start, p - start);
  185|     37|                p += 2;
  186|     37|                start = p + 1;
  187|     37|            }
  188|  1.57k|        } else if (*p == '@') {
  ------------------
  |  Branch (188:20): [True: 1.54k, False: 30]
  ------------------
  189|  1.54k|            if (need_user_info) {
  ------------------
  |  Branch (189:17): [True: 34, False: 1.51k]
  ------------------
  190|     34|                need_user_info = false;
  191|     34|                _user_info.assign(start, p - start);
  192|     34|                start = p + 1;
  193|     34|            }
  194|  1.54k|        } else if (*p == ' ') {
  ------------------
  |  Branch (194:20): [True: 30, False: 0]
  ------------------
  195|     30|            if (!is_all_spaces(p + 1)) {
  ------------------
  |  Branch (195:17): [True: 20, False: 10]
  ------------------
  196|     20|                _st.set_error(EINVAL, "Invalid space in url");
  197|     20|                return -1;
  198|     20|            }
  199|     10|            break;
  200|     30|        }
  201|  2.65k|    }
  202|    522|    const char* host_end = SplitHostAndPort(start, p, &_port);
  203|    522|    _host.assign(start, host_end - start);
  204|    522|    if (*p == '/') {
  ------------------
  |  Branch (204:9): [True: 295, False: 227]
  ------------------
  205|    295|        start = p; //slash pointed by p is counted into _path
  206|    295|        ++p;
  207|  1.60k|        for (; *p && *p != '?' && *p != '#'; ++p) {
  ------------------
  |  Branch (207:16): [True: 1.50k, False: 102]
  |  Branch (207:22): [True: 1.33k, False: 169]
  |  Branch (207:35): [True: 1.32k, False: 3]
  ------------------
  208|  1.32k|            if (*p == ' ') {
  ------------------
  |  Branch (208:17): [True: 21, False: 1.30k]
  ------------------
  209|     21|                if (!is_all_spaces(p + 1)) {
  ------------------
  |  Branch (209:21): [True: 13, False: 8]
  ------------------
  210|     13|                    _st.set_error(EINVAL, "Invalid space in path");
  211|     13|                    return -1;
  212|     13|                }
  213|      8|                break;
  214|     21|            }
  215|  1.32k|        }
  216|    282|        _path.assign(start, p - start);
  217|    282|    }
  218|    509|    if (*p == '?') {
  ------------------
  |  Branch (218:9): [True: 207, False: 302]
  ------------------
  219|    207|        start = ++p;
  220|  3.43k|        for (; *p && *p != '#'; ++p) {
  ------------------
  |  Branch (220:16): [True: 3.26k, False: 168]
  |  Branch (220:22): [True: 3.25k, False: 9]
  ------------------
  221|  3.25k|            if (*p == ' ') {
  ------------------
  |  Branch (221:17): [True: 30, False: 3.22k]
  ------------------
  222|     30|                if (!is_all_spaces(p + 1)) {
  ------------------
  |  Branch (222:21): [True: 19, False: 11]
  ------------------
  223|     19|                    _st.set_error(EINVAL, "Invalid space in query");
  224|     19|                    return -1;
  225|     19|                }
  226|     11|                break;
  227|     30|            }
  228|  3.25k|        }
  229|    188|        _query.assign(start, p - start);
  230|    188|    }
  231|    490|    if (*p == '#') {
  ------------------
  |  Branch (231:9): [True: 51, False: 439]
  ------------------
  232|     51|        start = ++p;
  233|    520|        for (; *p; ++p) {
  ------------------
  |  Branch (233:16): [True: 487, False: 33]
  ------------------
  234|    487|            if (*p == ' ') {
  ------------------
  |  Branch (234:17): [True: 18, False: 469]
  ------------------
  235|     18|                if (!is_all_spaces(p + 1)) {
  ------------------
  |  Branch (235:21): [True: 9, False: 9]
  ------------------
  236|      9|                    _st.set_error(EINVAL, "Invalid space in fragment");
  237|      9|                    return -1;
  238|      9|                }
  239|      9|                break;
  240|     18|            }
  241|    487|        }
  242|     42|        _fragment.assign(start, p - start);
  243|     42|    }
  244|    481|    return 0;
  245|    490|}
uri.cpp:_ZN4brpcL13is_valid_charEc:
  107|  2.65k|static bool is_valid_char(char c) {
  108|  2.65k|    static const std::unordered_set<char> other_valid_char = {
  109|  2.65k|        ':', '/', '?', '#', '[', ']', '@', '!', '$', '&',
  110|  2.65k|        '\'', '(', ')', '*', '+', ',', ';', '=', '-', '.',
  111|  2.65k|        '_', '~', '%', ' '
  112|  2.65k|    };
  113|       |
  114|  2.65k|    return (isalnum(c) || other_valid_char.count(c));
  ------------------
  |  Branch (114:13): [True: 0, False: 2.65k]
  |  Branch (114:27): [True: 2.65k, False: 0]
  ------------------
  115|  2.65k|}
uri.cpp:_ZN4brpcL13is_all_spacesEPKc:
  117|     99|static bool is_all_spaces(const char* p) {
  118|  1.00k|    for (; *p == ' '; ++p) {}
  ------------------
  |  Branch (118:12): [True: 909, False: 99]
  ------------------
  119|     99|    return !*p;
  120|     99|}
_ZN4brpc16SplitHostAndPortEPKcS1_Pi:
   84|    522|                                    int* port) {
   85|    522|    uint64_t port_raw = 0;
   86|    522|    uint64_t multiply = 1;
   87|    755|    for (const char* q = host_end - 1; q > host_begin; --q) {
  ------------------
  |  Branch (87:40): [True: 400, False: 355]
  ------------------
   88|    400|        if (*q >= '0' && *q <= '9') {
  ------------------
  |  Branch (88:13): [True: 322, False: 78]
  |  Branch (88:26): [True: 233, False: 89]
  ------------------
   89|    233|            port_raw += (*q - '0') * multiply;
   90|    233|            multiply *= 10;
   91|    233|        } else if (*q == ':') {
  ------------------
  |  Branch (91:20): [True: 41, False: 126]
  ------------------
   92|     41|            *port = static_cast<int>(port_raw);
   93|     41|            return q;
   94|    126|        } else {
   95|    126|            break;
   96|    126|        }
   97|    400|    }
   98|    481|    *port = -1;
   99|    481|    return host_end;
  100|    522|}

_ZN4brpc3URI10SetHttpURLERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
   71|    542|    int SetHttpURL(const std::string& url) { return SetHttpURL(url.c_str()); }

_ZN7bthread11TaskOptionsC2Ebb:
  441|     36|    : high_priority(high_priority)
  442|     36|    , in_place_if_possible(in_place_if_possible)
  443|     36|{}

_ZN7bthread11EpollThreadC2Ev:
  119|      2|        : _epfd(-1)
  120|      2|        , _stop(false)
  121|      2|        , _tid(0) {
  122|      2|    }
_ZN7bthread9LazyArrayIPN5butil6atomicIiEELm262144ELm256EEC2Ev:
   56|      2|    LazyArray() {
   57|      2|        memset(static_cast<void*>(_blocks), 0, sizeof(butil::atomic<Block*>) * NBLOCK);
   58|      2|    }

key.cpp:_ZN7bthreadL13get_key_countEPv:
  417|      2|static int get_key_count(void*) {
  418|      2|    BAIDU_SCOPED_LOCK(bthread::s_key_mutex);
  ------------------
  |  |   47|      2|    decltype(::butil::detail::get_lock_guard<decltype(ref_of_lock)>()) \
  |  |   48|      2|    BAIDU_CONCAT(scoped_locker_dummy_at_line_, __LINE__)(ref_of_lock)
  |  |  ------------------
  |  |  |  |   88|      2|# define BAIDU_CONCAT(a, b) BAIDU_CONCAT_HELPER(a, b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|      2|# define BAIDU_CONCAT_HELPER(a, b) a##b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  419|      2|    return (int)nkey - (int)nfreekey;
  420|      2|}
key.cpp:_ZN7bthreadL18get_keytable_countEPv:
  421|      2|static size_t get_keytable_count(void*) {
  422|      2|    return nkeytable.load(butil::memory_order_relaxed);
  423|      2|}
key.cpp:_ZN7bthreadL19get_keytable_memoryEPv:
  424|      2|static size_t get_keytable_memory(void*) {
  425|      2|    const size_t n = nkeytable.load(butil::memory_order_relaxed);
  426|      2|    const size_t nsub = nsubkeytable.load(butil::memory_order_relaxed);
  427|      2|    return n * sizeof(KeyTable) + nsub * sizeof(SubKeyTable);
  428|      2|}

_ZN7bthread28first_sys_pthread_mutex_lockEP15pthread_mutex_t:
  496|      2|int first_sys_pthread_mutex_lock(pthread_mutex_t* mutex) {
  497|      2|    pthread_once(&init_sys_mutex_lock_once, init_sys_mutex_lock);
  498|      2|    return sys_pthread_mutex_lock(mutex);
  499|      2|}
pthread_mutex_init:
 1299|    194|                       const pthread_mutexattr_t* __restrict mutexattr) {
 1300|    194|    INIT_MUTEX_OWNER_MAP_ENTRY(mutex, mutexattr);
  ------------------
  |  |  787|    194|#define INIT_MUTEX_OWNER_MAP_ENTRY(mutex, mutexattr) ((void)0)
  ------------------
 1301|    194|    return bthread::sys_pthread_mutex_init(mutex, mutexattr);
 1302|    194|}
pthread_mutex_lock:
 1309|    260|int pthread_mutex_lock(pthread_mutex_t* mutex) {
 1310|    260|    return bthread::pthread_mutex_lock_impl(mutex);
 1311|    260|}
pthread_mutex_unlock:
 1324|    260|int pthread_mutex_unlock(pthread_mutex_t* mutex) {
 1325|    260|    return bthread::pthread_mutex_unlock_impl(mutex);
 1326|    260|}
mutex.cpp:_ZN7bthreadL19init_sys_mutex_lockEv:
  439|      2|static void init_sys_mutex_lock() {
  440|       |// When bRPC library is linked as a shared library, need to make sure bRPC
  441|       |// shared library is loaded before the pthread shared library. Otherwise,
  442|       |// it may cause runtime error: undefined symbol: pthread_mutex_xxx.
  443|       |// Alternatively, static linking can also avoid this problem.
  444|      2|#if defined(OS_LINUX)
  445|       |    // TODO: may need dlvsym when GLIBC has multiple versions of a same symbol.
  446|       |    // http://blog.fesnel.com/blog/2009/08/25/preloading-with-multiple-symbol-versions
  447|      2|    if (_dl_sym) {
  ------------------
  |  Branch (447:9): [True: 0, False: 2]
  ------------------
  448|      0|        sys_pthread_mutex_init = (MutexInitOp)_dl_sym(
  449|      0|            RTLD_NEXT, "pthread_mutex_init", (void*)init_sys_mutex_lock);
  450|      0|        sys_pthread_mutex_destroy = (MutexOp)_dl_sym(
  451|      0|            RTLD_NEXT, "pthread_mutex_destroy", (void*)init_sys_mutex_lock);
  452|      0|        sys_pthread_mutex_lock = (MutexOp)_dl_sym(
  453|      0|            RTLD_NEXT, "pthread_mutex_lock", (void*)init_sys_mutex_lock);
  454|      0|        sys_pthread_mutex_unlock = (MutexOp)_dl_sym(
  455|      0|            RTLD_NEXT, "pthread_mutex_unlock", (void*)init_sys_mutex_lock);
  456|      0|        sys_pthread_mutex_trylock = (MutexOp)_dl_sym(
  457|      0|            RTLD_NEXT, "pthread_mutex_trylock", (void*)init_sys_mutex_lock);
  458|      0|#if HAS_PTHREAD_MUTEX_TIMEDLOCK
  459|      0|        sys_pthread_mutex_timedlock = (TimedMutexOp)_dl_sym(
  460|      0|            RTLD_NEXT, "pthread_mutex_timedlock", (void*)init_sys_mutex_lock);
  461|      0|#endif // HAS_PTHREAD_MUTEX_TIMEDLOCK
  462|      2|    } else {
  463|       |        // _dl_sym may be undefined reference in some system, fallback to dlsym
  464|      2|        sys_pthread_mutex_init = (MutexInitOp)dlsym(RTLD_NEXT, "pthread_mutex_init");
  465|      2|        sys_pthread_mutex_destroy = (MutexOp)dlsym(RTLD_NEXT, "pthread_mutex_destroy");
  466|      2|        sys_pthread_mutex_lock = (MutexOp)dlsym(RTLD_NEXT, "pthread_mutex_lock");
  467|      2|        sys_pthread_mutex_unlock = (MutexOp)dlsym(RTLD_NEXT, "pthread_mutex_unlock");
  468|      2|        sys_pthread_mutex_trylock = (MutexOp)dlsym(RTLD_NEXT, "pthread_mutex_trylock");
  469|      2|#if HAS_PTHREAD_MUTEX_TIMEDLOCK
  470|      2|        sys_pthread_mutex_timedlock = (TimedMutexOp)dlsym(RTLD_NEXT, "pthread_mutex_timedlock");
  471|      2|#endif // HAS_PTHREAD_MUTEX_TIMEDLOCK
  472|      2|    }
  473|       |#elif defined(OS_MACOSX)
  474|       |    // TODO: look workaround for dlsym on mac
  475|       |    sys_pthread_mutex_init = (MutexInitOp)dlsym(RTLD_NEXT, "pthread_mutex_init");
  476|       |    sys_pthread_mutex_destroy = (MutexOp)dlsym(RTLD_NEXT, "pthread_mutex_destroy");
  477|       |    sys_pthread_mutex_lock = (MutexOp)dlsym(RTLD_NEXT, "pthread_mutex_lock");
  478|       |    sys_pthread_mutex_trylock = (MutexOp)dlsym(RTLD_NEXT, "pthread_mutex_trylock");
  479|       |    sys_pthread_mutex_unlock = (MutexOp)dlsym(RTLD_NEXT, "pthread_mutex_unlock");
  480|       |#endif
  481|      2|}
_ZN7bthread23pthread_mutex_lock_implEP15pthread_mutex_t:
  973|    260|BUTIL_FORCE_INLINE int pthread_mutex_lock_impl(pthread_mutex_t* mutex) {
  974|       |    return internal::pthread_mutex_lock_impl(mutex, NULL);
  975|    260|}
_ZN7bthread8internal23pthread_mutex_lock_implI15pthread_mutex_tEEiPT_PK8timespec:
  870|    260|BUTIL_FORCE_INLINE int pthread_mutex_lock_impl(Mutex* mutex, const struct timespec* abstime) {
  871|       |    // Don't change behavior of lock when profiler is off.
  872|    260|    if (!g_cp ||
  ------------------
  |  Branch (872:9): [True: 260, False: 0]
  ------------------
  873|       |        // collecting code including backtrace() and submit() may call
  874|       |        // pthread_mutex_lock and cause deadlock. Don't sample.
  875|    260|        tls_inside_lock) {
  ------------------
  |  Branch (875:9): [True: 0, False: 0]
  ------------------
  876|    260|        return pthread_mutex_lock_internal(mutex, abstime);
  877|    260|    }
  878|       |    // Don't slow down non-contended locks.
  879|      0|    int rc = pthread_mutex_trylock_internal(mutex);
  880|      0|    if (rc != EBUSY) {
  ------------------
  |  Branch (880:9): [True: 0, False: 0]
  ------------------
  881|      0|        return rc;
  882|      0|    }
  883|       |    // Ask bvar::Collector if this (contended) locking should be sampled
  884|      0|    const size_t sampling_range = bvar::is_collectable(&g_cp_sl);
  885|       |
  886|      0|    bthread_contention_site_t* csite = NULL;
  887|      0|#ifndef DONT_SPEEDUP_PTHREAD_CONTENTION_PROFILER_WITH_TLS
  888|      0|    TLSPthreadContentionSites& fast_alt = tls_csites;
  889|      0|    if (fast_alt.cp_version != g_cp_version) {
  ------------------
  |  Branch (889:9): [True: 0, False: 0]
  ------------------
  890|      0|        fast_alt.cp_version = g_cp_version;
  891|      0|        fast_alt.count = 0;
  892|      0|    }
  893|      0|    if (fast_alt.count < TLS_MAX_COUNT) {
  ------------------
  |  Branch (893:9): [True: 0, False: 0]
  ------------------
  894|      0|        MutexAndContentionSite& entry = fast_alt.list[fast_alt.count++];
  895|      0|        entry.mutex = mutex;
  896|      0|        csite = &entry.csite;
  897|      0|        if (!bvar::is_sampling_range_valid(sampling_range)) {
  ------------------
  |  Branch (897:13): [True: 0, False: 0]
  ------------------
  898|      0|            make_contention_site_invalid(&entry.csite);
  899|      0|            return pthread_mutex_lock_internal(mutex, abstime);
  900|      0|        }
  901|      0|    }
  902|      0|#endif
  903|      0|    if (!bvar::is_sampling_range_valid(sampling_range)) {  // don't sample
  ------------------
  |  Branch (903:9): [True: 0, False: 0]
  ------------------
  904|      0|        return pthread_mutex_lock_internal(mutex, abstime);
  905|      0|    }
  906|       |    // Lock and monitor the waiting time.
  907|      0|    const int64_t start_ns = butil::cpuwide_time_ns();
  908|      0|    rc = pthread_mutex_lock_internal(mutex, abstime);
  909|      0|    if (!rc) { // Inside lock
  ------------------
  |  Branch (909:9): [True: 0, False: 0]
  ------------------
  910|      0|        if (!csite) {
  ------------------
  |  Branch (910:13): [True: 0, False: 0]
  ------------------
  911|      0|            csite = add_pthread_contention_site(mutex);
  912|      0|            if (csite == NULL) {
  ------------------
  |  Branch (912:17): [True: 0, False: 0]
  ------------------
  913|      0|                return rc;
  914|      0|            }
  915|      0|        }
  916|      0|        csite->duration_ns = butil::cpuwide_time_ns() - start_ns;
  917|      0|        csite->sampling_range = sampling_range;
  918|      0|    } // else rare
  919|      0|    return rc;
  920|      0|}
_ZN7bthread8internal27pthread_mutex_lock_internalEP15pthread_mutex_tPK8timespec:
  798|    260|                                                   const struct timespec* abstime) {
  799|    260|    int rc = 0;
  800|    260|    if (NULL == abstime) {
  ------------------
  |  Branch (800:9): [True: 260, False: 0]
  ------------------
  801|    260|        FIND_SYS_PTHREAD_MUTEX_OWNER_MAP_ENTRY(mutex);
  ------------------
  |  |  789|    260|#define FIND_SYS_PTHREAD_MUTEX_OWNER_MAP_ENTRY(mutex) ((void)0)
  ------------------
  802|    260|        SYS_PTHREAD_MUTEX_CHECK_OWNER;
  ------------------
  |  |  790|    260|#define SYS_PTHREAD_MUTEX_CHECK_OWNER ((void)0)
  ------------------
  803|    260|        rc = sys_pthread_mutex_lock(mutex);
  804|    260|        if (0 == rc) {
  ------------------
  |  Branch (804:13): [True: 260, False: 0]
  ------------------
  805|    260|            SYS_PTHREAD_MUTEX_SET_OWNER;
  ------------------
  |  |  791|    260|#define SYS_PTHREAD_MUTEX_SET_OWNER ((void)0)
  ------------------
  806|    260|        }
  807|    260|    } else {
  808|      0|        rc = sys_pthread_mutex_timedlock(mutex, abstime);
  809|      0|        if (0 == rc) {
  ------------------
  |  Branch (809:13): [True: 0, False: 0]
  ------------------
  810|      0|            FIND_SYS_PTHREAD_MUTEX_OWNER_MAP_ENTRY(mutex);
  ------------------
  |  |  789|      0|#define FIND_SYS_PTHREAD_MUTEX_OWNER_MAP_ENTRY(mutex) ((void)0)
  ------------------
  811|      0|            SYS_PTHREAD_MUTEX_SET_OWNER;
  ------------------
  |  |  791|      0|#define SYS_PTHREAD_MUTEX_SET_OWNER ((void)0)
  ------------------
  812|      0|        }
  813|      0|    }
  814|    260|    if (0 == rc) {
  ------------------
  |  Branch (814:9): [True: 260, False: 0]
  ------------------
  815|    260|        ADD_TLS_PTHREAD_LOCK_COUNT;
  ------------------
  |  |  554|    260|#define ADD_TLS_PTHREAD_LOCK_COUNT ((void)0)
  ------------------
  816|    260|    }
  817|    260|    return rc;
  818|    260|}
_ZN7bthread25pthread_mutex_unlock_implEP15pthread_mutex_t:
  988|    260|BUTIL_FORCE_INLINE int pthread_mutex_unlock_impl(pthread_mutex_t* mutex) {
  989|    260|    return internal::pthread_mutex_unlock_impl(mutex);
  990|    260|}
_ZN7bthread8internal25pthread_mutex_unlock_implI15pthread_mutex_tEEiPT_:
  928|    260|BUTIL_FORCE_INLINE int pthread_mutex_unlock_impl(Mutex* mutex) {
  929|       |    // Don't change behavior of unlock when profiler is off.
  930|    260|    if (!g_cp || tls_inside_lock) {
  ------------------
  |  Branch (930:9): [True: 260, False: 0]
  |  Branch (930:18): [True: 0, False: 0]
  ------------------
  931|       |        // This branch brings an issue that an entry created by
  932|       |        // add_pthread_contention_site may not be cleared. Thus we add a
  933|       |        // 16-bit rolling version in the entry to find out such entry.
  934|    260|        return pthread_mutex_unlock_internal(mutex);
  935|    260|    }
  936|      0|    int64_t unlock_start_ns = 0;
  937|      0|    bool miss_in_tls = true;
  938|      0|    bthread_contention_site_t saved_csite = {0,0};
  939|      0|#ifndef DONT_SPEEDUP_PTHREAD_CONTENTION_PROFILER_WITH_TLS
  940|      0|    TLSPthreadContentionSites& fast_alt = tls_csites;
  941|      0|    for (int i = fast_alt.count - 1; i >= 0; --i) {
  ------------------
  |  Branch (941:38): [True: 0, False: 0]
  ------------------
  942|      0|        if (fast_alt.list[i].mutex == mutex) {
  ------------------
  |  Branch (942:13): [True: 0, False: 0]
  ------------------
  943|      0|            if (is_contention_site_valid(fast_alt.list[i].csite)) {
  ------------------
  |  Branch (943:17): [True: 0, False: 0]
  ------------------
  944|      0|                saved_csite = fast_alt.list[i].csite;
  945|      0|                unlock_start_ns = butil::cpuwide_time_ns();
  946|      0|            }
  947|      0|            fast_alt.list[i] = fast_alt.list[--fast_alt.count];
  948|      0|            miss_in_tls = false;
  949|      0|            break;
  950|      0|        }
  951|      0|    }
  952|      0|#endif
  953|       |    // Check the map to see if the lock is sampled. Notice that we're still
  954|       |    // inside critical section.
  955|      0|    if (miss_in_tls) {
  ------------------
  |  Branch (955:9): [True: 0, False: 0]
  ------------------
  956|      0|        if (remove_pthread_contention_site(mutex, &saved_csite)) {
  ------------------
  |  Branch (956:13): [True: 0, False: 0]
  ------------------
  957|      0|            unlock_start_ns = butil::cpuwide_time_ns();
  958|      0|        }
  959|      0|    }
  960|      0|    const int rc = pthread_mutex_unlock_internal(mutex);
  961|       |    // [Outside lock]
  962|      0|    if (unlock_start_ns) {
  ------------------
  |  Branch (962:9): [True: 0, False: 0]
  ------------------
  963|      0|        const int64_t unlock_end_ns = butil::cpuwide_time_ns();
  964|      0|        saved_csite.duration_ns += unlock_end_ns - unlock_start_ns;
  965|      0|        submit_contention(saved_csite, unlock_end_ns);
  966|      0|    }
  967|      0|    return rc;
  968|    260|}
_ZN7bthread8internal29pthread_mutex_unlock_internalEP15pthread_mutex_t:
  843|    260|BUTIL_FORCE_INLINE int pthread_mutex_unlock_internal(pthread_mutex_t* mutex) {
  844|    260|    SYS_PTHREAD_MUTEX_RESET_OWNER(mutex);
  ------------------
  |  |  792|    260|#define SYS_PTHREAD_MUTEX_RESET_OWNER(mutex) ((void)0)
  ------------------
  845|    260|    SUB_TLS_PTHREAD_LOCK_COUNT;
  ------------------
  |  |  555|    260|#define SUB_TLS_PTHREAD_LOCK_COUNT ((void)0)
  ------------------
  846|    260|    return sys_pthread_mutex_unlock(mutex);
  847|    260|}

stack.cpp:_ZN7bthreadL15get_stack_countEPv:
   50|      2|static int64_t get_stack_count(void*) {
   51|      2|    return s_stack_count.load(butil::memory_order_relaxed);
   52|      2|}

_ZN5butil12ArenaOptionsC2Ev:
   27|      2|    : initial_block_size(64)
   28|      2|    , max_block_size(8192)
   29|      2|{}
_ZN5butil5ArenaC2ERKNS_12ArenaOptionsE:
   32|      2|    : _cur_block(NULL)
   33|      2|    , _isolated_blocks(NULL)
   34|      2|    , _block_size(options.initial_block_size)
   35|      2|    , _options(options) {
   36|      2|}

_ZN5butil13static_atomicIlE4loadESt12memory_order:
  293|      2|    T load(memory_order o) { return ref().load(o); }
_ZN5butil13static_atomicIlE3refEv:
  316|      2|    atomic<T>& ref() {
  317|       |        // Suppress strict-alias warnings.
  318|      2|        atomic<T>* p = reinterpret_cast<atomic<T>*>(&val);
  319|      2|        return *p;
  320|      2|    }
_ZN5butil13static_atomicImE4loadESt12memory_order:
  293|      6|    T load(memory_order o) { return ref().load(o); }
_ZN5butil13static_atomicImE3refEv:
  316|      6|    atomic<T>& ref() {
  317|       |        // Suppress strict-alias warnings.
  318|      6|        atomic<T>* p = reinterpret_cast<atomic<T>*>(&val);
  319|      6|        return *p;
  320|      6|    }
_ZN5butil6atomicIPN7bthread9LazyArrayIPNS0_IiEELm262144ELm256EE5BlockEEC2Ev:
  234|   524k|    atomic() {}

atomicops_internals_x86_gcc.cc:_ZN12_GLOBAL__N_123AtomicOpsx86InitializerC2Ev:
   88|      2|  AtomicOpsx86Initializer() {
   89|      2|    AtomicOps_Internalx86CPUFeaturesInit();
   90|      2|  }
atomicops_internals_x86_gcc.cc:_ZN12_GLOBAL__N_136AtomicOps_Internalx86CPUFeaturesInitEv:
   48|      2|void AtomicOps_Internalx86CPUFeaturesInit() {
   49|      2|  uint32_t eax;
   50|      2|  uint32_t ebx;
   51|      2|  uint32_t ecx;
   52|      2|  uint32_t edx;
   53|       |
   54|       |  // Get vendor string (issue CPUID with eax = 0)
   55|      2|  cpuid(eax, ebx, ecx, edx, 0);
  ------------------
  |  |   30|      2|  asm("mov %%rbx, %%rdi\n"     \
  |  |   31|      2|      "cpuid\n"                \
  |  |   32|      2|      "xchg %%rdi, %%rbx\n"    \
  |  |   33|      2|      : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
  ------------------
   56|      2|  char vendor[13];
   57|      2|  memcpy(vendor, &ebx, 4);
   58|      2|  memcpy(vendor + 4, &edx, 4);
   59|      2|  memcpy(vendor + 8, &ecx, 4);
   60|      2|  vendor[12] = 0;
   61|       |
   62|       |  // get feature flags in ecx/edx, and family/model in eax
   63|      2|  cpuid(eax, ebx, ecx, edx, 1);
  ------------------
  |  |   30|      2|  asm("mov %%rbx, %%rdi\n"     \
  |  |   31|      2|      "cpuid\n"                \
  |  |   32|      2|      "xchg %%rdi, %%rbx\n"    \
  |  |   33|      2|      : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
  ------------------
   64|       |
   65|      2|  int family = (eax >> 8) & 0xf;        // family and model fields
   66|      2|  int model = (eax >> 4) & 0xf;
   67|      2|  if (family == 0xf) {                  // use extended family and model fields
  ------------------
  |  Branch (67:7): [True: 0, False: 2]
  ------------------
   68|      0|    family += (eax >> 20) & 0xff;
   69|      0|    model += ((eax >> 16) & 0xf) << 4;
   70|      0|  }
   71|       |
   72|       |  // Opteron Rev E has a bug in which on very rare occasions a locked
   73|       |  // instruction doesn't act as a read-acquire barrier if followed by a
   74|       |  // non-locked read-modify-write instruction.  Rev F has this bug in
   75|       |  // pre-release versions, but not in versions released to customers,
   76|       |  // so we test only for Rev E, which is family 15, model 32..63 inclusive.
   77|      2|  if (strcmp(vendor, "AuthenticAMD") == 0 &&       // AMD
  ------------------
  |  Branch (77:7): [True: 0, False: 2]
  ------------------
   78|      0|      family == 15 &&
  ------------------
  |  Branch (78:7): [True: 0, False: 0]
  ------------------
   79|      0|      32 <= model && model <= 63) {
  ------------------
  |  Branch (79:7): [True: 0, False: 0]
  |  Branch (79:22): [True: 0, False: 0]
  ------------------
   80|      0|    AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug = true;
   81|      2|  } else {
   82|      2|    AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug = false;
   83|      2|  }
   84|      2|}

_ZN5butil6subtle13Release_StoreEPVll:
  181|      2|inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
  182|      2|  ATOMICOPS_COMPILER_BARRIER();
  ------------------
  |  |   24|      2|#define ATOMICOPS_COMPILER_BARRIER() __asm__ __volatile__("" : : : "memory")
  ------------------
  183|       |
  184|      2|  *ptr = value; // An x86 store acts as a release barrier
  185|       |                // for current AMD/Intel chips as of Jan 2008.
  186|       |                // See also Acquire_Load(), below.
  187|       |
  188|       |  // When new chips come out, check:
  189|       |  //  IA-32 Intel Architecture Software Developer's Manual, Volume 3:
  190|       |  //  System Programming Guide, Chatper 7: Multiple-processor management,
  191|       |  //  Section 7.2, Memory Ordering.
  192|       |  // Last seen at:
  193|       |  //   http://developer.intel.com/design/pentium4/manuals/index_new.htm
  194|       |  //
  195|       |  // x86 stores/loads fail to act as barriers for a few instructions (clflush
  196|       |  // maskmovdqu maskmovq movntdq movnti movntpd movntps movntq) but these are
  197|       |  // not generated by the compiler, and are rare.  Users of these instructions
  198|       |  // need to know about cache behaviour in any case since all of these involve
  199|       |  // either flushing cache lines or non-temporal cache hints.
  200|      2|}
_ZN5butil6subtle12Acquire_LoadEPVKl:
  206|     10|inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
  207|     10|  Atomic64 value = *ptr; // An x86 load acts as a acquire barrier,
  208|       |                         // for current AMD/Intel chips as of Jan 2008.
  209|       |                         // See also Release_Store(), above.
  210|     10|  ATOMICOPS_COMPILER_BARRIER();
  ------------------
  |  |   24|     10|#define ATOMICOPS_COMPILER_BARRIER() __asm__ __volatile__("" : : : "memory")
  ------------------
  211|     10|  return value;
  212|     10|}

_ZN5butil8demangleB5cxx11EPKc:
   30|    908|std::string demangle(const char* name) {
   31|       |    // mangled_name
   32|       |    //   A NULL-terminated character string containing the name to
   33|       |    //   be demangled.
   34|       |    // output_buffer:
   35|       |    //   A region of memory, allocated with malloc, of *length bytes,
   36|       |    //   into which the demangled name is stored. If output_buffer is
   37|       |    //   not long enough, it is expanded using realloc. output_buffer
   38|       |    //   may instead be NULL; in that case, the demangled name is placed
   39|       |    //   in a region of memory allocated with malloc.
   40|       |    // length
   41|       |    //   If length is non-NULL, the length of the buffer containing the
   42|       |    //   demangled name is placed in *length.
   43|       |    // status
   44|       |    //   *status is set to one of the following values:
   45|       |    //    0: The demangling operation succeeded.
   46|       |    //   -1: A memory allocation failure occurred.
   47|       |    //   -2: mangled_name is not a valid name under the C++ ABI
   48|       |    //       mangling rules.
   49|       |    //   -3: One of the arguments is invalid.
   50|    908|    int status = 0;
   51|    908|    char* buf = abi::__cxa_demangle(name, NULL, NULL, &status);
   52|    908|    if (status == 0 && buf) {
  ------------------
  |  Branch (52:9): [True: 908, False: 0]
  |  Branch (52:24): [True: 908, False: 0]
  ------------------
   53|    908|        std::string s(buf);
   54|    908|        free(buf);
   55|    908|        return s;
   56|    908|    }
   57|      0|    return std::string(name);
   58|    908|}

_ZNK5butil13DefaultHasherINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclERKS6_:
  562|     48|    std::size_t operator()(const std::string& s) const {
  563|     48|        std::size_t result = 0;
  564|    856|        for (std::string::const_iterator i = s.begin(); i != s.end(); ++i) {
  ------------------
  |  Branch (564:57): [True: 808, False: 48]
  ------------------
  565|    808|            result = result * 101 + *i;
  566|    808|        }
  567|     48|        return result;        
  568|     48|    }
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_NS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE26init_buckets_and_thumbnailEPNSC_6BucketEPmm:
  369|    542|                                           size_t nbucket) {
  370|  9.21k|        for (size_t i = 0; i < nbucket; ++i) {
  ------------------
  |  Branch (370:28): [True: 8.67k, False: 542]
  ------------------
  371|  8.67k|            buckets[i].set_invalid();
  372|  8.67k|        }
  373|    542|        buckets[nbucket].next = NULL;
  374|    542|        if (_Sparse) {
  ------------------
  |  Branch (374:13): [Folded, False: 542]
  ------------------
  375|      0|            bit_array_clear(thumbnail, nbucket);
  376|      0|        }
  377|    542|    }
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_NS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE6Bucket11set_invalidEv:
  292|  8.67k|        void set_invalid() { next = (Bucket*)-1UL; }
_ZNK5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_NS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE18is_default_bucketsEv:
  363|    542|    bool is_default_buckets() const {
  364|    542|        return _buckets == (Bucket*)(&_default_buckets);
  365|    542|    }
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_NS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE6BucketC2Ev:
  283|  9.21k|        Bucket() : next((Bucket*)-1UL) {}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE6BucketC2Ev:
  283|  1.08k|        Bucket() : next((Bucket*)-1UL) {}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE26init_buckets_and_thumbnailEPNSE_6BucketEPmm:
  369|    128|                                           size_t nbucket) {
  370|  66.6k|        for (size_t i = 0; i < nbucket; ++i) {
  ------------------
  |  Branch (370:28): [True: 66.5k, False: 128]
  ------------------
  371|  66.5k|            buckets[i].set_invalid();
  372|  66.5k|        }
  373|    128|        buckets[nbucket].next = NULL;
  374|    128|        if (_Sparse) {
  ------------------
  |  Branch (374:13): [Folded, False: 128]
  ------------------
  375|      0|            bit_array_clear(thumbnail, nbucket);
  376|      0|        }
  377|    128|    }
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE6Bucket11set_invalidEv:
  292|  66.5k|        void set_invalid() { next = (Bucket*)-1UL; }
_ZNK5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE5emptyEv:
  274|     64|    bool empty() const { return _size == 0; }
_ZNK5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE18is_default_bucketsEv:
  363|    128|    bool is_default_buckets() const {
  364|    128|        return _buckets == (Bucket*)(&_default_buckets);
  365|    128|    }
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE16init_load_factorEj:
  355|     64|    void init_load_factor(u_int load_factor) {
  356|     64|        if (_is_default_load_factor) {
  ------------------
  |  Branch (356:13): [True: 64, False: 0]
  ------------------
  357|     64|            _is_default_load_factor = false;
  358|     64|            _load_factor = load_factor;
  359|     64|        }
  360|     64|    }
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE14is_too_crowdedEmmj:
  351|     64|    static bool is_too_crowded(size_t size, size_t nbucket, u_int load_factor) {
  352|     64|        return size * 100 >= nbucket * load_factor;
  353|     64|    }
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE14NewBucketsInfoC2EPNSE_6BucketEPmm:
  327|     64|            : buckets(b), thumbnail(t), nbucket(n) {}
_ZNK5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE6Bucket8is_validEv:
  291|  1.20k|        bool is_valid() const { return next != (const Bucket*)-1UL; }
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE6BucketC2ERKS6_:
  284|     24|        explicit Bucket(const _K& k) : next(NULL) {
  285|     24|            element_space_.Init(k);
  286|     24|        }
_ZN5butil14FlatMapElementINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryEEC2ERKS6_:
  486|     24|    explicit FlatMapElement(const K& k) : _key(k), _value(T()) {}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE6Bucket7elementEv:
  294|     24|        Element& element() { return *element_space_; }
_ZN5butil14FlatMapElementINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryEE10second_refEv:
  496|     24|    T& second_ref() { return _value; }
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE13get_allocatorEv:
  344|     64|    allocator_type& get_allocator() { return _pool.get_allocator(); }

_ZN5butil11find_power2Em:
   45|     64|inline uint64_t find_power2(uint64_t b) {
   46|     64|    b -= 1;
   47|     64|    b |= (b >> 1);
   48|     64|    b |= (b >> 2);
   49|     64|    b |= (b >> 4);
   50|     64|    b |= (b >> 8);
   51|     64|    b |= (b >> 16);
   52|     64|    b |= (b >> 32);
   53|     64|    return b + 1;
   54|     64|}
_ZN5butil13flatmap_roundEm:
   61|     64|inline size_t flatmap_round(size_t nbucket) {
   62|       |#ifdef FLAT_MAP_ROUND_BUCKET_BY_USE_NEXT_PRIME    
   63|       |    return find_next_prime(nbucket);
   64|       |#else
   65|       |    // the lowerbound fixes the corner case of nbucket=0 which results in coredump during seeking the map.
   66|     64|    return nbucket <= 8 ? 8 : find_power2(nbucket);
  ------------------
  |  Branch (66:12): [True: 0, False: 64]
  ------------------
   67|     64|#endif
   68|     64|}
_ZN5butil11flatmap_modEmm:
   70|     48|inline size_t flatmap_mod(size_t hash_code, size_t nbucket) {
   71|       |#ifdef FLAT_MAP_ROUND_BUCKET_BY_USE_NEXT_PRIME
   72|       |    return hash_code % nbucket;
   73|       |#else
   74|     48|    return hash_code & (nbucket - 1);
   75|     48|#endif
   76|     48|}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_NS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE5clearEv:
  512|  1.08k|void FlatMap<_K, _T, _H, _E, _S, _A, _M>::clear() {
  513|  1.08k|    if (0 == _size) {
  ------------------
  |  Branch (513:9): [True: 1.08k, False: 0]
  ------------------
  514|  1.08k|        return;
  515|  1.08k|    }
  516|      0|    _size = 0;
  517|      0|    if (NULL != _buckets) {
  ------------------
  |  Branch (517:9): [True: 0, False: 0]
  ------------------
  518|      0|        for (size_t i = 0; i < _nbucket; ++i) {
  ------------------
  |  Branch (518:28): [True: 0, False: 0]
  ------------------
  519|      0|            Bucket& first_node = _buckets[i];
  520|      0|            if (first_node.is_valid()) {
  ------------------
  |  Branch (520:17): [True: 0, False: 0]
  ------------------
  521|      0|                first_node.destroy_element();
  522|      0|                Bucket* p = first_node.next;
  523|      0|                while (p) {
  ------------------
  |  Branch (523:24): [True: 0, False: 0]
  ------------------
  524|      0|                    Bucket* next_p = p->next;
  525|      0|                    p->destroy_element();
  526|      0|                    _pool.back(p);
  527|      0|                    p = next_p;
  528|      0|                }
  529|      0|                first_node.set_invalid();
  530|      0|            }
  531|      0|        }
  532|      0|    }
  533|      0|    if (NULL != _thumbnail) {
  ------------------
  |  Branch (533:9): [True: 0, False: 0]
  ------------------
  534|      0|        bit_array_clear(_thumbnail, _nbucket);
  535|      0|    }
  536|      0|}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_NS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EEC2ERKS8_RKSA_RKSB_:
  221|    542|    : _size(0)
  222|    542|    , _nbucket(DEFAULT_NBUCKET)
  223|    542|    , _buckets((Bucket*)(&_default_buckets))
  224|    542|    , _thumbnail(_S ? _default_thumbnail : NULL)
  ------------------
  |  Branch (224:18): [Folded, False: 542]
  ------------------
  225|    542|    , _load_factor(80)
  226|    542|    , _is_default_load_factor(true)
  227|    542|    , _hashfn(hashfn)
  228|    542|    , _eql(eql)
  229|    542|    , _pool(alloc) {
  230|    542|    init_buckets_and_thumbnail(_buckets, _thumbnail, _nbucket);
  231|    542|}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_NS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EED2Ev:
  245|    542|FlatMap<_K, _T, _H, _E, _S, _A, _M>::~FlatMap() {
  246|    542|    clear();
  247|    542|    if (!is_default_buckets()) {
  ------------------
  |  Branch (247:9): [True: 0, False: 542]
  ------------------
  248|      0|        get_allocator().Free(_buckets);
  249|      0|        _buckets = NULL;
  250|      0|        bit_array_free(_thumbnail);
  251|       |        _thumbnail = NULL;
  252|      0|    }
  253|    542|    _nbucket = 0;
  254|    542|    _load_factor = 0;
  255|    542|}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EEC2ERKSA_RKSC_RKSD_:
  221|     64|    : _size(0)
  222|     64|    , _nbucket(DEFAULT_NBUCKET)
  223|     64|    , _buckets((Bucket*)(&_default_buckets))
  224|     64|    , _thumbnail(_S ? _default_thumbnail : NULL)
  ------------------
  |  Branch (224:18): [Folded, False: 64]
  ------------------
  225|     64|    , _load_factor(80)
  226|     64|    , _is_default_load_factor(true)
  227|     64|    , _hashfn(hashfn)
  228|     64|    , _eql(eql)
  229|     64|    , _pool(alloc) {
  230|     64|    init_buckets_and_thumbnail(_buckets, _thumbnail, _nbucket);
  231|     64|}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE4initEmj:
  320|     64|int FlatMap<_K, _T, _H, _E, _S, _A, _M>::init(size_t nbucket, u_int load_factor) {
  321|     64|    if (nbucket <= _nbucket || load_factor < 10 || load_factor > 100 ||
  ------------------
  |  Branch (321:9): [True: 0, False: 64]
  |  Branch (321:32): [True: 0, False: 64]
  |  Branch (321:52): [True: 0, False: 64]
  ------------------
  322|     64|        !_is_default_load_factor || !empty() || !is_default_buckets()) {
  ------------------
  |  Branch (322:9): [True: 0, False: 64]
  |  Branch (322:37): [True: 0, False: 64]
  |  Branch (322:49): [True: 0, False: 64]
  ------------------
  323|      0|        return 0;
  324|      0|    }
  325|       |
  326|     64|    init_load_factor(load_factor);
  327|     64|    return resize(nbucket) ? 0 : -1;
  ------------------
  |  Branch (327:12): [True: 64, False: 0]
  ------------------
  328|     64|}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE6resizeEm:
  755|     64|bool FlatMap<_K, _T, _H, _E, _S, _A, _M>::resize(size_t nbucket) {
  756|     64|    optional<NewBucketsInfo> info = new_buckets_and_thumbnail(_size, nbucket);
  757|     64|    if (!info.has_value()) {
  ------------------
  |  Branch (757:9): [True: 0, False: 64]
  ------------------
  758|      0|        return false;
  759|      0|    }
  760|       |
  761|     64|    for (iterator it = begin(); it != end(); ++it) {
  ------------------
  |  Branch (761:33): [True: 0, False: 64]
  ------------------
  762|      0|        const key_type& key = Element::first_ref_from_value(*it);
  763|      0|        const size_t index = flatmap_mod(_hashfn(key), info->nbucket);
  764|      0|        Bucket& first_node = info->buckets[index];
  765|      0|        if (!first_node.is_valid()) {
  ------------------
  |  Branch (765:13): [True: 0, False: 0]
  ------------------
  766|      0|            if (_S) {
  ------------------
  |  Branch (766:17): [Folded, False: 0]
  ------------------
  767|      0|                bit_array_set(info->thumbnail, index);
  768|      0|            }
  769|      0|            new (&first_node) Bucket(key);
  770|      0|            first_node.element().second_ref() =
  771|      0|                Element::second_movable_ref_from_value(*it);
  772|      0|        } else {
  773|      0|            Bucket* newp = new (_pool.get()) Bucket(key);
  774|      0|            newp->element().second_ref() =
  775|      0|                Element::second_movable_ref_from_value(*it);
  776|      0|            newp->next = first_node.next;
  777|      0|            first_node.next = newp;
  778|      0|        }
  779|      0|    }
  780|     64|    size_t saved_size = _size;
  781|     64|    clear();
  782|     64|    if (!is_default_buckets()) {
  ------------------
  |  Branch (782:9): [True: 0, False: 64]
  ------------------
  783|      0|        get_allocator().Free(_buckets);
  784|      0|        if (_S) {
  ------------------
  |  Branch (784:13): [Folded, False: 0]
  ------------------
  785|      0|            bit_array_free(_thumbnail);
  786|      0|        }
  787|      0|    }
  788|     64|    _nbucket = info->nbucket;
  789|     64|    _buckets = info->buckets;
  790|     64|    _thumbnail = info->thumbnail;
  791|     64|    _size = saved_size;
  792|       |
  793|     64|    return true;
  794|     64|}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE25new_buckets_and_thumbnailEmm:
  716|     64|                                                               size_t new_nbucket) {
  717|     64|    size_t bump = 0;
  718|     64|    do {
  719|       |        // The first iteration uses 'new_nbucket + 0' ensures that when new_nbucket is a power
  720|       |        // of 2 and is already sufficient to accommodate `size`, it does not need to be doubled.
  721|       |        // Subsequent use of 'new_nbucket + 1' avoids an infinite loop.
  722|     64|        new_nbucket = flatmap_round(new_nbucket + bump);
  723|     64|        bump = 1;
  724|     64|    } while (is_too_crowded(size, new_nbucket, _load_factor));
  ------------------
  |  Branch (724:14): [True: 0, False: 64]
  ------------------
  725|     64|    if (_nbucket == new_nbucket) {
  ------------------
  |  Branch (725:9): [True: 0, False: 64]
  ------------------
  726|      0|        return nullopt;
  727|      0|    }
  728|       |    // Note: need an extra bucket to let iterator know where buckets end.
  729|     64|    auto buckets = (Bucket*)get_allocator().Alloc(
  730|     64|        sizeof(Bucket) * (new_nbucket + 1/*note*/));
  731|     64|    auto guard = MakeScopeGuard([buckets, this]() {
  732|     64|        get_allocator().Free(buckets);
  733|     64|    });
  734|     64|    if (NULL == buckets) {
  ------------------
  |  Branch (734:9): [True: 0, False: 64]
  ------------------
  735|      0|        LOG(FATAL) << "Fail to new Buckets";
  ------------------
  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  736|      0|        return nullopt;
  737|      0|    }
  738|       |
  739|     64|    uint64_t* thumbnail = NULL;
  740|     64|    if (_S) {
  ------------------
  |  Branch (740:9): [Folded, False: 64]
  ------------------
  741|      0|        thumbnail = bit_array_malloc(new_nbucket);
  742|      0|        if (NULL == thumbnail) {
  ------------------
  |  Branch (742:13): [True: 0, False: 0]
  ------------------
  743|      0|            LOG(FATAL) << "Fail to new thumbnail";
  ------------------
  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  744|      0|            return nullopt;
  745|      0|        }
  746|      0|    }
  747|       |
  748|     64|    guard.dismiss();
  749|     64|    init_buckets_and_thumbnail(buckets, thumbnail, new_nbucket);
  750|     64|    return NewBucketsInfo{buckets, thumbnail, new_nbucket};
  751|     64|}
_ZNK5butil15FlatMapIteratorINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EEESt4pairIKS7_S9_EEneERKSJ_:
  106|     64|    { return _node != rhs._node; }
_ZN5butil15FlatMapIteratorINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EEESt4pairIKS7_S9_EE23find_and_set_valid_nodeEv:
  137|    128|    void find_and_set_valid_node() {
  138|  1.15k|        for (; !_entry->is_valid(); ++_entry);
  ------------------
  |  Branch (138:16): [True: 1.02k, False: 128]
  ------------------
  139|    128|        _node = _entry;
  140|    128|    }
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE5clearEv:
  512|     64|void FlatMap<_K, _T, _H, _E, _S, _A, _M>::clear() {
  513|     64|    if (0 == _size) {
  ------------------
  |  Branch (513:9): [True: 64, False: 0]
  ------------------
  514|     64|        return;
  515|     64|    }
  516|      0|    _size = 0;
  517|      0|    if (NULL != _buckets) {
  ------------------
  |  Branch (517:9): [True: 0, False: 0]
  ------------------
  518|      0|        for (size_t i = 0; i < _nbucket; ++i) {
  ------------------
  |  Branch (518:28): [True: 0, False: 0]
  ------------------
  519|      0|            Bucket& first_node = _buckets[i];
  520|      0|            if (first_node.is_valid()) {
  ------------------
  |  Branch (520:17): [True: 0, False: 0]
  ------------------
  521|      0|                first_node.destroy_element();
  522|      0|                Bucket* p = first_node.next;
  523|      0|                while (p) {
  ------------------
  |  Branch (523:24): [True: 0, False: 0]
  ------------------
  524|      0|                    Bucket* next_p = p->next;
  525|      0|                    p->destroy_element();
  526|      0|                    _pool.back(p);
  527|      0|                    p = next_p;
  528|      0|                }
  529|      0|                first_node.set_invalid();
  530|      0|            }
  531|      0|        }
  532|      0|    }
  533|      0|    if (NULL != _thumbnail) {
  ------------------
  |  Branch (533:9): [True: 0, False: 0]
  ------------------
  534|      0|        bit_array_clear(_thumbnail, _nbucket);
  535|      0|    }
  536|      0|}
_ZNK5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE4seekIS6_EEPS8_RKT_:
  548|     24|_T* FlatMap<_K, _T, _H, _E, _S, _A, _M>::seek(const K2& key) const {
  549|     24|    Bucket& first_node = _buckets[flatmap_mod(_hashfn(key), _nbucket)];
  550|     24|    if (!first_node.is_valid()) {
  ------------------
  |  Branch (550:9): [True: 24, False: 0]
  ------------------
  551|     24|        return NULL;
  552|     24|    }
  553|      0|    if (_eql(first_node.element().first_ref(), key)) {
  ------------------
  |  Branch (553:9): [True: 0, False: 0]
  ------------------
  554|      0|        return &first_node.element().second_ref();
  555|      0|    }
  556|      0|    Bucket *p = first_node.next;
  557|      0|    while (p) {
  ------------------
  |  Branch (557:12): [True: 0, False: 0]
  ------------------
  558|      0|        if (_eql(p->element().first_ref(), key)) {
  ------------------
  |  Branch (558:13): [True: 0, False: 0]
  ------------------
  559|      0|            return &p->element().second_ref();
  560|      0|        }
  561|      0|        p = p->next;
  562|      0|    }
  563|      0|    return NULL;
  564|      0|}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EEixILb0EEENSt9enable_ifIXntT_ERS8_E4typeERKS6_:
  592|     24|FlatMap<_K, _T, _H, _E, _S, _A, _M>::operator[](const key_type& key) {
  593|     24|    const size_t index = flatmap_mod(_hashfn(key), _nbucket);
  594|     24|    Bucket& first_node = _buckets[index];
  595|     24|    if (!first_node.is_valid()) {
  ------------------
  |  Branch (595:9): [True: 24, False: 0]
  ------------------
  596|     24|        ++_size;
  597|     24|        if (_S) {
  ------------------
  |  Branch (597:13): [Folded, False: 24]
  ------------------
  598|      0|            bit_array_set(_thumbnail, index);
  599|      0|        }
  600|     24|        new (&first_node) Bucket(key);
  601|     24|        return first_node.element().second_ref();
  602|     24|    }
  603|      0|    Bucket *p = &first_node;
  604|      0|    while (true) {
  ------------------
  |  Branch (604:12): [True: 0, Folded]
  ------------------
  605|      0|        if (_eql(p->element().first_ref(), key)) {
  ------------------
  |  Branch (605:13): [True: 0, False: 0]
  ------------------
  606|      0|            return p->element().second_ref();
  607|      0|        }
  608|      0|        if (NULL == p->next) {
  ------------------
  |  Branch (608:13): [True: 0, False: 0]
  ------------------
  609|      0|            if (is_too_crowded(_size) && resize(_nbucket + 1)) {
  ------------------
  |  Branch (609:17): [True: 0, False: 0]
  |  Branch (609:42): [True: 0, False: 0]
  ------------------
  610|      0|                return operator[](key);
  611|      0|            }
  612|       |            // Fail to resize is OK.
  613|      0|            ++_size;
  614|      0|            Bucket* newp = new (_pool.get()) Bucket(key);
  615|      0|            p->next = newp;
  616|      0|            return newp->element().second_ref();
  617|      0|        }
  618|      0|        p = p->next;
  619|      0|    }
  620|      0|}
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE5beginEv:
  820|     64|FlatMap<_K, _T, _H, _E, _S, _A, _M>::begin() {
  821|     64|    return iterator(this, 0);
  822|     64|}
_ZN5butil15FlatMapIteratorINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EEESt4pairIKS7_S9_EEC2EPKSF_m:
   92|    128|    FlatMapIterator(const Map* map, size_t pos) {
   93|    128|        _entry = map->_buckets + pos;
   94|    128|        find_and_set_valid_node();
   95|    128|    }
_ZN5butil7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS6_EENS_14DefaultEqualToIS6_EELb0ENS_11PtAllocatorELb0EE3endEv:
  827|     64|FlatMap<_K, _T, _H, _E, _S, _A, _M>::end() {
  828|     64|    return iterator(this, _nbucket);
  829|     64|}

_ZN5butil8LinkNodeIN4bvar6detail7SamplerEE18InsertBeforeAsListEPS4_:
  102|     10|  void InsertBeforeAsList(LinkNode<T>* e) {
  103|     10|    LinkNode<T>* prev = this->previous_;
  104|     10|    prev->next_ = e;
  105|     10|    this->previous_ = e->previous_;
  106|     10|    e->previous_->next_ = this;
  107|     10|    e->previous_ = prev;
  108|     10|  }
_ZN5butil10LinkedListIN4bvar6detail13AgentCombinerIPNS2_7SamplerES5_NS2_14CombineSamplerEE5AgentEEC2Ev:
  167|      2|  LinkedList() {}
_ZN5butil8LinkNodeIN4bvar6detail13AgentCombinerIPNS2_7SamplerES5_NS2_14CombineSamplerEE5AgentEEC2Ev:
   88|    106|  LinkNode() : previous_(this), next_(this) {}
_ZNK5butil10LinkedListIN4bvar6detail13AgentCombinerIPNS2_7SamplerES5_NS2_14CombineSamplerEE5AgentEE4headEv:
  179|      2|  LinkNode<T>* head() const {
  180|      2|    return root_.next();
  181|      2|  }
_ZNK5butil10LinkedListIN4bvar6detail13AgentCombinerIPNS2_7SamplerES5_NS2_14CombineSamplerEE5AgentEE3endEv:
  187|      4|  const LinkNode<T>* end() const {
  188|      4|    return &root_;
  189|      4|  }
_ZN5butil8LinkNodeIN4bvar6detail13AgentCombinerIPNS2_7SamplerES5_NS2_14CombineSamplerEE5AgentEE5valueEv:
  150|      2|  T* value() {
  151|      2|    return static_cast<T*>(this);
  152|      2|  }
_ZNK5butil8LinkNodeIN4bvar6detail13AgentCombinerIPNS2_7SamplerES5_NS2_14CombineSamplerEE5AgentEE4nextEv:
  141|      4|  LinkNode<T>* next() const {
  142|      4|    return next_;
  143|      4|  }
_ZN5butil8LinkNodeIN4bvar6detail7SamplerEEC2Ev:
   88|     12|  LinkNode() : previous_(this), next_(this) {}
_ZNK5butil8LinkNodeIN4bvar6detail7SamplerEE4nextEv:
  141|     12|  LinkNode<T>* next() const {
  142|     12|    return next_;
  143|     12|  }
_ZN5butil8LinkNodeIN4bvar6detail7SamplerEE5valueEv:
  150|     10|  T* value() {
  151|     10|    return static_cast<T*>(this);
  152|     10|  }
_ZN5butil10LinkedListIN4bvar6detail13AgentCombinerIPNS2_7SamplerES5_NS2_14CombineSamplerEE5AgentEE6AppendEPNS_8LinkNodeIS8_EE:
  170|      2|  void Append(LinkNode<T>* e) {
  171|      2|    e->InsertBefore(&root_);
  172|      2|  }
_ZN5butil8LinkNodeIN4bvar6detail13AgentCombinerIPNS2_7SamplerES5_NS2_14CombineSamplerEE5AgentEE12InsertBeforeEPS9_:
   94|      2|  void InsertBefore(LinkNode<T>* e) {
   95|      2|    this->next_ = e;
   96|      2|    this->previous_ = e->previous_;
   97|      2|    e->previous_->next_ = this;
   98|      2|    e->previous_ = this;
   99|      2|  }

_ZN5butil9nullopt_tC2ENS_8internal20optional_forbidden_tE:
   59|    218|    explicit nullopt_t(internal::optional_forbidden_t) noexcept {}
_ZN5butil8optionalINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE14NewBucketsInfoEEC2EOSG_:
  198|     64|    optional(T&& value) : _engaged(true) {
  199|     64|        _storage.Init(std::move(value));
  200|     64|    }
_ZNK5butil8optionalINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE14NewBucketsInfoEE9has_valueEv:
  309|     64|    bool has_value() const { return _engaged; }
_ZN5butil8optionalINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE14NewBucketsInfoEEptEv:
  300|    192|    T* operator->() {
  301|    192|        return _storage.get();
  302|    192|    }
_ZN5butil8optionalINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE14NewBucketsInfoEED2Ev:
  233|     64|    ~optional() {
  234|     64|        reset();
  235|     64|    }
_ZN5butil8optionalINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE14NewBucketsInfoEE5resetEv:
  377|     64|    void reset() {
  378|     64|        if (_engaged) {
  ------------------
  |  Branch (378:13): [True: 64, False: 0]
  ------------------
  379|     64|            _storage.Destroy();
  380|     64|            _engaged = false;
  381|     64|        }
  382|     64|    }

_ZN5butil5debug10StackTraceC2Eb:
  766|      2|StackTrace::StackTrace(bool exclude_self) {
  767|       |  // NOTE: This code MUST be async-signal safe (it's used by in-process
  768|       |  // stack dumping signal handler). NO malloc or stdio is allowed here.
  769|       |
  770|      2|  if (GetStackTrace) {
  ------------------
  |  Branch (770:7): [True: 0, False: 2]
  ------------------
  771|      0|    count_ = GetStackTrace(trace_, arraysize(trace_), exclude_self ? 1 : 0);
  ------------------
  |  |  122|      0|#define arraysize(array) (sizeof(::butil::ArraySizeHelper(array)))
  ------------------
  |  Branch (771:55): [True: 0, False: 0]
  ------------------
  772|      2|  } else {
  773|      2|#if !defined(__UCLIBC__)
  774|       |    // Though the backtrace API man page does not list any possible negative
  775|       |    // return values, we take no chance.
  776|      2|    count_ = butil::saturated_cast<size_t>(backtrace(trace_, arraysize(trace_)));
  ------------------
  |  |  122|      2|#define arraysize(array) (sizeof(::butil::ArraySizeHelper(array)))
  ------------------
  777|      2|    if (exclude_self && count_ > 1) {
  ------------------
  |  Branch (777:9): [True: 0, False: 2]
  |  Branch (777:25): [True: 0, False: 0]
  ------------------
  778|       |      // Skip the top frame.
  779|      0|      memmove(trace_, trace_ + 1, (count_ - 1) * sizeof(void*));
  780|      0|      count_--;
  781|      0|    }
  782|       |#else
  783|       |    count_ = 0;
  784|       |#endif
  785|      2|  }
  786|      2|}

_ZN5butil6str2ipEPKcP7in_addr:
  117|      2|int str2ip(const char* ip_str, ip_t* ip) {
  118|       |    // ip_str can be NULL when called by EndPoint(0, ...)
  119|      2|    if (ip_str != NULL) {
  ------------------
  |  Branch (119:9): [True: 2, False: 0]
  ------------------
  120|      2|        for (; isspace(*ip_str); ++ip_str);
  ------------------
  |  Branch (120:16): [True: 0, False: 2]
  ------------------
  121|      2|        int rc = inet_pton(AF_INET, ip_str, ip);
  122|      2|        if (rc > 0) {
  ------------------
  |  Branch (122:13): [True: 2, False: 0]
  ------------------
  123|      2|            return 0;
  124|      2|        }
  125|      2|    }
  126|      0|    return -1;
  127|      2|}

_ZN5butil23DescribeCustomizedErrnoEiPKcS1_:
   40|     50|    int error_code, const char* error_name, const char* description) {
   41|     50|    BAIDU_SCOPED_LOCK(modify_desc_mutex);
  ------------------
  |  |   47|     50|    decltype(::butil::detail::get_lock_guard<decltype(ref_of_lock)>()) \
  |  |   48|     50|    BAIDU_CONCAT(scoped_locker_dummy_at_line_, __LINE__)(ref_of_lock)
  |  |  ------------------
  |  |  |  |   88|     50|# define BAIDU_CONCAT(a, b) BAIDU_CONCAT_HELPER(a, b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|     50|# define BAIDU_CONCAT_HELPER(a, b) a##b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   42|     50|    if (error_code < ERRNO_BEGIN || error_code >= ERRNO_END) {
  ------------------
  |  Branch (42:9): [True: 0, False: 50]
  |  Branch (42:37): [True: 0, False: 50]
  ------------------
   43|       |        // error() is a non-portable GNU extension that should not be used.
   44|      0|        fprintf(stderr, "Fail to define %s(%d) which is out of range, abort.",
   45|      0|              error_name, error_code);
   46|      0|        _exit(1);
   47|      0|    }
   48|     50|    const char* desc = errno_desc[error_code - ERRNO_BEGIN];
   49|     50|    if (desc) {
  ------------------
  |  Branch (49:9): [True: 0, False: 50]
  ------------------
   50|      0|        if (strcmp(desc, description) == 0) {
  ------------------
  |  Branch (50:13): [True: 0, False: 0]
  ------------------
   51|      0|            fprintf(stderr, "WARNING: Detected shared library loading\n");
   52|      0|            return -1;
   53|      0|        }
   54|     50|    } else {
   55|       |#if defined(OS_MACOSX)
   56|       |        const int rc = strerror_r(error_code, tls_error_buf, ERROR_BUFSIZE);
   57|       |        if (rc != EINVAL)
   58|       |#else
   59|     50|        desc = strerror_r(error_code, tls_error_buf, ERROR_BUFSIZE);
   60|     50|        if (desc && strncmp(desc, "Unknown error", 13) != 0)
  ------------------
  |  Branch (60:13): [True: 50, False: 0]
  |  Branch (60:21): [True: 0, False: 50]
  ------------------
   61|      0|#endif
   62|      0|        {
   63|      0|            fprintf(stderr, "WARNING: Fail to define %s(%d) which is already defined as `%s'",
   64|      0|                    error_name, error_code, desc);
   65|      0|        }
   66|     50|    }
   67|     50|    errno_desc[error_code - ERRNO_BEGIN] = description;
   68|     50|    return 0;  // must
   69|     50|}

_ZN5butil15reset_block_refERNS_5IOBuf8BlockRefE:
   71|     36|inline void reset_block_ref(IOBuf::BlockRef& ref) {
   72|     36|    ref.offset = 0;
   73|     36|    ref.length = 0;
   74|       |    ref.block = NULL;
   75|     36|}
_ZN5butil5IOBufC2Ev:
   77|     18|inline IOBuf::IOBuf() {
   78|     18|    reset_block_ref(_sv.refs[0]);
   79|     18|    reset_block_ref(_sv.refs[1]);
   80|     18|}

_ZN5butil13AlignedMemoryILm24ELm8EE9void_dataEv:
   71|    320|      void* void_data() { return static_cast<void*>(data_); }     \
_ZN5butil13AlignedMemoryILm48ELm8EE9void_dataEv:
   71|     48|      void* void_data() { return static_cast<void*>(data_); }     \
_ZN5butil13AlignedMemoryILm24ELm8EE7data_asINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS9_EENS_14DefaultEqualToIS9_EELb0ENS_11PtAllocatorELb0EE14NewBucketsInfoEEEPT_v:
   76|    256|      Type* data_as() { return static_cast<Type*>(void_data()); } \
_ZN5butil13AlignedMemoryILm48ELm8EE7data_asINS_14FlatMapElementINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryEEEEEPT_v:
   76|     24|      Type* data_as() { return static_cast<Type*>(void_data()); } \

_ZN5butil17ManualConstructorINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE14NewBucketsInfoEE4InitIJSG_EEEvDpOT_:
   62|     64|    void Init(Args&&... args) {
   63|     64|        new (_space.void_data()) Type(std::forward<Args>(args)...);
   64|     64|    }
_ZN5butil17ManualConstructorINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE14NewBucketsInfoEE3getEv:
   47|    256|    Type* get() {
   48|    256|        return _space.template data_as<Type>();
   49|    256|    }
_ZN5butil17ManualConstructorINS_14FlatMapElementINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryEEEE4InitIJRKS7_EEEvDpOT_:
   62|     24|    void Init(Args&&... args) {
   63|     24|        new (_space.void_data()) Type(std::forward<Args>(args)...);
   64|     24|    }
_ZN5butil17ManualConstructorINS_14FlatMapElementINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryEEEEdeEv:
   58|     24|    Type& operator*() { return *get(); }
_ZN5butil17ManualConstructorINS_14FlatMapElementINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryEEEE3getEv:
   47|     24|    Type* get() {
   48|     24|        return _space.template data_as<Type>();
   49|     24|    }
_ZN5butil17ManualConstructorINS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE14NewBucketsInfoEE7DestroyEv:
   66|     64|     void Destroy() { get()->~Type(); }

_ZN5butil14MakeScopeGuardIZNS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE25new_buckets_and_thumbnailEmmEUlvE_EENS_10ScopeGuardIT_St9enable_ifIXsr14is_result_voidISI_EE5valueEvEEEOSI_:
   76|     64|ScopeGuard<Callback> MakeScopeGuard(Callback&& callback) noexcept {
   77|     64|    return ScopeGuard<Callback>{ std::forward<Callback>(callback)};
   78|     64|}
_ZN5butil10ScopeGuardIZNS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE25new_buckets_and_thumbnailEmmEUlvE_St9enable_ifILb1EvEEC2EOSG_:
   64|     64|        :_callback(std::forward<Callback>(callback))
   65|     64|        , _dismiss(false) {}
_ZN5butil10ScopeGuardIZNS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE25new_buckets_and_thumbnailEmmEUlvE_St9enable_ifILb1EvEE7dismissEv:
   50|     64|    void dismiss() noexcept {
   51|     64|        _dismiss = true;
   52|     64|    }
_ZN5butil10ScopeGuardIZNS_7FlatMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4bvar8VarEntryENS_13DefaultHasherIS7_EENS_14DefaultEqualToIS7_EELb0ENS_11PtAllocatorELb0EE25new_buckets_and_thumbnailEmmEUlvE_St9enable_ifILb1EvEED2Ev:
   44|     64|    ~ScopeGuard() noexcept {
   45|     64|        if(!_dismiss) {
  ------------------
  |  Branch (45:12): [True: 0, False: 64]
  ------------------
   46|      0|            _callback();
   47|      0|        }
   48|     64|    }

_ZN5butil19get_leaky_singletonIN4bvar6detail16SamplerCollectorEEEPT_v:
   60|     10|inline T* get_leaky_singleton() {
   61|     10|    const butil::subtle::AtomicWord value = butil::subtle::Acquire_Load(
   62|     10|        &GetLeakySingleton<T>::g_leaky_singleton_untyped);
   63|     10|    if (value) {
  ------------------
  |  Branch (63:9): [True: 8, False: 2]
  ------------------
   64|      8|        return reinterpret_cast<T*>(value);
   65|      8|    }
   66|      2|    pthread_once(&GetLeakySingleton<T>::g_create_leaky_singleton_once,
   67|      2|                 GetLeakySingleton<T>::create_leaky_singleton);
   68|      2|    return reinterpret_cast<T*>(
   69|      2|        GetLeakySingleton<T>::g_leaky_singleton_untyped);
   70|     10|}
_ZN5butil17GetLeakySingletonIN4bvar6detail16SamplerCollectorEE22create_leaky_singletonEv:
   47|      2|void GetLeakySingleton<T>::create_leaky_singleton() {
   48|      2|    T* obj = create_leaky_singleton_obj<T>();
   49|      2|    butil::subtle::Release_Store(
   50|      2|        &g_leaky_singleton_untyped,
   51|      2|        reinterpret_cast<butil::subtle::AtomicWord>(obj));
   52|      2|}
_ZN5butil26create_leaky_singleton_objIN4bvar6detail16SamplerCollectorEEEPT_v:
   29|      2|T* create_leaky_singleton_obj() {
   30|      2|    return new T();
   31|      2|}

_ZN5butil14saturated_castImiEET_T0_:
   36|      2|inline Dst saturated_cast(Src value) {
   37|       |  // Optimization for floating point values, which already saturate.
   38|      2|  if (std::numeric_limits<Dst>::is_iec559)
  ------------------
  |  Branch (38:7): [Folded, False: 2]
  ------------------
   39|      0|    return static_cast<Dst>(value);
   40|       |
   41|      2|  switch (internal::DstRangeRelationToSrcRange<Dst>(value)) {
  ------------------
  |  Branch (41:11): [True: 2, False: 0]
  ------------------
   42|      2|    case internal::RANGE_VALID:
  ------------------
  |  Branch (42:5): [True: 2, False: 0]
  ------------------
   43|      2|      return static_cast<Dst>(value);
   44|       |
   45|      0|    case internal::RANGE_UNDERFLOW:
  ------------------
  |  Branch (45:5): [True: 0, False: 2]
  ------------------
   46|      0|      return std::numeric_limits<Dst>::min();
   47|       |
   48|      0|    case internal::RANGE_OVERFLOW:
  ------------------
  |  Branch (48:5): [True: 0, False: 2]
  ------------------
   49|      0|      return std::numeric_limits<Dst>::max();
   50|       |
   51|       |    // Should fail only on attempting to assign NaN to a saturated integer.
   52|      0|    case internal::RANGE_INVALID:
  ------------------
  |  Branch (52:5): [True: 0, False: 2]
  ------------------
   53|      0|      CHECK(false);
  ------------------
  |  |  617|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(FATAL).SetCheck(), !(condition))     \
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  618|      0|    << "Check failed: " #condition ". "
  ------------------
   54|      0|      return std::numeric_limits<Dst>::max();
   55|      2|  }
   56|       |
   57|      0|  NOTREACHED();
  ------------------
  |  | 1224|      2|#define NOTREACHED() DCHECK(false)
  |  |  ------------------
  |  |  |  |  846|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (472:7): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (472:7): [True: 0, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  847|      0|    << "Check failed: " #condition ". "
  |  |  ------------------
  ------------------
   58|      0|  return static_cast<Dst>(value);
   59|      2|}

_ZN5butil8internal26DstRangeRelationToSrcRangeImiEENS0_15RangeConstraintET0_:
  205|      2|inline RangeConstraint DstRangeRelationToSrcRange(Src value) {
  206|      2|  COMPILE_ASSERT(std::numeric_limits<Src>::is_specialized,
  ------------------
  |  |  241|      2|#define COMPILE_ASSERT(expr, msg)  BAIDU_CASSERT(expr, msg)
  |  |  ------------------
  |  |  |  |  196|      2|#define BAIDU_CASSERT(expr, msg) static_assert(expr, #msg)
  |  |  ------------------
  ------------------
  207|      2|                 argument_must_be_numeric);
  208|      2|  COMPILE_ASSERT(std::numeric_limits<Dst>::is_specialized,
  ------------------
  |  |  241|      2|#define COMPILE_ASSERT(expr, msg)  BAIDU_CASSERT(expr, msg)
  |  |  ------------------
  |  |  |  |  196|      2|#define BAIDU_CASSERT(expr, msg) static_assert(expr, #msg)
  |  |  ------------------
  ------------------
  209|      2|                 result_must_be_numeric);
  210|      2|  return DstRangeRelationToSrcRangeImpl<Dst, Src>::Check(value);
  211|      2|}
_ZN5butil8internal30DstRangeRelationToSrcRangeImplImiLNS0_21IntegerRepresentationE0ELS2_1ELNS0_26NumericRangeRepresentationE0EE5CheckEi:
  195|      2|  static RangeConstraint Check(Src value) {
  196|      2|    return (MaxExponent<Dst>::value >= MaxExponent<Src>::value)
  ------------------
  |  Branch (196:12): [True: 2, Folded]
  ------------------
  197|      2|               ? GetRangeConstraint(true, value >= static_cast<Src>(0))
  198|      2|               : GetRangeConstraint(
  199|      0|                     value <= static_cast<Src>(std::numeric_limits<Dst>::max()),
  200|      0|                     value >= static_cast<Src>(0));
  201|      2|  }
_ZN5butil8internal18GetRangeConstraintEbb:
  107|      2|                                   bool is_in_lower_bound) {
  108|      2|  return GetRangeConstraint((is_in_upper_bound ? 0 : RANGE_OVERFLOW) |
  ------------------
  |  Branch (108:30): [True: 2, False: 0]
  ------------------
  109|      2|                            (is_in_lower_bound ? 0 : RANGE_UNDERFLOW));
  ------------------
  |  Branch (109:30): [True: 2, False: 0]
  ------------------
  110|      2|}
_ZN5butil8internal18GetRangeConstraintEi:
   97|      2|inline RangeConstraint GetRangeConstraint(int integer_range_constraint) {
   98|      2|  DCHECK(integer_range_constraint >= RANGE_VALID &&
  ------------------
  |  |  846|      2|    BAIDU_LAZY_STREAM(LOG_STREAM(DCHECK), DCHECK_IS_ON() && !(condition)) \
  |  |  ------------------
  |  |  |  |  472|      8|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:7): [True: 2, False: 0]
  |  |  |  |  |  Branch (472:7): [True: 2, False: 0]
  |  |  |  |  |  Branch (472:7): [True: 2, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  847|      0|    << "Check failed: " #condition ". "
  ------------------
   99|      2|         integer_range_constraint <= RANGE_INVALID);
  100|      2|  return static_cast<RangeConstraint>(integer_range_constraint);
  101|      2|}

_ZN5butil30RegisterFlagValidatorOrDieImplIbEEbPKT_PFbPKcS1_E:
   64|     42|    const T* flag, bool (*validate_fn)(const char*, T val)) {
   65|     42|    static_assert(!butil::is_same<std::string, T>::value,
   66|     42|                  "Not support string flags");
   67|     42|    if (::GFLAGS_NAMESPACE::RegisterFlagValidator(flag, validate_fn)) {
  ------------------
  |  Branch (67:9): [True: 42, False: 0]
  ------------------
   68|     42|        return true;
   69|     42|    }
   70|       |    // Error printed by gflags does not have newline. Add one to it.
   71|      0|    char newline = '\n';
   72|      0|    butil::ignore_result(write(2, &newline, 1));
   73|      0|    _exit(1);
   74|     42|}
_ZN5butil30RegisterFlagValidatorOrDieImplIiEEbPKT_PFbPKcS1_E:
   64|     64|    const T* flag, bool (*validate_fn)(const char*, T val)) {
   65|     64|    static_assert(!butil::is_same<std::string, T>::value,
   66|     64|                  "Not support string flags");
   67|     64|    if (::GFLAGS_NAMESPACE::RegisterFlagValidator(flag, validate_fn)) {
  ------------------
  |  Branch (67:9): [True: 64, False: 0]
  ------------------
   68|     64|        return true;
   69|     64|    }
   70|       |    // Error printed by gflags does not have newline. Add one to it.
   71|      0|    char newline = '\n';
   72|      0|    butil::ignore_result(write(2, &newline, 1));
   73|      0|    _exit(1);
   74|     64|}
_ZN5butil30RegisterFlagValidatorOrDieImplImEEbPKT_PFbPKcS1_E:
   64|      2|    const T* flag, bool (*validate_fn)(const char*, T val)) {
   65|      2|    static_assert(!butil::is_same<std::string, T>::value,
   66|      2|                  "Not support string flags");
   67|      2|    if (::GFLAGS_NAMESPACE::RegisterFlagValidator(flag, validate_fn)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 0]
  ------------------
   68|      2|        return true;
   69|      2|    }
   70|       |    // Error printed by gflags does not have newline. Add one to it.
   71|      0|    char newline = '\n';
   72|      0|    butil::ignore_result(write(2, &newline, 1));
   73|      0|    _exit(1);
   74|      2|}
_ZN5butil30RegisterFlagValidatorOrDieImplIjEEbPKT_PFbPKcS1_E:
   64|      2|    const T* flag, bool (*validate_fn)(const char*, T val)) {
   65|      2|    static_assert(!butil::is_same<std::string, T>::value,
   66|      2|                  "Not support string flags");
   67|      2|    if (::GFLAGS_NAMESPACE::RegisterFlagValidator(flag, validate_fn)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 0]
  ------------------
   68|      2|        return true;
   69|      2|    }
   70|       |    // Error printed by gflags does not have newline. Add one to it.
   71|      0|    char newline = '\n';
   72|      0|    butil::ignore_result(write(2, &newline, 1));
   73|      0|    _exit(1);
   74|      2|}
_ZN5butil30RegisterFlagValidatorOrDieImplIlEEbPKT_PFbPKcS1_E:
   64|      2|    const T* flag, bool (*validate_fn)(const char*, T val)) {
   65|      2|    static_assert(!butil::is_same<std::string, T>::value,
   66|      2|                  "Not support string flags");
   67|      2|    if (::GFLAGS_NAMESPACE::RegisterFlagValidator(flag, validate_fn)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 0]
  ------------------
   68|      2|        return true;
   69|      2|    }
   70|       |    // Error printed by gflags does not have newline. Add one to it.
   71|      0|    char newline = '\n';
   72|      0|    butil::ignore_result(write(2, &newline, 1));
   73|      0|    _exit(1);
   74|      2|}

_ZNSt10lock_guardI15pthread_mutex_tEC2ERS0_:
  155|     88|    explicit lock_guard(pthread_mutex_t & mutex) : _pmutex(&mutex) {
  156|     88|#if !defined(NDEBUG)
  157|     88|        const int rc = pthread_mutex_lock(_pmutex);
  158|     88|        if (rc) {
  ------------------
  |  Branch (158:13): [True: 0, False: 88]
  ------------------
  159|      0|            LOG(FATAL) << "Fail to lock pthread_mutex_t=" << _pmutex << ", " << berror(rc);
  ------------------
  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|      0|            _pmutex = NULL;
  161|      0|        }
  162|       |#else
  163|       |        pthread_mutex_lock(_pmutex);
  164|       |#endif  // NDEBUG
  165|     88|    }
_ZNSt10lock_guardI15pthread_mutex_tED2Ev:
  167|     88|    ~lock_guard() {
  168|     88|#ifndef NDEBUG
  169|     88|        if (_pmutex) {
  ------------------
  |  Branch (169:13): [True: 88, False: 0]
  ------------------
  170|     88|            pthread_mutex_unlock(_pmutex);
  171|     88|        }
  172|       |#else
  173|       |        pthread_mutex_unlock(_pmutex);
  174|       |#endif
  175|     88|    }

_ZN5butil11PtAllocator5AllocEm:
   35|     64|    void* Alloc(size_t n) { return malloc(n); }
_ZN5butil18SingleThreadedPoolILm72ELm1024ELm16ENS_11PtAllocatorEE5resetEv:
  108|    542|    void reset() {
  109|    542|        _free_nodes = NULL;
  110|    542|        while (_blocks) {
  ------------------
  |  Branch (110:16): [True: 0, False: 542]
  ------------------
  111|      0|            Block* next = _blocks->next;
  112|      0|            _allocator.Free(_blocks);
  113|      0|            _blocks = next;
  114|      0|        }
  115|    542|    }
_ZN5butil18SingleThreadedPoolILm72ELm1024ELm16ENS_11PtAllocatorEEC2ERKS1_:
   65|    542|        : _free_nodes(NULL), _blocks(NULL), _allocator(alloc) {}
_ZN5butil18SingleThreadedPoolILm72ELm1024ELm16ENS_11PtAllocatorEED2Ev:
   66|    542|    ~SingleThreadedPool() { reset(); }
_ZN5butil18SingleThreadedPoolILm56ELm1024ELm16ENS_11PtAllocatorEEC2ERKS1_:
   65|     64|        : _free_nodes(NULL), _blocks(NULL), _allocator(alloc) {}
_ZN5butil18SingleThreadedPoolILm56ELm1024ELm16ENS_11PtAllocatorEE13get_allocatorEv:
  136|     64|    Allocator& get_allocator() { return _allocator; }

_ZN5butil6Status10set_errorvEiPKcP13__va_list_tag:
   32|     61|int Status::set_errorv(int c, const char* fmt, va_list args) {
   33|     61|    if (0 == c) {
  ------------------
  |  Branch (33:9): [True: 0, False: 61]
  ------------------
   34|      0|        free(_state);
   35|      0|        _state = NULL;
   36|      0|        return 0;
   37|      0|    }
   38|     61|    State* new_state = NULL;
   39|     61|    State* state = NULL;
   40|     61|    if (_state != NULL) {
  ------------------
  |  Branch (40:9): [True: 0, False: 61]
  ------------------
   41|      0|        state = _state;
   42|     61|    } else {
   43|     61|        const size_t guess_size = std::max(strlen(fmt) * 2, 32UL);
   44|     61|        const size_t st_size = status_size(guess_size);
   45|     61|        new_state = reinterpret_cast<State*>(malloc(st_size));
   46|     61|        if (NULL == new_state) {
  ------------------
  |  Branch (46:13): [True: 0, False: 61]
  ------------------
   47|      0|            return -1;
   48|      0|        }
   49|     61|        new_state->state_size = st_size;
   50|     61|        state = new_state;
   51|     61|    }
   52|     61|    const size_t cap = state->state_size - offsetof(State, message);
   53|     61|    va_list copied_args;
   54|     61|    va_copy(copied_args, args);
   55|     61|    const int bytes_used = vsnprintf(state->message, cap, fmt, copied_args);
   56|     61|    va_end(copied_args);
   57|     61|    if (bytes_used < 0) {
  ------------------
  |  Branch (57:9): [True: 0, False: 61]
  ------------------
   58|      0|        free(new_state);
   59|      0|        return -1;
   60|     61|    } else if ((size_t)bytes_used < cap) {
  ------------------
  |  Branch (60:16): [True: 61, False: 0]
  ------------------
   61|       |        // There was enough room, just shrink and return.
   62|     61|        state->code = c;
   63|     61|        state->size = bytes_used;
   64|     61|        if (new_state == state) {
  ------------------
  |  Branch (64:13): [True: 61, False: 0]
  ------------------
   65|     61|            _state = new_state;
   66|     61|        }
   67|     61|        return 0;
   68|     61|    } else {
   69|      0|        free(new_state);
   70|      0|        const size_t st_size = status_size(bytes_used);
   71|      0|        new_state = reinterpret_cast<State*>(malloc(st_size));
   72|      0|        if (NULL == new_state) {
  ------------------
  |  Branch (72:13): [True: 0, False: 0]
  ------------------
   73|      0|            return -1;
   74|      0|        }
   75|      0|        new_state->code = c;
   76|      0|        new_state->size = bytes_used;
   77|      0|        new_state->state_size = st_size;
   78|      0|        const int bytes_used2 =
   79|      0|            vsnprintf(new_state->message, bytes_used + 1, fmt, args);
   80|      0|        if (bytes_used2 != bytes_used) {
  ------------------
  |  Branch (80:13): [True: 0, False: 0]
  ------------------
   81|      0|            free(new_state);
   82|      0|            return -1;
   83|      0|        }
   84|      0|        free(_state);
   85|      0|        _state = new_state;
   86|      0|        return 0;
   87|      0|    }
   88|     61|}
_ZN5butil11status_sizeEm:
   25|     61|inline size_t status_size(size_t message_size) {
   26|       |    // Add 1 because even if the sum of size is aligned with int, we need to
   27|       |    // put an ending '\0'
   28|       |    return ((offsetof(Status::State, message) + message_size)
   29|     61|            / sizeof(int) + 1) * sizeof(int);
   30|     61|}

_ZN5butil6StatusC2Ev:
   52|    542|    Status() : _state(NULL) { }
_ZN5butil6StatusD2Ev:
   56|    542|    ~Status() { reset(); }
_ZN5butil6Status9set_errorEiPKcz:
  122|     61|inline int Status::set_error(int code, const char* msg, ...) {
  123|     61|    va_list ap;
  124|     61|    va_start(ap, msg);
  125|     61|    const int rc = set_errorv(code, msg, ap);
  126|       |    va_end(ap);
  127|     61|    return rc;
  128|     61|}
_ZN5butil6Status5resetEv:
  130|  1.08k|inline void Status::reset() {
  131|  1.08k|    free(_state);
  132|       |    _state = NULL;
  133|  1.08k|}

_ZN5butil14StringSplitter4initEv:
   46|    189|void StringSplitter::init() {
   47|       |    // Find the starting _head and _tail.
   48|    189|    if (__builtin_expect(_head != NULL, 1)) {
  ------------------
  |  Branch (48:9): [True: 189, False: 0]
  ------------------
   49|    189|        if (_empty_field_action == SKIP_EMPTY_FIELD) {
  ------------------
  |  Branch (49:13): [True: 189, False: 0]
  ------------------
   50|    438|            for (; not_end(_head) && *_head == _sep; ++_head) {}
  ------------------
  |  Branch (50:20): [True: 420, False: 18]
  |  Branch (50:38): [True: 249, False: 171]
  ------------------
   51|    189|        }
   52|  10.4k|        for (_tail = _head; not_end(_tail) && *_tail != _sep; ++_tail) {}
  ------------------
  |  Branch (52:29): [True: 10.3k, False: 131]
  |  Branch (52:47): [True: 10.2k, False: 58]
  ------------------
   53|    189|    } else {
   54|       |        _tail = NULL;
   55|      0|    }
   56|    189|}
_ZN5butil14StringSplitterppEv:
   58|  1.17k|StringSplitter& StringSplitter::operator++() {
   59|  1.17k|    if (__builtin_expect(_tail != NULL, 1)) {
  ------------------
  |  Branch (59:9): [True: 1.17k, False: 0]
  ------------------
   60|  1.17k|        if (not_end(_tail)) {
  ------------------
  |  Branch (60:13): [True: 1.07k, False: 98]
  ------------------
   61|  1.07k|            ++_tail;
   62|  1.07k|            if (_empty_field_action == SKIP_EMPTY_FIELD) {
  ------------------
  |  Branch (62:17): [True: 1.07k, False: 0]
  ------------------
   63|  1.29k|                for (; not_end(_tail) && *_tail == _sep; ++_tail) {}
  ------------------
  |  Branch (63:24): [True: 1.28k, False: 18]
  |  Branch (63:42): [True: 220, False: 1.06k]
  ------------------
   64|  1.07k|            }
   65|  1.07k|        }
   66|  1.17k|        _head = _tail;
   67|  5.84k|        for (; not_end(_tail) && *_tail != _sep; ++_tail) {}
  ------------------
  |  Branch (67:16): [True: 5.68k, False: 156]
  |  Branch (67:34): [True: 4.66k, False: 1.02k]
  ------------------
   68|  1.17k|    }
   69|  1.17k|    return *this;
   70|  1.17k|}
_ZNK5butil14StringSplittercvPKvEv:
   78|  1.36k|StringSplitter::operator const void*() const {
   79|  1.36k|    return (_head != NULL && not_end(_head)) ? _head : NULL;
  ------------------
  |  Branch (79:13): [True: 1.36k, False: 0]
  |  Branch (79:30): [True: 1.23k, False: 134]
  ------------------
   80|  1.36k|}
_ZNK5butil14StringSplitter5fieldEv:
   82|  1.23k|const char* StringSplitter::field() const {
   83|  1.23k|    return _head;
   84|  1.23k|}
_ZNK5butil14StringSplitter6lengthEv:
   86|  1.23k|size_t StringSplitter::length() const {
   87|  1.23k|    return static_cast<size_t>(_tail - _head);
   88|  1.23k|}
_ZNK5butil14StringSplitter7not_endEPKc:
   94|  20.5k|bool StringSplitter::not_end(const char* p) const {
   95|  20.5k|    return (_str_tail == NULL) ? *p : (p != _str_tail);
  ------------------
  |  Branch (95:12): [True: 0, False: 20.5k]
  ------------------
   96|  20.5k|}
_ZN5butil14StringSplitterC2EPKcS2_cNS_16EmptyFieldActionE:
   31|    189|    : _head(str_begin)
   32|    189|    , _str_tail(str_end)
   33|    189|    , _sep(sep)
   34|    189|    , _empty_field_action(action) {
   35|    189|    init();
   36|    189|}

_ZN5butil8internal4findERKNS_16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcm:
  136|  1.76k|size_t find(const StringPiece& self, char c, size_t pos) {
  137|  1.76k|  return findT(self, c, pos);
  138|  1.76k|}
_ZN5butil8internal5rfindERKNS_16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcm:
  187|     55|size_t rfind(const StringPiece& self, char c, size_t pos) {
  188|     55|  return rfindT(self, c, pos);
  189|     55|}
_ZN5butil8internal6substrERKNS_16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEmm:
  426|  1.09k|                   size_t n) {
  427|  1.09k|  return substrT(self, pos, n);
  428|  1.09k|}
_ZN5butil8internal5findTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEmRKNS_16BasicStringPieceIT_EENS9_10value_typeEm:
  126|  1.76k|             size_t pos) {
  127|  1.76k|  if (pos >= self.size())
  ------------------
  |  Branch (127:7): [True: 294, False: 1.46k]
  ------------------
  128|    294|    return BasicStringPiece<STR>::npos;
  129|       |
  130|  1.46k|  typename BasicStringPiece<STR>::const_iterator result =
  131|  1.46k|      std::find(self.begin() + pos, self.end(), c);
  132|  1.46k|  return result != self.end() ?
  ------------------
  |  Branch (132:10): [True: 717, False: 749]
  ------------------
  133|    749|      static_cast<size_t>(result - self.begin()) : BasicStringPiece<STR>::npos;
  134|  1.76k|}
_ZN5butil8internal6rfindTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEmRKNS_16BasicStringPieceIT_EENS9_10value_typeEm:
  173|     55|              size_t pos) {
  174|     55|  if (self.size() == 0)
  ------------------
  |  Branch (174:7): [True: 2, False: 53]
  ------------------
  175|      2|    return BasicStringPiece<STR>::npos;
  176|       |
  177|     53|  for (size_t i = std::min(pos, self.size() - 1); ;
  178|  4.27k|       --i) {
  179|  4.27k|    if (self.data()[i] == c)
  ------------------
  |  Branch (179:9): [True: 22, False: 4.25k]
  ------------------
  180|     22|      return i;
  181|  4.25k|    if (i == 0)
  ------------------
  |  Branch (181:9): [True: 31, False: 4.22k]
  ------------------
  182|     31|      break;
  183|  4.25k|  }
  184|     31|  return BasicStringPiece<STR>::npos;
  185|     53|}
_ZN5butil8internal7substrTINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_16BasicStringPieceIT_EERKSA_mm:
  418|  1.09k|                              size_t n) {
  419|  1.09k|  if (pos > self.size()) pos = self.size();
  ------------------
  |  Branch (419:7): [True: 0, False: 1.09k]
  ------------------
  420|  1.09k|  if (n > self.size() - pos) n = self.size() - pos;
  ------------------
  |  Branch (420:7): [True: 373, False: 717]
  ------------------
  421|  1.09k|  return BasicStringPiece<STR>(self.data() + pos, n);
  422|  1.09k|}

_ZN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2ERKS6_:
  194|    542|      : ptr_(str.data()), length_(str.size()) {}
_ZN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev:
  184|  2.73k|  BasicStringPiece() : ptr_(NULL), length_(0) {}
_ZN5butil9back_charERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
  468|     38|inline char back_char(const std::string& s) { return s[s.size() - 1]; }
_ZN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE10wordmemcmpEPKcS9_m:
  288|    718|                        size_type N) {
  289|    718|    return STRING_TYPE::traits_type::compare(p, p2, N);
  290|    718|  }
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4dataEv:
  208|  6.19k|  const value_type* data() const { return ptr_; }
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4sizeEv:
  209|  6.26k|  size_type size() const { return length_; }
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5beginEv:
  274|  2.18k|  const_iterator begin() const { return ptr_; }
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3endEv:
  275|  2.93k|  const_iterator end() const { return ptr_ + length_; }
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE6substrEmm:
  377|  1.09k|                          size_type n = BasicStringPiece::npos) const {
  378|  1.09k|    return internal::substr(*this, pos, n);
  379|  1.09k|  }
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4findEcm:
  324|  1.76k|  size_type find(value_type c, size_type pos = 0) const {
  325|  1.76k|    return internal::find(*this, c, pos);
  326|  1.76k|  }
_ZN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE13remove_suffixEm:
  238|     22|  void remove_suffix(size_type n) {
  239|     22|    length_ -= n;
  240|     22|  }
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5emptyEv:
  211|     48|  bool empty() const { return length_ == 0; }
_ZN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPKc:
  186|  2.21k|      : ptr_(str),
  187|  2.21k|        length_((str == NULL) ? 0 : STRING_TYPE::traits_type::length(str)) {}
  ------------------
  |  Branch (187:17): [True: 0, False: 2.21k]
  ------------------
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE12find_last_ofEcm:
  361|     55|                         size_type pos = BasicStringPiece::npos) const {
  362|     55|    return rfind(c, pos);
  363|     55|  }
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5rfindEcm:
  333|     55|  size_type rfind(value_type c, size_type pos = BasicStringPiece::npos) const {
  334|     55|    return internal::rfind(*this, c, pos);
  335|     55|  }
_ZN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPKcm:
  196|  2.32k|      : ptr_(offset), length_(len) {}
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEixEm:
  231|  1.05k|  value_type operator[](size_type i) const { return ptr_[i]; }
_ZN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE13remove_prefixEm:
  233|    425|  void remove_prefix(size_type n) {
  234|    425|    ptr_ += n;
  235|    425|    length_ -= n;
  236|    425|  }
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11starts_withERKS7_:
  307|  1.77k|  bool starts_with(const BasicStringPiece& x) const {
  308|  1.77k|    return ((this->length_ >= x.length_) &&
  ------------------
  |  Branch (308:13): [True: 718, False: 1.05k]
  ------------------
  309|    718|            (wordmemcmp(this->ptr_, x.ptr_, x.length_) == 0));
  ------------------
  |  Branch (309:13): [True: 81, False: 637]
  ------------------
  310|  1.77k|  }
_ZN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5clearEv:
  213|  1.02k|  void clear() {
  214|       |    ptr_ = NULL;
  215|  1.02k|    length_ = 0;
  216|  1.02k|  }
_ZNK5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE13find_first_ofEcm:
  342|    880|  size_type find_first_of(value_type c, size_type pos = 0) const {
  343|    880|    return find(c, pos);
  344|    880|  }

_ZN5butil5MutexC2Ev:
   50|    118|    Mutex() {
   51|       |#if defined(OS_WIN)
   52|       |    // The second parameter is the spin count, for short-held locks it avoid the
   53|       |    // contending thread from going to sleep which helps performance greatly.
   54|       |        ::InitializeCriticalSectionAndSpinCount(&_native_handle, 2000);
   55|       |#elif defined(OS_POSIX)
   56|       |        pthread_mutex_init(&_native_handle, NULL);
   57|    118|#endif
   58|    118|    }
_ZN5butil5Mutex4lockEv:
   70|     28|    void lock() {
   71|       |#if defined(OS_WIN)
   72|       |        ::EnterCriticalSection(&_native_handle);
   73|       |#elif defined(OS_POSIX)
   74|       |        pthread_mutex_lock(&_native_handle);
   75|     28|#endif
   76|     28|    }
_ZN5butil5Mutex6unlockEv:
   80|     28|    void unlock() {
   81|       |#if defined(OS_WIN)
   82|       |        ::LeaveCriticalSection(&_native_handle);
   83|       |#elif defined(OS_POSIX)
   84|       |        pthread_mutex_unlock(&_native_handle);
   85|     28|#endif
   86|     28|    }
_ZN5butil4LockC2Ev:
  126|    106|    Lock() {}
_ZN5butil4Lock7AcquireEv:
  128|     18|    void Acquire() { lock(); }
_ZN5butil4Lock7ReleaseEv:
  129|     18|    void Release() { unlock(); }
_ZNK5butil4Lock14AssertAcquiredEv:
  131|     18|    void AssertAcquired() const {}
_ZN5butil8AutoLockC2ERNS_4LockE:
  139|     18|    explicit AutoLock(Lock& lock) : lock_(lock) {
  140|     18|        lock_.Acquire();
  141|     18|    }
_ZN5butil8AutoLockD2Ev:
  147|     18|    ~AutoLock() {
  148|     18|        lock_.AssertAcquired();
  149|     18|        lock_.Release();
  150|     18|    }

_ZN5butil6detail29get_or_new_thread_exit_helperEv:
   99|      2|detail::ThreadExitHelper* get_or_new_thread_exit_helper() {
  100|      2|    pthread_once(&detail::thread_atexit_once, detail::make_thread_atexit_key);
  101|       |
  102|      2|    detail::ThreadExitHelper* h =
  103|      2|        (detail::ThreadExitHelper*)pthread_getspecific(detail::thread_atexit_key);
  104|      2|    if (NULL == h) {
  ------------------
  |  Branch (104:9): [True: 2, False: 0]
  ------------------
  105|      2|        h = new (std::nothrow) detail::ThreadExitHelper;
  106|      2|        if (NULL != h) {
  ------------------
  |  Branch (106:13): [True: 2, False: 0]
  ------------------
  107|      2|            pthread_setspecific(detail::thread_atexit_key, h);
  108|      2|        }
  109|      2|    }
  110|      2|    return h;
  111|      2|}
_ZN5butil13thread_atexitEPFvPvES0_:
  124|      2|int thread_atexit(void (*fn)(void*), void* arg) {
  125|      2|    if (NULL == fn) {
  ------------------
  |  Branch (125:9): [True: 0, False: 2]
  ------------------
  126|      0|        errno = EINVAL;
  127|      0|        return -1;
  128|      0|    }
  129|      2|    detail::ThreadExitHelper* h = detail::get_or_new_thread_exit_helper();
  130|      2|    if (h) {
  ------------------
  |  Branch (130:9): [True: 2, False: 0]
  ------------------
  131|      2|        return h->add(fn, arg);
  132|      2|    }
  133|      2|    errno = ENOMEM;
  134|      0|    return -1;
  135|      2|}
_ZN5butil13thread_atexitEPFvvE:
  137|      2|int thread_atexit(void (*fn)()) {
  138|      2|    if (NULL == fn) {
  ------------------
  |  Branch (138:9): [True: 0, False: 2]
  ------------------
  139|      0|        errno = EINVAL;
  140|      0|        return -1;
  141|      0|    }
  142|      2|    return thread_atexit(detail::call_single_arg_fn, (void*)fn);
  143|      2|}
thread_local.cpp:_ZN5butil6detailL22make_thread_atexit_keyEv:
   89|      2|static void make_thread_atexit_key() {
   90|      2|    if (pthread_key_create(&thread_atexit_key, delete_thread_exit_helper) != 0) {
  ------------------
  |  Branch (90:9): [True: 0, False: 2]
  ------------------
   91|      0|        fprintf(stderr, "Fail to create thread_atexit_key, abort\n");
   92|      0|        abort();
   93|      0|    }
   94|       |    // If caller is not pthread, delete_thread_exit_helper will not be called.
   95|       |    // We have to rely on atexit().
   96|      2|    atexit(helper_exit_global);
   97|      2|}
_ZN5butil6detail16ThreadExitHelper3addEPFvPvES2_:
   45|      2|    int add(Fn fn, void* arg) {
   46|      2|        try {
   47|      2|            if (_fns.capacity() < 16) {
  ------------------
  |  Branch (47:17): [True: 2, False: 0]
  ------------------
   48|      2|                _fns.reserve(16);
   49|      2|            }
   50|      2|            _fns.emplace_back(fn, arg);
   51|      2|        } catch (...) {
   52|      0|            errno = ENOMEM;
   53|      0|            return -1;
   54|      0|        }
   55|      2|        return 0;
   56|      2|    }

_ZN5butil14PlatformThread13SetNameSimpleEPKc:
   60|      2|void PlatformThread::SetNameSimple(const char* name) {
   61|      2|#if !defined(OS_NACL)
   62|       |  // On linux we can get the thread names to show up in the debugger by setting
   63|       |  // the process name for the LWP.  We don't want to do this for the main
   64|       |  // thread because that would rename the process, causing tools like killall
   65|       |  // to stop working.
   66|      2|  if (PlatformThread::CurrentId() == getpid())
  ------------------
  |  Branch (66:7): [True: 0, False: 2]
  ------------------
   67|      0|    return;
   68|       |
   69|       |  // http://0pointer.de/blog/projects/name-your-threads.html
   70|       |  // Set the name for the LWP (which gets truncated to 15 characters).
   71|       |  // Note that glibc also has a 'pthread_setname_np' api, but it may not be
   72|       |  // available everywhere and it's only benefit over using prctl directly is
   73|       |  // that it can set the name of threads other than the current thread.
   74|      2|  int err = prctl(PR_SET_NAME, name);
   75|       |  // We expect EPERM failures in sandboxed processes, just ignore those.
   76|      2|  if (err < 0 && errno != EPERM)
  ------------------
  |  Branch (76:7): [True: 0, False: 2]
  |  Branch (76:18): [True: 0, False: 0]
  ------------------
   77|      0|    DPLOG(ERROR) << "prctl(PR_SET_NAME)";
  ------------------
  |  |  749|      0|    BAIDU_LAZY_STREAM(PLOG_STREAM(severity), DLOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   78|      2|#endif  //  !defined(OS_NACL)
   79|      2|}

_ZN5butil14PlatformThread9CurrentIdEv:
  145|      2|PlatformThreadId PlatformThread::CurrentId() {
  146|       |  // Pthreads doesn't have the concept of a thread ID, so we have to reach down
  147|       |  // into the kernel.
  148|       |#if defined(OS_MACOSX)
  149|       |  return pthread_mach_thread_np(pthread_self());
  150|       |#elif defined(OS_LINUX)
  151|      2|  return syscall(__NR_gettid);
  152|       |#elif defined(OS_ANDROID)
  153|       |  return gettid();
  154|       |#elif defined(OS_SOLARIS) || defined(OS_QNX)
  155|       |  return pthread_self();
  156|       |#elif defined(OS_NACL) && defined(__GLIBC__)
  157|       |  return pthread_self();
  158|       |#elif defined(OS_NACL) && !defined(__GLIBC__)
  159|       |  // Pointers are 32-bits in NaCl.
  160|       |  return reinterpret_cast<int32_t>(pthread_self());
  161|       |#elif defined(OS_POSIX)
  162|       |  return reinterpret_cast<int64_t>(pthread_self());
  163|       |#endif
  164|      2|}

_ZN5butil15gettimeofday_usEv:
  338|      4|inline int64_t gettimeofday_us() {
  339|      4|    timeval now;
  340|       |    gettimeofday(&now, NULL);
  341|      4|    return now.tv_sec * 1000000L + now.tv_usec;
  342|      4|}

_ZN4bvar20DisplaySamplingRatioC2EPKcPKNS_19CollectorSpeedLimitE:
  439|      2|    : _var(name, get_sampling_ratio, (void*)sl) {
  440|      2|}
collector.cpp:_ZN4bvarL18get_sampling_ratioEPv:
  432|      2|static double get_sampling_ratio(void* arg) {
  433|      2|    return ((const CollectorSpeedLimit*)arg)->sampling_range /
  434|      2|        (double)COLLECTOR_SAMPLING_BASE;
  435|      2|}

_ZN4bvar6detail10AgentGroupINS0_13AgentCombinerIPNS0_7SamplerES4_NS0_14CombineSamplerEE5AgentEE16create_new_agentEv:
   89|      2|    inline static AgentId create_new_agent() {
   90|      2|        BAIDU_SCOPED_LOCK(_s_mutex);
  ------------------
  |  |   47|      2|    decltype(::butil::detail::get_lock_guard<decltype(ref_of_lock)>()) \
  |  |   48|      2|    BAIDU_CONCAT(scoped_locker_dummy_at_line_, __LINE__)(ref_of_lock)
  |  |  ------------------
  |  |  |  |   88|      2|# define BAIDU_CONCAT(a, b) BAIDU_CONCAT_HELPER(a, b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|      2|# define BAIDU_CONCAT_HELPER(a, b) a##b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   91|      2|        AgentId agent_id = 0;
   92|      2|        if (!_get_free_ids().empty()) {
  ------------------
  |  Branch (92:13): [True: 0, False: 2]
  ------------------
   93|      0|            agent_id = _get_free_ids().back();
   94|      0|            _get_free_ids().pop_back();
   95|      2|        } else {
   96|      2|            agent_id = _s_agent_kinds++;
   97|      2|        }
   98|      2|        return agent_id;
   99|      2|    }
_ZN4bvar6detail10AgentGroupINS0_13AgentCombinerIPNS0_7SamplerES4_NS0_14CombineSamplerEE5AgentEE13_get_free_idsEv:
  172|      2|    inline static std::deque<AgentId> &_get_free_ids() {
  173|      2|        if (__builtin_expect(!_s_free_ids, 0)) {
  ------------------
  |  Branch (173:13): [True: 2, False: 0]
  ------------------
  174|      2|            _s_free_ids = new (std::nothrow) std::deque<AgentId>();
  175|      2|            RELEASE_ASSERT(_s_free_ids);
  ------------------
  |  |  476|      2|    do {                            \
  |  |  477|      2|        if (!(condition)) {         \
  |  |  ------------------
  |  |  |  Branch (477:13): [True: 0, False: 2]
  |  |  ------------------
  |  |  478|      0|            ::abort();              \
  |  |  479|      0|        }                           \
  |  |  480|      2|    } while (false)
  |  |  ------------------
  |  |  |  Branch (480:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
  176|      2|        }
  177|      2|        return *_s_free_ids;
  178|      2|    }
_ZN4bvar6detail10AgentGroupINS0_13AgentCombinerIPNS0_7SamplerES4_NS0_14CombineSamplerEE5AgentEE13get_tls_agentEi:
  114|     10|    inline static Agent* get_tls_agent(AgentId id) {
  115|     10|        if (__builtin_expect(id >= 0, 1)) {
  ------------------
  |  Branch (115:13): [True: 10, False: 0]
  ------------------
  116|     10|            if (_s_tls_blocks) {
  ------------------
  |  Branch (116:17): [True: 8, False: 2]
  ------------------
  117|      8|                const size_t block_id = (size_t)id / ELEMENTS_PER_BLOCK;
  118|      8|                if (block_id < _s_tls_blocks->size()) {
  ------------------
  |  Branch (118:21): [True: 8, False: 0]
  ------------------
  119|      8|                    ThreadBlock* const tb = (*_s_tls_blocks)[block_id];
  120|      8|                    if (tb) {
  ------------------
  |  Branch (120:25): [True: 8, False: 0]
  ------------------
  121|      8|                        return tb->at(id - block_id * ELEMENTS_PER_BLOCK);
  122|      8|                    }
  123|      8|                }
  124|      8|            }
  125|     10|        }
  126|      2|        return NULL;
  127|     10|    }
_ZN4bvar6detail10AgentGroupINS0_13AgentCombinerIPNS0_7SamplerES4_NS0_14CombineSamplerEE5AgentEE11ThreadBlock2atEm:
   83|     10|        inline Agent* at(size_t offset) { return _agents + offset; };
_ZN4bvar6detail10AgentGroupINS0_13AgentCombinerIPNS0_7SamplerES4_NS0_14CombineSamplerEE5AgentEE23get_or_create_tls_agentEi:
  130|      2|    inline static Agent* get_or_create_tls_agent(AgentId id) {
  131|      2|        if (__builtin_expect(id < 0, 0)) {
  ------------------
  |  Branch (131:13): [True: 0, False: 2]
  ------------------
  132|      0|            CHECK(false) << "Invalid id=" << id;
  ------------------
  |  |  617|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(FATAL).SetCheck(), !(condition))     \
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  618|      0|    << "Check failed: " #condition ". "
  ------------------
  133|      0|            return NULL;
  134|      0|        }
  135|      2|        if (_s_tls_blocks == NULL) {
  ------------------
  |  Branch (135:13): [True: 2, False: 0]
  ------------------
  136|      2|            _s_tls_blocks = new (std::nothrow) std::vector<ThreadBlock *>;
  137|      2|            if (__builtin_expect(_s_tls_blocks == NULL, 0)) {
  ------------------
  |  Branch (137:17): [True: 0, False: 2]
  ------------------
  138|      0|                LOG(FATAL) << "Fail to create vector, " << berror();
  ------------------
  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  139|      0|                return NULL;
  140|      0|            }
  141|      2|            butil::thread_atexit(_destroy_tls_blocks);
  142|      2|        }
  143|      2|        const size_t block_id = (size_t)id / ELEMENTS_PER_BLOCK; 
  144|      2|        if (block_id >= _s_tls_blocks->size()) {
  ------------------
  |  Branch (144:13): [True: 2, False: 0]
  ------------------
  145|       |            // The 32ul avoid pointless small resizes.
  146|      2|            _s_tls_blocks->resize(std::max(block_id + 1, 32ul));
  147|      2|        }
  148|      2|        ThreadBlock* tb = (*_s_tls_blocks)[block_id];
  149|      2|        if (tb == NULL) {
  ------------------
  |  Branch (149:13): [True: 2, False: 0]
  ------------------
  150|      2|            ThreadBlock *new_block = new (std::nothrow) ThreadBlock;
  151|      2|            if (__builtin_expect(new_block == NULL, 0)) {
  ------------------
  |  Branch (151:17): [True: 0, False: 2]
  ------------------
  152|      0|                return NULL;
  153|      0|            }
  154|      2|            tb = new_block;
  155|      2|            (*_s_tls_blocks)[block_id] = new_block;
  156|      2|        }
  157|      2|        return tb->at(id - block_id * ELEMENTS_PER_BLOCK);
  158|      2|    }

_ZN4bvar6detail22call_op_returning_voidINS0_14CombineSamplerEPNS0_7SamplerES4_EEvRKT_RT0_RKT1_:
   28|     12|    const Op& op, T1& v1, const T2& v2) {
   29|     12|    return op(v1, v2);
   30|     12|}

_ZN4bvar6detail13AgentCombinerIPNS0_7SamplerES3_NS0_14CombineSamplerEEC2ES3_S3_RKS4_:
  227|      2|        : _id(AgentGroup::create_new_agent())
  228|      2|        , _op(op)
  229|      2|        , _global_result(result_identity)
  230|      2|        , _result_identity(result_identity)
  231|      2|        , _element_identity(element_identity) {
  232|      2|    }
_ZN4bvar6detail13AgentCombinerIPNS0_7SamplerES3_NS0_14CombineSamplerEE5Agent5resetERKS3_RKSt10shared_ptrIS5_E:
  175|      2|        void reset(const ElementTp& val, const self_shared_type& c) {
  176|      2|            combiner = c;
  177|      2|            element.store(val);
  178|      2|        }
_ZN4bvar6detail16ElementContainerIPNS0_7SamplerEvE5storeERKS3_:
   81|      2|    void store(const T& new_value) {
   82|      2|        butil::AutoLock guard(_lock);
   83|      2|        _value = new_value;
   84|      2|    }
_ZNK4bvar6detail13AgentCombinerIPNS0_7SamplerES3_NS0_14CombineSamplerEE2opEv:
  335|     10|    const BinaryOp& op() const { return _op; }
_ZN4bvar6detail13AgentCombinerIPNS0_7SamplerES3_NS0_14CombineSamplerEE16reset_all_agentsEv:
  261|      2|    ResultTp reset_all_agents() {
  262|      2|        ElementTp prev;
  263|      2|        butil::AutoLock guard(_lock);
  264|      2|        ResultTp tmp = _global_result;
  265|      2|        _global_result = _result_identity;
  266|      2|        for (butil::LinkNode<Agent>* node = _agents.head();
  267|      4|             node != _agents.end(); node = node->next()) {
  ------------------
  |  Branch (267:14): [True: 2, False: 2]
  ------------------
  268|      2|            node->value()->element.exchange(&prev, _element_identity);
  269|      2|            call_op_returning_void(_op, tmp, prev);
  270|      2|        }
  271|      2|        return tmp;
  272|      2|    }
_ZN4bvar6detail16ElementContainerIPNS0_7SamplerEvE8exchangeEPS3_RKS3_:
   86|      2|    void exchange(T* prev, const T& new_value) {
   87|      2|        butil::AutoLock guard(_lock);
   88|      2|        *prev = _value;
   89|      2|        _value = new_value;
   90|      2|    }
_ZN4bvar6detail13AgentCombinerIPNS0_7SamplerES3_NS0_14CombineSamplerEE23get_or_create_tls_agentEv:
  300|     10|    Agent* get_or_create_tls_agent() {
  301|     10|        Agent* agent = AgentGroup::get_tls_agent(_id);
  302|     10|        if (!agent) {
  ------------------
  |  Branch (302:13): [True: 2, False: 8]
  ------------------
  303|       |            // Create the agent
  304|      2|            agent = AgentGroup::get_or_create_tls_agent(_id);
  305|      2|            if (NULL == agent) {
  ------------------
  |  Branch (305:17): [True: 0, False: 2]
  ------------------
  306|      0|                LOG(FATAL) << "Fail to create agent";
  ------------------
  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  307|      0|                return NULL;
  308|      0|            }
  309|      2|        }
  310|     10|        if (!agent->combiner.expired()) {
  ------------------
  |  Branch (310:13): [True: 8, False: 2]
  ------------------
  311|      8|            return agent;
  312|      8|        }
  313|      2|        agent->reset(_element_identity, this->shared_from_this());
  314|       |        // TODO: Is uniqueness-checking necessary here?
  315|      2|        {
  316|      2|            butil::AutoLock guard(_lock);
  317|      2|            _agents.Append(agent);
  318|      2|        }
  319|      2|        return agent;
  320|     10|    }
_ZN4bvar6detail16ElementContainerIPNS0_7SamplerEvE6modifyINS0_14CombineSamplerES3_EEvRKT_RKT0_:
   93|     10|    void modify(const Op &op, const T1 &value2) {
   94|     10|        butil::AutoLock guard(_lock);
   95|     10|        call_op_returning_void(op, _value, value2);
   96|     10|    }

_ZN4bvar6detail16SamplerCollector3runEv:
  135|      2|void SamplerCollector::run() {
  136|      2|    ::usleep(FLAGS_bvar_sampler_thread_start_delay_us);
  137|       |    
  138|       |#ifndef UNIT_TEST
  139|       |    // NOTE:
  140|       |    // * Following vars can't be created on thread's stack since this thread
  141|       |    //   may be abandoned at any time after forking.
  142|       |    // * They can't created inside the constructor of SamplerCollector as well,
  143|       |    //   which results in deadlock.
  144|       |    if (s_cumulated_time_bvar == NULL) {
  145|       |        s_cumulated_time_bvar =
  146|       |            new PassiveStatus<double>(get_cumulated_time, this);
  147|       |    }
  148|       |    if (s_sampling_thread_usage_bvar == NULL) {
  149|       |        s_sampling_thread_usage_bvar =
  150|       |            new bvar::PerSecond<bvar::PassiveStatus<double> >(
  151|       |                    "bvar_sampler_collector_usage", s_cumulated_time_bvar, 10);
  152|       |    }
  153|       |#endif
  154|       |
  155|      2|    butil::LinkNode<Sampler> root;
  156|      2|    int consecutive_nosleep = 0;
  157|      4|    while (!_stop) {
  ------------------
  |  Branch (157:12): [True: 2, False: 2]
  ------------------
  158|      2|        int64_t abstime = butil::gettimeofday_us();
  159|      2|        Sampler* s = this->reset();
  160|      2|        if (s) {
  ------------------
  |  Branch (160:13): [True: 2, False: 0]
  ------------------
  161|      2|            s->InsertBeforeAsList(&root);
  162|      2|        }
  163|     12|        for (butil::LinkNode<Sampler>* p = root.next(); p != &root;) {
  ------------------
  |  Branch (163:57): [True: 10, False: 2]
  ------------------
  164|       |            // We may remove p from the list, save next first.
  165|     10|            butil::LinkNode<Sampler>* saved_next = p->next();
  166|     10|            Sampler* s = p->value();
  167|     10|            s->_mutex.lock();
  168|     10|            if (!s->_used) {
  ------------------
  |  Branch (168:17): [True: 0, False: 10]
  ------------------
  169|      0|                s->_mutex.unlock();
  170|      0|                p->RemoveFromList();
  171|      0|                delete s;
  172|     10|            } else {
  173|     10|                s->take_sample();
  174|     10|                s->_mutex.unlock();
  175|     10|            }
  176|     10|            p = saved_next;
  177|     10|        }
  178|      2|        bool slept = false;
  179|      2|        int64_t now = butil::gettimeofday_us();
  180|      2|        _cumulated_time_us += now - abstime;
  181|      2|        abstime += 1000000L;
  182|      4|        while (abstime > now) {
  ------------------
  |  Branch (182:16): [True: 2, False: 2]
  ------------------
  183|      2|            ::usleep(abstime - now);
  184|      2|            slept = true;
  185|      2|            now = butil::gettimeofday_us();
  186|      2|        }
  187|      2|        if (slept) {
  ------------------
  |  Branch (187:13): [True: 0, False: 2]
  ------------------
  188|      0|            consecutive_nosleep = 0;
  189|      2|        } else {            
  190|      2|            if (++consecutive_nosleep >= WARN_NOSLEEP_THRESHOLD) {
  ------------------
  |  Branch (190:17): [True: 0, False: 2]
  ------------------
  191|      0|                consecutive_nosleep = 0;
  192|      0|                LOG(WARNING) << "bvar is busy at sampling for "
  ------------------
  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  193|      0|                             << WARN_NOSLEEP_THRESHOLD << " seconds!";
  194|      0|            }
  195|      2|        }
  196|      2|    }
  197|      2|}
_ZN4bvar6detail7SamplerC2Ev:
  199|     10|Sampler::Sampler() : _used(true) {}
_ZN4bvar6detail7Sampler8scheduleEv:
  205|     10|void Sampler::schedule() {
  206|       |    // since the SamplerCollector is initialized before the program starts
  207|       |    // flags will not take effect if used in the SamplerCollector constructor
  208|     10|    if (FLAGS_bvar_enable_sampling) {
  ------------------
  |  Branch (208:9): [True: 10, False: 0]
  ------------------
  209|     10|        *butil::get_leaky_singleton<SamplerCollector>() << this;
  210|     10|    }
  211|     10|}
_ZN4bvar6detail16SamplerCollectorC2Ev:
   66|      2|        : _created(false)
   67|      2|        , _stop(false)
   68|      2|        , _cumulated_time_us(0) {
   69|      2|        create_sampling_thread();
   70|      2|    }
_ZN4bvar6detail16SamplerCollector22create_sampling_threadEv:
   91|      2|    void create_sampling_thread() {
   92|      2|        const int rc = pthread_create(&_tid, NULL, sampling_thread, this);
   93|      2|        if (rc != 0) {
  ------------------
  |  Branch (93:13): [True: 0, False: 2]
  ------------------
   94|      0|            LOG(FATAL) << "Fail to create sampling_thread, " << berror(rc);
  ------------------
  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   95|      2|        } else {
   96|      2|            _created = true;
   97|      2|            if (!registered_atfork) {
  ------------------
  |  Branch (97:17): [True: 2, False: 0]
  ------------------
   98|      2|                registered_atfork = true;
   99|      2|                pthread_atfork(NULL, NULL, child_callback_atfork);
  100|      2|            }
  101|      2|        }
  102|      2|    }
_ZN4bvar6detail16SamplerCollector15sampling_threadEPv:
  111|      2|    static void* sampling_thread(void* arg) {
  112|      2|        butil::PlatformThread::SetNameSimple("bvar_sampler");
  113|      2|        static_cast<SamplerCollector*>(arg)->run();
  114|       |        return NULL;
  115|      2|    }
_ZNK4bvar6detail14CombineSamplerclERPNS0_7SamplerES3_:
   36|     12|    void operator()(Sampler* & s1, Sampler* s2) const {
   37|     12|        if (s2 == NULL) {
  ------------------
  |  Branch (37:13): [True: 0, False: 12]
  ------------------
   38|      0|            return;
   39|      0|        }
   40|     12|        if (s1 == NULL) {
  ------------------
  |  Branch (40:13): [True: 4, False: 8]
  ------------------
   41|      4|            s1 = s2;
   42|      4|            return;
   43|      4|        }
   44|      8|        s1->InsertBeforeAsList(s2);
   45|      8|    }

_ZN4bvar6detail10SeriesBaseIlNS0_5AddToIlEEE6appendERKl:
  114|      2|    void append(const T& value) {
  115|      2|        BAIDU_SCOPED_LOCK(_mutex);
  ------------------
  |  |   47|      2|    decltype(::butil::detail::get_lock_guard<decltype(ref_of_lock)>()) \
  |  |   48|      2|    BAIDU_CONCAT(scoped_locker_dummy_at_line_, __LINE__)(ref_of_lock)
  |  |  ------------------
  |  |  |  |   88|      2|# define BAIDU_CONCAT(a, b) BAIDU_CONCAT_HELPER(a, b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|      2|# define BAIDU_CONCAT_HELPER(a, b) a##b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  116|      2|        return append_second(value, _op);
  117|      2|    }
_ZN4bvar6detail10SeriesBaseIlNS0_5AddToIlEEE13append_secondERKlRKS3_:
  161|      2|void SeriesBase<T, Op>::append_second(const T& value, const Op& op) {
  162|      2|    _data.second(_nsecond) = value;
  163|      2|    ++_nsecond;
  164|      2|    if (_nsecond >= 60) {
  ------------------
  |  Branch (164:9): [True: 0, False: 2]
  ------------------
  165|      0|        _nsecond = 0;
  166|      0|        T tmp = _data.second(0);
  167|      0|        for (int i = 1; i < 60; ++i) {
  ------------------
  |  Branch (167:25): [True: 0, False: 0]
  ------------------
  168|      0|            call_op_returning_void(op, tmp, _data.second(i));
  169|      0|        }
  170|      0|        DivideOnAddition<T, Op>::inplace_divide(tmp, op, 60);
  171|      0|        append_minute(tmp, op);
  172|      0|    }
  173|      2|}
_ZN4bvar6detail10SeriesBaseIlNS0_5AddToIlEEE4Data6secondEi:
  135|      2|        T& second(int index) { return _array[index]; }
_ZN4bvar6detail6SeriesIdNS0_5AddToIdEEEC2ERKS3_:
  218|      2|    explicit Series(const Op& op) : Base(op) {}
_ZN4bvar6detail10SeriesBaseIdNS0_5AddToIdEEEC2ERKS3_:
  103|      2|        : _op(op)
  104|      2|        , _nsecond(0)
  105|      2|        , _nminute(0)
  106|      2|        , _nhour(0)
  107|      2|        , _nday(0) {
  108|       |        pthread_mutex_init(&_mutex, NULL);
  109|      2|    }
_ZN4bvar6detail10SeriesBaseIdNS0_5AddToIdEEE4DataC2Ev:
  127|      2|        Data() {
  128|       |            // is_pod does not work for gcc 3.4
  129|      2|            if (butil::is_integral<T>::value ||
  ------------------
  |  Branch (129:17): [Folded, False: 0]
  ------------------
  130|      2|                butil::is_floating_point<T>::value) {
  ------------------
  |  Branch (130:17): [True: 0, Folded]
  ------------------
  131|      2|                memset(static_cast<void*>(_array), 0, sizeof(_array));
  132|      2|            }
  133|      2|        }
_ZN4bvar6detail10SeriesBaseIdNS0_5AddToIdEEE6appendERKd:
  114|      2|    void append(const T& value) {
  115|      2|        BAIDU_SCOPED_LOCK(_mutex);
  ------------------
  |  |   47|      2|    decltype(::butil::detail::get_lock_guard<decltype(ref_of_lock)>()) \
  |  |   48|      2|    BAIDU_CONCAT(scoped_locker_dummy_at_line_, __LINE__)(ref_of_lock)
  |  |  ------------------
  |  |  |  |   88|      2|# define BAIDU_CONCAT(a, b) BAIDU_CONCAT_HELPER(a, b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|      2|# define BAIDU_CONCAT_HELPER(a, b) a##b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  116|      2|        return append_second(value, _op);
  117|      2|    }
_ZN4bvar6detail10SeriesBaseIdNS0_5AddToIdEEE13append_secondERKdRKS3_:
  161|      2|void SeriesBase<T, Op>::append_second(const T& value, const Op& op) {
  162|      2|    _data.second(_nsecond) = value;
  163|      2|    ++_nsecond;
  164|      2|    if (_nsecond >= 60) {
  ------------------
  |  Branch (164:9): [True: 0, False: 2]
  ------------------
  165|      0|        _nsecond = 0;
  166|      0|        T tmp = _data.second(0);
  167|      0|        for (int i = 1; i < 60; ++i) {
  ------------------
  |  Branch (167:25): [True: 0, False: 0]
  ------------------
  168|      0|            call_op_returning_void(op, tmp, _data.second(i));
  169|      0|        }
  170|      0|        DivideOnAddition<T, Op>::inplace_divide(tmp, op, 60);
  171|      0|        append_minute(tmp, op);
  172|      0|    }
  173|      2|}
_ZN4bvar6detail10SeriesBaseIdNS0_5AddToIdEEE4Data6secondEi:
  135|      2|        T& second(int index) { return _array[index]; }
_ZN4bvar6detail6SeriesIlNS0_5AddToIlEEEC2ERKS3_:
  218|      2|    explicit Series(const Op& op) : Base(op) {}
_ZN4bvar6detail10SeriesBaseIlNS0_5AddToIlEEEC2ERKS3_:
  103|      2|        : _op(op)
  104|      2|        , _nsecond(0)
  105|      2|        , _nminute(0)
  106|      2|        , _nhour(0)
  107|      2|        , _nday(0) {
  108|       |        pthread_mutex_init(&_mutex, NULL);
  109|      2|    }
_ZN4bvar6detail10SeriesBaseIlNS0_5AddToIlEEE4DataC2Ev:
  127|      2|        Data() {
  128|       |            // is_pod does not work for gcc 3.4
  129|      2|            if (butil::is_integral<T>::value ||
  ------------------
  |  Branch (129:17): [True: 2, Folded]
  ------------------
  130|      2|                butil::is_floating_point<T>::value) {
  ------------------
  |  Branch (130:17): [Folded, False: 0]
  ------------------
  131|      2|                memset(static_cast<void*>(_array), 0, sizeof(_array));
  132|      2|            }
  133|      2|        }
_ZN4bvar6detail6SeriesImNS0_5AddToImEEEC2ERKS3_:
  218|      4|    explicit Series(const Op& op) : Base(op) {}
_ZN4bvar6detail10SeriesBaseImNS0_5AddToImEEEC2ERKS3_:
  103|      4|        : _op(op)
  104|      4|        , _nsecond(0)
  105|      4|        , _nminute(0)
  106|      4|        , _nhour(0)
  107|      4|        , _nday(0) {
  108|       |        pthread_mutex_init(&_mutex, NULL);
  109|      4|    }
_ZN4bvar6detail10SeriesBaseImNS0_5AddToImEEE4DataC2Ev:
  127|      4|        Data() {
  128|       |            // is_pod does not work for gcc 3.4
  129|      4|            if (butil::is_integral<T>::value ||
  ------------------
  |  Branch (129:17): [True: 4, Folded]
  ------------------
  130|      4|                butil::is_floating_point<T>::value) {
  ------------------
  |  Branch (130:17): [Folded, False: 0]
  ------------------
  131|      4|                memset(static_cast<void*>(_array), 0, sizeof(_array));
  132|      4|            }
  133|      4|        }
_ZN4bvar6detail10SeriesBaseImNS0_5AddToImEEE6appendERKm:
  114|      4|    void append(const T& value) {
  115|      4|        BAIDU_SCOPED_LOCK(_mutex);
  ------------------
  |  |   47|      4|    decltype(::butil::detail::get_lock_guard<decltype(ref_of_lock)>()) \
  |  |   48|      4|    BAIDU_CONCAT(scoped_locker_dummy_at_line_, __LINE__)(ref_of_lock)
  |  |  ------------------
  |  |  |  |   88|      4|# define BAIDU_CONCAT(a, b) BAIDU_CONCAT_HELPER(a, b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|      4|# define BAIDU_CONCAT_HELPER(a, b) a##b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  116|      4|        return append_second(value, _op);
  117|      4|    }
_ZN4bvar6detail10SeriesBaseImNS0_5AddToImEEE13append_secondERKmRKS3_:
  161|      4|void SeriesBase<T, Op>::append_second(const T& value, const Op& op) {
  162|      4|    _data.second(_nsecond) = value;
  163|      4|    ++_nsecond;
  164|      4|    if (_nsecond >= 60) {
  ------------------
  |  Branch (164:9): [True: 0, False: 4]
  ------------------
  165|      0|        _nsecond = 0;
  166|      0|        T tmp = _data.second(0);
  167|      0|        for (int i = 1; i < 60; ++i) {
  ------------------
  |  Branch (167:25): [True: 0, False: 0]
  ------------------
  168|      0|            call_op_returning_void(op, tmp, _data.second(i));
  169|      0|        }
  170|      0|        DivideOnAddition<T, Op>::inplace_divide(tmp, op, 60);
  171|      0|        append_minute(tmp, op);
  172|      0|    }
  173|      4|}
_ZN4bvar6detail10SeriesBaseImNS0_5AddToImEEE4Data6secondEi:
  135|      4|        T& second(int index) { return _array[index]; }
_ZN4bvar6detail6SeriesIiNS0_5AddToIiEEEC2ERKS3_:
  218|      2|    explicit Series(const Op& op) : Base(op) {}
_ZN4bvar6detail10SeriesBaseIiNS0_5AddToIiEEEC2ERKS3_:
  103|      2|        : _op(op)
  104|      2|        , _nsecond(0)
  105|      2|        , _nminute(0)
  106|      2|        , _nhour(0)
  107|      2|        , _nday(0) {
  108|       |        pthread_mutex_init(&_mutex, NULL);
  109|      2|    }
_ZN4bvar6detail10SeriesBaseIiNS0_5AddToIiEEE4DataC2Ev:
  127|      2|        Data() {
  128|       |            // is_pod does not work for gcc 3.4
  129|      2|            if (butil::is_integral<T>::value ||
  ------------------
  |  Branch (129:17): [True: 2, Folded]
  ------------------
  130|      2|                butil::is_floating_point<T>::value) {
  ------------------
  |  Branch (130:17): [Folded, False: 0]
  ------------------
  131|      2|                memset(static_cast<void*>(_array), 0, sizeof(_array));
  132|      2|            }
  133|      2|        }
_ZN4bvar6detail10SeriesBaseIiNS0_5AddToIiEEE6appendERKi:
  114|      2|    void append(const T& value) {
  115|      2|        BAIDU_SCOPED_LOCK(_mutex);
  ------------------
  |  |   47|      2|    decltype(::butil::detail::get_lock_guard<decltype(ref_of_lock)>()) \
  |  |   48|      2|    BAIDU_CONCAT(scoped_locker_dummy_at_line_, __LINE__)(ref_of_lock)
  |  |  ------------------
  |  |  |  |   88|      2|# define BAIDU_CONCAT(a, b) BAIDU_CONCAT_HELPER(a, b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|      2|# define BAIDU_CONCAT_HELPER(a, b) a##b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  116|      2|        return append_second(value, _op);
  117|      2|    }
_ZN4bvar6detail10SeriesBaseIiNS0_5AddToIiEEE13append_secondERKiRKS3_:
  161|      2|void SeriesBase<T, Op>::append_second(const T& value, const Op& op) {
  162|      2|    _data.second(_nsecond) = value;
  163|      2|    ++_nsecond;
  164|      2|    if (_nsecond >= 60) {
  ------------------
  |  Branch (164:9): [True: 0, False: 2]
  ------------------
  165|      0|        _nsecond = 0;
  166|      0|        T tmp = _data.second(0);
  167|      0|        for (int i = 1; i < 60; ++i) {
  ------------------
  |  Branch (167:25): [True: 0, False: 0]
  ------------------
  168|      0|            call_op_returning_void(op, tmp, _data.second(i));
  169|      0|        }
  170|      0|        DivideOnAddition<T, Op>::inplace_divide(tmp, op, 60);
  171|      0|        append_minute(tmp, op);
  172|      0|    }
  173|      2|}
_ZN4bvar6detail10SeriesBaseIiNS0_5AddToIiEEE4Data6secondEi:
  135|      2|        T& second(int index) { return _array[index]; }

_ZN4bvar13PassiveStatusINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2ERKN5butil16BasicStringPieceIS6_EEPFvRSoPvESE_:
  204|     14|        : _print(print), _arg(arg) {
  205|     14|        expose(name);
  206|     14|    }
_ZN4bvar13PassiveStatusIlE11expose_implERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESC_NS_13DisplayFilterE:
  172|      2|                    DisplayFilter display_filter) override {
  173|      2|        const int rc = Variable::expose_impl(prefix, name, display_filter);
  174|      2|        if (ADDITIVE &&
  ------------------
  |  Branch (174:13): [True: 2, Folded]
  ------------------
  175|      2|            rc == 0 &&
  ------------------
  |  Branch (175:13): [True: 2, False: 0]
  ------------------
  176|      2|            _series_sampler == NULL &&
  ------------------
  |  Branch (176:13): [True: 2, False: 0]
  ------------------
  177|      2|            FLAGS_save_series) {
  ------------------
  |  Branch (177:13): [True: 2, False: 0]
  ------------------
  178|      2|            _series_sampler = new SeriesSampler(this);
  179|      2|            _series_sampler->schedule();
  180|      2|        }
  181|      2|        return rc;
  182|      2|    }
_ZN4bvar13PassiveStatusIlE13SeriesSampler11take_sampleEv:
   62|      2|        void take_sample() override { _series.append(_owner->get_value()); }
_ZNK4bvar13PassiveStatusIlE9get_valueEv:
  139|      2|    Tp get_value() const {
  140|      2|        return (_getfn ? _getfn(_arg) : Tp());
  ------------------
  |  Branch (140:17): [True: 2, False: 0]
  ------------------
  141|      2|    }
_ZNK4bvar13PassiveStatusIdE9get_valueEv:
  139|      2|    Tp get_value() const {
  140|      2|        return (_getfn ? _getfn(_arg) : Tp());
  ------------------
  |  Branch (140:17): [True: 2, False: 0]
  ------------------
  141|      2|    }
_ZN4bvar13PassiveStatusIdE11expose_implERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESC_NS_13DisplayFilterE:
  172|      2|                    DisplayFilter display_filter) override {
  173|      2|        const int rc = Variable::expose_impl(prefix, name, display_filter);
  174|      2|        if (ADDITIVE &&
  ------------------
  |  Branch (174:13): [True: 2, Folded]
  ------------------
  175|      2|            rc == 0 &&
  ------------------
  |  Branch (175:13): [True: 2, False: 0]
  ------------------
  176|      2|            _series_sampler == NULL &&
  ------------------
  |  Branch (176:13): [True: 2, False: 0]
  ------------------
  177|      2|            FLAGS_save_series) {
  ------------------
  |  Branch (177:13): [True: 2, False: 0]
  ------------------
  178|      2|            _series_sampler = new SeriesSampler(this);
  179|      2|            _series_sampler->schedule();
  180|      2|        }
  181|      2|        return rc;
  182|      2|    }
_ZN4bvar13PassiveStatusIdE13SeriesSamplerC2EPS1_:
   58|      2|            : _owner(owner), _vector_names(NULL), _series(Op()) {}
_ZN4bvar13PassiveStatusIdE13SeriesSampler11take_sampleEv:
   62|      2|        void take_sample() override { _series.append(_owner->get_value()); }
_ZN4bvar13PassiveStatusIlE13SeriesSamplerC2EPS1_:
   58|      2|            : _owner(owner), _vector_names(NULL), _series(Op()) {}
_ZN4bvar13PassiveStatusIlEC2ERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPFlPvESD_:
   81|      2|        : _getfn(getfn)
   82|      2|        , _arg(arg)
   83|      2|        , _sampler(NULL)
   84|      2|        , _series_sampler(NULL) {
   85|      2|        expose(name);
   86|      2|    }
_ZNK4bvar13PassiveStatusImE9get_valueEv:
  139|      4|    Tp get_value() const {
  140|      4|        return (_getfn ? _getfn(_arg) : Tp());
  ------------------
  |  Branch (140:17): [True: 4, False: 0]
  ------------------
  141|      4|    }
_ZN4bvar13PassiveStatusImE11expose_implERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESC_NS_13DisplayFilterE:
  172|      4|                    DisplayFilter display_filter) override {
  173|      4|        const int rc = Variable::expose_impl(prefix, name, display_filter);
  174|      4|        if (ADDITIVE &&
  ------------------
  |  Branch (174:13): [True: 4, Folded]
  ------------------
  175|      4|            rc == 0 &&
  ------------------
  |  Branch (175:13): [True: 4, False: 0]
  ------------------
  176|      4|            _series_sampler == NULL &&
  ------------------
  |  Branch (176:13): [True: 4, False: 0]
  ------------------
  177|      4|            FLAGS_save_series) {
  ------------------
  |  Branch (177:13): [True: 4, False: 0]
  ------------------
  178|      4|            _series_sampler = new SeriesSampler(this);
  179|      4|            _series_sampler->schedule();
  180|      4|        }
  181|      4|        return rc;
  182|      4|    }
_ZN4bvar13PassiveStatusImE13SeriesSamplerC2EPS1_:
   58|      4|            : _owner(owner), _vector_names(NULL), _series(Op()) {}
_ZN4bvar13PassiveStatusImE13SeriesSampler11take_sampleEv:
   62|      4|        void take_sample() override { _series.append(_owner->get_value()); }
_ZN4bvar13PassiveStatusIdEC2ERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPFdPvESD_:
   81|      2|        : _getfn(getfn)
   82|      2|        , _arg(arg)
   83|      2|        , _sampler(NULL)
   84|      2|        , _series_sampler(NULL) {
   85|      2|        expose(name);
   86|      2|    }
_ZN4bvar13PassiveStatusIiEC2ERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPFiPvESD_:
   81|      2|        : _getfn(getfn)
   82|      2|        , _arg(arg)
   83|      2|        , _sampler(NULL)
   84|      2|        , _series_sampler(NULL) {
   85|      2|        expose(name);
   86|      2|    }
_ZNK4bvar13PassiveStatusIiE9get_valueEv:
  139|      2|    Tp get_value() const {
  140|      2|        return (_getfn ? _getfn(_arg) : Tp());
  ------------------
  |  Branch (140:17): [True: 2, False: 0]
  ------------------
  141|      2|    }
_ZN4bvar13PassiveStatusIiE11expose_implERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESC_NS_13DisplayFilterE:
  172|      2|                    DisplayFilter display_filter) override {
  173|      2|        const int rc = Variable::expose_impl(prefix, name, display_filter);
  174|      2|        if (ADDITIVE &&
  ------------------
  |  Branch (174:13): [True: 2, Folded]
  ------------------
  175|      2|            rc == 0 &&
  ------------------
  |  Branch (175:13): [True: 2, False: 0]
  ------------------
  176|      2|            _series_sampler == NULL &&
  ------------------
  |  Branch (176:13): [True: 2, False: 0]
  ------------------
  177|      2|            FLAGS_save_series) {
  ------------------
  |  Branch (177:13): [True: 2, False: 0]
  ------------------
  178|      2|            _series_sampler = new SeriesSampler(this);
  179|      2|            _series_sampler->schedule();
  180|      2|        }
  181|      2|        return rc;
  182|      2|    }
_ZN4bvar13PassiveStatusIiE13SeriesSamplerC2EPS1_:
   58|      2|            : _owner(owner), _vector_names(NULL), _series(Op()) {}
_ZN4bvar13PassiveStatusIiE13SeriesSampler11take_sampleEv:
   62|      2|        void take_sample() override { _series.append(_owner->get_value()); }
_ZN4bvar13PassiveStatusImEC2ERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEPFmPvESD_:
   81|      4|        : _getfn(getfn)
   82|      4|        , _arg(arg)
   83|      4|        , _sampler(NULL)
   84|      4|        , _series_sampler(NULL) {
   85|      4|        expose(name);
   86|      4|    }

_ZN4bvar7ReducerIPNS_6detail7SamplerENS1_14CombineSamplerENS1_6VoidOpEEC2ERKS3_RKS4_RKS5_:
  204|      2|        : _combiner(std::make_shared<combiner_type>(identity, identity, op))
  205|      2|        , _sampler(NULL) , _series_sampler(NULL) , _inv_op(inv_op) {}
_ZN4bvar7ReducerIPNS_6detail7SamplerENS1_14CombineSamplerENS1_6VoidOpEE5resetEv:
  238|      2|    T reset() { return _combiner->reset_all_agents(); }
_ZN4bvar7ReducerIPNS_6detail7SamplerENS1_14CombineSamplerENS1_6VoidOpEElsERKS3_:
  302|     10|    typename butil::add_cr_non_integral<T>::type value) {
  303|       |    // It's wait-free for most time
  304|     10|    agent_type* agent = _combiner->get_or_create_tls_agent();
  305|     10|    if (__builtin_expect(!agent, 0)) {
  ------------------
  |  Branch (305:9): [True: 0, False: 10]
  ------------------
  306|      0|        LOG(FATAL) << "Fail to create agent";
  ------------------
  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  307|      0|        return *this;
  308|      0|    }
  309|     10|    agent->element.modify(_combiner->op(), value);
  310|     10|    return *this;
  311|     10|}

_ZN4bvar8Variable11expose_implERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESB_NS_13DisplayFilterE:
  131|     24|                          DisplayFilter display_filter) {
  132|     24|    if (name.empty()) {
  ------------------
  |  Branch (132:9): [True: 0, False: 24]
  ------------------
  133|      0|        LOG(ERROR) << "Parameter[name] is empty";
  ------------------
  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  134|      0|        return -1;
  135|      0|    }
  136|       |    // NOTE: It's impossible to atomically erase from a submap and insert into
  137|       |    // another submap without a global lock. When the to-be-exposed name
  138|       |    // already exists, there's a chance that we can't insert back previous
  139|       |    // name. But it should be fine generally because users are unlikely to
  140|       |    // expose a variable more than once and calls to expose() are unlikely
  141|       |    // to contend heavily.
  142|       |
  143|       |    // remove previous pointer from the map if needed.
  144|     24|    hide();
  145|       |
  146|       |    // Build the name.
  147|     24|    _name.clear();
  148|     24|    _name.reserve((prefix.size() + name.size()) * 5 / 4);
  149|     24|    if (!prefix.empty()) {
  ------------------
  |  Branch (149:9): [True: 0, False: 24]
  ------------------
  150|      0|        to_underscored_name(&_name, prefix);
  151|      0|        if (!_name.empty() && butil::back_char(_name) != '_') {
  ------------------
  |  Branch (151:13): [True: 0, False: 0]
  |  Branch (151:31): [True: 0, False: 0]
  ------------------
  152|      0|            _name.push_back('_');
  153|      0|        }
  154|      0|    }
  155|     24|    to_underscored_name(&_name, name);
  156|       |    
  157|     24|    VarMapWithLock& m = get_var_map(_name);
  158|     24|    {
  159|     24|        BAIDU_SCOPED_LOCK(m.mutex);
  ------------------
  |  |   47|     24|    decltype(::butil::detail::get_lock_guard<decltype(ref_of_lock)>()) \
  |  |   48|     24|    BAIDU_CONCAT(scoped_locker_dummy_at_line_, __LINE__)(ref_of_lock)
  |  |  ------------------
  |  |  |  |   88|     24|# define BAIDU_CONCAT(a, b) BAIDU_CONCAT_HELPER(a, b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|     24|# define BAIDU_CONCAT_HELPER(a, b) a##b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|     24|        VarEntry* entry = m.seek(_name);
  161|     24|        if (entry == NULL) {
  ------------------
  |  Branch (161:13): [True: 24, False: 0]
  ------------------
  162|     24|            entry = &m[_name];
  163|     24|            entry->var = this;
  164|     24|            entry->display_filter = display_filter;
  165|     24|            return 0;
  166|     24|        }
  167|     24|    }
  168|      0|    RELEASE_ASSERT_VERBOSE(!FLAGS_bvar_abort_on_same_name,
  ------------------
  |  |  489|      0|    do {                                                                            \
  |  |  490|      0|        if (!(condition)) {                                                         \
  |  |  ------------------
  |  |  |  Branch (490:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  491|      0|            ASSERT_LOG("Assert failure: " #condition ". " #fmt, ## __VA_ARGS__);    \
  |  |  ------------------
  |  |  |  |  469|      0|    do {                                                                \
  |  |  |  |  470|      0|        std::string log = butil::string_printf(fmt, ## __VA_ARGS__);    \
  |  |  |  |  471|      0|        LOG(FATAL) << log;                                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  472|      0|    } while (false)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:14): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  492|      0|            ::abort();                                                              \
  |  |  493|      0|        }                                                                           \
  |  |  494|      0|    } while (false)
  |  |  ------------------
  |  |  |  Branch (494:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  169|      0|                           "Abort due to name conflict");
  170|      0|    if (!s_bvar_may_abort) {
  ------------------
  |  Branch (170:9): [True: 0, False: 0]
  ------------------
  171|       |        // Mark name conflict occurs, If this conflict happens before
  172|       |        // initialization of bvar_abort_on_same_name, the validator will
  173|       |        // abort the program if needed.
  174|      0|        s_bvar_may_abort = true;
  175|      0|    }
  176|       |        
  177|      0|    LOG(ERROR) << "Already exposed `" << _name << "' whose value is `"
  ------------------
  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  178|      0|               << describe_exposed(_name) << '\'';
  179|      0|    _name.clear();
  180|      0|    return -1;
  181|      0|}
_ZN4bvar8Variable4hideEv:
  187|     24|bool Variable::hide() {
  188|     24|    if (_name.empty()) {
  ------------------
  |  Branch (188:9): [True: 24, False: 0]
  ------------------
  189|     24|        return false;
  190|     24|    }
  191|      0|    VarMapWithLock& m = get_var_map(_name);
  192|      0|    BAIDU_SCOPED_LOCK(m.mutex);
  ------------------
  |  |   47|      0|    decltype(::butil::detail::get_lock_guard<decltype(ref_of_lock)>()) \
  |  |   48|      0|    BAIDU_CONCAT(scoped_locker_dummy_at_line_, __LINE__)(ref_of_lock)
  |  |  ------------------
  |  |  |  |   88|      0|# define BAIDU_CONCAT(a, b) BAIDU_CONCAT_HELPER(a, b)
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|      0|# define BAIDU_CONCAT_HELPER(a, b) a##b
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  193|      0|    VarEntry* entry = m.seek(_name);
  194|      0|    if (entry) {
  ------------------
  |  Branch (194:9): [True: 0, False: 0]
  ------------------
  195|      0|        CHECK_EQ(1UL, m.erase(_name));
  ------------------
  |  |  692|      0|#define CHECK_EQ(val1, val2) BAIDU_CHECK_OP(EQ, ==, val1, val2)
  |  |  ------------------
  |  |  |  |  630|      0|    if (std::string* _result =                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (630:22): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  631|      0|        ::logging::Check##name##Impl((val1), (val2),                    \
  |  |  |  |  632|      0|                                     #val1 " " #op " " #val2))          \
  |  |  |  |  633|      0|        ::logging::LogMessage(__FILE__, __LINE__, __func__, _result).stream().SetCheck()
  |  |  ------------------
  ------------------
  196|      0|    } else {
  197|      0|        CHECK(false) << "`" << _name << "' must exist";
  ------------------
  |  |  617|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(FATAL).SetCheck(), !(condition))     \
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  618|      0|    << "Check failed: " #condition ". "
  ------------------
  198|      0|    }
  199|      0|    _name.clear();
  200|      0|    return true;
  201|     24|}
_ZN4bvar19to_underscored_nameEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN5butil16BasicStringPieceIS5_EE:
  942|     24|void to_underscored_name(std::string* name, const butil::StringPiece& src) {
  943|     24|    name->reserve(name->size() + src.size() + 8/*just guess*/);
  944|    428|    for (const char* p = src.data(); p != src.data() + src.size(); ++p) {
  ------------------
  |  Branch (944:38): [True: 404, False: 24]
  ------------------
  945|    404|        if (isalpha(*p)) {
  ------------------
  |  Branch (945:13): [True: 366, False: 38]
  ------------------
  946|    366|            if (*p < 'a') { // upper cases
  ------------------
  |  Branch (946:17): [True: 0, False: 366]
  ------------------
  947|      0|                if (p != src.data() && !isupper(p[-1]) &&
  ------------------
  |  Branch (947:21): [True: 0, False: 0]
  |  Branch (947:40): [True: 0, False: 0]
  ------------------
  948|      0|                    butil::back_char(*name) != '_') {
  ------------------
  |  Branch (948:21): [True: 0, False: 0]
  ------------------
  949|      0|                    name->push_back('_');
  950|      0|                }
  951|      0|                name->push_back(*p - 'A' + 'a');
  952|    366|            } else {
  953|    366|                name->push_back(*p);
  954|    366|            }
  955|    366|        } else if (isdigit(*p)) {
  ------------------
  |  Branch (955:20): [True: 0, False: 38]
  ------------------
  956|      0|            name->push_back(*p);
  957|     38|        } else if (name->empty() || butil::back_char(*name) != '_') {
  ------------------
  |  Branch (957:20): [True: 0, False: 38]
  |  Branch (957:37): [True: 38, False: 0]
  ------------------
  958|     38|            name->push_back('_');
  959|     38|        }
  960|    404|    }
  961|     24|}
_ZN4bvar11get_var_mapERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
  119|     24|inline VarMapWithLock& get_var_map(const std::string& name) {
  120|     24|    VarMapWithLock& m = get_var_maps()[sub_map_index(name)];
  121|     24|    return m;
  122|     24|}
_ZN4bvar13sub_map_indexERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
  102|     24|inline size_t sub_map_index(const std::string& str) {
  103|     24|    if (str.empty()) {
  ------------------
  |  Branch (103:9): [True: 0, False: 24]
  ------------------
  104|      0|        return 0;
  105|      0|    }
  106|     24|    size_t h = 0;
  107|       |    // we're assume that str is ended with '\0', which may not be in general
  108|    428|    for (const char* p  = str.c_str(); *p; ++p) {
  ------------------
  |  Branch (108:40): [True: 404, False: 24]
  ------------------
  109|    404|        h = h * 5 + *p;
  110|    404|    }
  111|     24|    return h & (SUB_MAP_COUNT - 1);
  112|     24|}
_ZN4bvar12get_var_mapsEv:
  114|     24|inline VarMapWithLock* get_var_maps() {
  115|     24|    pthread_once(&s_var_maps_once, init_var_maps);
  116|     24|    return s_var_maps;
  117|     24|}
variable.cpp:_ZN4bvarL13init_var_mapsEv:
   96|      2|static void init_var_maps() {
   97|       |    // It's probably slow to initialize all sub maps, but rpc often expose 
   98|       |    // variables before user. So this should not be an issue to users.
   99|      2|    s_var_maps = new VarMapWithLock[SUB_MAP_COUNT];
  100|      2|}
_ZN4bvar14VarMapWithLockC2Ev:
   78|     64|    VarMapWithLock() {
   79|     64|        if (init(1024) != 0) {
  ------------------
  |  Branch (79:13): [True: 0, False: 64]
  ------------------
   80|      0|            LOG(WARNING) << "Fail to init VarMap";
  ------------------
  |  |  485|      0|    BAIDU_LAZY_STREAM(LOG_STREAM(severity), LOG_IS_ON(severity))
  |  |  ------------------
  |  |  |  |  472|      0|    !(condition) ? (void) 0 : ::logging::LogMessageVoidify() & (stream)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (472:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   81|      0|        }
   82|       |
   83|     64|        pthread_mutexattr_t attr;
   84|     64|        pthread_mutexattr_init(&attr);
   85|     64|        pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
   86|     64|        pthread_mutex_init(&mutex, &attr);
   87|     64|        pthread_mutexattr_destroy(&attr);
   88|     64|    }
_ZN4bvar8VarEntryC2Ev:
   67|     24|    VarEntry() : var(NULL), display_filter(DISPLAY_ON_ALL) {}

_ZN4bvar8VariableC2Ev:
  120|     26|    Variable() {}
_ZN4bvar8Variable6exposeERKN5butil16BasicStringPieceINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13DisplayFilterE:
  150|     24|               DisplayFilter display_filter = DISPLAY_ON_ALL) {
  151|     24|        return expose_impl(butil::StringPiece(), name, display_filter);
  152|     24|    }

_ZN9mcpack2pb12OutputStream4AreaC2ERKN5butil17LinkerInitializedE:
   47|      2|        Area(const butil::LinkerInitialized&) {}

LLVMFuzzerTestOneInput:
   26|    569|{
   27|    569|    if (size < kMinInputLength || size > kMaxInputLength){
  ------------------
  |  |   21|  1.13k|#define kMinInputLength 5
  ------------------
                  if (size < kMinInputLength || size > kMaxInputLength){
  ------------------
  |  |   22|    565|#define kMaxInputLength 1024
  ------------------
  |  Branch (27:9): [True: 4, False: 565]
  |  Branch (27:35): [True: 23, False: 542]
  ------------------
   28|     27|        return 1;
   29|     27|    }
   30|       |
   31|    542|    char *data_in = (char *)malloc(size + 1);
   32|    542|    memcpy(data_in, data, size);
   33|    542|    data_in[size] = '\0';
   34|       |
   35|       |
   36|    542|    std::string input(reinterpret_cast<const char*>(data), size);
   37|    542|    {
   38|    542|        brpc::URI uri;
   39|    542|        uri.SetHttpURL(input);
   40|    542|    }
   41|    542|    {
   42|    542|        butil::StringPiece host;
   43|    542|        butil::StringPiece vhost;
   44|    542|        butil::StringPiece port;
   45|    542|        butil::StringPiece app;
   46|    542|        butil::StringPiece stream_name;
   47|       |
   48|    542|        brpc::ParseRtmpURL(input, &host, &vhost, &port, &app, &stream_name);
   49|    542|    }
   50|       |
   51|    542|    return 0;
   52|    569|}

