Skip to content
Snippets Groups Projects
Commit 3b8c7328 authored by Florian Fischer's avatar Florian Fischer
Browse files

IoSleepStrategies: increment notifications stats in the AbstractIoSleepStrategy

The WaitfdSleepStrategy did not gather the amount of posted notifications
but the PipeSleepStrategy did.
Move the stats accounting into AbstractIoSleepStrategy so all derived
strategies track the amount of written notifications.
parent cf69f9cc
No related branches found
No related tags found
No related merge requests found
......@@ -271,6 +271,7 @@ class AbstractIoSleepStrategy : public Logger<LogSubsystem::SLEEP_S> {
const unsigned toWakeup = getSleeperCountToWakeup<callerEnvironment>(sleeping, count);
if (toWakeup) {
stats.incNotify();
stats.addNotifications(toWakeup);
if constexpr (callerEnvironment == CallerEnvironment::EMPER) {
writeNotificationsFromEmper(hint, toWakeup);
} else {
......
......@@ -14,7 +14,6 @@
#include "emper-common.h"
#include "sleep_strategy/AbstractIoSleepStrategy.hpp"
#include "sleep_strategy/AbstractWorkerSleepStrategy.hpp"
#include "sleep_strategy/Stats.hpp"
class Runtime;
......@@ -47,8 +46,6 @@ class PipeSleepStrategy : public AbstractWorkerSleepStrategy<PipeSleepStrategy>,
Pipe global;
void writeNotifications(emper::FiberHint hint, unsigned count) {
stats.addNotifications(count);
std::vector<void*> hints(count, hint);
ssize_t res = write(global.notifyFd, hints.data(), sizeof(void*) * hints.size());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment