diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-10-02 00:16:01 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-10-02 00:21:11 +0300 |
commit | edd1164575feefda103c73119a98cbd994e53141 (patch) | |
tree | ae69e078944ba7f27ffbce6209e4eef6e17fca88 /intern/cycles/render/scene.h | |
parent | 342bdbc1769fa31c734d7c38ab67be3428c9d234 (diff) |
Cycles: add time statistics to scene update
Gathers information for time spent in the various managers or object (Film, Camera, etc.) being updated in Scene::device_update.
The stats include the total time spent in the device_update methods as well as time spent in subroutines (e.g. bvh build, displacement, etc.).
This does not qualify as a full blown profiler, but is useful to identify potential bottleneck areas.
The stats can be enabled and printed by passing `--cycles-print-stats` on the command line to Cycles, or `-- --cycles-print-stats` to Blender.
Reviewed By: brecht
Maniphest Tasks: T79174
Differential Revision: https://developer.blender.org/D8596
Diffstat (limited to 'intern/cycles/render/scene.h')
-rw-r--r-- | intern/cycles/render/scene.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h index 0e32a70952b..cc2ef8da589 100644 --- a/intern/cycles/render/scene.h +++ b/intern/cycles/render/scene.h @@ -59,6 +59,7 @@ class Progress; class BakeManager; class BakeData; class RenderStats; +class SceneUpdateStats; class Volume; /* Scene Device Data */ @@ -260,6 +261,9 @@ class Scene : public NodeOwner { /* mutex must be locked manually by callers */ thread_mutex mutex; + /* scene update statistics */ + SceneUpdateStats *update_stats; + Scene(const SceneParams ¶ms, Device *device); ~Scene(); @@ -280,6 +284,8 @@ class Scene : public NodeOwner { void collect_statistics(RenderStats *stats); + void enable_update_stats(); + bool update(Progress &progress, bool &kernel_switch_needed); /* This function is used to create a node of a specified type instead of |