Skip to content

Commit 321a086

Browse files
authored
Merge febf1f5 into sapling-pr-archive-ktf
2 parents 3279747 + febf1f5 commit 321a086

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Framework/AnalysisSupport/src/DataInputDirector.cxx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "Framework/RootArrowFilesystem.h"
1616
#include "Framework/AnalysisDataModelHelpers.h"
1717
#include "Framework/Output.h"
18+
#include "Framework/Signpost.h"
1819
#include "Headers/DataHeader.h"
1920
#include "Framework/TableTreeHelpers.h"
2021
#include "Monitoring/Tags.h"
@@ -41,6 +42,9 @@
4142
#include <utility>
4243
#endif
4344

45+
#include <dlfcn.h>
46+
O2_DECLARE_DYNAMIC_LOG(reader_memory_dump);
47+
4448
namespace o2::framework
4549
{
4650
using namespace rapidjson;
@@ -462,6 +466,16 @@ bool DataInputDescriptor::readTree(DataAllocator& outputs, header::DataHeader dh
462466

463467
mIOTime += (uv_hrtime() - ioStart);
464468

469+
O2_SIGNPOST_ACTION(reader_memory_dump, [](void*) {
470+
void (*dump_)(const char*);
471+
if (void* sym = dlsym(nullptr, "igprof_dump_now")) {
472+
dump_ = __extension__(void (*)(const char*)) sym;
473+
if (dump_) {
474+
std::string filename = fmt::format("reader-memory-dump-{}.gz", uv_hrtime());
475+
}
476+
}
477+
});
478+
465479
return true;
466480
}
467481

0 commit comments

Comments
 (0)