Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider the following formatting changes to #12745 #269

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Framework/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 2024-02-22: Drop Tracy support

Tracy support never took off, so I am dropping it. This was mostly because people do not know about it and having a per process profile GUI was way unpractical. Moreover, needing an extra compile time flag meant one most likely did not have the support compiled in when needed.

I have therefore decided to replace it with signposts, which hopefully will see better adoption thanks
to the integration with Instruments on mac and the easy way they can be enabled dynamically.

We could then reintroduce Tracy support as a hook on top of signposts, if really needed.

# 2024-02-16: Improved Signposts.

In particular:
Expand Down
2 changes: 1 addition & 1 deletion Framework/Core/include/Framework/DataRelayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class DataRelayer
std::vector<PruneOp> mPruneOps;
size_t mMaxLanes;

TracyLockableN(std::recursive_mutex, mMutex, "data relayer mutex");
O2_LOCKABLE_NAMED(std::recursive_mutex, mMutex, "data relayer mutex");
};

} // namespace o2::framework
Expand Down
2 changes: 1 addition & 1 deletion Framework/Core/include/Framework/DataSender.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class DataSender
std::vector<bool> mPresent;
std::vector<bool> mPresentDefaults;

TracyLockableN(std::recursive_mutex, mMutex, "data relayer mutex");
O2_LOCKABLE_NAMED(std::recursive_mutex, mMutex, "data relayer mutex");
};

} // namespace o2::framework
Expand Down
1 change: 0 additions & 1 deletion Framework/Core/src/CommonMessageBackendsHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ struct CommonMessageBackendsHelpers {
static ServiceProcessingCallback sendCallback()
{
return [](ProcessingContext& ctx, void* service) {
ZoneScopedN("send message callback");
T* context = reinterpret_cast<T*>(service);
DataProcessor::doSend(ctx.services().get<DataSender>(), *context, ctx.services());
};
Expand Down
1 change: 0 additions & 1 deletion Framework/Core/src/CommonServices.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,6 @@ auto sendRelayerMetrics(ServiceRegistryRef registry, DataProcessingStats& stats)
stats.updateStats({static_cast<unsigned short>(static_cast<int>(ProcessingStatsId::AVAILABLE_MANAGED_SHM_BASE) + (runningWorkflow.shmSegmentId % 512)), DataProcessingStats::Op::SetIfPositive, freeMemory});
}

ZoneScopedN("send metrics");
auto device = registry.get<RawDeviceService>().device();

int64_t totalBytesIn = 0;
Expand Down
7 changes: 7 additions & 0 deletions Framework/Core/src/DataAllocator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <utility>

O2_DECLARE_DYNAMIC_LOG(stream_context);
O2_DECLARE_DYNAMIC_LOG(parts);

namespace o2::framework
{
Expand Down Expand Up @@ -129,6 +130,8 @@ void DataAllocator::addPartToContext(RouteIndex routeIndex, fair::mq::MessagePtr
o2::header::SerializationMethod serializationMethod)
{
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
Expand All @@ -150,6 +153,8 @@ 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);
O2_SIGNPOST_ID_FROM_POINTER(pid, parts, header->GetData());
O2_SIGNPOST_START(parts, pid, "parts", "addPartToContext %p", header->GetData());
mRegistry.get<StringContext>().addString(std::move(header), std::move(payload), routeIndex);
assert(payload.get() == nullptr);
}
Expand Down Expand Up @@ -206,6 +211,8 @@ void DataAllocator::adopt(const Output& spec, LifetimeHolder<TableBuilder>& tb)
auto& timingInfo = mRegistry.get<TimingInfo>();
RouteIndex routeIndex = matchDataHeader(spec, timingInfo.timeslice);
auto header = headerMessageFromOutput(spec, routeIndex, o2::header::gSerializationMethodArrow, 0);
O2_SIGNPOST_ID_FROM_POINTER(pid, parts, header->GetData());
O2_SIGNPOST_START(parts, pid, "parts", "adopt %p", header->GetData());
auto& context = mRegistry.get<ArrowContext>();

auto creator = [transport = context.proxy().getOutputTransport(routeIndex)](size_t s) -> std::unique_ptr<fair::mq::Message> {
Expand Down
Loading
Loading