0

I am using gperftools to profile my C++ code, and the largest node is __GI___poll. It's being called by low level Qt and OpenCL code (mostly Qt), so it's several steps removed from my own code. My guess is that this is just a general-use "wait on event" function, but my searching efforts came up dry.

What is this function, and what could it say about my code that it's spending so much time here?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241

1 Answers1

0

__GI___poll is simply the call to poll() system call.

Why is this function in your code?

The QCoreApplication::processEvents() on linux calls QEventDispatcherGlib::::processEvents() which in turn calls glib's g_main_context_iteration(). This function returns true if events were dispatched otherwise it can block till events are dispatched. This can mean that you are manually spinning the event loop which is not doing much but waiting for events and you may have a side thread running in which actual stuff is happening.

Waqar
  • 8,558
  • 4
  • 35
  • 43