Skip to content
Snippets Groups Projects

Add new argument to info fibres to enable grouping by line/stack

Merged Mohammed Bilal Akhtar requested to merge mbakhtar/KOS:fibre-grouping-initial into master
Files
4
+ 16
8
@@ -66,12 +66,16 @@ inline void BasePoller::pollLoop(T& This, bool pollerFibre) {
}
inline int PollerThread::blockingPoll() {
int evcnt;
for (;;) {
#if __FreeBSD__
int evcnt = kevent(pollFD, nullptr, 0, events, maxPoll, nullptr); // blocking
evcnt = kevent(pollFD, nullptr, 0, events, maxPoll, nullptr); // blocking
#else // __linux__ below
int evcnt = epoll_wait(pollFD, events, maxPoll, -1); // blocking
evcnt = epoll_wait(pollFD, events, maxPoll, -1); // blocking
#endif
if (evcnt < 0) { GENASSERT1(errno == EINTR, errno); } // gracefully handle EINTR
if (evcnt > 0) break;
if (evcnt < 0) { GENASSERT1(errno == EINTR, errno); } // gracefully handle EINTR
}
if (paused) pauseSem.P();
return evcnt;
}
@@ -116,14 +120,18 @@ void Poller::stop() {
}
inline int Poller::blockingPoll() {
_lfEventEngine->blockPollFD(pollFD);
int evcnt;
for (;;) {
#if __FreeBSD__
static const timespec ts = Time::zero();
int evcnt = kevent(pollFD, nullptr, 0, events, maxPoll, &ts);
static const timespec ts = Time::zero();
evcnt = kevent(pollFD, nullptr, 0, events, maxPoll, &ts);
#else // __linux__ below
int evcnt = epoll_wait(pollFD, events, maxPoll, 0);
evcnt = epoll_wait(pollFD, events, maxPoll, 0);
#endif
if (evcnt < 0) { GENASSERT1(errno == EINTR, errno); } // gracefully handle EINTR
if (evcnt > 0) break;
if (evcnt < 0) { GENASSERT1(errno == EINTR, errno); } // gracefully handle EINTR
_lfEventEngine->blockPollFD(pollFD);
}
if (paused) pauseSem.P();
return evcnt;
}
Loading