]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common/operation: demangle names in dump
authorSamuel Just <sjust@redhat.com>
Fri, 30 Sep 2022 18:43:54 +0000 (18:43 +0000)
committerSamuel Just <sjust@redhat.com>
Sat, 1 Oct 2022 22:12:08 +0000 (15:12 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/common/operation.h

index 61ad05887f42d8c6a98b630ddbd231c35683009f..0bb5c8e9532a0622ce254a73d20630f268c7c6ed 100644 (file)
@@ -7,6 +7,7 @@
 #include <array>
 #include <set>
 #include <vector>
+#include <boost/core/demangle.hpp>
 #include <boost/intrusive/list.hpp>
 #include <boost/intrusive_ptr.hpp>
 #include <boost/smart_ptr/intrusive_ref_counter.hpp>
@@ -121,7 +122,10 @@ struct TimeEvent : Event<T> {
   } internal_backend;
 
   void dump(ceph::Formatter *f) const {
-    detail::dump_time_event(typeid(T).name(), internal_backend.timestamp, f);
+    auto demangled_name = boost::core::demangle(typeid(T).name());
+    detail::dump_time_event(
+      demangled_name.c_str(),
+      internal_backend.timestamp, f);
   }
 
   auto get_timestamp() const {
@@ -218,10 +222,12 @@ public:
     };
 
     void dump(ceph::Formatter *f) const {
-      detail::dump_blocking_event(typeid(T).name(),
-                                 internal_backend.timestamp,
-                                 internal_backend.blocker,
-                                 f);
+      auto demangled_name = boost::core::demangle(typeid(T).name());
+      detail::dump_blocking_event(
+       demangled_name.c_str(),
+       internal_backend.timestamp,
+       internal_backend.blocker,
+       f);
     }
   };