Blender V5.0
depsgraph_debug.cc File Reference

Go to the source code of this file.

Functions

void DEG_debug_flags_set (Depsgraph *depsgraph, int flags)
int DEG_debug_flags_get (const Depsgraph *depsgraph)
void DEG_debug_name_set (Depsgraph *depsgraph, const char *name)
const char * DEG_debug_name_get (Depsgraph *depsgraph)
bool DEG_debug_compare (const Depsgraph *graph1, const Depsgraph *graph2)
bool DEG_debug_graph_relations_validate (Depsgraph *graph, Main *bmain, Scene *scene, ViewLayer *view_layer)
bool DEG_debug_consistency_check (Depsgraph *graph)
void DEG_stats_simple (const Depsgraph *graph, size_t *r_outer, size_t *r_operations, size_t *r_relations)
static std::string depsgraph_name_for_logging (Depsgraph *depsgraph)
void DEG_debug_print_begin (Depsgraph *depsgraph)
void DEG_debug_print_eval (Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address)
void DEG_debug_print_eval_subdata (Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address, const char *subdata_comment, const char *subdata_name, const void *subdata_address)
void DEG_debug_print_eval_subdata_index (Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address, const char *subdata_comment, const char *subdata_name, const void *subdata_address, const int subdata_index)
void DEG_debug_print_eval_parent_typed (Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address, const char *parent_comment, const char *parent_name, const void *parent_address)
void DEG_debug_print_eval_time (Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address, float time)
static std::string stringify_append_bit (const std::string &str, IDRecalcFlag tag)
std::string DEG_stringify_recalc_flags (uint flags)

Detailed Description

Implementation of tools for debugging the depsgraph

Definition in file depsgraph_debug.cc.

Function Documentation

◆ DEG_debug_compare()

bool DEG_debug_compare ( const Depsgraph * graph1,
const Depsgraph * graph2 )

◆ DEG_debug_consistency_check()

◆ DEG_debug_flags_get()

◆ DEG_debug_flags_set()

void DEG_debug_flags_set ( Depsgraph * depsgraph,
int flags )

◆ DEG_debug_graph_relations_validate()

bool DEG_debug_graph_relations_validate ( Depsgraph * graph,
Main * bmain,
Scene * scene,
ViewLayer * view_layer )

Check that dependencies in the graph are really up to date.

Definition at line 73 of file depsgraph_debug.cc.

References BLI_assert_msg, DEG_debug_compare(), DEG_get_mode(), DEG_graph_build_from_view_layer(), DEG_graph_free(), and DEG_graph_new().

◆ DEG_debug_name_get()

const char * DEG_debug_name_get ( Depsgraph * depsgraph)

◆ DEG_debug_name_set()

◆ DEG_debug_print_begin()

void DEG_debug_print_begin ( Depsgraph * depsgraph)

Definition at line 235 of file depsgraph_debug.cc.

References depsgraph, and depsgraph_name_for_logging().

◆ DEG_debug_print_eval()

◆ DEG_debug_print_eval_parent_typed()

void DEG_debug_print_eval_parent_typed ( Depsgraph * depsgraph,
const char * function_name,
const char * object_name,
const void * object_address,
const char * parent_comment,
const char * parent_name,
const void * parent_address )

◆ DEG_debug_print_eval_subdata()

void DEG_debug_print_eval_subdata ( Depsgraph * depsgraph,
const char * function_name,
const char * object_name,
const void * object_address,
const char * subdata_comment,
const char * subdata_name,
const void * subdata_address )

◆ DEG_debug_print_eval_subdata_index()

void DEG_debug_print_eval_subdata_index ( Depsgraph * depsgraph,
const char * function_name,
const char * object_name,
const void * object_address,
const char * subdata_comment,
const char * subdata_name,
const void * subdata_address,
const int subdata_index )

◆ DEG_debug_print_eval_time()

void DEG_debug_print_eval_time ( Depsgraph * depsgraph,
const char * function_name,
const char * object_name,
const void * object_address,
float time )

◆ DEG_stats_simple()

void DEG_stats_simple ( const Depsgraph * graph,
size_t * r_outer,
size_t * r_operations,
size_t * r_relations )

Obtain simple statistics about the complexity of the depsgraph.

Parameters
[out]r_outerThe number of outer nodes in the graph.
[out]r_operationsThe number of operation nodes in the graph.
[out]r_relationsThe number of relations between (executable) nodes in the graph.

Definition at line 183 of file depsgraph_debug.cc.

References blender::deg::IDNode::components, blender::deg::Depsgraph::find_time_source(), blender::deg::Depsgraph::id_nodes, blender::deg::Node::inlinks, blender::deg::Depsgraph::operations, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().

◆ DEG_stringify_recalc_flags()

std::string DEG_stringify_recalc_flags ( unsigned int flags)

Convert bit-flag representation of recalculation flags to string that consists of human-readable names of recalculation bits that are set in the given mask.

If flags == 0 the result is "NONE".

Example: DEG_stringify_recalc_flags(ID_RECALC_GEOMETRY | ID_RECALC_SHADING) -> "GEOMETRY, SHADING".

Definition at line 377 of file depsgraph_debug.cc.

References bitscan_forward_clear_uint(), ID_RECALC_PSYS_ALL, result, and stringify_append_bit().

◆ depsgraph_name_for_logging()

std::string depsgraph_name_for_logging ( Depsgraph * depsgraph)
static

◆ stringify_append_bit()

std::string stringify_append_bit ( const std::string & str,
IDRecalcFlag tag )
static

Definition at line 363 of file depsgraph_debug.cc.

References DEG_update_tag_as_string(), result, and str.

Referenced by DEG_stringify_recalc_flags().