From: Augustin Degomme Date: Tue, 6 Apr 2021 18:06:47 +0000 (+0200) Subject: change the way we display leak types, skipping demangling X-Git-Tag: v3.28~455^2~127 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b0ae92931a70bcd5e513d9f3f4400d2d3cbca196 change the way we display leak types, skipping demangling --- diff --git a/src/smpi/internals/smpi_utils.cpp b/src/smpi/internals/smpi_utils.cpp index 0f6de95b78..05cce1b430 100644 --- a/src/smpi/internals/smpi_utils.cpp +++ b/src/smpi/internals/smpi_utils.cpp @@ -153,7 +153,7 @@ void print_memory_analysis() handles.resize(max); for (const auto& p : handles) { if (xbt_log_no_loc) { - XBT_WARN("Leaked handle of type %s", boost::core::demangle(typeid(*p.second).name()).c_str()); + XBT_WARN("Leaked handle of type %s", p.second->name().c_str()); } else { XBT_WARN("Leaked handle of type %s at %p", p.second->name().c_str(), p.second); } diff --git a/teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.tesh b/teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.tesh index becf06c8ff..92cc86b339 100644 --- a/teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.tesh +++ b/teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.tesh @@ -24,16 +24,16 @@ $ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/../../../smpi_script/bin/smpirun -map -ho > Running smpirun with -wrapper "valgrind --leak-check=full" can provide more information > This can be done automatically by setting --cfg=smpi/auto-shared-malloc-thresh to the minimum size wanted size (this can alter execution if data content is necessary) > [0.023768] [smpi_utils/INFO] Probable memory leaks in your code: SMPI detected 32 unfreed MPI handles : display types and addresses (n max) with --cfg=smpi/list-leaks:n. -> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group -> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group -> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group -> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group -> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group -> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm +> [0.023768] [smpi_utils/WARNING] Leaked handle of type MPI_Group +> [0.023768] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.023768] [smpi_utils/WARNING] Leaked handle of type MPI_Group +> [0.023768] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.023768] [smpi_utils/WARNING] Leaked handle of type MPI_Group +> [0.023768] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.023768] [smpi_utils/WARNING] Leaked handle of type MPI_Group +> [0.023768] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.023768] [smpi_utils/WARNING] Leaked handle of type MPI_Group +> [0.023768] [smpi_utils/WARNING] Leaked handle of type MPI_Comm > [0.023768] [smpi_utils/WARNING] (more handle leaks hidden as you wanted to see only 10 of them) > [0.023768] [smpi_utils/INFO] Memory Usage: Simulated application allocated 2048 bytes during its lifetime through malloc/calloc calls. diff --git a/teshsuite/smpi/coll-allreduce-with-leaks/mc-coll-allreduce-with-leaks.tesh b/teshsuite/smpi/coll-allreduce-with-leaks/mc-coll-allreduce-with-leaks.tesh index b2d238bc7f..3a93258773 100644 --- a/teshsuite/smpi/coll-allreduce-with-leaks/mc-coll-allreduce-with-leaks.tesh +++ b/teshsuite/smpi/coll-allreduce-with-leaks/mc-coll-allreduce-with-leaks.tesh @@ -9,14 +9,14 @@ $ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/../../../smpi_script/bin/smpirun -wrapper > [0.000000] [mc_safety/INFO] Check a safety property. Reduction is: dpor. > [0.000000] [smpi_utils/INFO] Probable memory leaks in your code: SMPI detected 8 unfreed MPI handles : display types and addresses (n max) with --cfg=smpi/list-leaks:n. > Running smpirun with -wrapper "valgrind --leak-check=full" can provide more information -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Group +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Group +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Group +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Group > [0.000000] [smpi_utils/INFO] Memory Usage: Simulated application allocated 128 bytes during its lifetime through malloc/calloc calls. > Largest allocation at once from a single process was 16 bytes, at sysdep.h:59. It was called 8 times during the whole simulation. > If this is too much, consider sharing allocations for computation buffers. @@ -24,14 +24,14 @@ $ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/../../../smpi_script/bin/smpirun -wrapper > > [0.000000] [smpi_utils/INFO] Probable memory leaks in your code: SMPI detected 8 unfreed MPI handles : display types and addresses (n max) with --cfg=smpi/list-leaks:n. > Running smpirun with -wrapper "valgrind --leak-check=full" can provide more information -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm -> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Group +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Group +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Group +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Comm +> [0.000000] [smpi_utils/WARNING] Leaked handle of type MPI_Group > [0.000000] [smpi_utils/INFO] Memory Usage: Simulated application allocated 128 bytes during its lifetime through malloc/calloc calls. > Largest allocation at once from a single process was 16 bytes, at sysdep.h:59. It was called 8 times during the whole simulation. > If this is too much, consider sharing allocations for computation buffers.