Skip to content

Commit

Permalink
Print debugging information about stack consumption during stack oper…
Browse files Browse the repository at this point in the history
…ation.
  • Loading branch information
aentinger committed May 14, 2024
1 parent e83a276 commit 15b2483
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/arch/posix/eventloop_mbed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,16 @@ UA_EventLoopPOSIX_pollFDs(UA_EventLoopPOSIX *el, UA_DateTime listenTimeout) {
/* Event signaled for the fd? */
short event = rfd->listenEvents;

UA_LOG_INFO(el->eventLoop.logger, UA_LOGCATEGORY_EVENTLOOP,
"Processing event %u on fd %u", (unsigned)event,
(unsigned)rfd->fd);
extern rtos::Thread opc_ua_server_thread;

UA_LOG_INFO(el->eventLoop.logger,
UA_LOGCATEGORY_EVENTLOOP,
"Processing event %u on fd %u (stack: size = %d, free = %d, used = %d)",
(unsigned)event,
(unsigned)rfd->fd,
opc_ua_server_thread.stack_size(),
opc_ua_server_thread.free_stack(),
opc_ua_server_thread.used_stack());

/* Call the EventSource callback */
rfd->eventSourceCB(rfd->es, rfd, event);
Expand Down

0 comments on commit 15b2483

Please sign in to comment.