Skip to content

FEHelpers addStandardSamplingEnergies : Try to avoid repeated allocations .

FEHelpers addStandardSamplingEnergies : Try to avoid repeated allocations for creating string and Accessors

e.g things like the following (heaptrack)

 2246411 temporary allocations of 2599383 allocations in total (86.42%) from     
void std::__cxx11::basic_string<>::_M_construct<>(char*, char*, std::forward_iterator_tag)
  at /cvmfs/sft.cern.ch/lcg/releases/gcc/11.2.0-8a51a/x86_64-centos7/include/c++/11.2.0/bits/basic_string.tcc:219
  in /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc11-opt/2023-02-18T2101/Athena/23.0.17/InstallArea/x86_64-centos7-gcc11-opt/lib/libAthContainers.so
1275596 temporary allocations of 1275624 allocations in total (100.00%) from:   
    void std::__cxx11::basic_string<>::_M_construct_aux<>(char*, char*, std::__false_type)
      at /cvmfs/sft.cern.ch/lcg/releases/gcc/11.2.0-8a51a/x86_64-centos7/include/c++/11.2.0/bits/basic_string.h:255
      in /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc11-opt/2023-02-18T2101/Athena/23.0.17/InstallArea/x86_64-centos7-gcc11-opt/lib/libAthContainers.so
    void std::__cxx11::basic_string<>::_M_construct<>(char*, char*)             
      at /cvmfs/sft.cern.ch/lcg/releases/gcc/11.2.0-8a51a/x86_64-centos7/include/c++/11.2.0/bits/basic_string.h:274
    std::__cxx11::basic_string<>::basic_string(std::__cxx11::basic_string<> const&)
      at /cvmfs/sft.cern.ch/lcg/releases/gcc/11.2.0-8a51a/x86_64-centos7/include/c++/11.2.0/bits/basic_string.h:459
    SG::AuxTypeRegistry::findAuxID(std::__cxx11::basic_string<> const&, std::__cxx11::basic_string<> const&, SG::AuxTypeRegistry::Flags, std::type_info const&, SG::IAuxTypeVectorFactory* (SG::AuxTypeRegistry::*)() const)
      at /build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthContainers/Root/AuxTypeRegistry.cxx:471
    unsigned long SG::AuxTypeRegistry::getAuxID<>(std::__cxx11::basic_string<> const&, std::__cxx11::basic_string<> const&, SG::AuxTypeRegistry::Flags)
      at /build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthContainers/AthContainers/AuxTypeRegistry.icc:31
      in /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc11-opt/2023-02-18T2101/Athena/23.0.17/InstallArea/x86_64-centos7-gcc11-opt/lib/libxAODPFlow.so
    SG::ConstAuxElement::ConstAccessor<>::ConstAccessor(std::__cxx11::basic_string<> const&, std::__cxx11::basic_string<> const&, SG::AuxTypeRegistry::Flags)
      at /build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthContainers/AthContainers/AuxElement.icc:482
    SG::ConstAuxElement::ConstAccessor<>::ConstAccessor(std::__cxx11::basic_string<> const&)
      at /build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthContainers/AthContainers/AuxElement.icc:448
    SG::AuxElement::ConstAccessor<>::ConstAccessor(std::__cxx11::basic_string<> const&)
      at /build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthContainers/AthContainers/AuxElement.h:954
    SG::AuxElement::Accessor<>::Accessor(std::__cxx11::basic_string<> const&)   
      at /build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthContainers/AthContainers/AuxElement.icc:944
    FEHelpers::FillNeutralFlowElements::addSamplingEnergy(CaloSampling::CaloSample const&, std::__cxx11::basic_string<> const&, xAOD::CaloCluster_v1 const&, xAOD::FlowElement_v1&)
      at /build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODPFlow/Root/FEHelpers.cxx:208
    FEHelpers::FillNeutralFlowElements::addStandardSamplingEnergies(xAOD::FlowElement_v1&, xAOD::CaloCluster_v1 const&)
      at /build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODPFlow/Root/FEHelpers.cxx:279
      in /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc11-opt/2023-02-18T2101/Athena/23.0.17/InstallArea/x86_64-centos7-gcc11-opt/lib/libxAODPFlow.so
    PFNeutralFlowElementCreatorAlgorithm::createNeutralFlowElement(eflowCaloObject const&, DataVector<>*) const
      at /build/atnight/localbuilds/nightlies/Athena/master/athena/Reconstruction/eflowRec/src/PFNeutralFlowElementCreatorAlgorithm.cxx:123

Merge request reports