Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion include/base/dof_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
15 changes: 12 additions & 3 deletions src/base/dof_map.C
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down Expand Up @@ -2609,7 +2612,10 @@ void DofMap::SCALAR_dof_indices (std::vector<dof_id_type> & 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);

Expand Down Expand Up @@ -2690,7 +2696,10 @@ void DofMap::old_dof_indices (const Elem * const elem,
std::vector<dof_id_type> & 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);

Expand Down