What tools or programs can be used to log the execution flow of PHP code and identify performance bottlenecks?

When troubleshooting performance issues in PHP code, it is essential to log the execution flow and identify bottlenecks. Tools like Xdebug and Blackfire can be used to profile PHP code and pinpoint areas that need optimization. By analyzing the output generated by these tools, developers can make informed decisions on how to improve the performance of their code.

// Enable Xdebug profiler
xdebug_start_trace('/path/to/trace_file');

// Your PHP code here

// Stop Xdebug profiler
xdebug_stop_trace();