[xdebug-general] Does Xdebug profiler take into account that OS can block PHP process?

From: Дмитрий Хохлов <dmitry.hohlov[@]mail.ru>
Date: Fri, 6 May 2011 17:12:58 +0400

I get large times for some functions after profiling some script with
Xdebug. Functions with big times may differ from one call of the
script to other. The execution order, input data and all other things
are the same. But some functions some times still get big times. It
looks random.

One kind of this issue is related with files reading. When I read file
for the first time (e.g. by calling function "file") it takes
relatively long time. The next time I call this script this function
executes much faster. I'm sure this is because OS caches this file in
the RAM. But what differs in this two calls? The time of executing
(interpreting) my PHP script? No. It is the time of reading the file
by the OS. The PHP process was blocked for that time and do nothing.

But such blockings can occur not only when script reads or writes a
file. At least file operations are requested by the script. In some
cases we will really whant to include blocking time in function
execution time. But blockings also occurs (and this is much worse)
when OS switches to another process (we are all have multitask OSes,
aren't we) and when hardware interrupt occurs.

So, my questions are:
1. Does Xdebug know about such blockings (I'm sure it must)?
2. Does Xdebug really include time of wating for disk I/O (file
reading/writing) into function execution times?
3. Does Xdebug include time of other processes and hardware interrupt
handlers execution into function execution times?
4. Does Xdebug include time spent for other kind of PHP process
blockings (if they exists, I don't know exactly) into function
execution times?

-- 
Best regards,
Dmitry Khokhlov (dmitry.hohlov[@]mail.ru)
Received on Fri May 06 2011 - 14:48:26 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST