From 2c7a08b45e2ed6503617c8036f730b1fc8a673d0 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Fri, 30 May 2025 18:31:31 +0200 Subject: [PATCH] Add IOTrace debug-level messages --- IOPool/Input/src/RootTree.cc | 15 +++++++++++---- Utilities/StorageFactory/README.md | 2 -- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/IOPool/Input/src/RootTree.cc b/IOPool/Input/src/RootTree.cc index 2582d9bda9e97..80e579e5aad4c 100644 --- a/IOPool/Input/src/RootTree.cc +++ b/IOPool/Input/src/RootTree.cc @@ -1,11 +1,14 @@ -#include "RootTree.h" -#include "RootDelayedReader.h" -#include "RootPromptReadDelayedReader.h" +#include "DataFormats/Provenance/interface/BranchType.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Utilities/interface/EDMException.h" #include "FWCore/Utilities/interface/Exception.h" -#include "DataFormats/Provenance/interface/BranchType.h" #include "IOPool/Common/interface/getWrapperBasePtr.h" + #include "InputFile.h" +#include "RootTree.h" +#include "RootDelayedReader.h" +#include "RootPromptReadDelayedReader.h" + #include "TTree.h" #include "TTreeCache.h" #include "TLeaf.h" @@ -437,6 +440,8 @@ namespace edm { } inline void RootTree::getEntryUsingCache(TBranch* branch, EntryNumber entryNumber, TTreeCache* cache) const { + LogTrace("IOTrace").format( + "RootTree::getEntryUsingCache() begin for branch {} entry {}", branch->GetName(), entryNumber); try { auto guard = filePtr_->setCacheReadTemporarily(cache, tree_); branch->GetEntry(entryNumber); @@ -457,6 +462,8 @@ namespace edm { t.addContext(std::string("Reading branch ") + branch->GetName()); throw t; } + LogTrace("IOTrace").format( + "RootTree::getEntryUsingCache() end for branch {} entry {}", branch->GetName(), entryNumber); } bool RootTree::skipEntries(unsigned int& offset) { diff --git a/Utilities/StorageFactory/README.md b/Utilities/StorageFactory/README.md index 80f47073ba3d3..223ca20b2984c 100644 --- a/Utilities/StorageFactory/README.md +++ b/Utilities/StorageFactory/README.md @@ -51,8 +51,6 @@ There is an `edmStorageTracer.py` script for doing some analyses of the traces. The `StorageTracerProxy` also provides a way to correlate the trace entries with the rest of the framework via [MessageLogger](../../FWCore/MessageService/Readme.md) messages. These messages are issued with the DEBUG severity and `IOTrace` category. There are additional, higher-level messages as part of the `PoolSource`. To see these messages, compile the `Utilities/Storage` and `IOPool/Input` packages with `USER_CXXFLAGS="-DEDM_ML_DEBUG", and customize the MessageLogger configuration along ```py process.MessageLogger.cerr.threshold = "DEBUG" -process.MessageLogger.debugModules = ["*"] -process.MessageLogger.IOTrace = dict() ``` #### `StorageAddLatencyProxy`