Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-06-13 03:23:57

0001 #ifndef PerfTools_AllocMonitor_ThreadAllocInfo_h
0002 #define PerfTools_AllocMonitor_ThreadAllocInfo_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     PerfTools/AllocMonitor
0006 // Class  :     ThreadAllocInfo
0007 //
0008 /**\class ThreadAllocInfo ThreadAllocInfo.h "ThreadAllocInfo.h"
0009 
0010  Description: information about per module allocations
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Christopher Jones
0018 //         Created:  Fri, 10 May 2024 14:48:59 GMT
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 
0025 // forward declarations
0026 
0027 namespace edm::service::moduleAlloc {
0028   struct ThreadAllocInfo {
0029     size_t requested_ = 0;
0030     long long presentActual_ = 0;
0031     size_t maxActual_ = 0;
0032     long long minActual_ = 0;
0033     size_t maxSingleAlloc_ = 0;
0034     size_t nAllocations_ = 0;
0035     size_t nDeallocations_ = 0;
0036     bool active_ = false;
0037 
0038     void reset() {
0039       requested_ = 0;
0040       presentActual_ = 0;
0041       maxActual_ = 0;
0042       minActual_ = 0;
0043       maxSingleAlloc_ = 0;
0044       nAllocations_ = 0;
0045       nDeallocations_ = 0;
0046       active_ = true;
0047     }
0048 
0049     void deactivate() { active_ = false; }
0050   };
0051 }  // namespace edm::service::moduleAlloc
0052 #endif