| 669 | } |
| 670 | |
| 671 | void ProfilerManager::flush(bool updateTimer) |
| 672 | { |
| 673 | { // scope |
| 674 | AutoSetRestore<bool> pauseProfiler(&paused, true); |
| 675 | |
| 676 | auto pluginAccessor = activePlugins.accessor(); |
| 677 | |
| 678 | for (bool hasNext = pluginAccessor.getFirst(); hasNext;) |
| 679 | { |
| 680 | auto& pluginName = pluginAccessor.current()->first; |
| 681 | auto& plugin = pluginAccessor.current()->second; |
| 682 | |
| 683 | LogLocalStatus status("Profiler flush"); |
| 684 | plugin->flush(&status); |
| 685 | |
| 686 | hasNext = pluginAccessor.getNext(); |
| 687 | |
| 688 | if (!currentSession || plugin.get() != currentSession->plugin.get()) |
| 689 | activePlugins.remove(pluginName); |
| 690 | } |
| 691 | } |
| 692 | |
| 693 | if (updateTimer) |
| 694 | updateFlushTimer(); |
| 695 | } |
| 696 | |
| 697 | void ProfilerManager::updateFlushTimer(bool canStopTimer) |
| 698 | { |