diff --git a/Framework/Core/src/DataAllocator.cxx b/Framework/Core/src/DataAllocator.cxx index fe38283d5e2de..0bf0f86f812ec 100644 --- a/Framework/Core/src/DataAllocator.cxx +++ b/Framework/Core/src/DataAllocator.cxx @@ -21,6 +21,8 @@ #include "Framework/DeviceSpec.h" #include "Framework/StreamContext.h" #include "Framework/Signpost.h" +#include "Headers/DataHeader.h" +#include "Headers/DataHeaderHelpers.h" #include "Headers/Stack.h" #include @@ -131,13 +133,13 @@ void DataAllocator::addPartToContext(RouteIndex routeIndex, fair::mq::MessagePtr { auto headerMessage = headerMessageFromOutput(spec, routeIndex, serializationMethod, 0); O2_SIGNPOST_ID_FROM_POINTER(pid, parts, headerMessage->GetData()); - O2_SIGNPOST_START(parts, pid, "parts", "addPartToContext %p", headerMessage->GetData()); - // FIXME: this is kind of ugly, we know that we can change the content of the // header message because we have just created it, but the API declares it const const DataHeader* cdh = o2::header::get(headerMessage->GetData()); auto* dh = const_cast(cdh); dh->payloadSize = payloadMessage->GetSize(); + O2_SIGNPOST_START(parts, pid, "parts", "addPartToContext %{public}s@%p %" PRIu64, + cdh ? fmt::format("{}/{}/{}", cdh->dataOrigin, cdh->dataDescription, cdh->subSpecification).c_str() : "unknown", headerMessage->GetData(), dh->payloadSize); auto& context = mRegistry.get(); // make_scoped creates the context object inside of a scope handler, since it goes out of // scope immediately, the created object is scheduled and can be directly sent if the context @@ -153,8 +155,10 @@ void DataAllocator::adopt(const Output& spec, std::string* ptr) // the correct payload size is set later when sending the // StringContext, see DataProcessor::doSend auto header = headerMessageFromOutput(spec, routeIndex, o2::header::gSerializationMethodNone, 0); + const DataHeader* cdh = o2::header::get(header->GetData()); O2_SIGNPOST_ID_FROM_POINTER(pid, parts, header->GetData()); - O2_SIGNPOST_START(parts, pid, "parts", "addPartToContext %p", header->GetData()); + O2_SIGNPOST_START(parts, pid, "parts", "addPartToContext %{public}s@%p %" PRIu64, + cdh ? fmt::format("{}/{}/{}", cdh->dataOrigin, cdh->dataDescription, cdh->subSpecification).c_str() : "unknown", header->GetData(), cdh->payloadSize); mRegistry.get().addString(std::move(header), std::move(payload), routeIndex); assert(payload.get() == nullptr); } @@ -211,8 +215,10 @@ void DataAllocator::adopt(const Output& spec, LifetimeHolder& tb) auto& timingInfo = mRegistry.get(); RouteIndex routeIndex = matchDataHeader(spec, timingInfo.timeslice); auto header = headerMessageFromOutput(spec, routeIndex, o2::header::gSerializationMethodArrow, 0); + const DataHeader* cdh = o2::header::get(header->GetData()); O2_SIGNPOST_ID_FROM_POINTER(pid, parts, header->GetData()); - O2_SIGNPOST_START(parts, pid, "parts", "adopt %p", header->GetData()); + O2_SIGNPOST_START(parts, pid, "parts", "adopt %{public}s@%p %" PRIu64, + cdh ? fmt::format("{}/{}/{}", cdh->dataOrigin, cdh->dataDescription, cdh->subSpecification).c_str() : "unknown", header->GetData(), cdh->payloadSize); auto& context = mRegistry.get(); auto creator = [transport = context.proxy().getOutputTransport(routeIndex)](size_t s) -> std::unique_ptr {