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

Method dump

src/msg/async/AsyncMessenger.cc:504–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504void AsyncMessenger::dump(
505 Formatter* f, std::function<bool(const std::string&)> filter) const {
506 const bool tcp_info = filter("tcp_info");
507 std::lock_guard l{lock};
508 f->dump_unsigned("nonce", nonce);
509 f->open_object_section("my_name");
510 my_name.dump(f);
511 f->close_section(); // my_name
512 f->open_object_section("my_addrs");
513 my_addrs->dump(f);
514 f->close_section(); // my_addrs
515
516 if (filter("listen_sockets")) {
517 f->open_array_section("listen_sockets");
518 for (const auto& proc : processors) {
519 for (const auto& sock : proc->listen_sockets) {
520 f->open_object_section("socket");
521 f->dump_int("socket_fd", sock.fd());
522
523 f->dump_int("worker_id", proc->worker ? proc->worker->id : -1);
524 f->close_section(); // socket
525 }
526 }
527 f->close_section(); // listen_sockets
528 }
529
530 f->open_object_section("dispatch_queue");
531 f->dump_int("length", get_dispatch_queue_len());
532 utime_t dispatch_queue_max_age;
533 dispatch_queue_max_age.set_from_double(
534 get_dispatch_queue_max_age(ceph_clock_now()));
535 f->dump_string("max_age_ago", utimespan_str(dispatch_queue_max_age));
536 f->close_section(); // dispatch_queue
537
538 f->dump_int("connections_count", conns.size());
539
540 if (filter("connections")) {
541 f->open_array_section("connections");
542 for (const auto& [e, c] : conns) {
543 f->open_object_section("connection");
544 e.dump(f);
545 c->dump(f, tcp_info);
546 f->close_section(); // connection
547 }
548 f->close_section(); // connections
549 }
550
551 if (filter("anon_conns")) {
552 f->open_array_section("anon_conns");
553 for (const auto& c : anon_conns) {
554 c->dump(f, tcp_info);
555 }
556 f->close_section(); // anon_conns
557 }
558
559 if (filter("accepting_conns")) {
560 f->open_array_section("accepting_conns");
561 for (const auto& c : accepting_conns) {

Callers 1

callMethod · 0.45

Calls 12

filterFunction · 0.85
ceph_clock_nowFunction · 0.85
utimespan_strFunction · 0.85
set_from_doubleMethod · 0.80
dump_unsignedMethod · 0.45
open_object_sectionMethod · 0.45
close_sectionMethod · 0.45
open_array_sectionMethod · 0.45
dump_intMethod · 0.45
fdMethod · 0.45
dump_stringMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected