From cc199edf54164e6e2247e093d072719e93f37713 Mon Sep 17 00:00:00 2001 From: Roy Stogner Date: Thu, 22 Jan 2026 15:55:13 -0600 Subject: [PATCH] Remove remaining LOG_SCOPE(dof_indices) We decided to stop putting dof_indices in the PerfLog in PR #4146 last year, but apparently not only did we miss some dof_indices-esque functions, we let a LOG_SCOPE remain in dof_indices itself when refactoring! --- include/base/dof_map.h | 7 ++++++- src/base/dof_map.C | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/base/dof_map.h b/include/base/dof_map.h index f157f8a169a..6a61f304c44 100644 --- a/include/base/dof_map.h +++ b/include/base/dof_map.h @@ -2785,7 +2785,12 @@ void DofMap::dof_indices (const Elem * const elem, // We now allow elem==nullptr to request just SCALAR dofs // libmesh_assert(elem); - LOG_SCOPE("dof_indices()", "DofMap"); + // dof_indices() is a relatively light-weight function that is + // called millions of times in normal codes. Therefore, it is not a + // good candidate for logging, since the cost of the logging code + // itself is roughly on par with the time required to call + // dof_indices(). + // LOG_SCOPE("dof_indices()", "DofMap"); // Clear the DOF indices vector di.clear(); diff --git a/src/base/dof_map.C b/src/base/dof_map.C index a988d15bd08..56d284dbc63 100644 --- a/src/base/dof_map.C +++ b/src/base/dof_map.C @@ -2495,7 +2495,10 @@ void DofMap::_node_dof_indices (const Elem & elem, // function with a million arguments and hoping the compiler inlines // it properly into one of our most highly trafficked functions. - LOG_SCOPE("_node_dof_indices()", "DofMap"); + // dof_indices() is a relatively light-weight function; the cost of + // the logging code itself is roughly on par with the time required + // to call dof_indices(). + // LOG_SCOPE("_node_dof_indices()", "DofMap"); const unsigned int sys_num = this->sys_number(); const auto [vg, vig] = @@ -2609,7 +2612,10 @@ void DofMap::SCALAR_dof_indices (std::vector & di, #endif ) const { - LOG_SCOPE("SCALAR_dof_indices()", "DofMap"); + // dof_indices() is a relatively light-weight function; the cost of + // the logging code itself is roughly on par with the time required + // to call dof_indices(). + // LOG_SCOPE("SCALAR_dof_indices()", "DofMap"); libmesh_assert(this->variable(vn).type().family == SCALAR); @@ -2690,7 +2696,10 @@ void DofMap::old_dof_indices (const Elem * const elem, std::vector & di, const unsigned int vn) const { - LOG_SCOPE("old_dof_indices()", "DofMap"); + // dof_indices() is a relatively light-weight function; the cost of + // the logging code itself is roughly on par with the time required + // to call dof_indices(). + // LOG_SCOPE("old_dof_indices()", "DofMap"); libmesh_assert(elem);